Nightwatch tests are failing on main

Bug #2058256 reported by Jane Sandberg
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Medium
Unassigned

Bug Description

After bug 2021862 was merged, two of the nightwatch tests started failing, since they were searching the DOM for inputs with certain placeholder text. Instead of using the placeholder text, we could use the label text to find the appropriate label, then use the label's "for" attribute to get the id of the input in question.

To recreate on a running Evergreen system:
1. cd Open-ILS/src/eg2
2. MOZ_HEADLESS=1 npx nightwatch nightwatch/src/staff/cat/vandelay.spec.ts
3. MOZ_HEADLESS=1 npx nightwatch nightwatch/src/staff/admin/local/carousels.spec.ts

Changed in evergreen:
assignee: nobody → Jane Sandberg (sandbergja)
tags: added: angular
tags: added: automated-tests
tags: added: pullrequest
Revision history for this message
Jane Sandberg (sandbergja) wrote :

Here is a branch that fixes all but one of the test failures: user/sandbergja/nightwatch-fix-take-2

Here is a link: https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/sandbergja/nightwatch-fix-take-2

It's the top 3 commits that you'll want. The fourth commit is my patch for bug 2067115 -- without it, several of the tests fail, and rightly so!

Other tests just needed the routine maintenance of getting CSS/Xpath selectors to match the changes that have been made to the code under test. Noting that in several cases, Nightwatch 3 provides some nice convenience APIs (for example, selecting an input by its label text) that should allow the tests to be less tightly coupled to specific CSS/Xpath selectors, which I welcome! As such, these 3 commits should only be backported if we also backport bug 2036312.

And that one remaining test failure (nightwatch/src/staff/cat/holdings-editor-config.spec.ts) is due to a regression in the combobox code, which I'll report separately.

Revision history for this message
Jane Sandberg (sandbergja) wrote :

Holdings editor bug has been reported at bug 2067160

Changed in evergreen:
assignee: Jane Sandberg (sandbergja) → nobody
Revision history for this message
Stephanie Leary (stephanieleary) wrote :

Thanks for working on all these tests, Jane! I could not get the New Carousel test working without adjusting the owning library selector, so I've added a commit to do that along with my signoffs for your changes: user/sleary/nightwatch-fix-take-3

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/sleary/nightwatch-fix-take-3

Revision history for this message
Jane Sandberg (sandbergja) wrote :

Thanks, Stephanie, for the review, signoff, and selector fix. My signoff for your commit is at user/sandbergja/nightwatch-fix-take-3-signoff

tags: added: signedoff
Revision history for this message
Blake GH (bmagic) wrote :

Thanks all! Included for 3.13

Changed in evergreen:
status: New → Fix Committed
Andrea Neiman (aneiman)
Changed in evergreen:
milestone: none → 3.13.0
importance: Undecided → Medium
Andrea Neiman (aneiman)
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.