Skip to content

Commit

Permalink
try in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
samanthaandrews committed Sep 8, 2023
1 parent 9f797d3 commit df65a5a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/Playwright.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name: Playwright Tests for Digital Research Books

on:
schedule:
- cron: "00 14 * * 1-5"
pull_request:
branches: [production]
types: [opened, synchronize, reopened]

push:
branches:
- fix-flaky-playwright-tests
# schedule:
# - cron: "00 14 * * 1-5"
# pull_request:
# branches: [production]
# types: [opened, synchronize, reopened]

jobs:
tests:
Expand All @@ -28,16 +30,16 @@ jobs:

- name: Set the world parameters as an env var
run: |
echo "WORLD_PARAMETERS={\"appUrl\": \"https://digital-research-books-beta.nypl.org\", \"headless\": true}" >> $GITHUB_ENV
echo "WORLD_PARAMETERS={\"appUrl\": \"https://drb-qa.nypl.org\", \"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 password": ${{ secrets.CATALOG_USER_PIN }}
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() }}
uses: rtCamp/action-slack-notify@v2
Expand All @@ -46,4 +48,4 @@ jobs:
SLACK_MESSAGE: https://reports.cucumber.io/report-collections/01dbd6e8-653b-4597-b901-6caf2e653b07
SLACK_TITLE: DRB Cucumber/Playwright Test Results
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_USERNAME: nyplorgBot
SLACK_USERNAME: nyplorgBot
2 changes: 1 addition & 1 deletion playwright/support/mappings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export const elements = {
"language footer link": "//a[@href='http://www.nypl.org/language']",
"accessibility page heading": "//h1[text()='Accessibility at NYPL']",
"press page heading": "//h1[text()='Press Releases']",
"careers page heading": "//h1[text()='Careers at NYPL']",
"careers page heading": "//h2[text()='Careers at NYPL']",
"space rental page heading": "//h1//span[text()='Space Rental']",
"privacy page heading":
"//h1[text()='The New York Public Library Privacy Policy']",
Expand Down

0 comments on commit df65a5a

Please sign in to comment.