Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unskip liveblog-ad-limit test #1685

Merged
merged 3 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions playwright/tests/liveblog-ad-limit.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ import { cmpAcceptAll } from '../lib/cmp';
import { loadPage } from '../lib/load-page';
import { countLiveblogInlineSlots } from '../lib/util';

/**
* TODO serial e2e tests
* - It would be good to see if these tests could be run in parallel in the future
*/
const pages = blogs.filter(({ name }) => name === 'under-ad-limit');

const desktopBreakpoint = breakpoints.filter(
Expand All @@ -22,6 +18,8 @@ const MAX_AD_SLOTS = 8;
const addAndAwaitNewBlocks = async (page: Page, blockContent: string) => {
// scroll to the top so we get a toast to click on
await page.evaluate(() => window.scrollTo(0, 0));
// @ts-expect-error -- browser land
await page.waitForFunction(() => window.mockLiveUpdate !== undefined);
await page.evaluate((blockContent) => {
// @ts-expect-error -- browser land
// eslint-disable-next-line @typescript-eslint/no-unsafe-call -- browser land
Expand Down Expand Up @@ -51,7 +49,7 @@ const addAndAwaitNewBlocks = async (page: Page, blockContent: string) => {
await expect(newBlock).toBeVisible();
};

test.skip('A minimum amount of ad slots load', () => {
test.describe('A minimum amount of ad slots load', () => {
pages.forEach(({ path, expectedMinInlineSlots }) => {
/**
* First ensure that the we receive the expected initial amount of ad slots.
Expand Down
4 changes: 4 additions & 0 deletions playwright/tests/liveblog-live-update.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ test.describe.serial('Liveblog live updates', () => {
isMobile,
);

await page.waitForFunction(
// @ts-expect-error -- browser land
() => window.mockLiveUpdate !== undefined,
);
await page.evaluate(() => {
// @ts-expect-error -- browser land
// eslint-disable-next-line @typescript-eslint/no-unsafe-call -- browser land
Expand Down