Skip to content

Commit

Permalink
item details and work details links were the same so only one will be…
Browse files Browse the repository at this point in the history
… used
  • Loading branch information
clarissarichard committed Oct 19, 2023
1 parent 7138525 commit b71285a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
4 changes: 2 additions & 2 deletions playwright/features/ReadOnlineTargets.feature
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Feature: Read Online Link Targets

Scenario: As a user I click the Read Online button on the search results page and in the item detail page and their link targets navigate to the same website
Given I go to the "search result" page
Given I go to the "search results" page
When I click the "first read online button"
Then the "Hathi Trust website" should be displayed
Given I go to the "work details" page
Given I go to the "item details" page
When I click the "first read online button"
Then the "Hathi Trust website" should be displayed

4 changes: 1 addition & 3 deletions playwright/support/constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
export const URL = "playwright";
// create const for the URL
export const itemDetailURL =
"work/01a28167-8c8d-4141-a32f-718539d5c8a4?featured=949699";
export const URL = "playwright";
8 changes: 2 additions & 6 deletions playwright/support/mappings.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { itemDetailURL } from "./constants";
import dotenv from "dotenv";
dotenv.config({ path: ".env.local" });

Expand All @@ -10,13 +9,10 @@ export const pages: { [name: string]: Pages } = {
home: {
route: "/",
},
"item details": {
route: itemDetailURL,
},
"search results": {
route: "/search?query=subject%3ASub-saharan+Africa",
},
"work details": {
"item details": {
route: "/work/01a28167-8c8d-4141-a32f-718539d5c8a4?featured=949699",
},
"collection": {

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

View workflow job for this annotation

GitHub Actions / Lint

Replace `"collection"` with `collection`
Expand All @@ -26,7 +22,7 @@ export const pages: { [name: string]: Pages } = {
route: "/advanced-search",
},
"edition details": {
route: "https://drb-qa.nypl.org/edition/949698",
route: "/edition/949698",
},
"about": {

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

View workflow job for this annotation

GitHub Actions / Lint

Replace `"about"` with `about`
route: "/about",
Expand Down

0 comments on commit b71285a

Please sign in to comment.