RecreationBench / web /veranthe.example /tests /static /content.scripted.spec.ts
VoyagerXHF's picture
Upload folder using huggingface_hub (part 86)
68b0ee1 verified
Raw History Blame Contribute Delete
75.5 kB
import { test, expect } from '@playwright/test';
test.describe('Functional - homepage', () => {
test('homepage: h2 "Search Veranthe:"', async ({ page }) => {
await page.goto('/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Search Veranthe:' || t.startsWith('Search Veranthe:'))).toBeTruthy();
});
test('homepage: h2 "Main Content"', async ({ page }) => {
await page.goto('/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Main Content' || t.startsWith('Main Content'))).toBeTruthy();
});
test('homepage: h2 "A Mission Shaped by Bold Inqui"', async ({ page }) => {
await page.goto('/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'A Mission Shaped by Bold Inquiry' || t.startsWith('A Mission Shaped by Bold Inquiry'))).toBeTruthy();
});
test('homepage: header link "Veranthe UniversityVeranthe"', async ({ page }) => {
await page.goto('/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veranthe UniversityVeranthe' || t.startsWith('Veranthe UniversityVeranthe')), 'link text in header').toBeTruthy();
});
});
test.describe('Functional - about', () => {
test('about: title matches GT', async ({ page }) => {
await page.goto('/about/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('who we are');
});
test('about: h2 "Search Veranthe:"', async ({ page }) => {
await page.goto('/about/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Search Veranthe:' || t.startsWith('Search Veranthe:'))).toBeTruthy();
});
test('about: h2 "Main Content"', async ({ page }) => {
await page.goto('/about/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Main Content' || t.startsWith('Main Content'))).toBeTruthy();
});
test('about: h2 "Explore us"', async ({ page }) => {
await page.goto('/about/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Explore us' || t.startsWith('Explore us'))).toBeTruthy();
});
test('about: header link "Veranthe UniversityVeranthe"', async ({ page }) => {
await page.goto('/about/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veranthe UniversityVeranthe' || t.startsWith('Veranthe UniversityVeranthe')), 'link text in header').toBeTruthy();
});
});
test.describe('Functional - academics', () => {
test('academics: title matches GT', async ({ page }) => {
await page.goto('/academics/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('academics');
});
test('academics: h1 "Academics"', async ({ page }) => {
await page.goto('/academics/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Academics' || t.startsWith('Academics'))).toBeTruthy();
});
test('academics: h2 "Search Veranthe:"', async ({ page }) => {
await page.goto('/academics/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Search Veranthe:' || t.startsWith('Search Veranthe:'))).toBeTruthy();
});
test('academics: h2 "Main Content"', async ({ page }) => {
await page.goto('/academics/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Main Content' || t.startsWith('Main Content'))).toBeTruthy();
});
test('academics: h2 "Undergraduate Studies"', async ({ page }) => {
await page.goto('/academics/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Undergraduate Studies' || t.startsWith('Undergraduate Studies'))).toBeTruthy();
});
test('academics: header link "Veranthe UniversityVeranthe"', async ({ page }) => {
await page.goto('/academics/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veranthe UniversityVeranthe' || t.startsWith('Veranthe UniversityVeranthe')), 'link text in header').toBeTruthy();
});
});
test.describe('Functional - admission', () => {
test('admission: title matches GT', async ({ page }) => {
await page.goto('/admission/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('admission');
});
test('admission: h1 "Admission"', async ({ page }) => {
await page.goto('/admission/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Admission' || t.startsWith('Admission'))).toBeTruthy();
});
test('admission: h2 "Search Veranthe:"', async ({ page }) => {
await page.goto('/admission/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Search Veranthe:' || t.startsWith('Search Veranthe:'))).toBeTruthy();
});
test('admission: h2 "Main Content"', async ({ page }) => {
await page.goto('/admission/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Main Content' || t.startsWith('Main Content'))).toBeTruthy();
});
test('admission: h2 "Undergraduates"', async ({ page }) => {
await page.goto('/admission/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Undergraduates' || t.startsWith('Undergraduates'))).toBeTruthy();
});
test('admission: header link "Veranthe UniversityVeranthe"', async ({ page }) => {
await page.goto('/admission/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veranthe UniversityVeranthe' || t.startsWith('Veranthe UniversityVeranthe')), 'link text in header').toBeTruthy();
});
test('admission: nav link "Students"', async ({ page }) => {
await page.goto('/admission/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Students' || t.startsWith('Students')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('student-gateway')), 'href fragment present').toBeTruthy();
});
test('admission: nav link "Faculty & Staff"', async ({ page }) => {
await page.goto('/admission/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Faculty & Staff' || t.startsWith('Faculty & Staff')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('faculty-staff-gateway')), 'href fragment present').toBeTruthy();
});
test('admission: nav link "Academics"', async ({ page }) => {
await page.goto('/admission/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Academics' || t.startsWith('Academics')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('academics')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - atoz', () => {
test('atoz: h2 "Search Veranthe:"', async ({ page }) => {
await page.goto('/atoz/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Search Veranthe:' || t.startsWith('Search Veranthe:'))).toBeTruthy();
});
test('atoz: h2 "Main Content"', async ({ page }) => {
await page.goto('/atoz/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Main Content' || t.startsWith('Main Content'))).toBeTruthy();
});
test('atoz: h2 "A Purpose Rooted in Possibilit"', async ({ page }) => {
await page.goto('/atoz/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'A Purpose Rooted in Possibility' || t.startsWith('A Purpose Rooted in Possibility'))).toBeTruthy();
});
test('atoz: h2 "Campus News"', async ({ page }) => {
await page.goto('/atoz/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Campus News' || t.startsWith('Campus News'))).toBeTruthy();
});
test('atoz: header link "Veranthe UniversityVeranthe"', async ({ page }) => {
await page.goto('/atoz/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veranthe UniversityVeranthe' || t.startsWith('Veranthe UniversityVeranthe')), 'link text in header').toBeTruthy();
});
test('atoz: nav link "Students"', async ({ page }) => {
await page.goto('/atoz/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Students' || t.startsWith('Students')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('student-gateway')), 'href fragment present').toBeTruthy();
});
test('atoz: nav link "Faculty & Staff"', async ({ page }) => {
await page.goto('/atoz/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Faculty & Staff' || t.startsWith('Faculty & Staff')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('faculty-staff-gateway')), 'href fragment present').toBeTruthy();
});
test('atoz: nav link "Academics"', async ({ page }) => {
await page.goto('/atoz/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Academics' || t.startsWith('Academics')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('academics')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - campus_life', () => {
test('campus_life: title matches GT', async ({ page }) => {
await page.goto('/campus-life/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('campus life');
});
test('campus_life: h1 "Campus Life"', async ({ page }) => {
await page.goto('/campus-life/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Campus Life' || t.startsWith('Campus Life'))).toBeTruthy();
});
test('campus_life: h2 "Search Veranthe:"', async ({ page }) => {
await page.goto('/campus-life/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Search Veranthe:' || t.startsWith('Search Veranthe:'))).toBeTruthy();
});
test('campus_life: h2 "Main Content"', async ({ page }) => {
await page.goto('/campus-life/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Main Content' || t.startsWith('Main Content'))).toBeTruthy();
});
test('campus_life: h2 "Student Life"', async ({ page }) => {
await page.goto('/campus-life/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Student Life' || t.startsWith('Student Life'))).toBeTruthy();
});
test('campus_life: header link "Veranthe UniversityVeranthe"', async ({ page }) => {
await page.goto('/campus-life/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veranthe UniversityVeranthe' || t.startsWith('Veranthe UniversityVeranthe')), 'link text in header').toBeTruthy();
});
test('campus_life: nav link "Students"', async ({ page }) => {
await page.goto('/campus-life/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Students' || t.startsWith('Students')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('student-gateway')), 'href fragment present').toBeTruthy();
});
test('campus_life: nav link "Faculty & Staff"', async ({ page }) => {
await page.goto('/campus-life/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Faculty & Staff' || t.startsWith('Faculty & Staff')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('faculty-staff-gateway')), 'href fragment present').toBeTruthy();
});
test('campus_life: nav link "Academics"', async ({ page }) => {
await page.goto('/campus-life/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Academics' || t.startsWith('Academics')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('academics')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - contact', () => {
test('contact: title matches GT', async ({ page }) => {
await page.goto('/contact/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('contact us');
});
test('contact: h1 "Contact Us"', async ({ page }) => {
await page.goto('/contact/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Contact Us' || t.startsWith('Contact Us'))).toBeTruthy();
});
test('contact: h2 "Search Veranthe:"', async ({ page }) => {
await page.goto('/contact/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Search Veranthe:' || t.startsWith('Search Veranthe:'))).toBeTruthy();
});
test('contact: h2 "Main Content"', async ({ page }) => {
await page.goto('/contact/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Main Content' || t.startsWith('Main Content'))).toBeTruthy();
});
test('contact: h2 "General Contact Information"', async ({ page }) => {
await page.goto('/contact/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'General Contact Information' || t.startsWith('General Contact Information'))).toBeTruthy();
});
test('contact: header link "Veranthe UniversityVeranthe"', async ({ page }) => {
await page.goto('/contact/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veranthe UniversityVeranthe' || t.startsWith('Veranthe UniversityVeranthe')), 'link text in header').toBeTruthy();
});
test('contact: nav link "Students"', async ({ page }) => {
await page.goto('/contact/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Students' || t.startsWith('Students')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('student-gateway')), 'href fragment present').toBeTruthy();
});
test('contact: nav link "Faculty & Staff"', async ({ page }) => {
await page.goto('/contact/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Faculty & Staff' || t.startsWith('Faculty & Staff')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('faculty-staff-gateway')), 'href fragment present').toBeTruthy();
});
test('contact: nav link "Academics"', async ({ page }) => {
await page.goto('/contact/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Academics' || t.startsWith('Academics')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('academics')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - cookie_policy', () => {
test('cookie_policy: title matches GT', async ({ page }) => {
await page.goto('/cookie-policy/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('cookie policy');
});
test('cookie_policy: h1 "Cookie Policy"', async ({ page }) => {
await page.goto('/cookie-policy/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Cookie Policy' || t.startsWith('Cookie Policy'))).toBeTruthy();
});
test('cookie_policy: h2 "Search Veranthe:"', async ({ page }) => {
await page.goto('/cookie-policy/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Search Veranthe:' || t.startsWith('Search Veranthe:'))).toBeTruthy();
});
test('cookie_policy: h2 "Main Content"', async ({ page }) => {
await page.goto('/cookie-policy/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Main Content' || t.startsWith('Main Content'))).toBeTruthy();
});
test('cookie_policy: h3 "Cookies"', async ({ page }) => {
await page.goto('/cookie-policy/');
const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Cookies' || t.startsWith('Cookies'))).toBeTruthy();
});
test('cookie_policy: header link "Veranthe UniversityVeranthe"', async ({ page }) => {
await page.goto('/cookie-policy/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veranthe UniversityVeranthe' || t.startsWith('Veranthe UniversityVeranthe')), 'link text in header').toBeTruthy();
});
test('cookie_policy: nav link "Students"', async ({ page }) => {
await page.goto('/cookie-policy/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Students' || t.startsWith('Students')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('student-gateway')), 'href fragment present').toBeTruthy();
});
test('cookie_policy: nav link "Faculty & Staff"', async ({ page }) => {
await page.goto('/cookie-policy/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Faculty & Staff' || t.startsWith('Faculty & Staff')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('faculty-staff-gateway')), 'href fragment present').toBeTruthy();
});
test('cookie_policy: nav link "Academics"', async ({ page }) => {
await page.goto('/cookie-policy/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Academics' || t.startsWith('Academics')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('academics')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - faculty_staff_gateway', () => {
test('faculty_staff_gateway: title matches GT', async ({ page }) => {
await page.goto('/faculty-staff-gateway/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('gateway for faculty & staff');
});
test('faculty_staff_gateway: h1 "Gateway for Faculty & Staff"', async ({ page }) => {
await page.goto('/faculty-staff-gateway/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Gateway for Faculty & Staff' || t.startsWith('Gateway for Faculty & Staff'))).toBeTruthy();
});
test('faculty_staff_gateway: h2 "Search Veranthe:"', async ({ page }) => {
await page.goto('/faculty-staff-gateway/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Search Veranthe:' || t.startsWith('Search Veranthe:'))).toBeTruthy();
});
test('faculty_staff_gateway: h2 "Main Content"', async ({ page }) => {
await page.goto('/faculty-staff-gateway/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Main Content' || t.startsWith('Main Content'))).toBeTruthy();
});
test('faculty_staff_gateway: h2 "Working at Veranthe"', async ({ page }) => {
await page.goto('/faculty-staff-gateway/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Working at Veranthe' || t.startsWith('Working at Veranthe'))).toBeTruthy();
});
test('faculty_staff_gateway: header link "Veranthe UniversityVeranthe"', async ({ page }) => {
await page.goto('/faculty-staff-gateway/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veranthe UniversityVeranthe' || t.startsWith('Veranthe UniversityVeranthe')), 'link text in header').toBeTruthy();
});
test('faculty_staff_gateway: nav link "Students"', async ({ page }) => {
await page.goto('/faculty-staff-gateway/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Students' || t.startsWith('Students')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('student-gateway')), 'href fragment present').toBeTruthy();
});
test('faculty_staff_gateway: nav link "Faculty & Staff"', async ({ page }) => {
await page.goto('/faculty-staff-gateway/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Faculty & Staff' || t.startsWith('Faculty & Staff')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('faculty-staff-gateway')), 'href fragment present').toBeTruthy();
});
test('faculty_staff_gateway: nav link "Academics"', async ({ page }) => {
await page.goto('/faculty-staff-gateway/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Academics' || t.startsWith('Academics')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('academics')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - health_care', () => {
test('health_care: title matches GT', async ({ page }) => {
await page.goto('/health-care/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('health care');
});
test('health_care: h1 "Health Care"', async ({ page }) => {
await page.goto('/health-care/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Health Care' || t.startsWith('Health Care'))).toBeTruthy();
});
test('health_care: h2 "Search Veranthe:"', async ({ page }) => {
await page.goto('/health-care/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Search Veranthe:' || t.startsWith('Search Veranthe:'))).toBeTruthy();
});
test('health_care: h2 "Main Content"', async ({ page }) => {
await page.goto('/health-care/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Main Content' || t.startsWith('Main Content'))).toBeTruthy();
});
test('health_care: h2 "Patient Care"', async ({ page }) => {
await page.goto('/health-care/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Patient Care' || t.startsWith('Patient Care'))).toBeTruthy();
});
test('health_care: header link "Veranthe UniversityVeranthe"', async ({ page }) => {
await page.goto('/health-care/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veranthe UniversityVeranthe' || t.startsWith('Veranthe UniversityVeranthe')), 'link text in header').toBeTruthy();
});
test('health_care: nav link "Students"', async ({ page }) => {
await page.goto('/health-care/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Students' || t.startsWith('Students')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('student-gateway')), 'href fragment present').toBeTruthy();
});
test('health_care: nav link "Faculty & Staff"', async ({ page }) => {
await page.goto('/health-care/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Faculty & Staff' || t.startsWith('Faculty & Staff')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('faculty-staff-gateway')), 'href fragment present').toBeTruthy();
});
test('health_care: nav link "Academics"', async ({ page }) => {
await page.goto('/health-care/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Academics' || t.startsWith('Academics')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('academics')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - research', () => {
test('research: title matches GT', async ({ page }) => {
await page.goto('/research/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('research');
});
test('research: h1 "Research"', async ({ page }) => {
await page.goto('/research/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Research' || t.startsWith('Research'))).toBeTruthy();
});
test('research: h2 "Search Veranthe:"', async ({ page }) => {
await page.goto('/research/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Search Veranthe:' || t.startsWith('Search Veranthe:'))).toBeTruthy();
});
test('research: h2 "Main Content"', async ({ page }) => {
await page.goto('/research/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Main Content' || t.startsWith('Main Content'))).toBeTruthy();
});
test('research: h2 "Building Tomorrow"', async ({ page }) => {
await page.goto('/research/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Building Tomorrow' || t.startsWith('Building Tomorrow'))).toBeTruthy();
});
test('research: header link "Veranthe UniversityVeranthe"', async ({ page }) => {
await page.goto('/research/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veranthe UniversityVeranthe' || t.startsWith('Veranthe UniversityVeranthe')), 'link text in header').toBeTruthy();
});
test('research: nav link "Students"', async ({ page }) => {
await page.goto('/research/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Students' || t.startsWith('Students')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('student-gateway')), 'href fragment present').toBeTruthy();
});
test('research: nav link "Faculty & Staff"', async ({ page }) => {
await page.goto('/research/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Faculty & Staff' || t.startsWith('Faculty & Staff')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('faculty-staff-gateway')), 'href fragment present').toBeTruthy();
});
test('research: nav link "Academics"', async ({ page }) => {
await page.goto('/research/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Academics' || t.startsWith('Academics')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('academics')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - search', () => {
test('search: title matches GT', async ({ page }) => {
await page.goto('/search/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('search results');
});
test('search: h1 "Search Results"', async ({ page }) => {
await page.goto('/search/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Search Results' || t.startsWith('Search Results'))).toBeTruthy();
});
test('search: h2 "Search Veranthe:"', async ({ page }) => {
await page.goto('/search/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Search Veranthe:' || t.startsWith('Search Veranthe:'))).toBeTruthy();
});
test('search: h3 "Schools"', async ({ page }) => {
await page.goto('/search/');
const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Schools' || t.startsWith('Schools'))).toBeTruthy();
});
test('search: h3 "Academics"', async ({ page }) => {
await page.goto('/search/');
const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Academics' || t.startsWith('Academics'))).toBeTruthy();
});
test('search: header link "Veranthe UniversityVeranthe"', async ({ page }) => {
await page.goto('/search/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veranthe UniversityVeranthe' || t.startsWith('Veranthe UniversityVeranthe')), 'link text in header').toBeTruthy();
});
test('search: nav link "Students"', async ({ page }) => {
await page.goto('/search/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Students' || t.startsWith('Students')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('student-gateway')), 'href fragment present').toBeTruthy();
});
test('search: nav link "Faculty & Staff"', async ({ page }) => {
await page.goto('/search/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Faculty & Staff' || t.startsWith('Faculty & Staff')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('faculty-staff-gateway')), 'href fragment present').toBeTruthy();
});
test('search: nav link "Academics"', async ({ page }) => {
await page.goto('/search/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Academics' || t.startsWith('Academics')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('academics')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - student_gateway', () => {
test('student_gateway: title matches GT', async ({ page }) => {
await page.goto('/student-gateway/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('gateway for students');
});
test('student_gateway: h1 "Gateway for Students"', async ({ page }) => {
await page.goto('/student-gateway/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Gateway for Students' || t.startsWith('Gateway for Students'))).toBeTruthy();
});
test('student_gateway: h2 "Search Veranthe:"', async ({ page }) => {
await page.goto('/student-gateway/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Search Veranthe:' || t.startsWith('Search Veranthe:'))).toBeTruthy();
});
test('student_gateway: h2 "Main Content"', async ({ page }) => {
await page.goto('/student-gateway/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Main Content' || t.startsWith('Main Content'))).toBeTruthy();
});
test('student_gateway: h2 "General Academic Resources"', async ({ page }) => {
await page.goto('/student-gateway/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'General Academic Resources' || t.startsWith('General Academic Resources'))).toBeTruthy();
});
test('student_gateway: header link "Veranthe UniversityVeranthe"', async ({ page }) => {
await page.goto('/student-gateway/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veranthe UniversityVeranthe' || t.startsWith('Veranthe UniversityVeranthe')), 'link text in header').toBeTruthy();
});
test('student_gateway: nav link "Students"', async ({ page }) => {
await page.goto('/student-gateway/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Students' || t.startsWith('Students')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('student-gateway')), 'href fragment present').toBeTruthy();
});
test('student_gateway: nav link "Faculty & Staff"', async ({ page }) => {
await page.goto('/student-gateway/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Faculty & Staff' || t.startsWith('Faculty & Staff')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('faculty-staff-gateway')), 'href fragment present').toBeTruthy();
});
test('student_gateway: nav link "Academics"', async ({ page }) => {
await page.goto('/student-gateway/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Academics' || t.startsWith('Academics')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('academics')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - about_administration', () => {
test('about_administration: title matches GT', async ({ page }) => {
await page.goto('/about/administration/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('leadership and governance');
});
test('about_administration: h1 "Leadership and Governance"', async ({ page }) => {
await page.goto('/about/administration/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Leadership and Governance' || t.startsWith('Leadership and Governance'))).toBeTruthy();
});
test('about_administration: h2 "Search Veranthe:"', async ({ page }) => {
await page.goto('/about/administration/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Search Veranthe:' || t.startsWith('Search Veranthe:'))).toBeTruthy();
});
test('about_administration: h2 "Main Content"', async ({ page }) => {
await page.goto('/about/administration/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Main Content' || t.startsWith('Main Content'))).toBeTruthy();
});
test('about_administration: h2 "Administrative Offices"', async ({ page }) => {
await page.goto('/about/administration/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Administrative Offices' || t.startsWith('Administrative Offices'))).toBeTruthy();
});
test('about_administration: header link "Veranthe UniversityVeranthe"', async ({ page }) => {
await page.goto('/about/administration/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veranthe UniversityVeranthe' || t.startsWith('Veranthe UniversityVeranthe')), 'link text in header').toBeTruthy();
});
test('about_administration: nav link "Students"', async ({ page }) => {
await page.goto('/about/administration/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Students' || t.startsWith('Students')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('student-gateway')), 'href fragment present').toBeTruthy();
});
test('about_administration: nav link "Faculty & Staff"', async ({ page }) => {
await page.goto('/about/administration/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Faculty & Staff' || t.startsWith('Faculty & Staff')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('faculty-staff-gateway')), 'href fragment present').toBeTruthy();
});
test('about_administration: nav link "Academics"', async ({ page }) => {
await page.goto('/about/administration/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Academics' || t.startsWith('Academics')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('academics')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - academics_schools', () => {
test('academics_schools: title matches GT', async ({ page }) => {
await page.goto('/academics/schools/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('veranthe\'s seven schools');
});
test('academics_schools: h1 "Veranthe\'s Seven Schools"', async ({ page }) => {
await page.goto('/academics/schools/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veranthe\'s Seven Schools' || t.startsWith('Veranthe\'s Seven Schools'))).toBeTruthy();
});
test('academics_schools: h2 "Search Veranthe:"', async ({ page }) => {
await page.goto('/academics/schools/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Search Veranthe:' || t.startsWith('Search Veranthe:'))).toBeTruthy();
});
test('academics_schools: h2 "Main Content"', async ({ page }) => {
await page.goto('/academics/schools/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Main Content' || t.startsWith('Main Content'))).toBeTruthy();
});
test('academics_schools: h3 "Graduate School of Business"', async ({ page }) => {
await page.goto('/academics/schools/');
const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Graduate School of Business' || t.startsWith('Graduate School of Business'))).toBeTruthy();
});
test('academics_schools: header link "Veranthe UniversityVeranthe"', async ({ page }) => {
await page.goto('/academics/schools/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veranthe UniversityVeranthe' || t.startsWith('Veranthe UniversityVeranthe')), 'link text in header').toBeTruthy();
});
test('academics_schools: nav link "Students"', async ({ page }) => {
await page.goto('/academics/schools/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Students' || t.startsWith('Students')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('student-gateway')), 'href fragment present').toBeTruthy();
});
test('academics_schools: nav link "Faculty & Staff"', async ({ page }) => {
await page.goto('/academics/schools/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Faculty & Staff' || t.startsWith('Faculty & Staff')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('faculty-staff-gateway')), 'href fragment present').toBeTruthy();
});
test('academics_schools: nav link "Academics"', async ({ page }) => {
await page.goto('/academics/schools/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Academics' || t.startsWith('Academics')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('academics')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - list_academic', () => {
test('list_academic: title matches GT', async ({ page }) => {
await page.goto('/list/academic/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('academic departments');
});
test('list_academic: h1 "Academic Departments"', async ({ page }) => {
await page.goto('/list/academic/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Academic Departments' || t.startsWith('Academic Departments'))).toBeTruthy();
});
test('list_academic: h2 "Search Veranthe:"', async ({ page }) => {
await page.goto('/list/academic/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Search Veranthe:' || t.startsWith('Search Veranthe:'))).toBeTruthy();
});
test('list_academic: h2 "Main Content"', async ({ page }) => {
await page.goto('/list/academic/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Main Content' || t.startsWith('Main Content'))).toBeTruthy();
});
test('list_academic: h2 "List of programs"', async ({ page }) => {
await page.goto('/list/academic/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'List of programs' || t.startsWith('List of programs'))).toBeTruthy();
});
test('list_academic: header link "Veranthe UniversityVeranthe"', async ({ page }) => {
await page.goto('/list/academic/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veranthe UniversityVeranthe' || t.startsWith('Veranthe UniversityVeranthe')), 'link text in header').toBeTruthy();
});
test('list_academic: nav link "Students"', async ({ page }) => {
await page.goto('/list/academic/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Students' || t.startsWith('Students')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('student-gateway')), 'href fragment present').toBeTruthy();
});
test('list_academic: nav link "Faculty & Staff"', async ({ page }) => {
await page.goto('/list/academic/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Faculty & Staff' || t.startsWith('Faculty & Staff')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('faculty-staff-gateway')), 'href fragment present').toBeTruthy();
});
test('list_academic: nav link "Academics"', async ({ page }) => {
await page.goto('/list/academic/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Academics' || t.startsWith('Academics')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('academics')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - list_admin', () => {
test('list_admin: title matches GT', async ({ page }) => {
await page.goto('/list/admin/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('administrative resources and departments');
});
test('list_admin: h1 "Administrative Resources and D"', async ({ page }) => {
await page.goto('/list/admin/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Administrative Resources and Departments' || t.startsWith('Administrative Resources and Departments'))).toBeTruthy();
});
test('list_admin: h2 "Search Veranthe:"', async ({ page }) => {
await page.goto('/list/admin/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Search Veranthe:' || t.startsWith('Search Veranthe:'))).toBeTruthy();
});
test('list_admin: h2 "Main Content"', async ({ page }) => {
await page.goto('/list/admin/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Main Content' || t.startsWith('Main Content'))).toBeTruthy();
});
test('list_admin: h2 "List of websites"', async ({ page }) => {
await page.goto('/list/admin/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'List of websites' || t.startsWith('List of websites'))).toBeTruthy();
});
test('list_admin: header link "Veranthe UniversityVeranthe"', async ({ page }) => {
await page.goto('/list/admin/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veranthe UniversityVeranthe' || t.startsWith('Veranthe UniversityVeranthe')), 'link text in header').toBeTruthy();
});
test('list_admin: nav link "Students"', async ({ page }) => {
await page.goto('/list/admin/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Students' || t.startsWith('Students')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('student-gateway')), 'href fragment present').toBeTruthy();
});
test('list_admin: nav link "Faculty & Staff"', async ({ page }) => {
await page.goto('/list/admin/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Faculty & Staff' || t.startsWith('Faculty & Staff')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('faculty-staff-gateway')), 'href fragment present').toBeTruthy();
});
test('list_admin: nav link "Academics"', async ({ page }) => {
await page.goto('/list/admin/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Academics' || t.startsWith('Academics')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('academics')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - list_research', () => {
test('list_research: title matches GT', async ({ page }) => {
await page.goto('/list/research/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('research centers');
});
test('list_research: h1 "Research Centers"', async ({ page }) => {
await page.goto('/list/research/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Research Centers' || t.startsWith('Research Centers'))).toBeTruthy();
});
test('list_research: h2 "Search Veranthe:"', async ({ page }) => {
await page.goto('/list/research/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Search Veranthe:' || t.startsWith('Search Veranthe:'))).toBeTruthy();
});
test('list_research: h2 "Main Content"', async ({ page }) => {
await page.goto('/list/research/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Main Content' || t.startsWith('Main Content'))).toBeTruthy();
});
test('list_research: h2 "List of websites"', async ({ page }) => {
await page.goto('/list/research/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'List of websites' || t.startsWith('List of websites'))).toBeTruthy();
});
test('list_research: header link "Veranthe UniversityVeranthe"', async ({ page }) => {
await page.goto('/list/research/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veranthe UniversityVeranthe' || t.startsWith('Veranthe UniversityVeranthe')), 'link text in header').toBeTruthy();
});
test('list_research: nav link "Students"', async ({ page }) => {
await page.goto('/list/research/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Students' || t.startsWith('Students')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('student-gateway')), 'href fragment present').toBeTruthy();
});
test('list_research: nav link "Faculty & Staff"', async ({ page }) => {
await page.goto('/list/research/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Faculty & Staff' || t.startsWith('Faculty & Staff')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('faculty-staff-gateway')), 'href fragment present').toBeTruthy();
});
test('list_research: nav link "Academics"', async ({ page }) => {
await page.goto('/list/research/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Academics' || t.startsWith('Academics')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('academics')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - site_accessibility', () => {
test('site_accessibility: title matches GT', async ({ page }) => {
await page.goto('/site/accessibility/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('digital accessibility');
});
test('site_accessibility: h1 "Digital Accessibility"', async ({ page }) => {
await page.goto('/site/accessibility/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Digital Accessibility' || t.startsWith('Digital Accessibility'))).toBeTruthy();
});
test('site_accessibility: h2 "Search Veranthe:"', async ({ page }) => {
await page.goto('/site/accessibility/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Search Veranthe:' || t.startsWith('Search Veranthe:'))).toBeTruthy();
});
test('site_accessibility: h2 "Main Content"', async ({ page }) => {
await page.goto('/site/accessibility/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Main Content' || t.startsWith('Main Content'))).toBeTruthy();
});
test('site_accessibility: h2 "Reporting Accessibility Issues"', async ({ page }) => {
await page.goto('/site/accessibility/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Reporting Accessibility Issues' || t.startsWith('Reporting Accessibility Issues'))).toBeTruthy();
});
test('site_accessibility: header link "Veranthe UniversityVeranthe"', async ({ page }) => {
await page.goto('/site/accessibility/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veranthe UniversityVeranthe' || t.startsWith('Veranthe UniversityVeranthe')), 'link text in header').toBeTruthy();
});
test('site_accessibility: nav link "Students"', async ({ page }) => {
await page.goto('/site/accessibility/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Students' || t.startsWith('Students')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('student-gateway')), 'href fragment present').toBeTruthy();
});
test('site_accessibility: nav link "Faculty & Staff"', async ({ page }) => {
await page.goto('/site/accessibility/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Faculty & Staff' || t.startsWith('Faculty & Staff')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('faculty-staff-gateway')), 'href fragment present').toBeTruthy();
});
test('site_accessibility: nav link "Academics"', async ({ page }) => {
await page.goto('/site/accessibility/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Academics' || t.startsWith('Academics')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('academics')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - site_privacy', () => {
test('site_privacy: title matches GT', async ({ page }) => {
await page.goto('/site/privacy/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('online privacy policy');
});
test('site_privacy: h1 "Online Privacy Policy"', async ({ page }) => {
await page.goto('/site/privacy/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Online Privacy Policy' || t.startsWith('Online Privacy Policy'))).toBeTruthy();
});
test('site_privacy: h2 "Search Veranthe:"', async ({ page }) => {
await page.goto('/site/privacy/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Search Veranthe:' || t.startsWith('Search Veranthe:'))).toBeTruthy();
});
test('site_privacy: h2 "Main Content"', async ({ page }) => {
await page.goto('/site/privacy/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Main Content' || t.startsWith('Main Content'))).toBeTruthy();
});
test('site_privacy: h2 "Online Privacy Notice"', async ({ page }) => {
await page.goto('/site/privacy/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Online Privacy Notice' || t.startsWith('Online Privacy Notice'))).toBeTruthy();
});
test('site_privacy: header link "Veranthe UniversityVeranthe"', async ({ page }) => {
await page.goto('/site/privacy/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veranthe UniversityVeranthe' || t.startsWith('Veranthe UniversityVeranthe')), 'link text in header').toBeTruthy();
});
test('site_privacy: nav link "Students"', async ({ page }) => {
await page.goto('/site/privacy/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Students' || t.startsWith('Students')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('student-gateway')), 'href fragment present').toBeTruthy();
});
test('site_privacy: nav link "Faculty & Staff"', async ({ page }) => {
await page.goto('/site/privacy/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Faculty & Staff' || t.startsWith('Faculty & Staff')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('faculty-staff-gateway')), 'href fragment present').toBeTruthy();
});
test('site_privacy: nav link "Academics"', async ({ page }) => {
await page.goto('/site/privacy/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Academics' || t.startsWith('Academics')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('academics')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - site_terms', () => {
test('site_terms: title matches GT', async ({ page }) => {
await page.goto('/site/terms/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('terms of use for sites');
});
test('site_terms: h1 "Terms of use for sites"', async ({ page }) => {
await page.goto('/site/terms/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Terms of use for sites' || t.startsWith('Terms of use for sites'))).toBeTruthy();
});
test('site_terms: h2 "Search Veranthe:"', async ({ page }) => {
await page.goto('/site/terms/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Search Veranthe:' || t.startsWith('Search Veranthe:'))).toBeTruthy();
});
test('site_terms: h2 "Main Content"', async ({ page }) => {
await page.goto('/site/terms/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Main Content' || t.startsWith('Main Content'))).toBeTruthy();
});
test('site_terms: h2 "Disclaimer"', async ({ page }) => {
await page.goto('/site/terms/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Disclaimer' || t.startsWith('Disclaimer'))).toBeTruthy();
});
test('site_terms: header link "Veranthe UniversityVeranthe"', async ({ page }) => {
await page.goto('/site/terms/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veranthe UniversityVeranthe' || t.startsWith('Veranthe UniversityVeranthe')), 'link text in header').toBeTruthy();
});
test('site_terms: nav link "Students"', async ({ page }) => {
await page.goto('/site/terms/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Students' || t.startsWith('Students')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('student-gateway')), 'href fragment present').toBeTruthy();
});
test('site_terms: nav link "Faculty & Staff"', async ({ page }) => {
await page.goto('/site/terms/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Faculty & Staff' || t.startsWith('Faculty & Staff')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('faculty-staff-gateway')), 'href fragment present').toBeTruthy();
});
test('site_terms: nav link "Academics"', async ({ page }) => {
await page.goto('/site/terms/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Academics' || t.startsWith('Academics')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('academics')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - about_administration_policies', () => {
test('about_administration_policies: h1 "University-wide policy documen"', async ({ page }) => {
await page.goto('/about/administration/policies/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'University-wide policy documents' || t.startsWith('University-wide policy documents'))).toBeTruthy();
});
test('about_administration_policies: h2 "Search Veranthe:"', async ({ page }) => {
await page.goto('/about/administration/policies/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Search Veranthe:' || t.startsWith('Search Veranthe:'))).toBeTruthy();
});
test('about_administration_policies: h2 "Main Content"', async ({ page }) => {
await page.goto('/about/administration/policies/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Main Content' || t.startsWith('Main Content'))).toBeTruthy();
});
test('about_administration_policies: h3 "Schools"', async ({ page }) => {
await page.goto('/about/administration/policies/');
const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Schools' || t.startsWith('Schools'))).toBeTruthy();
});
test('about_administration_policies: header link "Veranthe UniversityVeranthe"', async ({ page }) => {
await page.goto('/about/administration/policies/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Veranthe UniversityVeranthe' || t.startsWith('Veranthe UniversityVeranthe')), 'link text in header').toBeTruthy();
});
test('about_administration_policies: nav link "Students"', async ({ page }) => {
await page.goto('/about/administration/policies/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Students' || t.startsWith('Students')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('student-gateway')), 'href fragment present').toBeTruthy();
});
test('about_administration_policies: nav link "Faculty & Staff"', async ({ page }) => {
await page.goto('/about/administration/policies/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Faculty & Staff' || t.startsWith('Faculty & Staff')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('faculty-staff-gateway')), 'href fragment present').toBeTruthy();
});
test('about_administration_policies: nav link "Academics"', async ({ page }) => {
await page.goto('/about/administration/policies/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Academics' || t.startsWith('Academics')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('academics')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - Routing', () => {
test('navigate to academics via "Academics"', async ({ page }) => {
await page.goto('/');
const link = page.locator('a[href*="academics"]').first();
expect(await link.count(), 'nav link to academics exists').toBeGreaterThan(0);
await link.click();
await page.waitForTimeout(1200);
expect(page.url().toLowerCase(), 'URL changed to destination').toContain('academics');
const bodyText = (await page.evaluate(() => document.body.innerText)).replace(/\s+/g, ' ');
expect(bodyText, 'destination distinctive content shown').toContain('Academics');
});
});