Skip to content

Fixed e2e tests when running multiple browsers concurrently#2799

Open
lama-d3v wants to merge 3 commits intomainfrom
2793-fix-e2e-tests-multiple-browsers
Open

Fixed e2e tests when running multiple browsers concurrently#2799
lama-d3v wants to merge 3 commits intomainfrom
2793-fix-e2e-tests-multiple-browsers

Conversation

@lama-d3v
Copy link
Contributor

Fixes #2793

@lama-d3v lama-d3v self-assigned this Jan 29, 2026
@lama-d3v lama-d3v requested a review from a team as a code owner January 29, 2026 13:13
@github-actions
Copy link

github-actions bot commented Jan 29, 2026

Sigrid maintainability feedback

💭️ You did not change any files that are analyzed by Sigrid.


View this system in Sigrid

@codecov
Copy link

codecov bot commented Jan 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.36%. Comparing base (89a60f7) to head (a21a2d4).
⚠️ Report is 21 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2799      +/-   ##
==========================================
+ Coverage   91.33%   91.36%   +0.02%     
==========================================
  Files         376      379       +3     
  Lines       17574    17639      +65     
  Branches     2004     1987      -17     
==========================================
+ Hits        16051    16115      +64     
+ Misses       1426     1425       -1     
- Partials       97       99       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lama-d3v lama-d3v marked this pull request as draft January 29, 2026 13:24
Comment on lines 166 to 173
const adminContext = await request.newContext();
await page.goto("/account/login");
await adminContext.storageState({ path: "e2e-tests/state/coordinator2.json" });

const loginPage = new LoginPgObj(page);
await loginPage.login("coordinator2", getTestPassword("coordinator2"));
Copy link
Contributor

Choose a reason for hiding this comment

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

These lines are mixing up storageState and logging in.

What happens here is:

  1. we create an adminContext with the storageState of coordinator2;
  2. we don't use that adminContext in the rest of the test;
  3. we log in as coordinator2, invalidating the session of the adminContext.

let electionId: number | null = null;

test(`create typists for flow`, async ({ page }) => {
test(`create typists for flow`, async ({ page, browserName }) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

An advantage of adding a random string to the usernames is that we can do it where they are defined as const as on line 65 for the typists. You do then lose the information on which browser the test is running, but the test outut/report also contains that information.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

typist3 and typist4 are also used in these tests:

{ number: "1", name: "Stadhuis" },

await fillDataEntryPagesAndSave(page, noRecountNoDifferencesDataEntry);

Do I need to use a random string for the usernames instead?

@lama-d3v lama-d3v force-pushed the 2793-fix-e2e-tests-multiple-browsers branch from 5633844 to 33bb5e5 Compare January 29, 2026 16:11
@lama-d3v lama-d3v marked this pull request as ready for review January 29, 2026 16:28
@praseodym praseodym changed the title Fixed e2e tests when running multiple browsers concurrently (#2793) Fixed e2e tests when running multiple browsers concurrently Jan 31, 2026
@github-actions
Copy link

github-actions bot commented Feb 5, 2026

PDF Diff Summary

Comparing against base branch: main

File Status
model-n-10-2.pdf ✅ No changes
model-na-14-2-bijlage1.pdf ✅ No changes
model-na-14-2.pdf ✅ No changes
model-na-31-2-bijlage1.pdf ✅ No changes
model-na-31-2-inlegvel.pdf ✅ No changes
model-na-31-2.pdf ✅ No changes
model-p-2a.pdf ✅ No changes

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.

Fix e2e tests when running multiple browsers concurrently

2 participants