Skip to content

Commit

Permalink
Merge branch 'development' into remove-survey-banner
Browse files Browse the repository at this point in the history
  • Loading branch information
jackiequach committed Jan 6, 2025
2 parents b373cc0 + 7578ee1 commit f2677da
Show file tree
Hide file tree
Showing 44 changed files with 1,306 additions and 1,515 deletions.
26 changes: 15 additions & 11 deletions .github/workflows/Playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,21 @@ jobs:
with:
node-version-file: ".nvmrc"

- name: Set environment for branch
run: |
if [[ $GITHUB_REF_NAME == 'production' ]]; then
echo "BASE_URL=https://drb-qa.nypl.org/" >> "$GITHUB_ENV"
else
echo "BASE_URL=http://local.nypl.org:3000/" >> "$GITHUB_ENV"
fi
- name: Add hosts to /etc/hosts
if: github.ref != 'production'
run: |
sudo echo "127.0.0.1 local.nypl.org" | sudo tee -a /etc/hosts
- name: Install Test Dependencies
run: npm i @cucumber/[email protected] @playwright/test@1.29.1
run: npm i @playwright/test@1.49.1

- name: Install Playwright
run: npx playwright install --with-deps
Expand All @@ -25,26 +38,17 @@ jobs:
run: NODE_ENV=test npm run build

- name: Start the app
if: github.ref != 'production'
run: |
NODE_ENV=test npm start &
sleep 5
shell: bash

- name: Run your tests
run: npm run playwright

- name: Set the world parameters as an env var
# WORLD_PARAMETERS set here will override anything set in cucumber.json
run: |
echo "WORLD_PARAMETERS={\"headless\": true}" >> $GITHUB_ENV
- name: Run Cucumber tests
run: npm run cucumber -- playwright/features --world-parameters '${{ env.WORLD_PARAMETERS }}'
env:
CATALOG_USERNAME: ${{ secrets.CATALOG_USERNAME }}
CATALOG_USER_PIN: ${{ secrets.CATALOG_USER_PIN }}
CUCUMBER_PUBLISH_TOKEN: ${{ secrets.CUCUMBER_PUBLISH_TOKEN }}
CUCUMBER_PUBLISH_ENABLED: true

- name: Slack Notification
if: ${{ always() }}
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
## [Prerelease]

- Remove survey banner
- Replace Cucumber with Playwright Page Object Model tests
- Update GH action to run tests against local.nypl.org and QA for prod PRs

## [0.18.10]

Expand Down
9 changes: 0 additions & 9 deletions cucumber.json

This file was deleted.

2 changes: 1 addition & 1 deletion mocks/mockEnv.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const NYPL_LOGIN_URL = "https://login.nypl.org/auth/login?redirect_uri=";
export const NYPL_LOGIN_URL = "login.nypl.org";
export const API_URL = "https://backend.msw";
export const FULFILL_PATH = "/fulfill/9351827";
export const LIMITED_ACCESS_EDITION_PATH = "/edition/6977884";
Expand Down
Loading

0 comments on commit f2677da

Please sign in to comment.