/** * @feature Settings * @see e2e/features/pages/settings.feature */ import { describe, test } from 'vitest'; import { setupBrowser } from '../../support/browser'; import { waitForAppReady } from '../../support/seed'; import { expectVisible, expectText } from '../../support/expect'; const { getPage } = setupBrowser(); describe('Settings', () => { test('settings page shows sections', async () => { const page = getPage(); await page.goto('/settings'); await waitForAppReady(page); await expectText(page.getByRole('heading', { level: 1 }), 'Settings'); await expectVisible(page.getByText('Database')); await expectVisible(page.getByRole('heading', { name: 'Sync' })); await expectVisible(page.getByRole('heading', { name: 'About' })); }); test('database stats show counts', async () => { const page = getPage(); await page.goto('/settings'); await waitForAppReady(page); await expectVisible(page.locator('main').getByText('Items')); await expectVisible(page.locator('main').getByText('Locations')); }); test('about section shows version', async () => { const page = getPage(); await page.goto('/settings'); await waitForAppReady(page); await expectVisible(page.getByText('SolidHaus v0.1.0')); await expectVisible(page.getByText('Data is stored locally')); }); });