Skip to content

Commit 20aa19f

Browse files
committed
Fix Reports e2e test
1 parent 512b810 commit 20aa19f

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

client/tests/e2e/Reports.e2e.test.js

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -213,17 +213,17 @@ describe('Report page for candidate report', () => {
213213
const validJawsHeadingMatchFound = await checkForHeading(
214214
page,
215215
'h2 ::-p-text(JAWS)',
216-
'JAWS and Chrome'
216+
'JAWS 2021.2111.13 or later and Chrome'
217217
);
218218
const validNvdaHeadingMatchFound = await checkForHeading(
219219
page,
220220
'h2 ::-p-text(NVDA)',
221-
'NVDA and Chrome'
221+
'NVDA 2020.4 or later and Chrome'
222222
);
223223
const validVoiceoverHeadingMatchFound = await checkForHeading(
224224
page,
225225
'h2 ::-p-text(VoiceOver for macOS)',
226-
'VoiceOver for macOS and Safari'
226+
'VoiceOver for macOS 11.6 (20G165) or later and Safari'
227227
);
228228

229229
expect(validReportCompletedOnDate).toBe(true);
@@ -242,20 +242,13 @@ describe('Report page for candidate report', () => {
242242
await page.click(viewResultsButton);
243243

244244
await page.waitForSelector('h1 ::-p-text(Modal Dialog Example)');
245-
246-
const isVersionsSummaryFound = await page.evaluate(() => {
247-
const elementsWithText = Array.from(
248-
document.querySelectorAll('h2')
249-
).filter(element => element.textContent.includes('Versions Summary'));
250-
return elementsWithText.length > 0;
251-
});
245+
await page.waitForSelector('h2 ::-p-text(Versions Summary)');
252246
await page.waitForSelector('h2 ::-p-text(Results for)');
253247
await page.waitForSelector(
254248
'details summary ::-p-text(Unapproved Report)'
255249
);
256250
const currentUrl = await page.url();
257251

258-
expect(isVersionsSummaryFound).toBe(false);
259252
expect(currentUrl).toMatch(/^.*\/report\/\d+\/targets\/\d+/);
260253
});
261254
});

0 commit comments

Comments
 (0)