Skip to content
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
5 changes: 5 additions & 0 deletions .github/workflows/website-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: Website E2E

on:
workflow_dispatch:
pull_request:
branches: [main]
paths:
- 'website-e2e/**'
- '.github/workflows/website-e2e.yml'
push:
branches: [main]
paths:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export default function PatternDetail({
const generalExplanation = attrs?.generalExplanation?.trim() ? attrs.generalExplanation.trim() : null;
const knowledgeIntent = attrs?.knowledgeIntent?.trim() ? attrs.knowledgeIntent.trim() : null;
const peilPrompt = attrs?.peilPrompt?.trim() ? attrs.peilPrompt.trim() : null;
const orientationPeilHref = withBasePath('/orientation/all#peil');
const orientationPeilHref = '/orientation/all#peil';

const showReference = context === 'category' && paperTitle && paperUrl;

Expand Down
16 changes: 11 additions & 5 deletions website-e2e/tests/smoke.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,29 @@ test.describe('homepage and global navigation', () => {
await expect(page).toHaveTitle(/Ballarat AI Prompt Taxonomy/i);
await expect(page.getByRole('heading', { level: 1, name: /Ballarat AI Prompt Taxonomy/i })).toBeVisible();
await expect(page.getByRole('link', { name: /Browse Patterns/i })).toBeVisible();
await expect(page.getByRole('link', { name: /Orientation \/ Getting Started/i })).toBeVisible();
await expect(page.getByRole('link', { name: /Start with the Guide/i })).toBeVisible();
await expect(page.getByRole('search', { name: /Prompt pattern search/i })).toBeVisible();
});

test('global navigation reaches logic layers', async ({ page }) => {
await page.goto('./');

await page.getByRole('navigation', { name: /Global navigation/i }).getByRole('link', { name: 'Logic' }).click();
const logicLink = page.getByRole('navigation', { name: 'Primary' }).getByRole('link', { name: 'Logic' });
if (!(await logicLink.isVisible())) {
await page.getByRole('button', { name: 'Menu' }).click();
}
await logicLink.click();

await expect(page).toHaveURL(/\/logic\/?$/);
await expect(page.getByRole('heading', { level: 1, name: /Logic Layers/i })).toBeVisible();
});

test('responsible use page renders its main heading', async ({ page }) => {
test('responsible use page renders its policy guidance', async ({ page }) => {
await page.goto('./responsible-use/');

await expect(page.getByRole('heading', { level: 1, name: /Responsible Use & Ethical Guidelines/i })).toBeVisible();
await expect(page.getByRole('heading', { level: 2, name: /Core Principles/i })).toBeVisible();
await expect(page.getByRole('heading', { level: 1, name: /^Responsible Use$/i })).toBeVisible();
await expect(page.getByRole('heading', { level: 2, name: /Research inclusion is not endorsement/i })).toBeVisible();
await expect(page.getByRole('heading', { level: 2, name: /Before you apply a pattern/i })).toBeVisible();
await expect(page.getByRole('link', { name: /Report privately/i })).toBeVisible();
});
});
Loading