Skip to content

fix: flaky auth in e2e test - #130

Merged
rkoopmans merged 1 commit into
tinify:masterfrom
wcreateweb:fix-flaky-auth
Sep 17, 2026
Merged

rkoopmans merged 1 commit into
tinify:masterfrom
wcreateweb:fix-flaky-auth

Conversation

@tijmenbruggeman

@tijmenbruggeman tijmenbruggeman commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

Fixes the occasional failure on an end-2-end test at login.

Background
Occasionally, I encountered a end-2-end test that failed on the login page where the password was on the username. There is a function that runs after 100ms of loading the login page (https://github.com/WordPress/WordPress/blob/master/wp-login.php#L1624). Playwright went on and filled the password into the username failed because the function triggered right when playwright was entering the password. This happened once in every 100 runs, but it was annoying nonetheless.

Summary by CodeRabbit

  • Tests
    • Strengthened authentication setup checks by verifying the username field receives focus and both login fields contain the expected credentials before submission.

@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Essentials

Run ID: 2daa2d85-04ce-4e96-ac5b-54d0add2117b

📥 Commits

Reviewing files that changed from the base of the PR and between 33eddda and 1384207.

📒 Files selected for processing (1)
  • test/integration/auth.setup.ts

Included review availability: 3 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


📝 Walkthrough

Walkthrough

The Playwright authentication setup now checks username focus and verifies the entered admin and password values before submitting the login form.

Changes

Authentication setup

Layer / File(s) Summary
Validate authentication form state
test/integration/auth.setup.ts
The setup asserts that the username field is focused and that both login fields contain the expected credentials before submission.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 13842

The authentication setup now waits for the delayed login-page focus behavior before entering credentials and is ready to merge.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: fixing flaky authentication behavior in the end-to-end test. It is concise and directly related to the pull request objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

A rabbit reads each line,
The patch grows clear beneath the moon,
Small changes hop in place,
Tests guard the garden path,
Reviews bloom before the dawn.

Comment @coderabbitai help to get the list of available commands.

@rkoopmans
rkoopmans merged commit 724ac38 into tinify:master Sep 17, 2026
9 checks passed
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