Skip to content

Commit

Permalink
Removed unneeded heading locators
Browse files Browse the repository at this point in the history
  • Loading branch information
clarissarichard committed Oct 19, 2023
1 parent c9c4468 commit 7138525
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 23 deletions.
18 changes: 12 additions & 6 deletions playwright/features/headerLinks.feature
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,20 @@ Feature: Header Links
And the "get help header link" should be displayed
And the "search header link" should be displayed

Scenario: As a user I navigate to the Digital Research Books home page and verify the account and search header sub-links are displayed
Scenario: As a user I navigate to the Digital Research Books home page and verify the account and search header sub-links and elements are displayed
Given I go to the "home" page
When I click the <first header link>
Then the <second header link> should be displayed

Examples:
| first header link | second header link |
| "my account header link" | "catalog header link" |
| "my account header link" | "research catalog header link" |
| "my account header link" | "close my account header link" |
| "search header link" | "close search header link" |
| first header link | second header link |
| "my account header link" | "catalog header link" |
| "my account header link" | "research catalog header link" |
| "my account header link" | "close my account header link" |
| "search header link" | "search header label" |
| "search header link" | "search header text field" |
| "search header link" | "search books music movies radio button" |
| "search header link" | "search research catalog radio button" |
| "search header link" | "search library website radio button" |
| "search header link" | "search header button" |
| "search header link" | "close search header link" |
23 changes: 6 additions & 17 deletions playwright/support/mappings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,43 +177,32 @@ export const elements = {
"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')",
"my account header link": "[aria-label='My Account']",
"catalog header link": "span:text('Go To The Catalog')",
"research catalog header link": "span:text('Go To The Research Catalog')",
"close my account header link": "[aria-label='Close']",
"my account login form": "#login",
"locations header link": "[href='https://www.nypl.org/locations']",
"find your library page heading": "#location-finder__title",
"library card header link": "[href='https://www.nypl.org/library-card/new']",
"library card page heading": "h1:text('Apply for a Library Card Online')",
"email updates header link":
"[href='https://pub.email.nypl.org/subscriptioncenter']",
"email updates page heading": "h1:text('Get the Best of NYPL in Your Inbox')",
"donate header link":
"[href='https://secure.nypl.org/site/Donation2?7825.donation=form1&df_id=7825&mfc_pref=T&s_src=FRQ18ZZ_TNN']",
"donate page heading":
"h1:text('Make Your Tax-Deductible Gift Today') >> nth=0",
"donate header link": "[href='https://www.nypl.org/donate-button']",
"shop header link":
"[href='https://shop.nypl.org/?utm_campaign=NYPLHeaderButton&utm_source=nypl.org&utm_medium=referral']",
"shop page heading": "[title='The New York Public Library Shop'] >> nth=0",
"books music movies header link":
"[href='https://www.nypl.org/books-music-movies']",
"books music movies page heading": "h1:text('Books/Music/Movies')",
"research header link": "[href='https://www.nypl.org/research'] >> nth=0",
"research page heading": "h1:text('Research')",
"education header link": "[href='https://www.nypl.org/education']",
"education page heading": "h1:text('Education')",
"events header link": "[href='https://www.nypl.org/events']",
"events page heading": "h1:text('Events')",
"connect header link": "[href='https://www.nypl.org/connect']",
"connect page heading": "h1:text('Connect')",
"give header link": "[href='https://www.nypl.org/give']",
"give page heading": "h1:text('Give')",
"get help header link": "[href='https://www.nypl.org/get-help']",
"get help page heading": "h1:text('Get Help')",
"search header link": "#searchButton",
"search header label": "#searchInput-label",
"search header text field": "#searchInput",
"search books music movies radio button": "span:text('Search books, music, and movies')",

Check failure on line 202 in playwright/support/mappings.ts

View workflow job for this annotation

GitHub Actions / Lint

Insert `⏎···`
"search research catalog radio button": "span:text('Search the Research Catalog')",

Check failure on line 203 in playwright/support/mappings.ts

View workflow job for this annotation

GitHub Actions / Lint

Insert `⏎···`
"search library website radio button": "span:text('Search the library website')",

Check failure on line 204 in playwright/support/mappings.ts

View workflow job for this annotation

GitHub Actions / Lint

Insert `⏎···`
"search header button": "#search-btn",
"close search header link": "[aria-label='Close Search']",
/** end header locators */
};
Expand Down

0 comments on commit 7138525

Please sign in to comment.