-
Notifications
You must be signed in to change notification settings - Fork 268
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
creating first visual test for login page #12922
Conversation
As our sorry cypress gets older, could this Percy Browserstack service work along their Automate service ? To run both functional and visual. It could be worth to take a look for the migration from Sorry. |
loginPage.canSubmit().then((canSubmit) => { | ||
if (canSubmit) { | ||
// Take a snapshot for visual diffing | ||
cy.percySnapshot('Login test'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using an external service like this could trivialize the screenshots storage for diff, and the reporting looks great too. Also it looks really straightforward to take the snapshots.
To debug issues styles related, to wait 15 minutes would mean increasing development time by a tremendous amount and hard to address to a specific component. Also the service Percy is limited to 5k screenshots, where every single push to a PR will trigger like at least 100 times, if we consider each existing test. As discussed today in the planning, this is the original issue which I'm working now since November. On top of that I've been investigating visual testing for unit tests which seems not currently achievable. |
@cnotv I still can't tell where those 15 minutes you've mention are coming from. Could you elaborate? |
It seems like there's more cases and reach 20 minutes sometimes, however I just checked the Test pipeline: https://github.com/rancher/dashboard/actions/runs/12786815636 |
That's a standard run. And this is only executing in the login test. I don't see why this has anything to do with those numbers. |
If you want to use E2E tests to generate screenshots then you should consider E2E timing. I am not aware of what is the final plan, so I just gave opinion based on what I see. |
@cnotv you may be right, but I still can't tell how's that relevant here. But you could participate and call it out. Or open an issue to collect those timings and come with a more accurate number. |
Sorry, but for what should I open the issue exactly? |
@cnotv that's ok. I think we circled back on to how you've come up with those extra 15 minutes. But whatever is implemented I'm fine. |
As I mentioned in the talk, the solutions are non-exclusive to each other. In mine I considered a development approach, while probably I may miss some QA requirements from your side. In the end you guys do the manual tests and know where is needed and where is not. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM pending CI succeeding
Summary
This is a POC of an implementation of visual testing with percy and cypress.
Occurred changes and/or fixed issues
This is for login test page only.
Technical notes summary
This is a POC using percy for visual testing
Areas or cases that should be tested
-No areas
-Used chrome for local testing
-Run the test using the command: npm run cy:run:percy
Areas which could experience regressions
Login page
Screenshot/Video
No
Checklist