Skip to content

Commit

Permalink
Increase to test 20 articles for better repeatability
Browse files Browse the repository at this point in the history
  • Loading branch information
emma-imber committed May 8, 2024
1 parent 49dc53a commit 7f97a6f
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 2 deletions.
90 changes: 90 additions & 0 deletions playwright/fixtures/pages/load-time-pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,96 @@ const loadTimePages: GuPage[] = [
path: '/commentisfree/2022/oct/27/we-can-go-to-the-moon-so-why-cant-we-stop-my-glasses-sliding-down-my-nose',
}),
},
{
path: getTestUrl({
stage,
path: '/books/2022/jul/18/tomorrow-and-tomorrow-and-tomorrow-by-gabrielle-zevin-review-when-game-boy-meets-game-girl',
}),
},
{
path: getTestUrl({
stage,
path: '/culture/2018/jan/25/the-20-greatest-oscar-snubs-ever-ranked',
}),
},
{
path: getTestUrl({
stage,
path: '/lifeandstyle/2023/sep/29/21-things-ive-learned-about-skin-care-sali-hughes',
}),
},
{
path: getTestUrl({
stage,
path: '/lifeandstyle/2024/apr/21/favourite-flowers-and-moles-making-merry',
}),
},
{
path: getTestUrl({
stage,
path: '/science/2024/feb/23/quantum-physics-microscopic-gravity-discovery',
}),
},
{
path: getTestUrl({
stage,
path: '/commentisfree/2024/may/01/vote-for-my-friend-sadiq-khan-dont-let-toxic-incompetent-tory-rule-ruin-london',
}),
},
{
path: getTestUrl({
stage,
path: '/books/2024/may/01/what-were-reading-writers-and-readers-on-the-books-they-enjoyed-in-april',
}),
},
{
path: getTestUrl({
stage,
path: '/travel/2024/may/01/its-not-the-zambezi-but-the-tweed-has-its-moments-canoeing-in-the-scottish-borders',
}),
},
{
path: getTestUrl({
stage,
path: '/sport/2024/apr/13/emma-raducanu-leads-gb-to-bjk-cup-finals-with-stunning-win-over-france',
}),
},
{
path: getTestUrl({
stage,
path: '/commentisfree/2024/apr/30/rishi-sunak-lead-tories-local-elections-regicide-as-usual',
}),
},
{
path: getTestUrl({
stage,
path: '/australia-news/2024/may/01/after-25-years-logging-and-bushfires-a-greater-glider-has-been-spotted-in-deongwar-state-forest',
}),
},
{
path: getTestUrl({
stage,
path: '/business/2024/apr/29/ireland-reaps-700m-brexit-bonanza-from-customs-duties',
}),
},
{
path: getTestUrl({
stage,
path: '/games/2020/mar/16/animal-crossing-new-horizons-review-nintendo-switch',
}),
},
{
path: getTestUrl({
stage,
path: '/money/2024/apr/29/meal-prepping-is-booming-but-beware-the-health-dangers',
}),
},
{
path: getTestUrl({
stage,
path: '/technology/2024/apr/30/amazon-sales-report-ai',
}),
},
];

export { loadTimePages };
4 changes: 2 additions & 2 deletions playwright/tests/test-ad-load-time.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { loadPage } from '../lib/load-page';
import { waitForSlot } from '../lib/util';

test(`Test how long top-above-nav takes to load`, async ({ page }) => {
test.setTimeout(100000);
test.setTimeout(300000);

const { path } = articles[0] as unknown as GuPage;

Expand Down Expand Up @@ -51,5 +51,5 @@ test(`Test how long top-above-nav takes to load`, async ({ page }) => {
totalAdRenderTime += endRenderingTime - startRenderingTime;
}

console.log(`Average ad render time is ${totalAdRenderTime / 5} ms`);
console.log(`Average ad render time is ${totalAdRenderTime / 20} ms`);
});

0 comments on commit 7f97a6f

Please sign in to comment.