Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If the enabled parameter is not set it should behave as no config #26

Merged
merged 1 commit into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading