Skip to content

Settle attachment scrolling before opening the Save menu - #83

Open
dnlbui wants to merge 1 commit into
test/update-account-option-selectorsfrom
test/settle-attachment-menu-scroll
Open

dnlbui wants to merge 1 commit into
test/update-account-option-selectorsfrom
test/settle-attachment-menu-scroll

Conversation

@dnlbui

@dnlbui dnlbui commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

What Changed

The multiple-attachment download scenario now uses AttachmentMenu.open() to scroll the target into view and wait for stable position/layout across rendered frames before opening Save. The wait is bounded at five seconds.

The named download waiter starts only after Save is visible and is awaited together with the Save click. Existing filename, size, and byte-for-byte checks remain intact.

Fixed Flow

Scroll attachment into view → wait for scrolling/layout to settle → open and verify Save → start the waiter and click Save together → verify downloaded bytes.

Why

Playwright's implicit scrolling could deliver a scroll event just after the attachment click, closing the newly opened menu as the client intends. The old waiter also remained active when menu opening failed, producing a secondary page-closed error during cleanup.

No client behavior or visibility timeout changes are included. Shared failure evidence before recipient cleanup follows in the next stacked issue, #78.

Validation

Against https://liberdus.com/dev/, from playwright-tests/:

CI=true ./node_modules/.bin/playwright test tests/attachments.e2e.test.js --project=chromium --grep 'should send and download multiple attachments' --workers=1 --retries=0 --repeat-each=3 --trace=on --reporter=line --output=/tmp/liberdus-issue79-validation
  • Three runs passed in 4.2 minutes, verifying all five attachment downloads and byte comparisons each time.
  • A focused temporary browser harness passed in Chromium, Firefox, and WebKit: offscreen attachment opens its menu, intentional scrolling dismisses it, and Save downloads the expected filename.
  • The harness also verified bounded failure during continuous layout changes in Chromium.
  • Syntax/diff checks and an independent make-code-skimmable pass passed; changes are limited to the helper and affected scenario.

Stacked on #82, base test/update-account-option-selectors.

Closes #79

@dnlbui
dnlbui added this pull request to stack #88 October 5, 2026 16:26
@dnlbui
dnlbui marked this pull request as ready for review October 5, 2026 16:26

This branch had an error being deployed

1 failed deployment
github-pages — a6f57d2c Deployed Oct 5, 2026 by dnlbui via deploy-report #28
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.

Stabilize attachment Save test by settling scroll before opening the context menu

1 participant