Skip to content

fix: additional fixes of the new assertView command#1282

Open
shadowusr wants to merge 3 commits into
masterfrom
users/shadowusr/TESTPLANE-1047.fix-popup-fallback
Open

fix: additional fixes of the new assertView command#1282
shadowusr wants to merge 3 commits into
masterfrom
users/shadowusr/TESTPLANE-1047.fix-popup-fallback

Conversation

@shadowusr

Copy link
Copy Markdown
Member

What's done?

This PR contains minor enhancements of the new assertView logic in Testplane 9:

  • An even better fallback in case capture area disappears mid-capture
  • An even better computation of safeArea in case of popup+sticky elements behind popup combo
  • A fix of incredibly rare occasion when window.innerHeight returns incorrect height

@pkg-pr-new

pkg-pr-new Bot commented Jun 23, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/gemini-testing/testplane@1282

commit: 8f2d38a

@github-actions

Copy link
Copy Markdown

✅ Testplane E2E run succeed

Report

@github-actions

Copy link
Copy Markdown

✅ Testplane browser-env run succeed

Report

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8f2d38ae50

ℹ️ 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".

opts,
async currentState => {
if (currentState.captureSpecs.length === 0) {
if (iterations > 0) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Require complete coverage before accepting disappeared targets

For a target that needs another scroll chunk and hides after the first scroll, iterations > 0 is true even though hasCapturedTheWholeArea is still false. Returning here makes _scrollThroughCaptureArea treat the empty spec list as finished, so CompositeImage renders only previously registered chunks and the lower part of the requested selector is never captured or compared; this can turn an incomplete capture into a passing/truncated baseline instead of an error.

Useful? React with 👍 / 👎.

Comment on lines +56 to +57
width: visualViewport.width as Length<"css", "x">,
height: visualViewport.height as Length<"css", "y">

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Normalize visual viewport dimensions before returning

When visualViewport exposes fractional CSS pixels, such as under pinch/page zoom, these raw dimensions flow through fromCssToDevice unchanged whenever DPR is an integer. Later screenshot cropping and PNG encoding assume integer image sizes (Image.crop stores actualWidth/actualHeight directly, and PNG IHDR writes integer widths), so these captures can fail or produce malformed buffers; round/floor the visual viewport size before returning it.

Useful? React with 👍 / 👎.

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