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

chore: update expectations for Firefox when evaluate fails #8890

Merged
merged 1 commit into from Sep 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 12 additions & 4 deletions test/src/page.spec.ts
Expand Up @@ -1693,7 +1693,7 @@ describe('Page', function () {
});

it('should throw an error if loading from url fail', async () => {
const {page, server} = getTestState();
const {page, server, isFirefox} = getTestState();

await page.goto(server.EMPTY_PAGE);
let error!: Error;
Expand All @@ -1702,7 +1702,11 @@ describe('Page', function () {
} catch (error_) {
error = error_ as Error;
}
expect(error.message).toContain('Could not load script');
if (isFirefox) {
expect(error.message).toBeTruthy();
} else {
expect(error.message).toContain('Could not load script');
}
});

it('should work with a path', async () => {
Expand Down Expand Up @@ -1815,7 +1819,7 @@ describe('Page', function () {
});

it('should throw an error if loading from url fail', async () => {
const {page, server} = getTestState();
const {page, server, isFirefox} = getTestState();

await page.goto(server.EMPTY_PAGE);
let error!: Error;
Expand All @@ -1824,7 +1828,11 @@ describe('Page', function () {
} catch (error_) {
error = error_ as Error;
}
expect(error.message).toContain('Could not load style');
if (isFirefox) {
expect(error.message).toBeTruthy();
} else {
expect(error.message).toContain('Could not load style');
}
});

it('should work with a path', async () => {
Expand Down