Skip to content

Commit

Permalink
Fix chrome 131 amp-ad-exit test (#40219)
Browse files Browse the repository at this point in the history
  • Loading branch information
powerivq authored Jan 8, 2025
1 parent 5129866 commit 28565b3
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions extensions/amp-ad-exit/0.1/test-e2e/test-amp-ad-exit.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ describes.endtoend(
);
});

// TODO(#40214): fix flaky test.
it.skip('product2 ad opened', async () => {
it('product2 ad opened', async () => {
const adDiv = await controller.findElement('#product2');
await setTime(Number.MAX_VALUE);
await controller.click(adDiv);
Expand All @@ -76,9 +75,11 @@ describes.endtoend(
/^http:\/\/localhost:8000\/\?product2&r=0\.\d+$/
);

await expect(
'http://localhost:8000/amp4test/request-bank/e2e/deposit/tracking'
).to.have.sentCount(1);
const response = await fetch(
'http://localhost:8000/amp4test/request-bank/e2e/withdraw/tracking',
{signal: AbortSignal.timeout(500)}
);
await response.json();
});

it('variable target "current" should point to product1 by default', async () => {
Expand All @@ -95,8 +96,7 @@ describes.endtoend(
);
});

// TODO(#40214): fix flaky test.
it.skip('should open product2 after setting varible target', async () => {
it('should open product2 after setting varible target', async () => {
const headline = await controller.findElement('h1');
const nextButton = await controller.findElement('#next-btn');
await setTime(Number.MAX_VALUE);
Expand All @@ -110,9 +110,11 @@ describes.endtoend(
await expect(await controller.getCurrentUrl()).to.match(
/^http:\/\/localhost:8000\/\?product2&r=0\.\d+$/
);
await expect(
'http://localhost:8000/amp4test/request-bank/e2e/deposit/tracking'
).to.have.sentCount(1);
const response = await fetch(
'http://localhost:8000/amp4test/request-bank/e2e/withdraw/tracking',
{signal: AbortSignal.timeout(500)}
);
await response.json();
});
}
);

0 comments on commit 28565b3

Please sign in to comment.