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

PYIC-7484: add functional tests for mobile download link #1828

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

thebauSoftwire
Copy link
Contributor

@thebauSoftwire thebauSoftwire commented Feb 4, 2025

Proposed changes

What changed

Added functional tests for handling mobile download link

Why did it change

Increase test coverage

Issue tracking

Comment on lines +39 to +43
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.*$/);
Copy link
Contributor Author

@thebauSoftwire thebauSoftwire Feb 4, 2025

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

@thebauSoftwire
Copy link
Contributor Author

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... 🤔

@thebauSoftwire thebauSoftwire marked this pull request as ready for review February 4, 2025 17:05
@thebauSoftwire thebauSoftwire requested review from a team as code owners February 4, 2025 17:05
Copy link

sonarqubecloud bot commented Feb 5, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants