import { test, expect } from '@playwright/test' import { CREDENTIALS_HINT, hasStaffCredentials, waitForAppHydration } from '../helpers/admin-app' // The whole suite requires a staff session; skip cleanly when creds are absent. test.skip(!hasStaffCredentials(), CREDENTIALS_HINT) test.describe('admin-web smoke', () => { test('dashboard shell renders with sidebar navigation', async ({ page }) => { await page.goto('/dashboard') await waitForAppHydration(page) await expect(page.getByRole('button', { name: 'Dashboard', exact: true })).toBeVisible() await expect(page.getByRole('button', { name: 'Products', exact: true })).toBeVisible() await expect(page.getByRole('button', { name: 'Slots', exact: true })).toBeVisible() }) test('products list renders with the add-product action', async ({ page }) => { await page.goto('/dashboard/products') await waitForAppHydration(page) await expect(page.getByRole('button', { name: 'Add Product' })).toBeVisible() }) })