fix: wait for element to be displayed before assertView#1244
fix: wait for element to be displayed before assertView#1244
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ef8eabbd78
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| browser | ||
| .$(selector) | ||
| .then(el => el.waitForExist()) | ||
| .then(el => el.waitForDisplayed()) |
There was a problem hiding this comment.
Keep assertView waiting for existence, not visibility
Switching assertView prechecks to waitForDisplayed changes command semantics and can fail valid scenarios where a selector exists but is intentionally hidden (or temporarily hidden) at capture time. The screenshot pipeline still treats hidden selectors as a supported case (getElementCaptureRect returns null for hidden nodes and only errors when all capture areas are hidden in src/browser/client-scripts/index.js), and docs currently specify waitForExist for assertView (docs/writing-tests.md, note under assertView). With this change, such tests now time out before capture instead of proceeding with the existing hidden-element handling.
Useful? React with 👍 / 👎.
ef8eabb to
2c1f5c6
Compare
commit: |
No description provided.