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

Upgrade puppeteer, fix intermittent CI issues #1193

Merged
merged 6 commits into from
Aug 15, 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
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 @@
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 All @@ -54,7 +53,7 @@
);
});

it('renders page for review page after test format v2', async () => {

Check warning on line 56 in client/tests/e2e/TestReview.e2e.test.js

View workflow job for this annotation

GitHub Actions / Using NodeJS and Postgres 12

Test has no assertions

Check warning on line 56 in client/tests/e2e/TestReview.e2e.test.js

View workflow job for this annotation

GitHub Actions / Using NodeJS and Postgres 12

Test has no assertions
await getPage({ role: false, url: '/test-review/65' }, async page => {
await text(
page,
Expand All @@ -64,7 +63,7 @@
});
});

it('opens latest review page for pattern from /data-management', async () => {

Check warning on line 66 in client/tests/e2e/TestReview.e2e.test.js

View workflow job for this annotation

GitHub Actions / Using NodeJS and Postgres 12

Test has no assertions

Check warning on line 66 in client/tests/e2e/TestReview.e2e.test.js

View workflow job for this annotation

GitHub Actions / Using NodeJS and Postgres 12

Test has no assertions
await getPage(
{
role: false,
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 @@ -358,7 +358,7 @@
});
});

it('opens popup with content after clicking "Open Test Page" button', async () => {

Check warning on line 361 in client/tests/e2e/TestRun.e2e.test.js

View workflow job for this annotation

GitHub Actions / Using NodeJS and Postgres 12

Test has no assertions

Check warning on line 361 in client/tests/e2e/TestRun.e2e.test.js

View workflow job for this annotation

GitHub Actions / Using NodeJS and Postgres 12

Test has no assertions
await getPage({ role: 'tester', url: '/test-queue' }, async page => {
await assignSelfAndNavigateToRun(page);

Expand All @@ -366,12 +366,11 @@
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
Loading