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

Add visual regression tests #994

Merged
merged 6 commits into from
Aug 20, 2024
Merged

Add visual regression tests #994

merged 6 commits into from
Aug 20, 2024

Conversation

saundefined
Copy link
Member

/cc @pronskiy

Co-authored-by: Roman Pronskiy <roman@pronskiy.com>
@saundefined saundefined self-assigned this May 23, 2024
Copy link

github-actions bot commented May 23, 2024

🚀 Commit 7b11b96 Deployed on https://web-php-pr-994.preview.thephp.foundation

@pronskiy
Copy link
Contributor

Going through the list of PRs and issues, we can see that there are a bunch of UI/CSS things. The problem is that we currently do not have any experts in this area, and moreover, no QA experts to verify if the changes do not break something.

With this PR Sergey and I propose to introduce screenshot regression testing.

It works like this:

  • Creates snapshots of the website.
  • Then for (almost) every PR creates a new screenshot after changes and compares it to a snapshot.
  • If there is an unexpected difference between two screenshots, then this is a regression introduced and PR should be fixed.

We'd like your feedback on this idea. And if it makes sense, we'll implement the missing parts.

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

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

I think this makes sense, as at least it is possible to see the difference between the current website render and the proposed change.

@saundefined saundefined marked this pull request as ready for review June 3, 2024 10:27
@saundefined
Copy link
Member Author

.github/workflows/pr-preview.yml Outdated Show resolved Hide resolved
.github/workflows/pr-preview.yml Outdated Show resolved Hide resolved
saundefined and others added 3 commits June 3, 2024 21:36
Co-authored-by: Derick Rethans <derick@php.net>
@saundefined
Copy link
Member Author

I'm going to merge this PR later this week if there are no objections.
We'll see how useful it is in real life and adjust as needed.

@saundefined saundefined merged commit c632d19 into php:master Aug 20, 2024
4 checks passed
@saundefined saundefined deleted the regression branch August 20, 2024 06:20
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.

5 participants