From 8e327ed81a91eef84b49dc219f91edb43565df26 Mon Sep 17 00:00:00 2001 From: ayan <100955969+ayan1229@users.noreply.github.com> Date: Tue, 5 Nov 2024 11:07:35 -0500 Subject: [PATCH 1/3] SFR-2078: Automate Different Publishing Sources --- CHANGELOG.md | 4 ++++ cucumber.json | 2 +- playwright/features/pubSource.feature | 32 +++++++++++++++++++++++++++ playwright/support/mappings.ts | 5 +++++ 4 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 playwright/features/pubSource.feature diff --git a/CHANGELOG.md b/CHANGELOG.md index 58d6af14..ab251c29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,11 +2,15 @@ ## [Prerelease] +- SFR-2078: autoamte and validate different publishing source collections + ## [0.18.6] + - Add submit feedback error handling and new fields - Fix docker file and playwright tests ## [0.18.5] + - Make NYPL footer sticky ## [0.18.4] diff --git a/cucumber.json b/cucumber.json index c5d91f16..3ba96491 100644 --- a/cucumber.json +++ b/cucumber.json @@ -2,7 +2,7 @@ "default": { "import": ["playwright/tests/**/*.ts", "playwright/support/**/*.ts"], "worldParameters": { - "appUrl": "http://localhost:3000/", + "appUrl": "https://drb-qa.nypl.org/", "headless": false } } diff --git a/playwright/features/pubSource.feature b/playwright/features/pubSource.feature new file mode 100644 index 00000000..7336e7fc --- /dev/null +++ b/playwright/features/pubSource.feature @@ -0,0 +1,32 @@ +Feature: Specific Pub Sources + Scenario: As a user I search for title "How safe is eating chicken" and open the title after search result is loaded + Given I go to the "home" page + When I select "title" from the category dropdown + And I fill in the "homepage search box" with "How safe is eating chicken?" + And I click the "search button" + And I click the "first read online button" + And the "e-reader settings button" should be displayed + + Scenario: Chicken Farm + Given I go to the "home" page + When I select "title" from the category dropdown + And I fill in the "homepage search box" with "Chicken Farm" + And I click the "search button" + And I click the "first read online button" + And the "e-reader settings button" should be displayed + + Scenario: Reading Fiction in Antebellum America + Given I go to the "home" page + When I select "title" from the category dropdown + And I fill in the "homepage search box" with "Reading Fiction in Antebellum America" + And I click the "search button" + And I click the "first read online button" + And the "e-reader settings button" should be displayed + + Scenario: Climate Change and Agriculture + Given I go to the "home" page + When I select "title" from the category dropdown + And I fill in the "homepage search box" with "Climate Change and Agriculture" + And I click the "search button" + And I click the "first read online button" + And the "e-reader settings button" should be displayed diff --git a/playwright/support/mappings.ts b/playwright/support/mappings.ts index fc120590..cdccf43e 100644 --- a/playwright/support/mappings.ts +++ b/playwright/support/mappings.ts @@ -251,4 +251,9 @@ export const inputs = { petroleum: "petroleum", "Robot Soccer": "Robot Soccer", "Jane Austen": "Jane Austen", + "How safe is eating chicken?": "How safe is eating chicken?", + "Chicken Farm": "Chicken Farm", + "Reading Fiction in Antebellum America": + "Reading Fiction in Antebellum America", + "Climate Change and Agriculture": "Climate Change and Agriculture", }; From b73eb3cd78e4e4eda5d896614523d8d2c4950b7f Mon Sep 17 00:00:00 2001 From: ayan <100955969+ayan1229@users.noreply.github.com> Date: Tue, 5 Nov 2024 11:12:44 -0500 Subject: [PATCH 2/3] fix the changelog differences --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ab251c29..2c084c37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ - SFR-2078: autoamte and validate different publishing source collections +## [0.18.7] + +- Fix header when banner is up + ## [0.18.6] - Add submit feedback error handling and new fields From b3c6c297d713a741c145e9d90e4cb3cc5cbe95c6 Mon Sep 17 00:00:00 2001 From: ayan <100955969+ayan1229@users.noreply.github.com> Date: Fri, 8 Nov 2024 14:55:46 -0500 Subject: [PATCH 3/3] revert appUrl on cucumber.js --- cucumber.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cucumber.json b/cucumber.json index 3ba96491..c5d91f16 100644 --- a/cucumber.json +++ b/cucumber.json @@ -2,7 +2,7 @@ "default": { "import": ["playwright/tests/**/*.ts", "playwright/support/**/*.ts"], "worldParameters": { - "appUrl": "https://drb-qa.nypl.org/", + "appUrl": "http://localhost:3000/", "headless": false } }