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

SFR-2033/verify-nypl-header-links #508

Merged
merged 2 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Fix cut off text on search bar dropdown
- Fix broken link on the About page
- SFR-2008: Automate License Page Headers and Sub-Headers
- SFR-2033: Verify the external NYPL header links of DRB App

## [0.18.1]

Expand Down
57 changes: 35 additions & 22 deletions playwright/features/headerLinks.feature
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,45 @@ Feature: Header Links
And the "get help header link" should be displayed
And the "search header link" should be displayed

Examples:
| DRB |
| "home" |
| "advanced search" |
| "search results" |
| "item details" |
| "edition details" |
| "collection" |
| "read online" |
| "license" |
| "about" |
Examples:
| DRB |
| "home" |
| "advanced search" |
| "search results" |
| "item details" |
| "edition details" |
| "collection" |
| "read online" |
| "license" |
| "about" |

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" | "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" |
| 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" |

Scenario: As a user when I click on Locations I should be directed to NYPL location page
Given I go to the "home" page
Then I click the <first header link>
And the <landing page header> should be displayed

Examples:
| first header link | landing page header |
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not familiar with cucumber syntax. Does it always start with a row without double quotes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Toxiapo yes. First row will always be without quotes to map the next rows with the main steps

| "locations header link" | "locations page header" |
| "library card header link" | "get a library card page header" |
| "email updates header link" | "get email updates page header" |
| "donate header link" | "donation page button" |
| "shop header link" | "shop page footer" |
8 changes: 8 additions & 0 deletions playwright/support/mappings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,14 @@ export const elements = {
"//p[contains(text(),'Works may be in the public domain in the Unites St')]",
"public domain us only subheader":
"//p[contains(text(),'Works may be in the public domain in the Unites States')]",

/** external page locators */
"locations page header":
"//div[contains(text(),'Welcome to The New York Public Library. Discover o')]",
"get a library card page header": "//h1[@id='hero-banner']",
"get email updates page header": "//h1[@id='page-title']",
"donation page button": "//button[text()='Donate']",
"shop page footer": "//h2[text()='All Proceeds Support the Library']",
};

export const inputs = {
Expand Down
Loading