2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-04-28 05:26:47 +00:00

Server connection check passes now

This commit is contained in:
Oliver Walters 2022-05-22 08:27:01 +10:00
parent f13b04d029
commit fc911ea5b5

View File

@ -13,6 +13,7 @@ void main() {
setUp(() async { setUp(() async {
if (! await UserProfileDBManager().profileNameExists("Test Profile")) {
// Create and select a profile to user // Create and select a profile to user
await UserProfileDBManager().addProfile(UserProfile( await UserProfileDBManager().addProfile(UserProfile(
name: "Test Profile", name: "Test Profile",
@ -21,6 +22,20 @@ void main() {
password: "testpassword", password: "testpassword",
selected: true, selected: true,
)); ));
}
var prf = await UserProfileDBManager().getSelectedProfile();
// Ensure that the server settings are correct by default,
// as they can get overwritten by subsequent tests
if (prf != null) {
prf.server = "http://localhost:12345";
prf.username = "testuser";
prf.password = "testpassword";
await UserProfileDBManager().updateProfile(prf);
}
}); });