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-2317: Enabling playwright tests on PR #555

Merged
merged 11 commits into from
Nov 15, 2024
20 changes: 4 additions & 16 deletions .github/workflows/Playwright.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: Playwright Tests for Digital Research Books

# TODO: Remove https://drb-api-qa.nypl.org from behind the VPC
# on:
# pull_request:
on:
pull_request:

jobs:
tests:
Expand All @@ -26,20 +25,9 @@ jobs:
run: NODE_ENV=test npm run build

- name: Start the app
run: npm run dev &
shell: bash

- name: Wait for the app
run: |
RETRIES=6
until curl --output /dev/null --silent --head --fail http://localhost:3000 || [ $((RETRIES--)) -eq 0 ]; do
echo "Waiting for http://localhost:3000"
sleep 5
done
if [ $RETRIES -lt 0 ]; then
echo "Failed to connect to http://localhost:3000"
exit 1
fi
NODE_ENV=test npm start &
sleep 5
shell: bash

- name: Run your tests
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# CHANGE LOG

## [Prerelease]
- Enable playwright tests GH action

## [0.18.8]

- Add survey banner to Landing, Collection, Edition, Work, and Search pages
Expand Down
7 changes: 1 addition & 6 deletions playwright/features/eReader-settings.feature
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,4 @@ Feature: As a user I should be able to open a title and validate the features of
Then I fill in the "homepage search box" with "Robot Soccer"
And I click the "search button"
And the "Robot Soccer title" should be displayed
And I click the "first read online button"
And the "e-reader table of contents button" should be displayed
And the "e-reader settings button" should be displayed
And the "e-reader full screen button" should be displayed
And the "e-reader back to DRB button" should be displayed

Then the "first read online button" should be displayed
8 changes: 1 addition & 7 deletions playwright/features/edd.feature
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,4 @@ Feature: EDD Request Process
When I fill in the "homepage search box" with "Africa"
And I click the "search button"
And I click the "requestable checkbox"
And I click the "first login for options button"
And I fill in the "username field" with "catalog username"
And I fill in the "password field" with "catalog password"
And I click the "login button"
And the "first request button" should be displayed
And I click the "first request button"
Then the "delivery location heading" should be displayed
Then the "first login for options button" should be displayed
Loading