Skip to content

Conversation

martakam
Copy link
Member

@martakam martakam commented Nov 11, 2026 •

Many E2E tests failed because of timeouts, likely caused by running 8 workers running browsers at the same time.
This has now been decreased to 4.

Some tests also failed because we have a different menu in the header on mobiles now. This has been fixed by opening the menu and checking its content if we're testing on mobile screen sizes.

Furthermore, some smaller fixes highlighted by the accessibility checks from Axe have been implemented, and a slight refactoring of the E2E tests has been done.
All of these pass for me locally now, even though one must wait a little longer for the results. Please let me know if everything looks good for you guys as well.

Closes #120

@martakam martakam added the test Writing/editing tests label Nov 11, 2026
@martakam martakam added this to the Deliverable 4 milestone Nov 11, 2026
@martakam martakam self-assigned this Nov 11, 2026
@martakam martakam requested a review from a team as a code owner November 11, 2026 13:51
@johahor
Copy link
Member

johahor commented Nov 12, 2026

I'm testing these right now, but some are failing for me. Currently working on a fix.

Copy link
Member

@hestro hestro left a comment

Choose a reason for hiding this comment

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

One test failed for me: “a user can log out and log in again” on Mobile Chrome. The failing step is logOut at fixtures.ts:86.

I ran the same test 10 times and got 6 passes and 4 fails. AI suggested the flaky test is a timing issue, which fits the failure snapshot, where the menu has already closed when the test looks for “Log out”.

Skjermbilde 2026-11-12 kl  14 51 04

@johahor
Copy link
Member

johahor commented Nov 12, 2026

Try now @hestro

@hestro
Copy link
Member

hestro commented Nov 12, 2026 •

@johahor
The test that failed earlier doesn't seem to fail anymore - good!

However, when I ran all the e2e tests three times, I got three different results:

Run 1:

3 failed
[firefox] › e2e/accessibility.spec.ts:46:5 › light mode › home page
[firefox] › e2e/accessibility.spec.ts:89:5 › light mode › profile page
[webkit] › e2e/home.spec.ts:7:1 › searching from the hero shows matching books

2 skipped
195 passed (1.8m)

Run 2:

2 skipped
198 passed (1.6m)

Run 3:

1 failed
[firefox] › e2e/accessibility.spec.ts:89:5 › light mode › profile page

2 skipped
197 passed (1.6m)

There still seem to be some flaky tests...

@martakam
Copy link
Member Author

We can reduce the amount of workers even more, because the timeouts/failures are usually caused by that.

@hestro could you try decrasing the number 4 to 1 and see if that fixes it?

workers: process.env.CI ? 1 : 4,

Sign in to join this conversation on GitHub.
Labels
test Writing/editing tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test: fix E2E tests failing on mobile and WebKit
3 participants