Skip to content

Commit eddf066

Browse files
committed
Format and Test School and License Pages
1 parent 7c8cd5a commit eddf066

File tree

4 files changed

+58
-5
lines changed

4 files changed

+58
-5
lines changed

src/pages/ilios-schools.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
---
2-
layout: ../layouts/Content.astro
3-
title: Ilios Schools
2+
layout: ../layouts/Markdown.astro
3+
title: Schools
44
description: >
55
List of Ilios Schools
66
---
77

8+
## Ilios Schools
9+
810
- UCSF School of Medicine (project partner)
911
- UC Irvine School of Medicine (project partner)
1012
- UCSF School of Pharmacy (project supporting school)

src/pages/license.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
2-
layout: ../layouts/Content.astro
2+
layout: ../layouts/Markdown.astro
33
title: License
44
description: >
55
Ilios License Information
66
---
77

8-
The MIT License (MIT)
8+
## The MIT License (MIT)
99

10-
Copyright (c) 2015 The Regents of the University of California
10+
Copyright (c) 2026 The Regents of the University of California
1111

1212
Permission is hereby granted, free of charge, to any person obtaining a copy
1313
of this software and associated documentation files (the "Software"), to deal
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { test, expect } from '@playwright/test';
2+
import { takeScreenshot } from '../take-screenshot';
3+
import AxeBuilder from '@axe-core/playwright';
4+
5+
test.describe('Ilios Schools Page', () => {
6+
test('Layout', async ({ page }) => {
7+
await page.goto('/ilios-schools');
8+
9+
await expect(page).toHaveTitle('Schools | Ilios');
10+
await expect(page.getByRole('heading', { level: 1 })).toContainText('Ilios');
11+
await expect(page.getByRole('heading', { level: 2 })).toContainText('Ilios Schools');
12+
await takeScreenshot(page, 'ilios-schools');
13+
});
14+
15+
test('should not have any a11y issues', async ({ page }) => {
16+
await page.goto('/ilios-schools');
17+
18+
const accessibilityScanResults = await new AxeBuilder({ page }).analyze();
19+
20+
expect(accessibilityScanResults.violations).toEqual([]);
21+
});
22+
});

test/playwright/license.spec.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import { test, expect } from '@playwright/test';
2+
import { takeScreenshot } from '../take-screenshot';
3+
import AxeBuilder from '@axe-core/playwright';
4+
import { DateTime } from 'luxon';
5+
6+
const thisYear = DateTime.now().year;
7+
8+
test.describe('License Page', () => {
9+
test('Layout', async ({ page }) => {
10+
await page.goto('/license');
11+
12+
await expect(page).toHaveTitle('License | Ilios');
13+
await expect(page.getByRole('heading', { level: 1 })).toContainText('Ilios');
14+
await expect(page.getByRole('heading', { level: 2 })).toContainText('The MIT License (MIT)');
15+
await expect(
16+
page.getByText(`Copyright (c) ${thisYear} The Regents of the University of California`),
17+
).toBeVisible();
18+
19+
await takeScreenshot(page, 'license');
20+
});
21+
22+
test('should not have any a11y issues', async ({ page }) => {
23+
await page.goto('/license');
24+
25+
const accessibilityScanResults = await new AxeBuilder({ page }).analyze();
26+
27+
expect(accessibilityScanResults.violations).toEqual([]);
28+
});
29+
});

0 commit comments

Comments
 (0)