Skip to content

Commit e631431

Browse files
authored
fixed integration tests for special-error pages (#1632)
1 parent 0896925 commit e631431

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
export const phishingMalwareHelpPageURL = 'https://duckduckgo.com/duckduckgo-help-pages/privacy/phishing-and-malware-protection/';
1+
export const phishingMalwareHelpPageURL = 'https://duckduckgo.com/duckduckgo-help-pages/privacy/phishing-and-malware-protection';
22
export const reportSiteAsSafeFormURL = 'https://duckduckgo.com/malicious-site-protection/report-error';

special-pages/pages/special-error/integration-tests/special-error.spec.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,30 +82,24 @@ test.describe('special-error', () => {
8282
const special = SpecialErrorPage.create(page, workerInfo);
8383
await special.overrideTestLinks();
8484

85-
const expectedURL = `${phishingMalwareHelpPageURL}`;
86-
8785
await special.openPage({ errorId: 'phishing' });
88-
await special.opensNewPage('Learn more', expectedURL);
86+
await special.opensNewPage('Learn more', phishingMalwareHelpPageURL);
8987
});
9088

9189
test('opens malware help page in a new window', async ({ page }, workerInfo) => {
9290
const special = SpecialErrorPage.create(page, workerInfo);
9391
await special.overrideTestLinks();
9492

95-
const expectedURL = `${phishingMalwareHelpPageURL}`;
96-
9793
await special.openPage({ errorId: 'malware' });
98-
await special.opensNewPage('Learn more', expectedURL);
94+
await special.opensNewPage('Learn more', phishingMalwareHelpPageURL);
9995
});
10096

10197
test('opens scam help page in a new window', async ({ page }, workerInfo) => {
10298
const special = SpecialErrorPage.create(page, workerInfo);
10399
await special.overrideTestLinks();
104100

105-
const expectedURL = `${phishingMalwareHelpPageURL}`;
106-
107101
await special.openPage({ errorId: 'scam' });
108-
await special.opensNewPage('Learn more', expectedURL);
102+
await special.opensNewPage('Learn more', phishingMalwareHelpPageURL);
109103
});
110104

111105
test('opens report form in a new window', async ({ page }, workerInfo) => {

0 commit comments

Comments
 (0)