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

[test] Fix containers size for screenshots #1111

Merged
merged 2 commits into from
Feb 24, 2021

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Feb 24, 2021

Implement #1081 (comment)

maxWidth: 500,
display: 'flex',
flexDirection: 'column',
// Workaround the min-height limitation
Copy link
Member Author

Choose a reason for hiding this comment

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

@oliviertassinari
Copy link
Member Author

I have approved the changes, it seems correct:

Screenshot 2021-02-24 at 22 01 05

@oliviertassinari
Copy link
Member Author

oliviertassinari commented Feb 24, 2021

The visual regressions are a bit slower now that screenshots are all larger. But it still seems manageable :).

@eps1lon an idea I got working on this and seeing console warnings, errors in some of the stories. Maybe we could mock console.error/console.warn and fail the test case if something pop? It could be a quick-win way to assert that all the demos we have in the documentation are "clean" (warning free) We had a couple of regressions in the history of the project. Either when external contributors and reviews are careless or when we do breaking changes / introduce deprecations.

@oliviertassinari oliviertassinari merged commit 38b670c into mui:master Feb 24, 2021
@oliviertassinari oliviertassinari deleted the test-screenshots branch February 24, 2021 22:33
@eps1lon
Copy link
Member

eps1lon commented Feb 24, 2021

You can listen to console calls in playwright and then fail the test with warn/error calls.. Mocking is always a bit brittle since you have to take care to properly restore them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants