Skip to content

Commit

Permalink
If the enabled parameter is not set it should behave as no config
Browse files Browse the repository at this point in the history
  • Loading branch information
elchininet committed Dec 18, 2023
1 parent d243cd0 commit 485efe9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .hass/config/configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ lovelace:
mode: yaml
title: No Config
filename: ui-lovelace-no-config.yaml
lovelace-not-enabled:
mode: yaml
title: Not Enabled
filename: ui-lovelace-not-enabled.yaml
lovelace-config-with-error:
mode: yaml
title: Config with error
Expand Down
4 changes: 4 additions & 0 deletions .hass/config/ui-lovelace-not-enabled.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
keep_texts_in_tabs:
position: after
title: Not Enabled
views: !include views.yaml
8 changes: 8 additions & 0 deletions tests/main-options.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ test('No config', async ({ page }) => {
await expect(page.locator(TABS_CONTENT_SELECTOR)).toHaveScreenshot('07-no-config.png');
});

test('Not enabled', async ({ page }) => {
await page.goto(
getLovelaceUrl('not-enabled')
);
await expect(page.locator(HEADER_SELECTOR)).toBeVisible();
await expect(page.locator(TABS_CONTENT_SELECTOR)).toHaveScreenshot('07-no-config.png');
});

test('Should be the same after a window resize', async ({ page }) => {
await page.goto(
getLovelaceUrl()
Expand Down

0 comments on commit 485efe9

Please sign in to comment.