fix(theme): complete namespace swap + page-hero/aura-bg placement + single.spec gating
This commit is contained in:
@@ -5,15 +5,15 @@ test.use({ viewport: { width: 1920, height: 1080 } });
|
||||
|
||||
test.describe('single-project', () => {
|
||||
test('project detail renders hero, sidebar, no axe violations', async ({ page }, testInfo) => {
|
||||
// Pick the first project; skip the test gracefully if none exist.
|
||||
// Navigate to the projects archive and pick the first card. The test
|
||||
// fails (not skips) when no projects exist — silently skipping masks
|
||||
// regression of the single-project template itself.
|
||||
const response = await page.goto('/projects/');
|
||||
expect(response && response.status()).toBeLessThan(400);
|
||||
|
||||
const firstLink = page.locator('.archive-projects__grid a.project-card__title-link').first();
|
||||
if (await firstLink.count() === 0) {
|
||||
test.skip(true, 'No projects to test detail page');
|
||||
return;
|
||||
}
|
||||
const linkCount = await firstLink.count();
|
||||
expect(linkCount, 'archive must contain at least one project card to exercise the single-project template').toBeGreaterThan(0);
|
||||
|
||||
await Promise.all([
|
||||
page.waitForLoadState('networkidle'),
|
||||
|
||||
Reference in New Issue
Block a user