fix playwright test for home-assistant

This commit is contained in:
ibizaman 2025-06-24 13:55:56 +02:00
parent 91ad39941e
commit 6d127a6cf1
2 changed files with 7 additions and 10 deletions

View file

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

View file

@ -29,10 +29,10 @@ let
config = { config = {
name = "Tiserbox"; name = "Tiserbox";
country = "My Country"; country = "CH";
latitude = "01.0000000000"; latitude = "01.0000000000";
longitude.source = pkgs.writeText "longitude" "01.0000000000"; longitude.source = pkgs.writeText "longitude" "01.0000000000";
time_zone = "America/Los_Angeles"; time_zone = "Europe/Zurich";
unit_system = "metric"; unit_system = "metric";
}; };
}; };
@ -62,14 +62,10 @@ let
"page.get_by_label(re.compile('Confirm password')).fill('adminpassword')" "page.get_by_label(re.compile('Confirm password')).fill('adminpassword')"
"page.get_by_role('button', name=re.compile('Create account')).click()" "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_role('button', name=re.compile('Finish')).click()"
"page.get_by_label(re.compile('Username')).fill('admin')" "expect(page).to_have_title(re.compile('Overview'), timeout=15000)"
"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'))"
]; } ]; }
]; ];
}; };