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 4 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
7 changes: 3 additions & 4 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)
);
await page.waitForNetworkIdle();

// Allow additional time for popup to open
const popupPage = await popupTarget.page();
const pages = await global.browser.pages();
const popupPage = pages[pages.length - 1];
Copy link
Contributor

@howard-e howard-e Aug 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting! Should the same be done for the similar TestRun.e2e test?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! It wasn't creating issues so I didn't remember to change it but yes, best to keep consistency. It is changed now.


// 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
8 changes: 4 additions & 4 deletions client/tests/e2e/snapshots/saved/_data-management.html
Original file line number Diff line number Diff line change
Expand Up @@ -1087,7 +1087,7 @@ <h2>Test Plans Status Summary</h2>
<td>
<div class="css-bpz90">
<span class="rd full-width css-be9e2a">R&amp;D</span>
<p class="review-text">Complete <b>Aug 8, 2024</b></p>
<p class="review-text">Complete <b>Aug 12, 2024</b></p>
</div>
</td>
<td>
Expand All @@ -1110,7 +1110,7 @@ <h2>Test Plans Status Summary</h2>
<path
fill="currentColor"
d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"></path></svg
><b>V24.08.08</b></span
><b>V24.08.12</b></span
></a
></span
><button
Expand Down Expand Up @@ -1660,7 +1660,7 @@ <h2>Test Plans Status Summary</h2>
<td>
<div class="css-bpz90">
<span class="rd full-width css-be9e2a">R&amp;D</span>
<p class="review-text">Complete <b>Jul 31, 2024</b></p>
<p class="review-text">Complete <b>Aug 12, 2024</b></p>
</div>
</td>
<td>
Expand All @@ -1683,7 +1683,7 @@ <h2>Test Plans Status Summary</h2>
<path
fill="currentColor"
d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"></path></svg
><b>V24.07.31</b></span
><b>V24.08.12</b></span
></a
></span
><button
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