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-1917: Fix failing Playwright tests #490

Merged
merged 6 commits into from
Mar 22, 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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGE LOG

## [Pre-release]

- SFR-1917: Fixed failing Playwright tests

## [0.18.0]

- Add Physical Edition badge and Scan and Deliver blurb to EDD editions
Expand Down
21 changes: 10 additions & 11 deletions playwright/support/mappings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ export const pages: { [name: string]: Pages } = {
route: "/",
},
"search results": {
route: "/search?query=subject%3ASub-saharan+Africa",
route: "search?query=subject%3Awashington+dc",
},
"item details": {
route: "/work/01a28167-8c8d-4141-a32f-718539d5c8a4?featured=949699",
route: "work/01ca64fb-31cc-4451-b8b2-7fc0d9c4f1a8?featured=6428716",
},
collection: {
route: "/collection/297da3a0-bcdb-4eb3-a520-a330fd8fa370",
Expand Down Expand Up @@ -103,18 +103,18 @@ export const elements = {

/** item details page locators */
"item title": "#work-title",
"item author": "div:text('By') > a:text('Library of Congress')",
"item featured edition heading": "#featured-edition",
"item author": "div:text('By') > a[href*='display=author'] >> nth=0",
"item featured edition heading": "div:text('Featured Edition')",
"item featured edition cover": "[alt='Placeholder Cover'] >> nth=0",
"item featured edition year": "a:text('Edition') >> nth=0",
"item featured edition year": "a:has-text('Edition') >> nth=0",
"item featured edition publisher": "div:text('Published by') >> nth=0",
"item featured edition language": "div:text('Languages') >> nth=0",
"item featured edition license": "[href='/license'] >> nth=0",
"item details heading": "#details-list-heading",
"item details authors heading": "dt:text('Authors')",
"item details authors": "dd > a:text('Library of Congress')",
"item details authors": "dd > a[href*='display=author'] >> nth=0",
"item details subjects heading": "dt:text('Subjects')",
"item details subjects": "a:text('Africa, Sub-Saharan')",
"item details subjects": "li > a[href*='/search?query=subject'] >> nth=0",
"item details languages heading": "dt:text('Languages')",
"item details languages": "li:text('English')",
"item all editions heading": "#all-editions",
Expand All @@ -131,19 +131,18 @@ export const elements = {
"back to search results button": "a:text('Back to search results')",

/** log in page locators */
"first login for options button": "text=Log in for options >> nth=0",
"username field": "#code",
"password field": "#pin",
"login button": "[value='Submit']",

/** read online page locators */
"first read online button": "a:text('Read Online') >> nth=0",
"Hathi Trust website":
"iframe[src='https://babel.hathitrust.org/cgi/pt?id=mdp.39015034622749']",
"iframe[src='https://babel.hathitrust.org/cgi/pt?id=hvd.32044079201976']",

/** request page locators */
"first request button":
"[href='https://www.nypl.org/research/collections/shared-collection-catalog/hold/request/b10715506-i13895605']",
"first login for options button": "a:text('Log in to request scan') >> nth=0",
"first request button": "a:text('Request scan') >> nth=0",
"delivery location heading": "h2:text('Choose a delivery location')",

/** ereader locators */
Expand Down
Loading