Skip to content

Commit

Permalink
Upgrade puppeteer to v23 and fix intermittent CI issues (#1193)
Browse files Browse the repository at this point in the history
Upgrade puppeteer to v23 and fix intermittent CI issues
  • Loading branch information
stalgiag authored Aug 15, 2024
1 parent 3694a16 commit 5f2de7a
Show file tree
Hide file tree
Showing 6 changed files with 220 additions and 188 deletions.
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"prettier": "^2.8.8",
"puppeteer": "^21.11.0",
"puppeteer": "^23.0.2",
"storybook-addon-apollo-client": "^4.1.4",
"storybook-react-router": "^1.0.8",
"style-loader": "^3.3.4",
Expand Down
9 changes: 4 additions & 5 deletions client/tests/e2e/TestReview.e2e.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,11 @@ describe('Test Review page', () => {
const openTestPageButtonSelector = 'button ::-p-text(Open Test Page)';
await page.click(openTestPageButtonSelector);

const popupTarget = await new Promise(resolve =>
page.browser().once('targetcreated', resolve)
);

// Allow additional time for popup to open
const popupPage = await popupTarget.page();
await page.waitForNetworkIdle();

const pages = await global.browser.pages();
const popupPage = pages[pages.length - 1];

// Check for 'Run Test Setup' button
await popupPage.waitForSelector('button ::-p-text(Run Test Setup)');
Expand Down
9 changes: 4 additions & 5 deletions client/tests/e2e/TestRun.e2e.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,12 +366,11 @@ describe('Test Run when signed in as tester', () => {
const openTestPageButtonSelector = 'button ::-p-text(Open Test Page)';
await page.click(openTestPageButtonSelector);

const popupTarget = await new Promise(resolve =>
page.browser().once('targetcreated', resolve)
);

// Allow additional time for popup to open
const popupPage = await popupTarget.page();
await page.waitForNetworkIdle();

const pages = await global.browser.pages();
const popupPage = pages[pages.length - 1];

// Check for 'Run Test Setup' button
await popupPage.waitForSelector('button ::-p-text(Run Test Setup)');
Expand Down
2 changes: 1 addition & 1 deletion client/tests/e2e/snapshots/saved/_run_2.html
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ <h2 class="css-4trv3a">Assistive Technology Details</h2>
d="M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"></path></svg
><span
>We have automatically detected you are using
<b>Chrome Headless 121</b>. This version is different than
<b>Chrome Headless 127</b>. This version is different than
what <b>esmeralda-baggins</b> was using last time, which was
<b>Firefox 99</b>.<br /><br />We have not updated this
information below. Please proceed with caution.</span
Expand Down
3 changes: 1 addition & 2 deletions client/tests/util/getPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,7 @@ const getPage = async (options, callback) => {
const foundExistingIncognitoContext = !!incognitoContexts[role];

if (!foundExistingIncognitoContext) {
incognitoContexts[role] =
await global.browser.createIncognitoBrowserContext();
incognitoContexts[role] = await global.browser.createBrowserContext();
}
const incognitoContext = incognitoContexts[role];

Expand Down
Loading

0 comments on commit 5f2de7a

Please sign in to comment.