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

UI Tests: Cypress scripts were breaking due to unexpected navigation on different form #18758

Closed
nidhipurohit11 opened this issue Nov 4, 2022 · 1 comment
Assignees
Labels

Comments

@nidhipurohit11
Copy link
Contributor

Description of the issue

Some Cypress scripts were breaking because in between the execution on a form, it was navigating on a different form. This was occurring because of an uncaught exception.

Following scripts breaking because of this same reason -

Multicurrency - Click on ‘set exchange gain/loss’, tried clicking save but navigated on SI

Sales invoice payment - After clicking on the difference amount - it tried entering ref no but navigated on SI from PE

Partial payment - difference amount click, then navigated on SI

Partial delivery note - in child table qty clear, tried entering new qty but navigated on item page

Advance payment - instead of asserting allocated_amount, it navigated on SO

Can find the error recording here - https://dashboard.cypress.io/projects/da59y9/runs/4345/specs

Observed result

Screenshot 2022-11-03 at 7 27 29 PM

Screenshot 2022-11-04 at 4 08 05 PM

Expected result

Flow execution should work as expected from the script

Additional information

ERPNext: v14.x.x-develop () (develop)
Frappe Framework: v14.x.x-develop () (develop)

@maharshivpatel
Copy link
Collaborator

This issue was caused as DOM Elements were added to grid_container& grid variable on touchstart event as they are intended to be used only on mobile devices with touch interface but on_input_focus function that uses this variable was also called from desktop on mouse click event that caused this uncaught exception. This didn't cause any problem in manual testing or while using but had this behaviour on Cypress. This issue has been fixed #18754

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants