Skip to content

Commit

Permalink
test(percy): Add back (abbreviated) Calltaker tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
binh-dam-ibigroup committed Aug 11, 2023
1 parent 7af0cc8 commit fd0ef25
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
18 changes: 17 additions & 1 deletion .github/workflows/percy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
env:
PERCY_OTP2_CONFIG_URL: ${{ secrets.PERCY_MOCKOTP2_CONFIG_URL_METRO_MODE_SELECTOR }}
- name: Build OTP-RR
# Artifacts are shared between desktop and mobile tests (but not call-taker).
run: yarn build
env:
YAML_CONFIG: /tmp/otp2config.yml
Expand All @@ -36,4 +37,19 @@ jobs:
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN_OTP2 }}
OTP_RR_UI_MODE: desktop
# TODO: Reinstate calltaker UI tests.
- name: Take Percy Snapshots (Mobile)
run: npx percy exec -- npx jest percy/percy.test.js --force-exit
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN_OTP2 }}
OTP_RR_UI_MODE: mobile
# Calltaker has a separate config file, so another build should be produced.
- name: Build OTP-RR Calltaker
run: yarn build
env:
YAML_CONFIG: /tmp/otp2config.yml
JS_CONFIG: ./percy/har-mock-config-call-taker.js
- name: Take Percy Snapshots (Calltaker)
run: npx percy exec -- npx jest percy/percy.test.js --force-exit
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN_OTP2 }}
OTP_RR_UI_MODE: calltaker
3 changes: 3 additions & 0 deletions percy/percy.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ async function executeTest(page, isMobile, isCallTaker) {

// take screenshot
await percySnapshotWithWait(page, 'Call Taker With Settings Adjusted')

// Other steps are identical to desktop, so we end here to not waste screenshots.
return
}

// Select a trip
Expand Down

0 comments on commit fd0ef25

Please sign in to comment.