Nightwatch tests are failing on main
Bug #2058256 reported by
Jane Sandberg
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/
3. MOZ_HEADLESS=1 npx nightwatch nightwatch/
Changed in evergreen: | |
assignee: | nobody → Jane Sandberg (sandbergja) |
tags: | added: angular |
tags: | added: automated-tests |
tags: | added: pullrequest |
Changed in evergreen: | |
assignee: | Jane Sandberg (sandbergja) → nobody |
Changed in evergreen: | |
milestone: | none → 3.13.0 |
importance: | Undecided → Medium |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
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.