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

feat(api): add page.emulateVisionDeficiency(type) #5901

Merged
merged 3 commits into from May 26, 2020
Merged

feat(api): add page.emulateVisionDeficiency(type) #5901

merged 3 commits into from May 26, 2020

Conversation

mathiasbynens
Copy link
Member

@mathiasbynens mathiasbynens commented May 20, 2020

To make it possible for contributors to check this out locally, I've temporarily checked in a random Chromium roll for a binary that works on macOS. Before merging, we'd separate this out to a separate commit which rolls Chromium + updates src/protocol.d.ts. This has now happened as part of #5879.

src/Page.ts Outdated Show resolved Hide resolved
@mathiasbynens mathiasbynens changed the title [WIP] feat(api): add page.emulateVisionDeficiency(type) feat(api): add page.emulateVisionDeficiency(type) May 26, 2020
Copy link
Collaborator

@OrKoN OrKoN left a comment

Choose a reason for hiding this comment

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

LGTM

const screenshot = await page.screenshot();
expect(screenshot).toBeGolden('screenshot-sanity.png');
}
});
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: I'd personally have one individual it for each test rather than the blocks (I think it leads to nicer errors if a test fails) but take it or leave it

Copy link
Member Author

Choose a reason for hiding this comment

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

I see what you're saying. I think the reason it's done this way for existing tests is because we'd otherwise have to duplicate the page.setViewport + page.goto setup for each subtest.

src/Page.ts Outdated Show resolved Hide resolved
@mathiasbynens mathiasbynens merged commit 7eab7f8 into master May 26, 2020
@mathiasbynens mathiasbynens deleted the cvd branch May 26, 2020 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants