-
Notifications
You must be signed in to change notification settings - Fork 1
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
PYIC-7484: add functional tests for mobile download link #1828
base: main
Are you sure you want to change the base?
Conversation
const responsePromise = page.waitForResponse(response => response.status() == 301); | ||
await page.getByRole('button', {name: "Download GOV.UK One Login"}).click(); | ||
const response = await responsePromise; | ||
|
||
expect(response.headers()['location']).toMatch(/^.*apps\.apple\.com\/gb\/app\/gov-uk-id-check.*$/); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is handled differently for apple devices as instead of going straight to the page, it will try and open it in the app for the app store instead so page.url will remain as .../pyi-triage-mobile-download-app/en?context=iphone
but checking that the 301 redirect response will have location itms-appss:appls.apple.com/...
in its headers instead
I'm not sure why the pyi-triage-desktop-download-app screenshots have been marked as needing an update. I've ran the browser tests multiple times and have required the same change so I don't think it's flakiness... 🤔 |
a53f01d
to
0bf1b35
Compare
|
Proposed changes
What changed
Added functional tests for handling mobile download link
Why did it change
Increase test coverage
Issue tracking