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

Fix one failing E2E test on Firefox, skip the other one #1809

Merged
merged 3 commits into from
May 13, 2024

Conversation

rmunn
Copy link
Collaborator

@rmunn rmunn commented May 6, 2024

Fixes #1801

Description

We currently have two E2E tests that fail on Firefox while they pass on Chrome.

One of them appears to be caused by reload() not triggering our page autosave when it happens immediately after a locator.fill(). I suspect that the reload() isn't triggering the blur event which would allow our autosave to trigger, but only on Firefox (for reasons that would take so long to determine that I figure it's not worth spending the time). I solved this one by clicking on another entry before running the reload(), which forces the just-entered data to autosave and thus the rest of the test passes as it should.

The other test appears to be running into a Playwright bug with locator.fill() on Firefox, where the locator thinks the input field (or textarea in this case) is not editable. This happens even if you put expect(...).toBeEditable() immediately before the .fill(). The expect passes, but then the locator waits forever (or rather, until the test times out) for the text area to be editable, for some reason not realizing that it is editable. Since this appears to be caused by a Playwright and/or Firefox bug rather than by our code, and the test passes in Chromium, I decided to simply have this test skipped on Firefox until such time as the locator.fill() bug gets resolved.

Checklist

  • I have labeled my PR with: bug, feature, engineering, security fix or testing
  • I have performed a self-review of my own code
  • I have reviewed the title & description of this PR which I will use as the squashed PR commit message
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • I have enabled auto-merge (optional)

Testing

  • Run npm run test-e2e; all E2E tests should now pass.

@rmunn rmunn added the testing Pertaining to unit or e2e testing label May 6, 2024
@rmunn rmunn self-assigned this May 6, 2024
@rmunn rmunn requested a review from megahirt May 6, 2024 04:06
Copy link

github-actions bot commented May 6, 2024

Unit Test Results

362 tests   362 ✅  12s ⏱️
 37 suites    0 💤
  1 files      0 ❌

Results for commit dba024c.

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@megahirt megahirt left a comment

Choose a reason for hiding this comment

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

This is great detective work, Robin! Once you've resolved @myieye 's comments I'd like to get this merged so that future PRs can benefit from the green this will bring back.

rmunn added 2 commits May 10, 2024 13:23
It seems that reloading the page immediately after editing an entry
isn't triggering the autosave on Firefox. We can work around this by
navigating to another entry before reloading, which does trigger the
autosave.
There appears to be a Playwright bug with locator.fill() on Firefox,
where the locator waits forever for the textarea to be editable. This
happens even if you have added "expect(...).toBeEditable()" immediately
before the locator.fill(). Since this bug appears to be Firefox-specific,
we will simply skip this test on Firefox until the bug is solved.
@rmunn rmunn force-pushed the debt/failing-firefox-e2e branch from 63cf775 to 0ec6a7e Compare May 10, 2024 06:23
Firefox is slower on this test for some reason, and we do want to make
sure it doesn't time out and make an otherwise-green test run go red.
@rmunn rmunn requested review from myieye and megahirt May 10, 2024 06:56
@rmunn rmunn merged commit ef581f5 into develop May 13, 2024
17 checks passed
@rmunn rmunn deleted the debt/failing-firefox-e2e branch May 13, 2024 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Pertaining to unit or e2e testing
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

debt: 2 failing Firefox playwright E2E tests after npm packages
3 participants