fix playwright test for home-assistant

This commit is contained in:
ibizaman 2025-06-24 13:55:56 +02:00 committed by Pierre Penninckx
parent 6947475f2c
commit 5a1e9809bc
2 changed files with 7 additions and 10 deletions

View file

@ -79,8 +79,8 @@ in
};
unit_system = lib.mkOption {
type = lib.types.oneOf [ lib.types.str (lib.types.enum [ "metric" "us_customary" ]) ];
description = "Timezone of this instance.";
example = "America/Los_Angeles";
description = "Unit system of this instance.";
example = "metric";
};
};
};
@ -326,6 +326,7 @@ in
systemd.services.home-assistant.preStart =
(let
# TODO: this probably does not work anymore
onboarding = pkgs.writeText "onboarding" ''
{
"version": 4,

View file

@ -29,10 +29,10 @@ let
config = {
name = "Tiserbox";
country = "My Country";
country = "CH";
latitude = "01.0000000000";
longitude.source = pkgs.writeText "longitude" "01.0000000000";
time_zone = "America/Los_Angeles";
time_zone = "Europe/Zurich";
unit_system = "metric";
};
};
@ -62,14 +62,10 @@ let
"page.get_by_label(re.compile('Confirm password')).fill('adminpassword')"
"page.get_by_role('button', name=re.compile('Create account')).click()"
"expect(page.get_by_text('All set')).to_be_visible()"
"expect(page.get_by_text('We found compatible devices')).to_be_visible()"
"page.get_by_role('button', name=re.compile('Finish')).click()"
"page.get_by_label(re.compile('Username')).fill('admin')"
"page.get_by_label(re.compile('Password')).fill('adminpassword')"
"page.get_by_role('button', name=re.compile('Log in')).click()"
"expect(page).to_have_title(re.compile('Overview'))"
"expect(page).to_have_title(re.compile('Overview'), timeout=15000)"
]; }
];
};