Skip to content

Commit

Permalink
SFR-1778: Fix failing tests for 0.17.4 release (#440)
Browse files Browse the repository at this point in the history
* Adjusted mappings

* Fixed most errors in itemDetailPageElements

* Didn't see issue with resolved to 2 elements but specified first Jane Austen link

* Didn't see issue with resolved to 2 elements but specified first robot soccer  link

* Corrected ticket number in changelog

* Fixed lint error

* Fixed capitalization of mappings in advSearch

* Removed unneeded element
  • Loading branch information
clarissarichard authored Sep 7, 2023
1 parent 0583cd0 commit 9f797d3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
- Add: SFR-1746: Verify "read online only" toggle button on item details page
- Add: SFR-1748: Verify the headers and footers of Advanced Search page
- Add: SFR-1749: Verify the footers and the respecting landing pages (homepage)
- Add: SFR-1750: Verify the Back to Search Results button is available on Item Details page
- Add: SFR-1751: Verify the Back to Search Results button is available on Item Details page
- Add: SFR-1750: Verify the header links of home page
- Add: SFR-1745: Add Playwright tests to GitHub Actions
- Fix: SFR-1755: Fix Playwright test failures
- Upgrade New Relic packages and update configuration
- Update Adobe Analytics page names
- SFR-1778: Fix failing Playwright tests

## [0.17.3]

Expand Down
6 changes: 3 additions & 3 deletions playwright/features/advSearch.feature
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ Feature: Advanced Search
And the "author heading" should be displayed
And the "search result link" should be displayed

Scenario: As a user I select a language checkbox in advance search and verify the search results
Scenario: As a user I select a language checkbox in advanced search and verify the search results
Given I go to the "home" page
When I click the "advanced search link"
Then I fill in the "keyword search box" with "Jane Austen"
And I click the "Russian language checkbox"
And I click the "advanced search button"
Then the "russian language subheader" should be displayed
And the "russian language checkbox" should be checked
Then the "Russian language subheader" should be displayed
And the "Russian language checkbox" should be checked
And the "first read online button" should be displayed

Scenario: As as user I verify the headers and footers of Advanced Search Page
Expand Down
6 changes: 3 additions & 3 deletions playwright/features/itemDetailPageElements.feature
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ Feature: Item Detail Page Elements
And the "items currently available online toggle" should be displayed
And the "second item edition" should be displayed

Scenario: As a user when I click on "show only intems currently available online" button, only online available books should be displayed
Scenario: As a user when I click on "show only items currently available online" button, only online available books should be displayed
Given I go to the "item detail" page
Then I double click the "items currently available online toggle"
And the "first read online button for all edition" should be displayed
And the "first read online button for all editions" should be displayed

Scenario: As a user when I am in item details page for a collection, I should see back to search results button
Scenario: As a user when I am on item details page for a collection, I should see back to search results button
Given I go to the "home" page
Then I fill in the "homepage search box" with "Jane Austen"
And I click the "search button"
Expand Down
13 changes: 7 additions & 6 deletions playwright/support/mappings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ export const elements = {
"Latin language checkbox": "span:text('Latin')",
"Russian language checkbox": "span:text('Russian')",
"publication year apply button": "#year-filter-button",
"first read online button": "text=Read Online >> nth=0",
"first read online button for all edition": "text=Read Online >> nth=1",
"first read online button": "a:text('Read Online') >> nth=0",
"first read online button for all editions": "a:text('Read Online') >> nth=1",
"first request button":
"[href='https://www.nypl.org/research/collections/shared-collection-catalog/hold/request/b10715506-i13895605']",
"English language checkbox": "span:text('English')",
Expand Down Expand Up @@ -66,7 +66,7 @@ export const elements = {
"advanced search clear button": "#reset-button",
"keyword heading": "h1:text('IBM 1401')",
"author heading": "h1:text('Laurie, Edward J.')",
"russian language subheader": "//div[contains(text(),'Russian')]",
"Russian language subheader": "span:text('Russian')",
"search result link": "a:text('Computers and how they work')",
"delivery location heading": "h2:text('Choose a delivery location')",
"site name heading": "h1:text('Digital Research Books')",
Expand Down Expand Up @@ -114,7 +114,7 @@ export const elements = {
"first search result edition": "a:text('1900 Edition') >> nth=0",
"first collection card link": "a[href^='/collection/'] >> nth=0",
"number of results": "#page-counter",
"Robot Soccer title": "//a[text()='Robot soccer']",
"Robot Soccer title": "//a[text()='Robot soccer'] >> nth=0",
"e-reader table of contents button": "[aria-label='Table of Contents']",
"e-reader settings button": "[aria-label='Settings']",
"e-reader full screen button": "[aria-label='Toggle full screen']",
Expand Down Expand Up @@ -151,10 +151,11 @@ export const elements = {
"//h1[text()='General Policies and Rules']",
"about page heading": "//h1[text()='About The New York Public Library']",
"language page heading": "//h1[text()='Language']",
"The Novels of Jane Austen link": "//a[text()='The novels of Jane Austen']",
"The Novels of Jane Austen link":
"//a[text()='The novels of Jane Austen'] >> nth=0",
"The Novels of Jane Austen heading":
"//h1[text()='The novels of Jane Austen']",
"back to search results button": "//a[text()='Back to search results']",
"back to search results button": "a:text('Back to search results')",
/** header locators */
"header logo": "a[aria-label='The New York Public Library']",
"spotlight heading": "a:text('Spotlight')",
Expand Down

1 comment on commit 9f797d3

@vercel
Copy link

@vercel vercel bot commented on 9f797d3 Sep 7, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.