2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-07-01 11:20:41 +00:00

Format Code and Add Format Checks to CI (#643)

* Remove unused lib/generated/i18n.dart

* Use `fvm dart format .`

* Add contributing guidelines

* Enforce dart format

* Add `dart format off` directive to generated files
This commit is contained in:
Ben Hagen
2025-06-24 01:55:01 +02:00
committed by GitHub
parent e9db6532e4
commit 4444884afa
100 changed files with 5332 additions and 5592 deletions

View File

@ -10,23 +10,20 @@ import "package:inventree/user_profile.dart";
import "setup.dart";
void main() {
setupTestEnv();
setUp(() async {
await setupServerProfile(select: true);
// Ensure the profile is selected
assert(! await UserProfileDBManager().selectProfileByName("Missing Profile"));
assert(
!await UserProfileDBManager().selectProfileByName("Missing Profile"),
);
assert(await UserProfileDBManager().selectProfileByName(testServerName));
});
group("Login Tests:", () {
test("Disconnected", () async {
// Test that calling disconnect() does the right thing
var api = InvenTreeAPI();
@ -37,7 +34,6 @@ void main() {
expect(api.isConnected(), equals(false));
expect(api.isConnecting(), equals(false));
expect(api.hasToken, equals(false));
});
test("Login Failure", () async {
@ -66,7 +62,6 @@ void main() {
debugContains("Token request failed: STATUS 401");
debugContains("showSnackIcon: 'Not Connected'");
});
test("Bad Token", () async {
@ -125,6 +120,5 @@ void main() {
debugContains("Received token from server");
debugContains("showSnackIcon: 'Connected to Server'");
});
});
}
}