fix(e2e): arm the rotation request waiter instead of chaining it onto expect() - #785
Closed
rubenvdlinde wants to merge 1 commit into
Closed
fix(e2e): arm the rotation request waiter instead of chaining it onto expect()#785rubenvdlinde wants to merge 1 commit into
rubenvdlinde wants to merge 1 commit into
Conversation
… expect()
The only E2E failure on learniq development:
TypeError: expect(...).toBeVisible(...).waitForRequest is not a function
at nextcloud-app.spec.ts:229
`toBeVisible()` resolves a Promise and `waitForRequest` is a PAGE method, so
the chain could never work. The test threw before it clicked anything, which
is why it read as a broken rotation feature rather than a broken test.
Rewritten to the idiom this same file already uses correctly twenty lines
earlier: assign `page.waitForRequest(...)` to a variable, THEN interact, THEN
await it.
🔑 The waiter is armed BEFORE the click deliberately. A request started by the
click cannot be caught by a waiter created afterwards, so the ordering is the
point of the pattern rather than a style choice.
Contributor
Quality Report — ConductionNL/learniq @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| check-specs | ✅ | ||||
| format | ✅ | ||||
| check-l10n-js | ✅ | ||||
| check-schema-l10n | ✅ | ||||
| composer | ✅ | ✅ 104/104 | |||
| npm | ✅ | ✅ 637/637 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ❌ | ||||
| PHPUnit | ✅ | ||||
| Newman | ⏭️ | ||||
| Playwright | ⏭️ deferred — runs on the promotion into beta/main, not on a pull request into development | ||||
| Hydra gates | ✅ |
Quality workflow — 2026-09-01 12:56 UTC
Download the full PDF report from the workflow artifacts.
Contributor
Author
|
Superseded, closing. Another session landed the identical fix on development while this was open: same diagnosis ( Verified on development: the waiter is armed before There is nothing here that development does not already have. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The only E2E failure on learniq development:
toBeVisible()resolves a Promise andwaitForRequestis a Page method, so the chain could never work. The test threw before it clicked anything — which is why it read as a broken rotation feature rather than a broken test.Rewritten to the idiom this same file already uses correctly twenty lines earlier: assign
page.waitForRequest(...)to a variable, then interact, then await it.The waiter is armed before the click deliberately: a request started by the click cannot be caught by a waiter created afterwards, so the ordering is the point of the pattern rather than a style choice.