Skip to content

All device test updates#1039

Closed
chinmaymudholkar1 wants to merge 21 commits intomainfrom
macos-vm
Closed

All device test updates#1039
chinmaymudholkar1 wants to merge 21 commits intomainfrom
macos-vm

Conversation

@chinmaymudholkar1
Copy link
Copy Markdown
Collaborator

Tests running on Safari and mobile devices regularly fail due to two main issues:

  1. Faulty webkit on linux
  2. Several header menu items are shown only after clicking the 'More' button

Changes in this PR fix these issues:

  1. Run Safari and iOS tests on a macOS GitHub runner instead of ubuntu-latest. The macOS runner now runs in parallel to ubuntu-latest to reduce execution time. Some tests (report downloads) have had to be modified to handle the CSVs opening in new tabs vs. downloading.
  2. On smaller viewports, the 'Browse More' button is clicked if the expected option is not immediately available.

@chinmaymudholkar1 chinmaymudholkar1 requested a review from a team as a code owner March 23, 2026 16:40
@zoltan-antal zoltan-antal self-assigned this Mar 24, 2026
@zoltan-antal
Copy link
Copy Markdown
Contributor

Lots of tests don't run locally for me, so I'm having trouble recreating things locally. Do they run fine for you?

@chinmaymudholkar1
Copy link
Copy Markdown
Collaborator Author

Lots of tests don't run locally for me, so I'm having trouble recreating things locally. Do they run fine for you?

Yes they do.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a lot of formatting changes in this file. If they're not needed, can we restore the original version please?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yamllint

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean? Yamllint doesn't cause this, it didn't complain about the previous formatting. I think it must be an issue with your IDE formatting settings.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have more of this in end-to-end-tests-all-devices.yaml and run-end-to-end-tests/action.yml

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/NHSDigital/manage-vaccinations-in-schools-testing/actions/runs/23448779403/job/68219837872

I don't have any additional settings for yaml linting on my IDE (just the ones on the repo).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see in the linked job that there was an issue with line length on one line.
It's good that you fixed that, but that doesn't mean we need to split all variable declarations to two lines using a | or that we need to replace all ' with ". Those are my main concerns, as they show up as changes in the diff and makes it hard to read and figure out what the actual changes are.

@chinmaymudholkar1 chinmaymudholkar1 marked this pull request as draft March 25, 2026 10:21
auto-merge was automatically disabled March 25, 2026 10:21

Pull request was converted to draft

@chinmaymudholkar1 chinmaymudholkar1 marked this pull request as ready for review March 25, 2026 16:21
# WebKit may open CSV in browser - read from <pre> element
pages = self.page.context.pages
page_to_read = pages[-1] if len(pages) > 1 else self.page
page_to_read.wait_for_load_state("load", timeout=page_load_timeout)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need this wait? We already waited 5s in the try block before we enter the except block.

- device: iPhone 15
os: macos-latest
cache_path: ~/Library/Caches/ms-playwright
max-parallel: 5
Copy link
Copy Markdown
Contributor

@zoltan-antal zoltan-antal Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see that you changed it to 2 in order to

avoid teams getting deleted

But now it's back up to 5 again. If this can truly cause flakiness, should we not just turn it down to 1? It seems that the workflow doesn't take that long, and it mainly runs as night, so it should probably be fine?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am seeing a strange 500 response on the reset_team function. This is only happening on GH, not on local. I have tried various solutions on different commits, but the issue persists. Even 1 parallel run does not help.

{
echo "tests="
echo "cross_service_tests=true"
echo "cross_service_tests=false"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we turning this off?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am seeing a strange 500 response on the reset_team function. This is only happening on GH, not on local. I have tried various solutions on different commits, but the issue persists. Even 1 parallel run does not help.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I can see there's lots of tests failing (I reran them too). But it seems like they're failing even with this being off, so I don't think we need to turn these tests off to solve it, it doesn't seem related.

Comment on lines +80 to +82
imms_api_tests: "false"
pds_api_tests: "false"
reporting_tests: "false"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, why are we turning these off?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am seeing a strange 500 response on the reset_team function. This is only happening on GH, not on local. I have tried various solutions on different commits, but the issue persists. Even 1 parallel run does not help.

@chinmaymudholkar1
Copy link
Copy Markdown
Collaborator Author

This needs more thought. I will reattempt this later.

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