RecreationBench / web /borvia.example /tests /static /structure.scripted.spec.ts
VoyagerXHF's picture
Upload folder using huggingface_hub (part 17)
77cdd5c verified
Raw History Blame Contribute Delete
91.2 kB
import { test, expect } from '@playwright/test';
test.describe('Structural - homepage', () => {
test('homepage: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('homepage: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - cookie_policy', () => {
test('cookie_policy: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/cookie-policy/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('cookie_policy: heading hierarchy is valid', async ({ page }) => {
await page.goto('/cookie-policy/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('cookie_policy: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/cookie-policy/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - help', () => {
test('help: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/help/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('help: heading hierarchy is valid', async ({ page }) => {
await page.goto('/help/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('help: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/help/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - login', () => {
test('login: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/login/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('login: heading hierarchy is valid', async ({ page }) => {
await page.goto('/login/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('login: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/login/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - owners', () => {
test('owners: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/owners/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('owners: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/owners/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - platform', () => {
test('platform: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/platform/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('platform: heading hierarchy is valid', async ({ page }) => {
await page.goto('/platform/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('platform: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/platform/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - platform_cards', () => {
test('platform_cards: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/platform/cards/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('platform_cards: heading hierarchy is valid', async ({ page }) => {
await page.goto('/platform/cards/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('platform_cards: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/platform/cards/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - platform_education', () => {
test('platform_education: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/platform/education/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('platform_education: heading hierarchy is valid', async ({ page }) => {
await page.goto('/platform/education/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('platform_education: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/platform/education/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - platform_financial_institutions', () => {
test('platform_financial_institutions: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/platform/financial-institutions/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('platform_financial_institutions: heading hierarchy is valid', async ({ page }) => {
await page.goto('/platform/financial-institutions/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('platform_financial_institutions: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/platform/financial-institutions/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - platform_marketplaces', () => {
test('platform_marketplaces: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/platform/marketplaces/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('platform_marketplaces: heading hierarchy is valid', async ({ page }) => {
await page.goto('/platform/marketplaces/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('platform_marketplaces: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/platform/marketplaces/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - platform_multi_currency_accounts', () => {
test('platform_multi_currency_accounts: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/platform/multi-currency-accounts/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('platform_multi_currency_accounts: heading hierarchy is valid', async ({ page }) => {
await page.goto('/platform/multi-currency-accounts/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('platform_multi_currency_accounts: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/platform/multi-currency-accounts/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - platform_receive', () => {
test('platform_receive: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/platform/receive/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('platform_receive: heading hierarchy is valid', async ({ page }) => {
await page.goto('/platform/receive/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('platform_receive: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/platform/receive/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - platform_send', () => {
test('platform_send: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/platform/send/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('platform_send: heading hierarchy is valid', async ({ page }) => {
await page.goto('/platform/send/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('platform_send: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/platform/send/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - platform_spend_management', () => {
test('platform_spend_management: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/platform/spend-management/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('platform_spend_management: heading hierarchy is valid', async ({ page }) => {
await page.goto('/platform/spend-management/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('platform_spend_management: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/platform/spend-management/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - platform_travel', () => {
test('platform_travel: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/platform/travel/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('platform_travel: heading hierarchy is valid', async ({ page }) => {
await page.goto('/platform/travel/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('platform_travel: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/platform/travel/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - platform_workforce_platforms', () => {
test('platform_workforce_platforms: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/platform/workforce-platforms/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('platform_workforce_platforms: heading hierarchy is valid', async ({ page }) => {
await page.goto('/platform/workforce-platforms/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('platform_workforce_platforms: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/platform/workforce-platforms/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sg_account', () => {
test('sg_account: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/sg/account/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('sg_account: heading hierarchy is valid', async ({ page }) => {
await page.goto('/sg/account/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('sg_account: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/sg/account/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sg_business', () => {
test('sg_business: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/sg/business/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('sg_business: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/sg/business/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sg_card', () => {
test('sg_card: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/sg/card/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('sg_card: heading hierarchy is valid', async ({ page }) => {
await page.goto('/sg/card/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('sg_card: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/sg/card/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sg_interest', () => {
test('sg_interest: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/sg/interest/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('sg_interest: heading hierarchy is valid', async ({ page }) => {
await page.goto('/sg/interest/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('sg_interest: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/sg/interest/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sg_large_amounts', () => {
test('sg_large_amounts: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/sg/large-amounts/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('sg_large_amounts: heading hierarchy is valid', async ({ page }) => {
await page.goto('/sg/large-amounts/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('sg_large_amounts: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/sg/large-amounts/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sg_receive_money', () => {
test('sg_receive_money: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/sg/receive-money/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('sg_receive_money: heading hierarchy is valid', async ({ page }) => {
await page.goto('/sg/receive-money/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('sg_receive_money: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/sg/receive-money/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sg_safety_and_security', () => {
test('sg_safety_and_security: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/sg/safety-and-security/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('sg_safety_and_security: heading hierarchy is valid', async ({ page }) => {
await page.goto('/sg/safety-and-security/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('sg_safety_and_security: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/sg/safety-and-security/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - terms_and_conditions', () => {
test('terms_and_conditions: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/terms-and-conditions/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('terms_and_conditions: heading hierarchy is valid', async ({ page }) => {
await page.goto('/terms-and-conditions/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
});
test.describe('Structural - gb_business_tools', () => {
test('gb_business_tools: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/gb/business-tools/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('gb_business_tools: heading hierarchy is valid', async ({ page }) => {
await page.goto('/gb/business-tools/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('gb_business_tools: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/gb/business-tools/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - gb_company_formation', () => {
test('gb_company_formation: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/gb/company-formation/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('gb_company_formation: heading hierarchy is valid', async ({ page }) => {
await page.goto('/gb/company-formation/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('gb_company_formation: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/gb/company-formation/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - p_research_privacy_policy', () => {
test('p_research_privacy_policy: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/p/research-privacy-policy/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
});
test.describe('Structural - sg_blog', () => {
test('sg_blog: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/sg/blog/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('sg_blog: heading hierarchy is valid', async ({ page }) => {
await page.goto('/sg/blog/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('sg_blog: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/sg/blog/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sg_compare', () => {
test('sg_compare: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/sg/compare/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('sg_compare: heading hierarchy is valid', async ({ page }) => {
await page.goto('/sg/compare/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('sg_compare: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/sg/compare/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sg_currency_converter', () => {
test('sg_currency_converter: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/sg/currency-converter/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('sg_currency_converter: heading hierarchy is valid', async ({ page }) => {
await page.goto('/sg/currency-converter/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('sg_currency_converter: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/sg/currency-converter/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sg_iban', () => {
test('sg_iban: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/sg/iban/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('sg_iban: heading hierarchy is valid', async ({ page }) => {
await page.goto('/sg/iban/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('sg_iban: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/sg/iban/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sg_partnerwise', () => {
test('sg_partnerwise: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/sg/partnerwise/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('sg_partnerwise: heading hierarchy is valid', async ({ page }) => {
await page.goto('/sg/partnerwise/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('sg_partnerwise: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/sg/partnerwise/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sg_pricing', () => {
test('sg_pricing: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/sg/pricing/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('sg_pricing: heading hierarchy is valid', async ({ page }) => {
await page.goto('/sg/pricing/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('sg_pricing: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/sg/pricing/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sg_stock', () => {
test('sg_stock: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/sg/stock/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('sg_stock: heading hierarchy is valid', async ({ page }) => {
await page.goto('/sg/stock/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('sg_stock: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/sg/stock/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - us_invoice_generator', () => {
test('us_invoice_generator: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/us/invoice-generator/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('us_invoice_generator: heading hierarchy is valid', async ({ page }) => {
await page.goto('/us/invoice-generator/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('us_invoice_generator: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/us/invoice-generator/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - au_blog_gyrostream_borvia_api_case_study', () => {
test('au_blog_gyrostream_borvia_api_case_study: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/au/blog/gyrostream-borvia-api-case-study/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('au_blog_gyrostream_borvia_api_case_study: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/au/blog/gyrostream-borvia-api-case-study/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - gb_about_borvia_reviews', () => {
test('gb_about_borvia_reviews: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/gb/about/borvia-reviews/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('gb_about_borvia_reviews: heading hierarchy is valid', async ({ page }) => {
await page.goto('/gb/about/borvia-reviews/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('gb_about_borvia_reviews: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/gb/about/borvia-reviews/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - gb_blog_case_study_pangolia', () => {
test('gb_blog_case_study_pangolia: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/gb/blog/case-study-pangolia/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('gb_blog_case_study_pangolia: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/gb/blog/case-study-pangolia/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - gb_blog_creating_a_buzz_in_the_honey_industry_with_borvia_business', () => {
test('gb_blog_creating_a_buzz_in_the_honey_industry_with_borvia_business: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/gb/blog/creating-a-buzz-in-the-honey-industry-with-borvia-business/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('gb_blog_creating_a_buzz_in_the_honey_industry_with_borvia_business: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/gb/blog/creating-a-buzz-in-the-honey-industry-with-borvia-business/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - gb_blog_pay_contractors_talentdesk_case_study', () => {
test('gb_blog_pay_contractors_talentdesk_case_study: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/gb/blog/pay-contractors-talentdesk-case-study/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('gb_blog_pay_contractors_talentdesk_case_study: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/gb/blog/pay-contractors-talentdesk-case-study/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - gb_blog_borvia_platform_bank_mandiri_case_study', () => {
test('gb_blog_borvia_platform_bank_mandiri_case_study: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/gb/blog/borvia-platform-bank-mandiri-case-study/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('gb_blog_borvia_platform_bank_mandiri_case_study: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/gb/blog/borvia-platform-bank-mandiri-case-study/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - gb_comparison_singapore_price_comparison_research_2026', () => {
test('gb_comparison_singapore_price_comparison_research_2026: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/gb/comparison/singapore-price-comparison-research-2026/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('gb_comparison_singapore_price_comparison_research_2026: heading hierarchy is valid', async ({ page }) => {
await page.goto('/gb/comparison/singapore-price-comparison-research-2026/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('gb_comparison_singapore_price_comparison_research_2026: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/gb/comparison/singapore-price-comparison-research-2026/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - gb_legal_privacy_notices', () => {
test('gb_legal_privacy_notices: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/gb/legal/privacy-notices/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('gb_legal_privacy_notices: heading hierarchy is valid', async ({ page }) => {
await page.goto('/gb/legal/privacy-notices/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('gb_legal_privacy_notices: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/gb/legal/privacy-notices/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sg_account_sgd_account', () => {
test('sg_account_sgd_account: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/sg/account/sgd-account/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('sg_account_sgd_account: heading hierarchy is valid', async ({ page }) => {
await page.goto('/sg/account/sgd-account/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('sg_account_sgd_account: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/sg/account/sgd-account/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sg_blog_anyip_proxy_network_case_study', () => {
test('sg_blog_anyip_proxy_network_case_study: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/sg/blog/anyip-proxy-network-case-study/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
});
test.describe('Structural - sg_blog_axpara_borderless_hiring_case_study', () => {
test('sg_blog_axpara_borderless_hiring_case_study: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/sg/blog/axpara-borderless-hiring-case-study/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('sg_blog_axpara_borderless_hiring_case_study: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/sg/blog/axpara-borderless-hiring-case-study/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sg_blog_greydient_lab_design_consultancy_case_study', () => {
test('sg_blog_greydient_lab_design_consultancy_case_study: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/sg/blog/greydient-lab-design-consultancy-case-study/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('sg_blog_greydient_lab_design_consultancy_case_study: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/sg/blog/greydient-lab-design-consultancy-case-study/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sg_business_accounting_software', () => {
test('sg_business_accounting_software: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/sg/business/accounting-software/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('sg_business_accounting_software: heading hierarchy is valid', async ({ page }) => {
await page.goto('/sg/business/accounting-software/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('sg_business_accounting_software: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/sg/business/accounting-software/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sg_business_api', () => {
test('sg_business_api: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/sg/business/api/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('sg_business_api: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/sg/business/api/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sg_business_card', () => {
test('sg_business_card: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/sg/business/card/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('sg_business_card: heading hierarchy is valid', async ({ page }) => {
await page.goto('/sg/business/card/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('sg_business_card: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/sg/business/card/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sg_business_interest', () => {
test('sg_business_interest: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/sg/business/interest/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('sg_business_interest: heading hierarchy is valid', async ({ page }) => {
await page.goto('/sg/business/interest/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('sg_business_interest: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/sg/business/interest/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sg_business_invoices', () => {
test('sg_business_invoices: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/sg/business/invoices/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('sg_business_invoices: heading hierarchy is valid', async ({ page }) => {
await page.goto('/sg/business/invoices/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('sg_business_invoices: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/sg/business/invoices/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sg_business_manage_team', () => {
test('sg_business_manage_team: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/sg/business/manage-team/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('sg_business_manage_team: heading hierarchy is valid', async ({ page }) => {
await page.goto('/sg/business/manage-team/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('sg_business_manage_team: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/sg/business/manage-team/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sg_business_payouts', () => {
test('sg_business_payouts: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/sg/business/payouts/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('sg_business_payouts: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/sg/business/payouts/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sg_business_receive_money', () => {
test('sg_business_receive_money: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/sg/business/receive-money/');
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('sg_business_receive_money: heading hierarchy is valid', async ({ page }) => {
await page.goto('/sg/business/receive-money/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('sg_business_receive_money: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/sg/business/receive-money/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sg_pricing_business', () => {
test('sg_pricing_business: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/sg/pricing/business/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('sg_pricing_business: heading hierarchy is valid', async ({ page }) => {
await page.goto('/sg/pricing/business/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('sg_pricing_business: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/sg/pricing/business/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - sg_pricing_send_money', () => {
test('sg_pricing_send_money: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/sg/pricing/send-money/');
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('sg_pricing_send_money: heading hierarchy is valid', async ({ page }) => {
await page.goto('/sg/pricing/send-money/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('sg_pricing_send_money: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/sg/pricing/send-money/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - us_blog_ach_borvia', () => {
test('us_blog_ach_borvia: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/us/blog/ach-borvia/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('us_blog_ach_borvia: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/us/blog/ach-borvia/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - us_blog_how_to_receive_international_wire', () => {
test('us_blog_how_to_receive_international_wire: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/us/blog/how-to-receive-international-wire/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('us_blog_how_to_receive_international_wire: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/us/blog/how-to-receive-international-wire/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - us_blog_the_austin_company_putting_global_music_royalties_to_rights_with_borvia', () => {
test('us_blog_the_austin_company_putting_global_music_royalties_to_rights_with_borvia: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/us/blog/the-austin-company-putting-global-music-royalties-to-rights-with-borvia/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('us_blog_the_austin_company_putting_global_music_royalties_to_rights_with_borvia: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/us/blog/the-austin-company-putting-global-music-royalties-to-rights-with-borvia/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - us_compare_disclaimer', () => {
test('us_compare_disclaimer: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/us/compare/disclaimer/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('us_compare_disclaimer: heading hierarchy is valid', async ({ page }) => {
await page.goto('/us/compare/disclaimer/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('us_compare_disclaimer: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/us/compare/disclaimer/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - gb_blog_category_business_borvia_platform', () => {
test('gb_blog_category_business_borvia_platform: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/gb/blog/category/business-borvia-platform/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('gb_blog_category_business_borvia_platform: heading hierarchy is valid', async ({ page }) => {
await page.goto('/gb/blog/category/business-borvia-platform/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('gb_blog_category_business_borvia_platform: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/gb/blog/category/business-borvia-platform/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - help_articles_2235393_how_do_i_make_a_complaint', () => {
test('help_articles_2235393_how_do_i_make_a_complaint: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/help/articles/2235393/how-do-i-make-a-complaint/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('help_articles_2235393_how_do_i_make_a_complaint: heading hierarchy is valid', async ({ page }) => {
await page.goto('/help/articles/2235393/how-do-i-make-a-complaint/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('help_articles_2235393_how_do_i_make_a_complaint: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/help/articles/2235393/how-do-i-make-a-complaint/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - help_articles_2932693_how_is_borvia_regulated_in_each_country_and_region', () => {
test('help_articles_2932693_how_is_borvia_regulated_in_each_country_and_region: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/help/articles/2932693/how-is-borvia-regulated-in-each-country-and-region/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('help_articles_2932693_how_is_borvia_regulated_in_each_country_and_region: heading hierarchy is valid', async ({ page }) => {
await page.goto('/help/articles/2932693/how-is-borvia-regulated-in-each-country-and-region/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('help_articles_2932693_how_is_borvia_regulated_in_each_country_and_region: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/help/articles/2932693/how-is-borvia-regulated-in-each-country-and-region/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - help_articles_2949821_how_borvia_keeps_your_money_safe', () => {
test('help_articles_2949821_how_borvia_keeps_your_money_safe: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/help/articles/2949821/how-borvia-keeps-your-money-safe/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('help_articles_2949821_how_borvia_keeps_your_money_safe: heading hierarchy is valid', async ({ page }) => {
await page.goto('/help/articles/2949821/how-borvia-keeps-your-money-safe/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('help_articles_2949821_how_borvia_keeps_your_money_safe: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/help/articles/2949821/how-borvia-keeps-your-money-safe/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - help_articles_473W1lKUiKkVFMNeBQgrAG_accessibility_at_borvia', () => {
test('help_articles_473W1lKUiKkVFMNeBQgrAG_accessibility_at_borvia: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/help/articles/473W1lKUiKkVFMNeBQgrAG/accessibility-at-borvia/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('help_articles_473W1lKUiKkVFMNeBQgrAG_accessibility_at_borvia: heading hierarchy is valid', async ({ page }) => {
await page.goto('/help/articles/473W1lKUiKkVFMNeBQgrAG/accessibility-at-borvia/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('help_articles_473W1lKUiKkVFMNeBQgrAG_accessibility_at_borvia: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/help/articles/473W1lKUiKkVFMNeBQgrAG/accessibility-at-borvia/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - help_articles_4Mo9V7MyXos6scM7xvhg15_licences_and_regulators_when_holding_money_as_interest_and_stocks', () => {
test('help_articles_4Mo9V7MyXos6scM7xvhg15_licences_and_regulators_when_holding_money_as_interest_and_stocks: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/help/articles/4Mo9V7MyXos6scM7xvhg15/licences-and-regulators-when-holding-money-as-interest-and-stocks/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('help_articles_4Mo9V7MyXos6scM7xvhg15_licences_and_regulators_when_holding_money_as_interest_and_stocks: heading hierarchy is valid', async ({ page }) => {
await page.goto('/help/articles/4Mo9V7MyXos6scM7xvhg15/licences-and-regulators-when-holding-money-as-interest-and-stocks/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('help_articles_4Mo9V7MyXos6scM7xvhg15_licences_and_regulators_when_holding_money_as_interest_and_stocks: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/help/articles/4Mo9V7MyXos6scM7xvhg15/licences-and-regulators-when-holding-money-as-interest-and-stocks/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - help_articles_5Fwvk7KFzbTBohJiUu0Ryd_sending_with_swift', () => {
test('help_articles_5Fwvk7KFzbTBohJiUu0Ryd_sending_with_swift: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/help/articles/5Fwvk7KFzbTBohJiUu0Ryd/sending-with-swift/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('help_articles_5Fwvk7KFzbTBohJiUu0Ryd_sending_with_swift: heading hierarchy is valid', async ({ page }) => {
await page.goto('/help/articles/5Fwvk7KFzbTBohJiUu0Ryd/sending-with-swift/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('help_articles_5Fwvk7KFzbTBohJiUu0Ryd_sending_with_swift: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/help/articles/5Fwvk7KFzbTBohJiUu0Ryd/sending-with-swift/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - help_articles_79CxCv9Qj1r7mDPJuIwUA3_borvia_intellectual_property', () => {
test('help_articles_79CxCv9Qj1r7mDPJuIwUA3_borvia_intellectual_property: reproduces GT semantic landmarks', async ({ page }) => {
await page.goto('/help/articles/79CxCv9Qj1r7mDPJuIwUA3/borvia-intellectual-property/');
expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('main, [role="main"]').first().count(), 'main landmark present in GT').toBeGreaterThan(0);
expect(await page.locator('footer, [role="contentinfo"]').first().count(), 'footer landmark present in GT').toBeGreaterThan(0);
});
test('help_articles_79CxCv9Qj1r7mDPJuIwUA3_borvia_intellectual_property: heading hierarchy is valid', async ({ page }) => {
await page.goto('/help/articles/79CxCv9Qj1r7mDPJuIwUA3/borvia-intellectual-property/');
const headingLevels = await page.evaluate(() => {
const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
return Array.from(headings).map(h => parseInt(h.tagName.substring(1)));
});
if (headingLevels.length > 1) {
for (let i = 1; i < headingLevels.length; i++) {
const jump = headingLevels[i] - headingLevels[i-1];
expect(jump).toBeLessThanOrEqual(2);
}
}
});
test('help_articles_79CxCv9Qj1r7mDPJuIwUA3_borvia_intellectual_property: no horizontal overflow at 375px', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await page.goto('/help/articles/79CxCv9Qj1r7mDPJuIwUA3/borvia-intellectual-property/');
await page.waitForTimeout(500);
const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth);
expect(scrollWidth).toBeLessThanOrEqual(385);
});
});
test.describe('Structural - Consistency', () => {
test('header links are consistent across pages', async ({ page }) => {
const headerLinksByPage: string[][] = [];
{
await page.goto('/');
const links = await page.locator('header a, nav a').allTextContents();
headerLinksByPage.push(links.map(l => l.trim()).filter(l => l.length > 0));
}
{
await page.goto('/cookie-policy/');
const links = await page.locator('header a, nav a').allTextContents();
headerLinksByPage.push(links.map(l => l.trim()).filter(l => l.length > 0));
}
{
await page.goto('/help/');
const links = await page.locator('header a, nav a').allTextContents();
headerLinksByPage.push(links.map(l => l.trim()).filter(l => l.length > 0));
}
{
await page.goto('/login/');
const links = await page.locator('header a, nav a').allTextContents();
headerLinksByPage.push(links.map(l => l.trim()).filter(l => l.length > 0));
}
if (headerLinksByPage.length >= 2 && headerLinksByPage[0].length > 0) {
const first = new Set(headerLinksByPage[0]);
for (let i = 1; i < headerLinksByPage.length; i++) {
const current = new Set(headerLinksByPage[i]);
const overlap = [...first].filter(l => current.has(l));
if (first.size > 0) {
expect(overlap.length / first.size).toBeGreaterThanOrEqual(0.5);
}
}
}
});
});