Datasets:
Download web/rituvia.example/tests/static/structure.scripted.spec.ts from Qwen/RecreationBench: direct link, hf CLI and curl.
- Browser
- Download file 242 kB
-
https://huggingface.co/datasets/Qwen/RecreationBench/resolve/main/web/rituvia.example/tests/static/structure.scripted.spec.ts
- Command line
-
hf download hf://datasets/Qwen/RecreationBench/web/rituvia.example/tests/static/structure.scripted.spec.ts
-
curl -L -o structure.scripted.spec.ts https://huggingface.co/datasets/Qwen/RecreationBench/resolve/main/web/rituvia.example/tests/static/structure.scripted.spec.ts
242 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('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('homepage: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/'); | |
| 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('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 - clarify', () => { | |
| test('clarify: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/clarify/'); | |
| expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('clarify: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/clarify/'); | |
| 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('clarify: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/clarify/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa', () => { | |
| test('qa: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/'); | |
| 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('qa: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - science_behind_rituvia', () => { | |
| test('science_behind_rituvia: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/science-behind-rituvia/'); | |
| expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('science_behind_rituvia: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/science-behind-rituvia/'); | |
| 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('science_behind_rituvia: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/science-behind-rituvia/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - shape', () => { | |
| test('shape: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/shape/'); | |
| expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('shape: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/shape/'); | |
| 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('shape: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/shape/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_after_eating_breakfast_i_usually_get_very_drowsy_and_sleepy_coffee_helps_but_im_trying_to_control_my_caffeine_intake_how_can_i_fight_this_sleepiness', () => { | |
| test('qa_after_eating_breakfast_i_usually_get_very_drowsy_and_sleepy_coffee_helps_but_im_trying_to_control_my_caffeine_intake_how_can_i_fight_this_sleepiness: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/after-eating-breakfast-i-usually-get-very-drowsy-and-sleepy-coffee-helps-but-im-trying-to-control-my-caffeine-intake-how-can-i-fight-this-sleepiness/'); | |
| 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('qa_after_eating_breakfast_i_usually_get_very_drowsy_and_sleepy_coffee_helps_but_im_trying_to_control_my_caffeine_intake_how_can_i_fight_this_sleepiness: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/after-eating-breakfast-i-usually-get-very-drowsy-and-sleepy-coffee-helps-but-im-trying-to-control-my-caffeine-intake-how-can-i-fight-this-sleepiness/'); | |
| 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('qa_after_eating_breakfast_i_usually_get_very_drowsy_and_sleepy_coffee_helps_but_im_trying_to_control_my_caffeine_intake_how_can_i_fight_this_sleepiness: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/after-eating-breakfast-i-usually-get-very-drowsy-and-sleepy-coffee-helps-but-im-trying-to-control-my-caffeine-intake-how-can-i-fight-this-sleepiness/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_are_you_able_to_meditate_in_an_area_thats_not_so_quiet', () => { | |
| test('qa_are_you_able_to_meditate_in_an_area_thats_not_so_quiet: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/are-you-able-to-meditate-in-an-area-thats-not-so-quiet/'); | |
| 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('qa_are_you_able_to_meditate_in_an_area_thats_not_so_quiet: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/are-you-able-to-meditate-in-an-area-thats-not-so-quiet/'); | |
| 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('qa_are_you_able_to_meditate_in_an_area_thats_not_so_quiet: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/are-you-able-to-meditate-in-an-area-thats-not-so-quiet/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_be_grateful', () => { | |
| test('qa_be_grateful: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/be-grateful/'); | |
| 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('qa_be_grateful: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/be-grateful/'); | |
| 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('qa_be_grateful: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/be-grateful/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_best_tips_for_meditating', () => { | |
| test('qa_best_tips_for_meditating: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/best-tips-for-meditating/'); | |
| 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('qa_best_tips_for_meditating: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/best-tips-for-meditating/'); | |
| 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('qa_best_tips_for_meditating: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/best-tips-for-meditating/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_clean_tidy_up', () => { | |
| test('qa_clean_tidy_up: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/clean-tidy-up/'); | |
| 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('qa_clean_tidy_up: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/clean-tidy-up/'); | |
| 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('qa_clean_tidy_up: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/clean-tidy-up/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_deep_work', () => { | |
| test('qa_deep_work: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/deep-work/'); | |
| 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('qa_deep_work: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/deep-work/'); | |
| 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('qa_deep_work: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/deep-work/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_disconnect_unplug', () => { | |
| test('qa_disconnect_unplug: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/disconnect-unplug/'); | |
| 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('qa_disconnect_unplug: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/disconnect-unplug/'); | |
| 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('qa_disconnect_unplug: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/disconnect-unplug/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_do_i_eat_before_or_after_a_workout', () => { | |
| test('qa_do_i_eat_before_or_after_a_workout: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/do-i-eat-before-or-after-a-workout/'); | |
| 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('qa_do_i_eat_before_or_after_a_workout: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/do-i-eat-before-or-after-a-workout/'); | |
| 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('qa_do_i_eat_before_or_after_a_workout: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/do-i-eat-before-or-after-a-workout/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_do_you_feel_like_your_relationships_can_improve_if_youre_not_on_social_media_as_much', () => { | |
| test('qa_do_you_feel_like_your_relationships_can_improve_if_youre_not_on_social_media_as_much: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/do-you-feel-like-your-relationships-can-improve-if-youre-not-on-social-media-as-much/'); | |
| 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('qa_do_you_feel_like_your_relationships_can_improve_if_youre_not_on_social_media_as_much: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/do-you-feel-like-your-relationships-can-improve-if-youre-not-on-social-media-as-much/'); | |
| 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('qa_do_you_feel_like_your_relationships_can_improve_if_youre_not_on_social_media_as_much: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/do-you-feel-like-your-relationships-can-improve-if-youre-not-on-social-media-as-much/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_do_you_find_a_late_breakfast_helps_balance_your_energy_levels_i_cant_eat_too_early_without_all_my_energy_going_to_digestion', () => { | |
| test('qa_do_you_find_a_late_breakfast_helps_balance_your_energy_levels_i_cant_eat_too_early_without_all_my_energy_going_to_digestion: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/do-you-find-a-late-breakfast-helps-balance-your-energy-levels-i-cant-eat-too-early-without-all-my-energy-going-to-digestion/'); | |
| 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('qa_do_you_find_a_late_breakfast_helps_balance_your_energy_levels_i_cant_eat_too_early_without_all_my_energy_going_to_digestion: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/do-you-find-a-late-breakfast-helps-balance-your-energy-levels-i-cant-eat-too-early-without-all-my-energy-going-to-digestion/'); | |
| 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('qa_do_you_find_a_late_breakfast_helps_balance_your_energy_levels_i_cant_eat_too_early_without_all_my_energy_going_to_digestion: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/do-you-find-a-late-breakfast-helps-balance-your-energy-levels-i-cant-eat-too-early-without-all-my-energy-going-to-digestion/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_do_you_find_even_the_not_so_easy_challenges_beget_awarenesss_to_be_grateful_for', () => { | |
| test('qa_do_you_find_even_the_not_so_easy_challenges_beget_awarenesss_to_be_grateful_for: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/do-you-find-even-the-not-so-easy-challenges-beget-awarenesss-to-be-grateful-for/'); | |
| 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('qa_do_you_find_even_the_not_so_easy_challenges_beget_awarenesss_to_be_grateful_for: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/do-you-find-even-the-not-so-easy-challenges-beget-awarenesss-to-be-grateful-for/'); | |
| 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('qa_do_you_find_even_the_not_so_easy_challenges_beget_awarenesss_to_be_grateful_for: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/do-you-find-even-the-not-so-easy-challenges-beget-awarenesss-to-be-grateful-for/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_do_you_find_it_easier_to_practice_gratefulness_when_thinking_of_what_went_well_today_instead_of_trying_to_realize_what_youre_actually_grateful_for', () => { | |
| test('qa_do_you_find_it_easier_to_practice_gratefulness_when_thinking_of_what_went_well_today_instead_of_trying_to_realize_what_youre_actually_grateful_for: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/do-you-find-it-easier-to-practice-gratefulness-when-thinking-of-what-went-well-today-instead-of-trying-to-realize-what-youre-actually-grateful-for/'); | |
| 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('qa_do_you_find_it_easier_to_practice_gratefulness_when_thinking_of_what_went_well_today_instead_of_trying_to_realize_what_youre_actually_grateful_for: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/do-you-find-it-easier-to-practice-gratefulness-when-thinking-of-what-went-well-today-instead-of-trying-to-realize-what-youre-actually-grateful-for/'); | |
| 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('qa_do_you_find_it_easier_to_practice_gratefulness_when_thinking_of_what_went_well_today_instead_of_trying_to_realize_what_youre_actually_grateful_for: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/do-you-find-it-easier-to-practice-gratefulness-when-thinking-of-what-went-well-today-instead-of-trying-to-realize-what-youre-actually-grateful-for/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_do_you_have_a_cheat_day', () => { | |
| test('qa_do_you_have_a_cheat_day: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-a-cheat-day/'); | |
| 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('qa_do_you_have_a_cheat_day: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-a-cheat-day/'); | |
| 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('qa_do_you_have_a_cheat_day: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/do-you-have-a-cheat-day/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_do_you_have_any_examples_of_what_you_can_prepare_the_day_before', () => { | |
| test('qa_do_you_have_any_examples_of_what_you_can_prepare_the_day_before: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-any-examples-of-what-you-can-prepare-the-day-before/'); | |
| 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('qa_do_you_have_any_examples_of_what_you_can_prepare_the_day_before: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-any-examples-of-what-you-can-prepare-the-day-before/'); | |
| 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('qa_do_you_have_any_examples_of_what_you_can_prepare_the_day_before: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/do-you-have-any-examples-of-what-you-can-prepare-the-day-before/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_do_you_have_any_good_make_in_advance_recipes_i_like_to_have_things_ready_to_go_that_i_can_just_pull_out_of_the_refrigerator_freezer_and_heat_up_but_im_burning_out_on_the_things_i_usually_ma', () => { | |
| test('qa_do_you_have_any_good_make_in_advance_recipes_i_like_to_have_things_ready_to_go_that_i_can_just_pull_out_of_the_refrigerator_freezer_and_heat_up_but_im_burning_out_on_the_things_i_usually_ma: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-any-good-make-in-advance-recipes-i-like-to-have-things-ready-to-go-that-i-can-just-pull-out-of-the-refrigerator-freezer-and-heat-up-but-im-burning-out-on-the-things-i-usually-ma/'); | |
| 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('qa_do_you_have_any_good_make_in_advance_recipes_i_like_to_have_things_ready_to_go_that_i_can_just_pull_out_of_the_refrigerator_freezer_and_heat_up_but_im_burning_out_on_the_things_i_usually_ma: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-any-good-make-in-advance-recipes-i-like-to-have-things-ready-to-go-that-i-can-just-pull-out-of-the-refrigerator-freezer-and-heat-up-but-im-burning-out-on-the-things-i-usually-ma/'); | |
| 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('qa_do_you_have_any_good_make_in_advance_recipes_i_like_to_have_things_ready_to_go_that_i_can_just_pull_out_of_the_refrigerator_freezer_and_heat_up_but_im_burning_out_on_the_things_i_usually_ma: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/do-you-have-any-good-make-in-advance-recipes-i-like-to-have-things-ready-to-go-that-i-can-just-pull-out-of-the-refrigerator-freezer-and-heat-up-but-im-burning-out-on-the-things-i-usually-ma/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_do_you_have_any_tips_for_a_quick_weekday_breakfast_i_love_making_eggs_on_the_weekend_but_during_the_week_i_only_really_have_time_for_toast_and_tea', () => { | |
| test('qa_do_you_have_any_tips_for_a_quick_weekday_breakfast_i_love_making_eggs_on_the_weekend_but_during_the_week_i_only_really_have_time_for_toast_and_tea: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-any-tips-for-a-quick-weekday-breakfast-i-love-making-eggs-on-the-weekend-but-during-the-week-i-only-really-have-time-for-toast-and-tea/'); | |
| 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('qa_do_you_have_any_tips_for_a_quick_weekday_breakfast_i_love_making_eggs_on_the_weekend_but_during_the_week_i_only_really_have_time_for_toast_and_tea: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-any-tips-for-a-quick-weekday-breakfast-i-love-making-eggs-on-the-weekend-but-during-the-week-i-only-really-have-time-for-toast-and-tea/'); | |
| 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('qa_do_you_have_any_tips_for_a_quick_weekday_breakfast_i_love_making_eggs_on_the_weekend_but_during_the_week_i_only_really_have_time_for_toast_and_tea: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/do-you-have-any-tips-for-a-quick-weekday-breakfast-i-love-making-eggs-on-the-weekend-but-during-the-week-i-only-really-have-time-for-toast-and-tea/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_do_you_have_any_tips_for_learning_a_language_in_particular_how_do_you_practice_speaking', () => { | |
| test('qa_do_you_have_any_tips_for_learning_a_language_in_particular_how_do_you_practice_speaking: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-any-tips-for-learning-a-language-in-particular-how-do-you-practice-speaking/'); | |
| 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('qa_do_you_have_any_tips_for_learning_a_language_in_particular_how_do_you_practice_speaking: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-any-tips-for-learning-a-language-in-particular-how-do-you-practice-speaking/'); | |
| 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('qa_do_you_have_any_tips_for_learning_a_language_in_particular_how_do_you_practice_speaking: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/do-you-have-any-tips-for-learning-a-language-in-particular-how-do-you-practice-speaking/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_do_you_have_any_tricks_about_preparing_breakfast_the_night_before_but_not_oatmeal_im_not_a_big_fan_of_it_i_usually_dont_have_enough_time_in_the_morning', () => { | |
| test('qa_do_you_have_any_tricks_about_preparing_breakfast_the_night_before_but_not_oatmeal_im_not_a_big_fan_of_it_i_usually_dont_have_enough_time_in_the_morning: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-any-tricks-about-preparing-breakfast-the-night-before-but-not-oatmeal-im-not-a-big-fan-of-it-i-usually-dont-have-enough-time-in-the-morning/'); | |
| 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('qa_do_you_have_any_tricks_about_preparing_breakfast_the_night_before_but_not_oatmeal_im_not_a_big_fan_of_it_i_usually_dont_have_enough_time_in_the_morning: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-any-tricks-about-preparing-breakfast-the-night-before-but-not-oatmeal-im-not-a-big-fan-of-it-i-usually-dont-have-enough-time-in-the-morning/'); | |
| 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('qa_do_you_have_any_tricks_about_preparing_breakfast_the_night_before_but_not_oatmeal_im_not_a_big_fan_of_it_i_usually_dont_have_enough_time_in_the_morning: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/do-you-have-any-tricks-about-preparing-breakfast-the-night-before-but-not-oatmeal-im-not-a-big-fan-of-it-i-usually-dont-have-enough-time-in-the-morning/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_do_you_have_eggs_every_morning_or_do_you_switch_it_up', () => { | |
| test('qa_do_you_have_eggs_every_morning_or_do_you_switch_it_up: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-eggs-every-morning-or-do-you-switch-it-up/'); | |
| 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('qa_do_you_have_eggs_every_morning_or_do_you_switch_it_up: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-eggs-every-morning-or-do-you-switch-it-up/'); | |
| 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('qa_do_you_have_eggs_every_morning_or_do_you_switch_it_up: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/do-you-have-eggs-every-morning-or-do-you-switch-it-up/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_do_you_have_trouble_remembering_to_registrate_your_healthy_breakfast_on_rituvia', () => { | |
| test('qa_do_you_have_trouble_remembering_to_registrate_your_healthy_breakfast_on_rituvia: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-trouble-remembering-to-registrate-your-healthy-breakfast-on-rituvia/'); | |
| 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('qa_do_you_have_trouble_remembering_to_registrate_your_healthy_breakfast_on_rituvia: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/do-you-have-trouble-remembering-to-registrate-your-healthy-breakfast-on-rituvia/'); | |
| 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('qa_do_you_have_trouble_remembering_to_registrate_your_healthy_breakfast_on_rituvia: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/do-you-have-trouble-remembering-to-registrate-your-healthy-breakfast-on-rituvia/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_do_you_vary_what_you_eat_every_morning', () => { | |
| test('qa_do_you_vary_what_you_eat_every_morning: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/do-you-vary-what-you-eat-every-morning/'); | |
| 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('qa_do_you_vary_what_you_eat_every_morning: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/do-you-vary-what-you-eat-every-morning/'); | |
| 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('qa_do_you_vary_what_you_eat_every_morning: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/do-you-vary-what-you-eat-every-morning/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_does_anyone_have_a_recipe_for_a_green_smoothie_that_tastes_great', () => { | |
| test('qa_does_anyone_have_a_recipe_for_a_green_smoothie_that_tastes_great: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/does-anyone-have-a-recipe-for-a-green-smoothie-that-tastes-great/'); | |
| 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('qa_does_anyone_have_a_recipe_for_a_green_smoothie_that_tastes_great: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/does-anyone-have-a-recipe-for-a-green-smoothie-that-tastes-great/'); | |
| 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('qa_does_anyone_have_a_recipe_for_a_green_smoothie_that_tastes_great: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/does-anyone-have-a-recipe-for-a-green-smoothie-that-tastes-great/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_does_anyone_have_to_take_medication_that_makes_you_feel_sluggish_the_next_morning_and_if_so_how_do_you_deal_with_it', () => { | |
| test('qa_does_anyone_have_to_take_medication_that_makes_you_feel_sluggish_the_next_morning_and_if_so_how_do_you_deal_with_it: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/does-anyone-have-to-take-medication-that-makes-you-feel-sluggish-the-next-morning-and-if-so-how-do-you-deal-with-it/'); | |
| 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('qa_does_anyone_have_to_take_medication_that_makes_you_feel_sluggish_the_next_morning_and_if_so_how_do_you_deal_with_it: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/does-anyone-have-to-take-medication-that-makes-you-feel-sluggish-the-next-morning-and-if-so-how-do-you-deal-with-it/'); | |
| 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('qa_does_anyone_have_to_take_medication_that_makes_you_feel_sluggish_the_next_morning_and_if_so_how_do_you_deal_with_it: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/does-anyone-have-to-take-medication-that-makes-you-feel-sluggish-the-next-morning-and-if-so-how-do-you-deal-with-it/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_does_anyone_know_how_i_can_just_get_up_and_do_it_i_have_motivation_but_i_dont_put_it_into_action', () => { | |
| test('qa_does_anyone_know_how_i_can_just_get_up_and_do_it_i_have_motivation_but_i_dont_put_it_into_action: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/does-anyone-know-how-i-can-just-get-up-and-do-it-i-have-motivation-but-i-dont-put-it-into-action/'); | |
| 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('qa_does_anyone_know_how_i_can_just_get_up_and_do_it_i_have_motivation_but_i_dont_put_it_into_action: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/does-anyone-know-how-i-can-just-get-up-and-do-it-i-have-motivation-but-i-dont-put-it-into-action/'); | |
| 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('qa_does_anyone_know_how_i_can_just_get_up_and_do_it_i_have_motivation_but_i_dont_put_it_into_action: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/does-anyone-know-how-i-can-just-get-up-and-do-it-i-have-motivation-but-i-dont-put-it-into-action/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_does_journaling_help_with_very_bad_anxiety_i_am_curious_if_it_works_for_other_people', () => { | |
| test('qa_does_journaling_help_with_very_bad_anxiety_i_am_curious_if_it_works_for_other_people: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/does-journaling-help-with-very-bad-anxiety-i-am-curious-if-it-works-for-other-people/'); | |
| 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('qa_does_journaling_help_with_very_bad_anxiety_i_am_curious_if_it_works_for_other_people: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/does-journaling-help-with-very-bad-anxiety-i-am-curious-if-it-works-for-other-people/'); | |
| 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('qa_does_journaling_help_with_very_bad_anxiety_i_am_curious_if_it_works_for_other_people: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/does-journaling-help-with-very-bad-anxiety-i-am-curious-if-it-works-for-other-people/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_drink_tea', () => { | |
| test('qa_drink_tea: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/drink-tea/'); | |
| 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('qa_drink_tea: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/drink-tea/'); | |
| 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('qa_drink_tea: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/drink-tea/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_eat_a_great_breakfast', () => { | |
| test('qa_eat_a_great_breakfast: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/eat-a-great-breakfast/'); | |
| 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('qa_eat_a_great_breakfast: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/eat-a-great-breakfast/'); | |
| 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('qa_eat_a_great_breakfast: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/eat-a-great-breakfast/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_exercise', () => { | |
| test('qa_exercise: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/exercise/'); | |
| 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('qa_exercise: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/exercise/'); | |
| 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('qa_exercise: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/exercise/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_floss', () => { | |
| test('qa_floss: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/floss/'); | |
| 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('qa_floss: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/floss/'); | |
| 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('qa_floss: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/floss/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_groom_yourself', () => { | |
| test('qa_groom_yourself: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/groom-yourself/'); | |
| 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('qa_groom_yourself: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/groom-yourself/'); | |
| 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('qa_groom_yourself: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/groom-yourself/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_how_can_i_know_more_about_meditation_2', () => { | |
| test('qa_how_can_i_know_more_about_meditation_2: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/how-can-i-know-more-about-meditation-2/'); | |
| 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('qa_how_can_i_know_more_about_meditation_2: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/how-can-i-know-more-about-meditation-2/'); | |
| 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('qa_how_can_i_know_more_about_meditation_2: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/how-can-i-know-more-about-meditation-2/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_how_can_i_make_breakfast_if_i_wake_up_at_645_have_to_leave_by_720_and_take_30_minutes_to_get_ready_without_making_a_drastic_change_to_my_wake_up_time', () => { | |
| test('qa_how_can_i_make_breakfast_if_i_wake_up_at_645_have_to_leave_by_720_and_take_30_minutes_to_get_ready_without_making_a_drastic_change_to_my_wake_up_time: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/how-can-i-make-breakfast-if-i-wake-up-at-645-have-to-leave-by-720-and-take-30-minutes-to-get-ready-without-making-a-drastic-change-to-my-wake-up-time/'); | |
| 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('qa_how_can_i_make_breakfast_if_i_wake_up_at_645_have_to_leave_by_720_and_take_30_minutes_to_get_ready_without_making_a_drastic_change_to_my_wake_up_time: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/how-can-i-make-breakfast-if-i-wake-up-at-645-have-to-leave-by-720-and-take-30-minutes-to-get-ready-without-making-a-drastic-change-to-my-wake-up-time/'); | |
| 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('qa_how_can_i_make_breakfast_if_i_wake_up_at_645_have_to_leave_by_720_and_take_30_minutes_to_get_ready_without_making_a_drastic_change_to_my_wake_up_time: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/how-can-i-make-breakfast-if-i-wake-up-at-645-have-to-leave-by-720-and-take-30-minutes-to-get-ready-without-making-a-drastic-change-to-my-wake-up-time/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_how_can_i_make_exercising_as_a_habit_i_do_one_day_and_get_lazy_another_one_this_is_my_problem', () => { | |
| test('qa_how_can_i_make_exercising_as_a_habit_i_do_one_day_and_get_lazy_another_one_this_is_my_problem: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/how-can-i-make-exercising-as-a-habit-i-do-one-day-and-get-lazy-another-one-this-is-my-problem/'); | |
| 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('qa_how_can_i_make_exercising_as_a_habit_i_do_one_day_and_get_lazy_another_one_this_is_my_problem: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/how-can-i-make-exercising-as-a-habit-i-do-one-day-and-get-lazy-another-one-this-is-my-problem/'); | |
| 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('qa_how_can_i_make_exercising_as_a_habit_i_do_one_day_and_get_lazy_another_one_this_is_my_problem: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/how-can-i-make-exercising-as-a-habit-i-do-one-day-and-get-lazy-another-one-this-is-my-problem/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_how_can_i_stop_random_moments_of_self_doubt_random_moments_of_feeling_insecure', () => { | |
| test('qa_how_can_i_stop_random_moments_of_self_doubt_random_moments_of_feeling_insecure: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/how-can-i-stop-random-moments-of-self-doubt-random-moments-of-feeling-insecure/'); | |
| 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('qa_how_can_i_stop_random_moments_of_self_doubt_random_moments_of_feeling_insecure: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/how-can-i-stop-random-moments-of-self-doubt-random-moments-of-feeling-insecure/'); | |
| 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('qa_how_can_i_stop_random_moments_of_self_doubt_random_moments_of_feeling_insecure: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/how-can-i-stop-random-moments-of-self-doubt-random-moments-of-feeling-insecure/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_how_can_i_study_for_10_hours_a_day_2', () => { | |
| test('qa_how_can_i_study_for_10_hours_a_day_2: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/how-can-i-study-for-10-hours-a-day-2/'); | |
| 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('qa_how_can_i_study_for_10_hours_a_day_2: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/how-can-i-study-for-10-hours-a-day-2/'); | |
| 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('qa_how_can_i_study_for_10_hours_a_day_2: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/how-can-i-study-for-10-hours-a-day-2/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_how_do_i_disconnect_and_unplug', () => { | |
| test('qa_how_do_i_disconnect_and_unplug: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/how-do-i-disconnect-and-unplug/'); | |
| 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('qa_how_do_i_disconnect_and_unplug: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/how-do-i-disconnect-and-unplug/'); | |
| 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('qa_how_do_i_disconnect_and_unplug: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/how-do-i-disconnect-and-unplug/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_how_do_i_find_time_and_energy_to_meditate_in_the_morning', () => { | |
| test('qa_how_do_i_find_time_and_energy_to_meditate_in_the_morning: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/how-do-i-find-time-and-energy-to-meditate-in-the-morning/'); | |
| 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('qa_how_do_i_find_time_and_energy_to_meditate_in_the_morning: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/how-do-i-find-time-and-energy-to-meditate-in-the-morning/'); | |
| 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('qa_how_do_i_find_time_and_energy_to_meditate_in_the_morning: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/how-do-i-find-time-and-energy-to-meditate-in-the-morning/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_how_do_i_keep_myself_accountable_especially_when_i_lack_support_group', () => { | |
| test('qa_how_do_i_keep_myself_accountable_especially_when_i_lack_support_group: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/how-do-i-keep-myself-accountable-especially-when-i-lack-support-group/'); | |
| 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('qa_how_do_i_keep_myself_accountable_especially_when_i_lack_support_group: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/how-do-i-keep-myself-accountable-especially-when-i-lack-support-group/'); | |
| 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('qa_how_do_i_keep_myself_accountable_especially_when_i_lack_support_group: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/how-do-i-keep-myself-accountable-especially-when-i-lack-support-group/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_how_do_i_remember_all_the_details_in_my_day_for_my_diary', () => { | |
| test('qa_how_do_i_remember_all_the_details_in_my_day_for_my_diary: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/how-do-i-remember-all-the-details-in-my-day-for-my-diary/'); | |
| 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('qa_how_do_i_remember_all_the_details_in_my_day_for_my_diary: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/how-do-i-remember-all-the-details-in-my-day-for-my-diary/'); | |
| 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('qa_how_do_i_remember_all_the_details_in_my_day_for_my_diary: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/how-do-i-remember-all-the-details-in-my-day-for-my-diary/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_how_do_i_stay_consistent_with_meditation', () => { | |
| test('qa_how_do_i_stay_consistent_with_meditation: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/how-do-i-stay-consistent-with-meditation/'); | |
| 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('qa_how_do_i_stay_consistent_with_meditation: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/how-do-i-stay-consistent-with-meditation/'); | |
| 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('qa_how_do_i_stay_consistent_with_meditation: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/how-do-i-stay-consistent-with-meditation/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_how_do_i_strengthen_the_mediation_effects', () => { | |
| test('qa_how_do_i_strengthen_the_mediation_effects: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/how-do-i-strengthen-the-mediation-effects/'); | |
| 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('qa_how_do_i_strengthen_the_mediation_effects: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/how-do-i-strengthen-the-mediation-effects/'); | |
| 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('qa_how_do_i_strengthen_the_mediation_effects: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/how-do-i-strengthen-the-mediation-effects/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_how_do_you_actually_disconnect_and_be_consistent_with_it', () => { | |
| test('qa_how_do_you_actually_disconnect_and_be_consistent_with_it: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-actually-disconnect-and-be-consistent-with-it/'); | |
| 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('qa_how_do_you_actually_disconnect_and_be_consistent_with_it: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-actually-disconnect-and-be-consistent-with-it/'); | |
| 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('qa_how_do_you_actually_disconnect_and_be_consistent_with_it: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/how-do-you-actually-disconnect-and-be-consistent-with-it/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_how_do_you_avoid_eating_carb_heavy_cereal_when_youre_pressed_for_time_in_the_morning', () => { | |
| test('qa_how_do_you_avoid_eating_carb_heavy_cereal_when_youre_pressed_for_time_in_the_morning: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-avoid-eating-carb-heavy-cereal-when-youre-pressed-for-time-in-the-morning/'); | |
| 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('qa_how_do_you_avoid_eating_carb_heavy_cereal_when_youre_pressed_for_time_in_the_morning: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-avoid-eating-carb-heavy-cereal-when-youre-pressed-for-time-in-the-morning/'); | |
| 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('qa_how_do_you_avoid_eating_carb_heavy_cereal_when_youre_pressed_for_time_in_the_morning: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/how-do-you-avoid-eating-carb-heavy-cereal-when-youre-pressed-for-time-in-the-morning/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_how_do_you_celebrate_after_working_out', () => { | |
| test('qa_how_do_you_celebrate_after_working_out: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-celebrate-after-working-out/'); | |
| 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('qa_how_do_you_celebrate_after_working_out: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-celebrate-after-working-out/'); | |
| 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('qa_how_do_you_celebrate_after_working_out: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/how-do-you-celebrate-after-working-out/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_how_do_you_consistently_meditate_like_do_it_everyday_i_have_a_problem_with_procrastination_and_not_being_able_to_do_simple_things_like_meditating_or_journaling_everyday', () => { | |
| test('qa_how_do_you_consistently_meditate_like_do_it_everyday_i_have_a_problem_with_procrastination_and_not_being_able_to_do_simple_things_like_meditating_or_journaling_everyday: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-consistently-meditate-like-do-it-everyday-i-have-a-problem-with-procrastination-and-not-being-able-to-do-simple-things-like-meditating-or-journaling-everyday/'); | |
| 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('qa_how_do_you_consistently_meditate_like_do_it_everyday_i_have_a_problem_with_procrastination_and_not_being_able_to_do_simple_things_like_meditating_or_journaling_everyday: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-consistently-meditate-like-do-it-everyday-i-have-a-problem-with-procrastination-and-not-being-able-to-do-simple-things-like-meditating-or-journaling-everyday/'); | |
| 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('qa_how_do_you_consistently_meditate_like_do_it_everyday_i_have_a_problem_with_procrastination_and_not_being_able_to_do_simple_things_like_meditating_or_journaling_everyday: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/how-do-you-consistently-meditate-like-do-it-everyday-i-have-a-problem-with-procrastination-and-not-being-able-to-do-simple-things-like-meditating-or-journaling-everyday/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_how_do_you_decide_what_a_great_breakfast_is_i_like_how_open_this_is_because_it_makes_it_possible_to_interpret_it_as_youd_like_is_great_healthy_satisfyin', () => { | |
| test('qa_how_do_you_decide_what_a_great_breakfast_is_i_like_how_open_this_is_because_it_makes_it_possible_to_interpret_it_as_youd_like_is_great_healthy_satisfyin: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-decide-what-a-great-breakfast-is-i-like-how-open-this-is-because-it-makes-it-possible-to-interpret-it-as-youd-like-is-great-healthy-satisfyin/'); | |
| 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('qa_how_do_you_decide_what_a_great_breakfast_is_i_like_how_open_this_is_because_it_makes_it_possible_to_interpret_it_as_youd_like_is_great_healthy_satisfyin: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-decide-what-a-great-breakfast-is-i-like-how-open-this-is-because-it-makes-it-possible-to-interpret-it-as-youd-like-is-great-healthy-satisfyin/'); | |
| 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('qa_how_do_you_decide_what_a_great_breakfast_is_i_like_how_open_this_is_because_it_makes_it_possible_to_interpret_it_as_youd_like_is_great_healthy_satisfyin: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/how-do-you-decide-what-a-great-breakfast-is-i-like-how-open-this-is-because-it-makes-it-possible-to-interpret-it-as-youd-like-is-great-healthy-satisfyin/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_how_do_you_disconnect', () => { | |
| test('qa_how_do_you_disconnect: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-disconnect/'); | |
| 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('qa_how_do_you_disconnect: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-disconnect/'); | |
| 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('qa_how_do_you_disconnect: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/how-do-you-disconnect/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_how_do_you_find_time_to_read', () => { | |
| test('qa_how_do_you_find_time_to_read: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-find-time-to-read/'); | |
| 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('qa_how_do_you_find_time_to_read: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-find-time-to-read/'); | |
| 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('qa_how_do_you_find_time_to_read: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/how-do-you-find-time-to-read/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_how_do_you_keep_your_back_from_hurting_during_meditation', () => { | |
| test('qa_how_do_you_keep_your_back_from_hurting_during_meditation: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-keep-your-back-from-hurting-during-meditation/'); | |
| 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('qa_how_do_you_keep_your_back_from_hurting_during_meditation: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-keep-your-back-from-hurting-during-meditation/'); | |
| 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('qa_how_do_you_keep_your_back_from_hurting_during_meditation: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/how-do-you-keep-your-back-from-hurting-during-meditation/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_how_do_you_maintain_your_dedication', () => { | |
| test('qa_how_do_you_maintain_your_dedication: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-maintain-your-dedication/'); | |
| 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('qa_how_do_you_maintain_your_dedication: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-maintain-your-dedication/'); | |
| 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('qa_how_do_you_maintain_your_dedication: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/how-do-you-maintain-your-dedication/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_how_do_you_make_cardio_fun', () => { | |
| test('qa_how_do_you_make_cardio_fun: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-make-cardio-fun/'); | |
| 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('qa_how_do_you_make_cardio_fun: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-make-cardio-fun/'); | |
| 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('qa_how_do_you_make_cardio_fun: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/how-do-you-make-cardio-fun/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_how_do_you_not_just_pop_into_facebook_right_quick_fa_second', () => { | |
| test('qa_how_do_you_not_just_pop_into_facebook_right_quick_fa_second: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-not-just-pop-into-facebook-right-quick-fa-second/'); | |
| 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('qa_how_do_you_not_just_pop_into_facebook_right_quick_fa_second: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-not-just-pop-into-facebook-right-quick-fa-second/'); | |
| 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('qa_how_do_you_not_just_pop_into_facebook_right_quick_fa_second: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/how-do-you-not-just-pop-into-facebook-right-quick-fa-second/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_how_do_you_prepare_breakfast_fast', () => { | |
| test('qa_how_do_you_prepare_breakfast_fast: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-prepare-breakfast-fast/'); | |
| 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('qa_how_do_you_prepare_breakfast_fast: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-prepare-breakfast-fast/'); | |
| 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('qa_how_do_you_prepare_breakfast_fast: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/how-do-you-prepare-breakfast-fast/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_how_do_you_remember_what_you_study', () => { | |
| test('qa_how_do_you_remember_what_you_study: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-remember-what-you-study/'); | |
| 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('qa_how_do_you_remember_what_you_study: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-remember-what-you-study/'); | |
| 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('qa_how_do_you_remember_what_you_study: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/how-do-you-remember-what-you-study/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_how_do_you_stick_to_the_meditation_habit', () => { | |
| test('qa_how_do_you_stick_to_the_meditation_habit: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-stick-to-the-meditation-habit/'); | |
| 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('qa_how_do_you_stick_to_the_meditation_habit: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/how-do-you-stick-to-the-meditation-habit/'); | |
| 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('qa_how_do_you_stick_to_the_meditation_habit: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/how-do-you-stick-to-the-meditation-habit/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_how_does_ending_the_day_with_being_grateful_affect_your_sleep', () => { | |
| test('qa_how_does_ending_the_day_with_being_grateful_affect_your_sleep: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/how-does-ending-the-day-with-being-grateful-affect-your-sleep/'); | |
| 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('qa_how_does_ending_the_day_with_being_grateful_affect_your_sleep: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/how-does-ending-the-day-with-being-grateful-affect-your-sleep/'); | |
| 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('qa_how_does_ending_the_day_with_being_grateful_affect_your_sleep: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/how-does-ending-the-day-with-being-grateful-affect-your-sleep/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_how_exactly_can_you_resist_the_urge_to_to_constantly_check_your_phone', () => { | |
| test('qa_how_exactly_can_you_resist_the_urge_to_to_constantly_check_your_phone: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/how-exactly-can-you-resist-the-urge-to-to-constantly-check-your-phone/'); | |
| 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('qa_how_exactly_can_you_resist_the_urge_to_to_constantly_check_your_phone: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/how-exactly-can-you-resist-the-urge-to-to-constantly-check-your-phone/'); | |
| 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('qa_how_exactly_can_you_resist_the_urge_to_to_constantly_check_your_phone: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/how-exactly-can-you-resist-the-urge-to-to-constantly-check-your-phone/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_how_hard_do_people_find_it_to_disconnect_away_from_there_phone_on_an_evening', () => { | |
| test('qa_how_hard_do_people_find_it_to_disconnect_away_from_there_phone_on_an_evening: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/how-hard-do-people-find-it-to-disconnect-away-from-there-phone-on-an-evening/'); | |
| 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('qa_how_hard_do_people_find_it_to_disconnect_away_from_there_phone_on_an_evening: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/how-hard-do-people-find-it-to-disconnect-away-from-there-phone-on-an-evening/'); | |
| 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('qa_how_hard_do_people_find_it_to_disconnect_away_from_there_phone_on_an_evening: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/how-hard-do-people-find-it-to-disconnect-away-from-there-phone-on-an-evening/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_how_is_exercising_every_day_different_from_just_2_to_4_times_a_week', () => { | |
| test('qa_how_is_exercising_every_day_different_from_just_2_to_4_times_a_week: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/how-is-exercising-every-day-different-from-just-2-to-4-times-a-week/'); | |
| 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('qa_how_is_exercising_every_day_different_from_just_2_to_4_times_a_week: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/how-is-exercising-every-day-different-from-just-2-to-4-times-a-week/'); | |
| 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('qa_how_is_exercising_every_day_different_from_just_2_to_4_times_a_week: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/how-is-exercising-every-day-different-from-just-2-to-4-times-a-week/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_how_often_do_you_meditate_what_are_the_benefits_for_you', () => { | |
| test('qa_how_often_do_you_meditate_what_are_the_benefits_for_you: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/how-often-do-you-meditate-what-are-the-benefits-for-you/'); | |
| 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('qa_how_often_do_you_meditate_what_are_the_benefits_for_you: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/how-often-do-you-meditate-what-are-the-benefits-for-you/'); | |
| 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('qa_how_often_do_you_meditate_what_are_the_benefits_for_you: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/how-often-do-you-meditate-what-are-the-benefits-for-you/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_how_to_concentrate_to_study_for_3_4_hours', () => { | |
| test('qa_how_to_concentrate_to_study_for_3_4_hours: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/how-to-concentrate-to-study-for-3-4-hours/'); | |
| 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('qa_how_to_concentrate_to_study_for_3_4_hours: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/how-to-concentrate-to-study-for-3-4-hours/'); | |
| 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('qa_how_to_concentrate_to_study_for_3_4_hours: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/how-to-concentrate-to-study-for-3-4-hours/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_how_to_showthat_youre_grateful_to_the_person_you_love_the_most_when_he_is_far_away', () => { | |
| test('qa_how_to_showthat_youre_grateful_to_the_person_you_love_the_most_when_he_is_far_away: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/how-to-showthat-youre-grateful-to-the-person-you-love-the-most-when-he-is-far-away/'); | |
| 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('qa_how_to_showthat_youre_grateful_to_the_person_you_love_the_most_when_he_is_far_away: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/how-to-showthat-youre-grateful-to-the-person-you-love-the-most-when-he-is-far-away/'); | |
| 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('qa_how_to_showthat_youre_grateful_to_the_person_you_love_the_most_when_he_is_far_away: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/how-to-showthat-youre-grateful-to-the-person-you-love-the-most-when-he-is-far-away/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_how_you_practice_gratitude', () => { | |
| test('qa_how_you_practice_gratitude: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/how-you-practice-gratitude/'); | |
| 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('qa_how_you_practice_gratitude: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/how-you-practice-gratitude/'); | |
| 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('qa_how_you_practice_gratitude: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/how-you-practice-gratitude/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_i_am_grateful_for_my_life_but_feel_strongly_i_have_to_much_in_my_life_how_do_i_balance_being_grateful_and_just_wanting_more_and_having_more', () => { | |
| test('qa_i_am_grateful_for_my_life_but_feel_strongly_i_have_to_much_in_my_life_how_do_i_balance_being_grateful_and_just_wanting_more_and_having_more: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/i-am-grateful-for-my-life-but-feel-strongly-i-have-to-much-in-my-life-how-do-i-balance-being-grateful-and-just-wanting-more-and-having-more/'); | |
| 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('qa_i_am_grateful_for_my_life_but_feel_strongly_i_have_to_much_in_my_life_how_do_i_balance_being_grateful_and_just_wanting_more_and_having_more: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/i-am-grateful-for-my-life-but-feel-strongly-i-have-to-much-in-my-life-how-do-i-balance-being-grateful-and-just-wanting-more-and-having-more/'); | |
| 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('qa_i_am_grateful_for_my_life_but_feel_strongly_i_have_to_much_in_my_life_how_do_i_balance_being_grateful_and_just_wanting_more_and_having_more: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/i-am-grateful-for-my-life-but-feel-strongly-i-have-to-much-in-my-life-how-do-i-balance-being-grateful-and-just-wanting-more-and-having-more/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_i_cannot_eradicate_all_junk_food_from_my_kitchen_as_i_stay_with_a_joint_family_is_there_any_other_way_to_keep_away_these_temptations', () => { | |
| test('qa_i_cannot_eradicate_all_junk_food_from_my_kitchen_as_i_stay_with_a_joint_family_is_there_any_other_way_to_keep_away_these_temptations: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/i-cannot-eradicate-all-junk-food-from-my-kitchen-as-i-stay-with-a-joint-family-is-there-any-other-way-to-keep-away-these-temptations/'); | |
| 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('qa_i_cannot_eradicate_all_junk_food_from_my_kitchen_as_i_stay_with_a_joint_family_is_there_any_other_way_to_keep_away_these_temptations: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/i-cannot-eradicate-all-junk-food-from-my-kitchen-as-i-stay-with-a-joint-family-is-there-any-other-way-to-keep-away-these-temptations/'); | |
| 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('qa_i_cannot_eradicate_all_junk_food_from_my_kitchen_as_i_stay_with_a_joint_family_is_there_any_other_way_to_keep_away_these_temptations: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/i-cannot-eradicate-all-junk-food-from-my-kitchen-as-i-stay-with-a-joint-family-is-there-any-other-way-to-keep-away-these-temptations/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_i_cant_eat_eggs_meat_based_products_everyday_as_i_find_those_bit_heavy_in_the_morning_what_are_my_other_options_for_brekkie_that_do_not_lack_protein_and_are_filling', () => { | |
| test('qa_i_cant_eat_eggs_meat_based_products_everyday_as_i_find_those_bit_heavy_in_the_morning_what_are_my_other_options_for_brekkie_that_do_not_lack_protein_and_are_filling: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/i-cant-eat-eggs-meat-based-products-everyday-as-i-find-those-bit-heavy-in-the-morning-what-are-my-other-options-for-brekkie-that-do-not-lack-protein-and-are-filling/'); | |
| 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('qa_i_cant_eat_eggs_meat_based_products_everyday_as_i_find_those_bit_heavy_in_the_morning_what_are_my_other_options_for_brekkie_that_do_not_lack_protein_and_are_filling: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/i-cant-eat-eggs-meat-based-products-everyday-as-i-find-those-bit-heavy-in-the-morning-what-are-my-other-options-for-brekkie-that-do-not-lack-protein-and-are-filling/'); | |
| 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('qa_i_cant_eat_eggs_meat_based_products_everyday_as_i_find_those_bit_heavy_in_the_morning_what_are_my_other_options_for_brekkie_that_do_not_lack_protein_and_are_filling: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/i-cant-eat-eggs-meat-based-products-everyday-as-i-find-those-bit-heavy-in-the-morning-what-are-my-other-options-for-brekkie-that-do-not-lack-protein-and-are-filling/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_i_feel_my_thoughts_run_faster_than_i_can_write_them_down_sometimes_i_feel_i_cant_write_down_everything_im_feeling_at_the_moment_as_the_speed_at_which_i_write_doesnt_match_t', () => { | |
| test('qa_i_feel_my_thoughts_run_faster_than_i_can_write_them_down_sometimes_i_feel_i_cant_write_down_everything_im_feeling_at_the_moment_as_the_speed_at_which_i_write_doesnt_match_t: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/i-feel-my-thoughts-run-faster-than-i-can-write-them-down-sometimes-i-feel-i-cant-write-down-everything-im-feeling-at-the-moment-as-the-speed-at-which-i-write-doesnt-match-t/'); | |
| 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('qa_i_feel_my_thoughts_run_faster_than_i_can_write_them_down_sometimes_i_feel_i_cant_write_down_everything_im_feeling_at_the_moment_as_the_speed_at_which_i_write_doesnt_match_t: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/i-feel-my-thoughts-run-faster-than-i-can-write-them-down-sometimes-i-feel-i-cant-write-down-everything-im-feeling-at-the-moment-as-the-speed-at-which-i-write-doesnt-match-t/'); | |
| 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('qa_i_feel_my_thoughts_run_faster_than_i_can_write_them_down_sometimes_i_feel_i_cant_write_down_everything_im_feeling_at_the_moment_as_the_speed_at_which_i_write_doesnt_match_t: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/i-feel-my-thoughts-run-faster-than-i-can-write-them-down-sometimes-i-feel-i-cant-write-down-everything-im-feeling-at-the-moment-as-the-speed-at-which-i-write-doesnt-match-t/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_i_have_a_question_that_sometimes_when_you_dont_feel_like_writing_or_journaling_even_a_line_what_should_be_done_at_that_time', () => { | |
| test('qa_i_have_a_question_that_sometimes_when_you_dont_feel_like_writing_or_journaling_even_a_line_what_should_be_done_at_that_time: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/i-have-a-question-that-sometimes-when-you-dont-feel-like-writing-or-journaling-even-a-line-what-should-be-done-at-that-time/'); | |
| 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('qa_i_have_a_question_that_sometimes_when_you_dont_feel_like_writing_or_journaling_even_a_line_what_should_be_done_at_that_time: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/i-have-a-question-that-sometimes-when-you-dont-feel-like-writing-or-journaling-even-a-line-what-should-be-done-at-that-time/'); | |
| 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('qa_i_have_a_question_that_sometimes_when_you_dont_feel_like_writing_or_journaling_even_a_line_what_should_be_done_at_that_time: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/i-have-a-question-that-sometimes-when-you-dont-feel-like-writing-or-journaling-even-a-line-what-should-be-done-at-that-time/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_i_have_chronic_lower_back_pain_but_i_started_to_jog_recently_and_the_pain_has_not_increased_is_that_a_good_thing', () => { | |
| test('qa_i_have_chronic_lower_back_pain_but_i_started_to_jog_recently_and_the_pain_has_not_increased_is_that_a_good_thing: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/i-have-chronic-lower-back-pain-but-i-started-to-jog-recently-and-the-pain-has-not-increased-is-that-a-good-thing/'); | |
| 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('qa_i_have_chronic_lower_back_pain_but_i_started_to_jog_recently_and_the_pain_has_not_increased_is_that_a_good_thing: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/i-have-chronic-lower-back-pain-but-i-started-to-jog-recently-and-the-pain-has-not-increased-is-that-a-good-thing/'); | |
| 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('qa_i_have_chronic_lower_back_pain_but_i_started_to_jog_recently_and_the_pain_has_not_increased_is_that_a_good_thing: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/i-have-chronic-lower-back-pain-but-i-started-to-jog-recently-and-the-pain-has-not-increased-is-that-a-good-thing/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_i_love_breakfast_but_would_love_new_ideas_what_else_are_people_eating_for_protein_besides_nuts_or_eggs', () => { | |
| test('qa_i_love_breakfast_but_would_love_new_ideas_what_else_are_people_eating_for_protein_besides_nuts_or_eggs: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/i-love-breakfast-but-would-love-new-ideas-what-else-are-people-eating-for-protein-besides-nuts-or-eggs/'); | |
| 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('qa_i_love_breakfast_but_would_love_new_ideas_what_else_are_people_eating_for_protein_besides_nuts_or_eggs: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/i-love-breakfast-but-would-love-new-ideas-what-else-are-people-eating-for-protein-besides-nuts-or-eggs/'); | |
| 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('qa_i_love_breakfast_but_would_love_new_ideas_what_else_are_people_eating_for_protein_besides_nuts_or_eggs: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/i-love-breakfast-but-would-love-new-ideas-what-else-are-people-eating-for-protein-besides-nuts-or-eggs/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_i_need_a_healthy_breakfast_option_thats_fast_and_easy_where_i_can_make_multiple_meals_2', () => { | |
| test('qa_i_need_a_healthy_breakfast_option_thats_fast_and_easy_where_i_can_make_multiple_meals_2: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/i-need-a-healthy-breakfast-option-thats-fast-and-easy-where-i-can-make-multiple-meals-2/'); | |
| 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('qa_i_need_a_healthy_breakfast_option_thats_fast_and_easy_where_i_can_make_multiple_meals_2: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/i-need-a-healthy-breakfast-option-thats-fast-and-easy-where-i-can-make-multiple-meals-2/'); | |
| 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('qa_i_need_a_healthy_breakfast_option_thats_fast_and_easy_where_i_can_make_multiple_meals_2: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/i-need-a-healthy-breakfast-option-thats-fast-and-easy-where-i-can-make-multiple-meals-2/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_i_need_fast_and_simply_breakfast_ideas_for_a_vegetarian', () => { | |
| test('qa_i_need_fast_and_simply_breakfast_ideas_for_a_vegetarian: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/i-need-fast-and-simply-breakfast-ideas-for-a-vegetarian/'); | |
| 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('qa_i_need_fast_and_simply_breakfast_ideas_for_a_vegetarian: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/i-need-fast-and-simply-breakfast-ideas-for-a-vegetarian/'); | |
| 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('qa_i_need_fast_and_simply_breakfast_ideas_for_a_vegetarian: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/i-need-fast-and-simply-breakfast-ideas-for-a-vegetarian/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_i_need_some_ideas_of_journal_prompts', () => { | |
| test('qa_i_need_some_ideas_of_journal_prompts: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/i-need-some-ideas-of-journal-prompts/'); | |
| 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('qa_i_need_some_ideas_of_journal_prompts: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/i-need-some-ideas-of-journal-prompts/'); | |
| 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('qa_i_need_some_ideas_of_journal_prompts: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/i-need-some-ideas-of-journal-prompts/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_i_share_a_room_with_my_mom_the_problem_is_that_she_snores_heavily_while_sleeping_i_cant_fall_asleep_because_of_that_even_if_i_manage_to_do_that_i_wake_up_several_times_during_the_night_th', () => { | |
| test('qa_i_share_a_room_with_my_mom_the_problem_is_that_she_snores_heavily_while_sleeping_i_cant_fall_asleep_because_of_that_even_if_i_manage_to_do_that_i_wake_up_several_times_during_the_night_th: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/i-share-a-room-with-my-mom-the-problem-is-that-she-snores-heavily-while-sleeping-i-cant-fall-asleep-because-of-that-even-if-i-manage-to-do-that-i-wake-up-several-times-during-the-night-th/'); | |
| 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('qa_i_share_a_room_with_my_mom_the_problem_is_that_she_snores_heavily_while_sleeping_i_cant_fall_asleep_because_of_that_even_if_i_manage_to_do_that_i_wake_up_several_times_during_the_night_th: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/i-share-a-room-with-my-mom-the-problem-is-that-she-snores-heavily-while-sleeping-i-cant-fall-asleep-because-of-that-even-if-i-manage-to-do-that-i-wake-up-several-times-during-the-night-th/'); | |
| 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('qa_i_share_a_room_with_my_mom_the_problem_is_that_she_snores_heavily_while_sleeping_i_cant_fall_asleep_because_of_that_even_if_i_manage_to_do_that_i_wake_up_several_times_during_the_night_th: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/i-share-a-room-with-my-mom-the-problem-is-that-she-snores-heavily-while-sleeping-i-cant-fall-asleep-because-of-that-even-if-i-manage-to-do-that-i-wake-up-several-times-during-the-night-th/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_i_use_an_app_on_my_phone_to_help_guide_me_through_meditation_how_can_i_minimise_the_likelihood_that_ill_get_distracted_by_everything_else_on_my_phone', () => { | |
| test('qa_i_use_an_app_on_my_phone_to_help_guide_me_through_meditation_how_can_i_minimise_the_likelihood_that_ill_get_distracted_by_everything_else_on_my_phone: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/i-use-an-app-on-my-phone-to-help-guide-me-through-meditation-how-can-i-minimise-the-likelihood-that-ill-get-distracted-by-everything-else-on-my-phone/'); | |
| 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('qa_i_use_an_app_on_my_phone_to_help_guide_me_through_meditation_how_can_i_minimise_the_likelihood_that_ill_get_distracted_by_everything_else_on_my_phone: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/i-use-an-app-on-my-phone-to-help-guide-me-through-meditation-how-can-i-minimise-the-likelihood-that-ill-get-distracted-by-everything-else-on-my-phone/'); | |
| 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('qa_i_use_an_app_on_my_phone_to_help_guide_me_through_meditation_how_can_i_minimise_the_likelihood_that_ill_get_distracted_by_everything_else_on_my_phone: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/i-use-an-app-on-my-phone-to-help-guide-me-through-meditation-how-can-i-minimise-the-likelihood-that-ill-get-distracted-by-everything-else-on-my-phone/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_i_want_to_write_beautifully_in_my_journal_i_mean_calligraphy_style_writing_but_it_is_a_lot_of_work_how_do_you_continue_to_write_when_the_handwriting_is_not_that_good', () => { | |
| test('qa_i_want_to_write_beautifully_in_my_journal_i_mean_calligraphy_style_writing_but_it_is_a_lot_of_work_how_do_you_continue_to_write_when_the_handwriting_is_not_that_good: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/i-want-to-write-beautifully-in-my-journal-i-mean-calligraphy-style-writing-but-it-is-a-lot-of-work-how-do-you-continue-to-write-when-the-handwriting-is-not-that-good/'); | |
| 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('qa_i_want_to_write_beautifully_in_my_journal_i_mean_calligraphy_style_writing_but_it_is_a_lot_of_work_how_do_you_continue_to_write_when_the_handwriting_is_not_that_good: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/i-want-to-write-beautifully-in-my-journal-i-mean-calligraphy-style-writing-but-it-is-a-lot-of-work-how-do-you-continue-to-write-when-the-handwriting-is-not-that-good/'); | |
| 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('qa_i_want_to_write_beautifully_in_my_journal_i_mean_calligraphy_style_writing_but_it_is_a_lot_of_work_how_do_you_continue_to_write_when_the_handwriting_is_not_that_good: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/i-want-to-write-beautifully-in-my-journal-i-mean-calligraphy-style-writing-but-it-is-a-lot-of-work-how-do-you-continue-to-write-when-the-handwriting-is-not-that-good/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_i_would_really_like_to_do_yoga_but_dont_know_where_to_start_any_suggestions', () => { | |
| test('qa_i_would_really_like_to_do_yoga_but_dont_know_where_to_start_any_suggestions: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/i-would-really-like-to-do-yoga-but-dont-know-where-to-start-any-suggestions/'); | |
| 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('qa_i_would_really_like_to_do_yoga_but_dont_know_where_to_start_any_suggestions: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/i-would-really-like-to-do-yoga-but-dont-know-where-to-start-any-suggestions/'); | |
| 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('qa_i_would_really_like_to_do_yoga_but_dont_know_where_to_start_any_suggestions: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/i-would-really-like-to-do-yoga-but-dont-know-where-to-start-any-suggestions/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_if_you_are_lazy_to_do_exercise_what_will_you_do', () => { | |
| test('qa_if_you_are_lazy_to_do_exercise_what_will_you_do: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/if-you-are-lazy-to-do-exercise-what-will-you-do/'); | |
| 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('qa_if_you_are_lazy_to_do_exercise_what_will_you_do: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/if-you-are-lazy-to-do-exercise-what-will-you-do/'); | |
| 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('qa_if_you_are_lazy_to_do_exercise_what_will_you_do: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/if-you-are-lazy-to-do-exercise-what-will-you-do/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_if_you_had_a_private_chef_who_would_cook_your_great_breakfast_for_you_what_would_you_ask_him_to_make', () => { | |
| test('qa_if_you_had_a_private_chef_who_would_cook_your_great_breakfast_for_you_what_would_you_ask_him_to_make: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/if-you-had-a-private-chef-who-would-cook-your-great-breakfast-for-you-what-would-you-ask-him-to-make/'); | |
| 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('qa_if_you_had_a_private_chef_who_would_cook_your_great_breakfast_for_you_what_would_you_ask_him_to_make: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/if-you-had-a-private-chef-who-would-cook-your-great-breakfast-for-you-what-would-you-ask-him-to-make/'); | |
| 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('qa_if_you_had_a_private_chef_who_would_cook_your_great_breakfast_for_you_what_would_you_ask_him_to_make: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/if-you-had-a-private-chef-who-would-cook-your-great-breakfast-for-you-what-would-you-ask-him-to-make/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_im_out_of_ideas_what_could_be_great_vegan_breakfast', () => { | |
| test('qa_im_out_of_ideas_what_could_be_great_vegan_breakfast: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/im-out-of-ideas-what-could-be-great-vegan-breakfast/'); | |
| 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('qa_im_out_of_ideas_what_could_be_great_vegan_breakfast: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/im-out-of-ideas-what-could-be-great-vegan-breakfast/'); | |
| 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('qa_im_out_of_ideas_what_could_be_great_vegan_breakfast: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/im-out-of-ideas-what-could-be-great-vegan-breakfast/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_in_the_past_year_what_have_you_been_most_grateful_for', () => { | |
| test('qa_in_the_past_year_what_have_you_been_most_grateful_for: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/in-the-past-year-what-have-you-been-most-grateful-for/'); | |
| 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('qa_in_the_past_year_what_have_you_been_most_grateful_for: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/in-the-past-year-what-have-you-been-most-grateful-for/'); | |
| 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('qa_in_the_past_year_what_have_you_been_most_grateful_for: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/in-the-past-year-what-have-you-been-most-grateful-for/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_is_it_hard_for_you_to_show_gratitude_towards_others_and_yourself', () => { | |
| test('qa_is_it_hard_for_you_to_show_gratitude_towards_others_and_yourself: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/is-it-hard-for-you-to-show-gratitude-towards-others-and-yourself/'); | |
| 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('qa_is_it_hard_for_you_to_show_gratitude_towards_others_and_yourself: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/is-it-hard-for-you-to-show-gratitude-towards-others-and-yourself/'); | |
| 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('qa_is_it_hard_for_you_to_show_gratitude_towards_others_and_yourself: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/is-it-hard-for-you-to-show-gratitude-towards-others-and-yourself/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_is_it_okay_to_have_a_great_breakfast_at_10', () => { | |
| test('qa_is_it_okay_to_have_a_great_breakfast_at_10: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/is-it-okay-to-have-a-great-breakfast-at-10/'); | |
| 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('qa_is_it_okay_to_have_a_great_breakfast_at_10: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/is-it-okay-to-have-a-great-breakfast-at-10/'); | |
| 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('qa_is_it_okay_to_have_a_great_breakfast_at_10: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/is-it-okay-to-have-a-great-breakfast-at-10/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_is_it_possible_to_meditate_with_your_eyes_open_is_it_just_as_good_i_almost_feel_as_though_my_focus_is_better_when_im_looking_at_something', () => { | |
| test('qa_is_it_possible_to_meditate_with_your_eyes_open_is_it_just_as_good_i_almost_feel_as_though_my_focus_is_better_when_im_looking_at_something: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/is-it-possible-to-meditate-with-your-eyes-open-is-it-just-as-good-i-almost-feel-as-though-my-focus-is-better-when-im-looking-at-something/'); | |
| 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('qa_is_it_possible_to_meditate_with_your_eyes_open_is_it_just_as_good_i_almost_feel_as_though_my_focus_is_better_when_im_looking_at_something: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/is-it-possible-to-meditate-with-your-eyes-open-is-it-just-as-good-i-almost-feel-as-though-my-focus-is-better-when-im-looking-at-something/'); | |
| 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('qa_is_it_possible_to_meditate_with_your_eyes_open_is_it_just_as_good_i_almost_feel_as_though_my_focus_is_better_when_im_looking_at_something: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/is-it-possible-to-meditate-with-your-eyes-open-is-it-just-as-good-i-almost-feel-as-though-my-focus-is-better-when-im-looking-at-something/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_is_it_really_okay_to_only_dance_around_should_i_be_doing_a_more_structured_work_out_routine_than_simply_dancing_around_to_get_my_heart_pumping_faster', () => { | |
| test('qa_is_it_really_okay_to_only_dance_around_should_i_be_doing_a_more_structured_work_out_routine_than_simply_dancing_around_to_get_my_heart_pumping_faster: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/is-it-really-okay-to-only-dance-around-should-i-be-doing-a-more-structured-work-out-routine-than-simply-dancing-around-to-get-my-heart-pumping-faster/'); | |
| 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('qa_is_it_really_okay_to_only_dance_around_should_i_be_doing_a_more_structured_work_out_routine_than_simply_dancing_around_to_get_my_heart_pumping_faster: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/is-it-really-okay-to-only-dance-around-should-i-be-doing-a-more-structured-work-out-routine-than-simply-dancing-around-to-get-my-heart-pumping-faster/'); | |
| 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('qa_is_it_really_okay_to_only_dance_around_should_i_be_doing_a_more_structured_work_out_routine_than_simply_dancing_around_to_get_my_heart_pumping_faster: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/is-it-really-okay-to-only-dance-around-should-i-be-doing-a-more-structured-work-out-routine-than-simply-dancing-around-to-get-my-heart-pumping-faster/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_is_it_safe_to_do_fasting_meaning_skipping_my_breakfast_atleast_once_a_week', () => { | |
| test('qa_is_it_safe_to_do_fasting_meaning_skipping_my_breakfast_atleast_once_a_week: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/is-it-safe-to-do-fasting-meaning-skipping-my-breakfast-atleast-once-a-week/'); | |
| 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('qa_is_it_safe_to_do_fasting_meaning_skipping_my_breakfast_atleast_once_a_week: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/is-it-safe-to-do-fasting-meaning-skipping-my-breakfast-atleast-once-a-week/'); | |
| 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('qa_is_it_safe_to_do_fasting_meaning_skipping_my_breakfast_atleast_once_a_week: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/is-it-safe-to-do-fasting-meaning-skipping-my-breakfast-atleast-once-a-week/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_is_there_some_way_i_can_prepare_healthy_breakfasts_ahead_of_time_so_i_have_more_time_in_the_morning', () => { | |
| test('qa_is_there_some_way_i_can_prepare_healthy_breakfasts_ahead_of_time_so_i_have_more_time_in_the_morning: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/is-there-some-way-i-can-prepare-healthy-breakfasts-ahead-of-time-so-i-have-more-time-in-the-morning/'); | |
| 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('qa_is_there_some_way_i_can_prepare_healthy_breakfasts_ahead_of_time_so_i_have_more_time_in_the_morning: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/is-there-some-way-i-can-prepare-healthy-breakfasts-ahead-of-time-so-i-have-more-time-in-the-morning/'); | |
| 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('qa_is_there_some_way_i_can_prepare_healthy_breakfasts_ahead_of_time_so_i_have_more_time_in_the_morning: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/is-there-some-way-i-can-prepare-healthy-breakfasts-ahead-of-time-so-i-have-more-time-in-the-morning/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_is_walking_actually_beneficial', () => { | |
| test('qa_is_walking_actually_beneficial: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/is-walking-actually-beneficial/'); | |
| 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('qa_is_walking_actually_beneficial: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/is-walking-actually-beneficial/'); | |
| 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('qa_is_walking_actually_beneficial: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/is-walking-actually-beneficial/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_is_whole_wheat_bread_and_peanut_butter_a_good_breakfast', () => { | |
| test('qa_is_whole_wheat_bread_and_peanut_butter_a_good_breakfast: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/is-whole-wheat-bread-and-peanut-butter-a-good-breakfast/'); | |
| 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('qa_is_whole_wheat_bread_and_peanut_butter_a_good_breakfast: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/is-whole-wheat-bread-and-peanut-butter-a-good-breakfast/'); | |
| 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('qa_is_whole_wheat_bread_and_peanut_butter_a_good_breakfast: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/is-whole-wheat-bread-and-peanut-butter-a-good-breakfast/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_its_hard_for_me_writing_my_journal_cause_i_have_to_face_my_thousand_sorrows_how_can_i_solve_the_problem', () => { | |
| test('qa_its_hard_for_me_writing_my_journal_cause_i_have_to_face_my_thousand_sorrows_how_can_i_solve_the_problem: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/its-hard-for-me-writing-my-journal-cause-i-have-to-face-my-thousand-sorrows-how-can-i-solve-the-problem/'); | |
| 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('qa_its_hard_for_me_writing_my_journal_cause_i_have_to_face_my_thousand_sorrows_how_can_i_solve_the_problem: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/its-hard-for-me-writing-my-journal-cause-i-have-to-face-my-thousand-sorrows-how-can-i-solve-the-problem/'); | |
| 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('qa_its_hard_for_me_writing_my_journal_cause_i_have_to_face_my_thousand_sorrows_how_can_i_solve_the_problem: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/its-hard-for-me-writing-my-journal-cause-i-have-to-face-my-thousand-sorrows-how-can-i-solve-the-problem/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - work_for_teams', () => { | |
| test('work_for_teams: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/work/for-teams/'); | |
| expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('work_for_teams: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/work/for-teams/'); | |
| 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('work_for_teams: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/work/for-teams/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - work_plans', () => { | |
| test('work_plans: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/work/plans/'); | |
| expect(await page.locator('header, [role="banner"]').first().count(), 'header landmark present in GT').toBeGreaterThan(0); | |
| }); | |
| test('work_plans: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/work/plans/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - work_request_a_demo', () => { | |
| test('work_request_a_demo: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/work/request-a-demo/'); | |
| 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('work_request_a_demo: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/work/request-a-demo/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_learn_study', () => { | |
| test('qa_learn_study: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/learn-study/'); | |
| 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('qa_learn_study: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/learn-study/'); | |
| 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('qa_learn_study: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/learn-study/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_meditate', () => { | |
| test('qa_meditate: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/meditate/'); | |
| 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('qa_meditate: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/meditate/'); | |
| 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('qa_meditate: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/meditate/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_page_1946', () => { | |
| test('qa_page_1946: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/page/1946/'); | |
| 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('qa_page_1946: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/page/1946/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_page_2', () => { | |
| test('qa_page_2: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/page/2/'); | |
| 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('qa_page_2: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/page/2/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_read', () => { | |
| test('qa_read: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/read/'); | |
| 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('qa_read: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/read/'); | |
| 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('qa_read: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/read/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_sleep', () => { | |
| test('qa_sleep: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/sleep/'); | |
| 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('qa_sleep: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/sleep/'); | |
| 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('qa_sleep: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/sleep/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_stretch', () => { | |
| test('qa_stretch: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/stretch/'); | |
| 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('qa_stretch: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/stretch/'); | |
| 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('qa_stretch: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/stretch/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_think_about_my_purpose', () => { | |
| test('qa_think_about_my_purpose: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/think-about-my-purpose/'); | |
| 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('qa_think_about_my_purpose: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/think-about-my-purpose/'); | |
| 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('qa_think_about_my_purpose: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/think-about-my-purpose/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_what_are_some_good_apps_or_resources_for_meditation', () => { | |
| test('qa_what_are_some_good_apps_or_resources_for_meditation: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/what-are-some-good-apps-or-resources-for-meditation/'); | |
| 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('qa_what_are_some_good_apps_or_resources_for_meditation: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/what-are-some-good-apps-or-resources-for-meditation/'); | |
| 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('qa_what_are_some_good_apps_or_resources_for_meditation: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/what-are-some-good-apps-or-resources-for-meditation/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_what_do_you_have_for_breakfast', () => { | |
| test('qa_what_do_you_have_for_breakfast: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/what-do-you-have-for-breakfast/'); | |
| 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('qa_what_do_you_have_for_breakfast: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/what-do-you-have-for-breakfast/'); | |
| 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('qa_what_do_you_have_for_breakfast: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/what-do-you-have-for-breakfast/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_work_outs_to_build_different_parts_of_my_body', () => { | |
| test('qa_work_outs_to_build_different_parts_of_my_body: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/work-outs-to-build-different-parts-of-my-body/'); | |
| 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('qa_work_outs_to_build_different_parts_of_my_body: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/work-outs-to-build-different-parts-of-my-body/'); | |
| 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('qa_work_outs_to_build_different_parts_of_my_body: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/work-outs-to-build-different-parts-of-my-body/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_write_in_my_journal', () => { | |
| test('qa_write_in_my_journal: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/write-in-my-journal/'); | |
| 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('qa_write_in_my_journal: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/write-in-my-journal/'); | |
| 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('qa_write_in_my_journal: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/write-in-my-journal/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_write_my_to_do', () => { | |
| test('qa_write_my_to_do: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/write-my-to-do/'); | |
| 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('qa_write_my_to_do: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/write-my-to-do/'); | |
| 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('qa_write_my_to_do: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/write-my-to-do/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_yes_how_do_you_manage_your_morning_notes_and_study_schedule', () => { | |
| test('qa_yes_how_do_you_manage_your_morning_notes_and_study_schedule: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/yes-how-do-you-manage-your-morning-notes-and-study-schedule/'); | |
| 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('qa_yes_how_do_you_manage_your_morning_notes_and_study_schedule: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/yes-how-do-you-manage-your-morning-notes-and-study-schedule/'); | |
| 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('qa_yes_how_do_you_manage_your_morning_notes_and_study_schedule: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/yes-how-do-you-manage-your-morning-notes-and-study-schedule/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_yoga', () => { | |
| test('qa_yoga: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/yoga/'); | |
| 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('qa_yoga: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/yoga/'); | |
| 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('qa_yoga: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/yoga/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_eat_a_great_breakfast_page_2', () => { | |
| test('qa_eat_a_great_breakfast_page_2: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/eat-a-great-breakfast/page/2/'); | |
| 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('qa_eat_a_great_breakfast_page_2: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/eat-a-great-breakfast/page/2/'); | |
| 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('qa_eat_a_great_breakfast_page_2: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/eat-a-great-breakfast/page/2/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_eat_a_great_breakfast_page_482', () => { | |
| test('qa_eat_a_great_breakfast_page_482: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/eat-a-great-breakfast/page/482/'); | |
| 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('qa_eat_a_great_breakfast_page_482: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/eat-a-great-breakfast/page/482/'); | |
| 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('qa_eat_a_great_breakfast_page_482: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/eat-a-great-breakfast/page/482/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_exercise_page_2', () => { | |
| test('qa_exercise_page_2: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/exercise/page/2/'); | |
| 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('qa_exercise_page_2: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/exercise/page/2/'); | |
| 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('qa_exercise_page_2: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/exercise/page/2/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_exercise_page_411', () => { | |
| test('qa_exercise_page_411: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/exercise/page/411/'); | |
| 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('qa_exercise_page_411: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/exercise/page/411/'); | |
| 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('qa_exercise_page_411: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/exercise/page/411/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_meditate_page_2', () => { | |
| test('qa_meditate_page_2: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/meditate/page/2/'); | |
| 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('qa_meditate_page_2: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/meditate/page/2/'); | |
| 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('qa_meditate_page_2: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/meditate/page/2/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_meditate_page_239', () => { | |
| test('qa_meditate_page_239: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/meditate/page/239/'); | |
| 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('qa_meditate_page_239: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/meditate/page/239/'); | |
| 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('qa_meditate_page_239: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/meditate/page/239/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_should_my_daily_journal_be_more_than_just_my_productivity_and_daily_accomplishments_i_feel_like_maybe_i_should_enter_in_some_of_my_feelings_or_thoughts_but_i_havent_really_done_that_so_far', () => { | |
| test('qa_should_my_daily_journal_be_more_than_just_my_productivity_and_daily_accomplishments_i_feel_like_maybe_i_should_enter_in_some_of_my_feelings_or_thoughts_but_i_havent_really_done_that_so_far: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/should-my-daily-journal-be-more-than-just-my-productivity-and-daily-accomplishments-i-feel-like-maybe-i-should-enter-in-some-of-my-feelings-or-thoughts-but-i-havent-really-done-that-so-far/'); | |
| 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('qa_should_my_daily_journal_be_more_than_just_my_productivity_and_daily_accomplishments_i_feel_like_maybe_i_should_enter_in_some_of_my_feelings_or_thoughts_but_i_havent_really_done_that_so_far: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/should-my-daily-journal-be-more-than-just-my-productivity-and-daily-accomplishments-i-feel-like-maybe-i-should-enter-in-some-of-my-feelings-or-thoughts-but-i-havent-really-done-that-so-far/'); | |
| 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('qa_should_my_daily_journal_be_more_than_just_my_productivity_and_daily_accomplishments_i_feel_like_maybe_i_should_enter_in_some_of_my_feelings_or_thoughts_but_i_havent_really_done_that_so_far: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/should-my-daily-journal-be-more-than-just-my-productivity-and-daily-accomplishments-i-feel-like-maybe-i-should-enter-in-some-of-my-feelings-or-thoughts-but-i-havent-really-done-that-so-far/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_what_are_some_good_meal_ideas_for_breakfast', () => { | |
| test('qa_what_are_some_good_meal_ideas_for_breakfast: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/what-are-some-good-meal-ideas-for-breakfast/'); | |
| 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('qa_what_are_some_good_meal_ideas_for_breakfast: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/what-are-some-good-meal-ideas-for-breakfast/'); | |
| 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('qa_what_are_some_good_meal_ideas_for_breakfast: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/what-are-some-good-meal-ideas-for-breakfast/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_what_are_the_best_journaling_methods_for_a_11_14_year_old_girl', () => { | |
| test('qa_what_are_the_best_journaling_methods_for_a_11_14_year_old_girl: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/what-are-the-best-journaling-methods-for-a-11-14-year-old-girl/'); | |
| 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('qa_what_are_the_best_journaling_methods_for_a_11_14_year_old_girl: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/what-are-the-best-journaling-methods-for-a-11-14-year-old-girl/'); | |
| 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('qa_what_are_the_best_journaling_methods_for_a_11_14_year_old_girl: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/what-are-the-best-journaling-methods-for-a-11-14-year-old-girl/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_what_breakfast_keeps_you_the_fullest_longest', () => { | |
| test('qa_what_breakfast_keeps_you_the_fullest_longest: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/what-breakfast-keeps-you-the-fullest-longest/'); | |
| 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('qa_what_breakfast_keeps_you_the_fullest_longest: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/what-breakfast-keeps-you-the-fullest-longest/'); | |
| 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('qa_what_breakfast_keeps_you_the_fullest_longest: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/what-breakfast-keeps-you-the-fullest-longest/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_what_do_you_find_motivates_you_in_the_morning_to_exercise', () => { | |
| test('qa_what_do_you_find_motivates_you_in_the_morning_to_exercise: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/what-do-you-find-motivates-you-in-the-morning-to-exercise/'); | |
| 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('qa_what_do_you_find_motivates_you_in_the_morning_to_exercise: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/what-do-you-find-motivates-you-in-the-morning-to-exercise/'); | |
| 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('qa_what_do_you_find_motivates_you_in_the_morning_to_exercise: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/what-do-you-find-motivates-you-in-the-morning-to-exercise/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_what_is_a_breakfast_you_enjoy_so_much_that_you_look_forward_to_eating_it_the_night_before', () => { | |
| test('qa_what_is_a_breakfast_you_enjoy_so_much_that_you_look_forward_to_eating_it_the_night_before: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/what-is-a-breakfast-you-enjoy-so-much-that-you-look-forward-to-eating-it-the-night-before/'); | |
| 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('qa_what_is_a_breakfast_you_enjoy_so_much_that_you_look_forward_to_eating_it_the_night_before: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/what-is-a-breakfast-you-enjoy-so-much-that-you-look-forward-to-eating-it-the-night-before/'); | |
| 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('qa_what_is_a_breakfast_you_enjoy_so_much_that_you_look_forward_to_eating_it_the_night_before: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/what-is-a-breakfast-you-enjoy-so-much-that-you-look-forward-to-eating-it-the-night-before/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_what_is_an_ideal_duration_for_meditating_what_time_of_the_day_night_does_it_matters', () => { | |
| test('qa_what_is_an_ideal_duration_for_meditating_what_time_of_the_day_night_does_it_matters: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/what-is-an-ideal-duration-for-meditating-what-time-of-the-day-night-does-it-matters/'); | |
| 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('qa_what_is_an_ideal_duration_for_meditating_what_time_of_the_day_night_does_it_matters: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/what-is-an-ideal-duration-for-meditating-what-time-of-the-day-night-does-it-matters/'); | |
| 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('qa_what_is_an_ideal_duration_for_meditating_what_time_of_the_day_night_does_it_matters: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/what-is-an-ideal-duration-for-meditating-what-time-of-the-day-night-does-it-matters/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_what_is_the_right_way_of_meditaying_supposed_to_feel_like', () => { | |
| test('qa_what_is_the_right_way_of_meditaying_supposed_to_feel_like: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/what-is-the-right-way-of-meditaying-supposed-to-feel-like/'); | |
| 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('qa_what_is_the_right_way_of_meditaying_supposed_to_feel_like: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/what-is-the-right-way-of-meditaying-supposed-to-feel-like/'); | |
| 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('qa_what_is_the_right_way_of_meditaying_supposed_to_feel_like: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/what-is-the-right-way-of-meditaying-supposed-to-feel-like/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_what_kind_of_exersice_do_you_prefer_on_your_morning_routine', () => { | |
| test('qa_what_kind_of_exersice_do_you_prefer_on_your_morning_routine: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/what-kind-of-exersice-do-you-prefer-on-your-morning-routine/'); | |
| 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('qa_what_kind_of_exersice_do_you_prefer_on_your_morning_routine: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/what-kind-of-exersice-do-you-prefer-on-your-morning-routine/'); | |
| 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('qa_what_kind_of_exersice_do_you_prefer_on_your_morning_routine: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/what-kind-of-exersice-do-you-prefer-on-your-morning-routine/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_whats_usually_the_focus_of_your_meditation_do_you_stick_with_breathing_or_have_you_found_an_activity_or_sensation_which_is_more_suited_to_you', () => { | |
| test('qa_whats_usually_the_focus_of_your_meditation_do_you_stick_with_breathing_or_have_you_found_an_activity_or_sensation_which_is_more_suited_to_you: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/whats-usually-the-focus-of-your-meditation-do-you-stick-with-breathing-or-have-you-found-an-activity-or-sensation-which-is-more-suited-to-you/'); | |
| 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('qa_whats_usually_the_focus_of_your_meditation_do_you_stick_with_breathing_or_have_you_found_an_activity_or_sensation_which_is_more_suited_to_you: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/whats-usually-the-focus-of-your-meditation-do-you-stick-with-breathing-or-have-you-found-an-activity-or-sensation-which-is-more-suited-to-you/'); | |
| 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('qa_whats_usually_the_focus_of_your_meditation_do_you_stick_with_breathing_or_have_you_found_an_activity_or_sensation_which_is_more_suited_to_you: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/whats-usually-the-focus-of-your-meditation-do-you-stick-with-breathing-or-have-you-found-an-activity-or-sensation-which-is-more-suited-to-you/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_who_are_you_most_grateful_to_right_now_be_sure_you_tell_them', () => { | |
| test('qa_who_are_you_most_grateful_to_right_now_be_sure_you_tell_them: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/who-are-you-most-grateful-to-right-now-be-sure-you-tell-them/'); | |
| 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('qa_who_are_you_most_grateful_to_right_now_be_sure_you_tell_them: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/who-are-you-most-grateful-to-right-now-be-sure-you-tell-them/'); | |
| 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('qa_who_are_you_most_grateful_to_right_now_be_sure_you_tell_them: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/who-are-you-most-grateful-to-right-now-be-sure-you-tell-them/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_why_do_we_need_to_meditate', () => { | |
| test('qa_why_do_we_need_to_meditate: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/why-do-we-need-to-meditate/'); | |
| 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('qa_why_do_we_need_to_meditate: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/why-do-we-need-to-meditate/'); | |
| 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('qa_why_do_we_need_to_meditate: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/why-do-we-need-to-meditate/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_would_be_great_to_see_more_guided_meditation_with_manifestation_as_the_topic', () => { | |
| test('qa_would_be_great_to_see_more_guided_meditation_with_manifestation_as_the_topic: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/would-be-great-to-see-more-guided-meditation-with-manifestation-as-the-topic/'); | |
| 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('qa_would_be_great_to_see_more_guided_meditation_with_manifestation_as_the_topic: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/would-be-great-to-see-more-guided-meditation-with-manifestation-as-the-topic/'); | |
| 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('qa_would_be_great_to_see_more_guided_meditation_with_manifestation_as_the_topic: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/would-be-great-to-see-more-guided-meditation-with-manifestation-as-the-topic/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_write_in_my_journal_page_2', () => { | |
| test('qa_write_in_my_journal_page_2: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/write-in-my-journal/page/2/'); | |
| 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('qa_write_in_my_journal_page_2: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/write-in-my-journal/page/2/'); | |
| 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('qa_write_in_my_journal_page_2: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/write-in-my-journal/page/2/'); | |
| await page.waitForTimeout(500); | |
| const scrollWidth = await page.evaluate(() => document.documentElement.scrollWidth); | |
| expect(scrollWidth).toBeLessThanOrEqual(385); | |
| }); | |
| }); | |
| test.describe('Structural - qa_write_in_my_journal_page_63', () => { | |
| test('qa_write_in_my_journal_page_63: reproduces GT semantic landmarks', async ({ page }) => { | |
| await page.goto('/qa/write-in-my-journal/page/63/'); | |
| 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('qa_write_in_my_journal_page_63: heading hierarchy is valid', async ({ page }) => { | |
| await page.goto('/qa/write-in-my-journal/page/63/'); | |
| 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('qa_write_in_my_journal_page_63: no horizontal overflow at 375px', async ({ page }) => { | |
| await page.setViewportSize({ width: 375, height: 812 }); | |
| await page.goto('/qa/write-in-my-journal/page/63/'); | |
| 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('/clarify/'); | |
| 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('/qa/'); | |
| 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('/science-behind-rituvia/'); | |
| 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); | |
| } | |
| } | |
| } | |
| }); | |
| }); | |