Repository navigation
fix(playwright): classify attachment disposition by type - #125
Open
Pranav-Bobde wants to merge 1 commit into
Open
Pranav-Bobde wants to merge 1 commit into
Pranav-Bobde wants to merge 1 commit into
Conversation
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.
Problem
@keploy/playwrightwaits for page requests to finish before ending a test. It treated anyContent-Dispositionvalue containingattachmentas a download. Chromium rendersinline; filename="attachment-page.html"as a page. When that navigation cancels an older request, settle kept waiting and timed out the test.The new test runs Chromium against a local page server and fake Keploy agent. Before the fix, Chromium cancelled
/slow, but the test timed out incontextteardown while the settle step still listedGET /slow.Change
Read the header's disposition type, its first token.
inlinecounts as a page navigation. Any other valid type counts as a download, because browsers treat unknown types such asx-attachmentas attachment (RFC 6266, section 4.2). Inline headers with filenames containing "attachment" now count as page navigations. Existing download, 204 and 205 cases stay covered, and a new row covers anx-attachmentdownload.Checked
timedOut, the page server loggedslow cut, and settle still reported a wait for/slow.x-attachmentdownload row passes both onmainand with this change, so unknown disposition types still count as downloads.npm run buildpassed; rootnode --test --test-reporter=spec test/*.test.mjspassed 51/51; Jestnpm testpassed 41/41.npm testpassed 47/47 before and 49/49 after in headless Chromium.jest/e2e/lane.sh; Firefox; WebKit. The root, Jest and Playwright package scripts define no lint command.