Skip to content

fix: Replace path with parentPath#39275

Open
lhfmartin wants to merge 5 commits intomicrosoft:mainfrom
lhfmartin:fix-issue-39274
Open

fix: Replace path with parentPath#39275
lhfmartin wants to merge 5 commits intomicrosoft:mainfrom
lhfmartin:fix-issue-39274

Conversation

@lhfmartin
Copy link

@lhfmartin lhfmartin commented Feb 14, 2026

The path attribute in Dirent class is removed in nodejs 24, so I am replacing it with parentPath

Fixes #39274

Copy link
Member

@Skn0tt Skn0tt left a comment

Choose a reason for hiding this comment

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

Please add a regression test that triggers the bug you're reporting, so we can ensure it doesn't come back.

@lhfmartin
Copy link
Author

@microsoft-github-policy-service agree

@github-actions

This comment has been minimized.

@lhfmartin
Copy link
Author

Please add a regression test that triggers the bug you're reporting, so we can ensure it doesn't come back.

I have tried to add a test that uploads a folder and ensure that all files in the folder are received by the server.
However, for the two webkit tests, I am getting the error:

Error: expect(received).toEqual(expected) // deep equality

    - Expected  - 3
    + Received  + 3

      Set {
    -   "folder-upload-test/file1.txt",
    -   "folder-upload-test/file2",
    -   "folder-upload-test/sub-dir/really.txt",
    +   "file1.txt",
    +   "file2",
    +   "really.txt",

It seems that f.originalFilename will only return the file name without the base folder path when using webkit for the test. Is it a known issue / how should I fix that?

The test passes on chrome / firefox.

@github-actions
Copy link
Contributor

Test results for "MCP"

1 failed
❌ [msedge] › mcp/tracing.spec.ts:21 › check that trace is saved with --save-trace @mcp-windows-latest

4882 passed, 135 skipped


Merge workflow run.

@Skn0tt
Copy link
Member

Skn0tt commented Feb 16, 2026

That doesn't look like an issue per se, more like a platform difference. I think it's fine to follow what page-set-input-files.spec.ts:38 does, and assert on the DOM state instead of what arrives on the server.

@Skn0tt
Copy link
Member

Skn0tt commented Feb 16, 2026

It looks like there's some lint failures, please make sure that npm run lint passes. Otherwise this looks great, thank you!

@lhfmartin
Copy link
Author

Updated, thanks

@github-actions
Copy link
Contributor

Test results for "tests 1"

29 failed
❌ [playwright-test] › aria-snapshot-file.spec.ts:23 › should match snapshot with name @macos-latest-node20
❌ [playwright-test] › aria-snapshot-file.spec.ts:40 › should generate multiple missing @macos-latest-node20
❌ [playwright-test] › aria-snapshot-file.spec.ts:62 › should rebaseline all @macos-latest-node20
❌ [playwright-test] › aria-snapshot-file.spec.ts:109 › should generate snapshot name @macos-latest-node20
❌ [playwright-test] › aria-snapshot-file.spec.ts:131 › backwards compat with .yml extension @macos-latest-node20
❌ [playwright-test] › aria-snapshot-file.spec.ts:150 › should update snapshot with the update-snapshots=all (config) @macos-latest-node20
❌ [playwright-test] › aria-snapshot-file.spec.ts:150 › should update snapshot with the update-snapshots=changed (config) @macos-latest-node20
❌ [playwright-test] › aria-snapshot-file.spec.ts:150 › should update snapshot with the update-snapshots=missing (config) @macos-latest-node20
❌ [playwright-test] › aria-snapshot-file.spec.ts:198 › should respect config.snapshotPathTemplate @macos-latest-node20
❌ [playwright-test] › aria-snapshot-file.spec.ts:225 › should respect config.expect.toMatchAriaSnapshot.pathTemplate @macos-latest-node20
❌ [playwright-test] › config.spec.ts:349 › should print nice error when project is unknown and launching UI mode @macos-latest-node20
❌ [playwright-test] › expect-configure.spec.ts:19 › should configure timeout @macos-latest-node20
❌ [playwright-test] › expect-configure.spec.ts:56 › should prefer local message @macos-latest-node20
❌ [playwright-test] › expect-configure.spec.ts:90 › should chain configure @macos-latest-node20
❌ [playwright-test] › expect-poll.spec.ts:105 › should fail when used with web-first assertion @macos-latest-node20
❌ [playwright-test] › expect-poll.spec.ts:118 › should time out when running infinite predicate @macos-latest-node20
❌ [playwright-test] › expect-poll.spec.ts:162 › should support .not predicate @macos-latest-node20
❌ [playwright-test] › expect.spec.ts:508 › should support toHaveURL with baseURL from webServer @macos-latest-node20
❌ [playwright-test] › playwright.ct-react.spec.ts:600 › should not add React import to minified .js file that already imports React after closing brace @macos-latest-node20
❌ [playwright-test] › playwright.spec.ts:485 › should work with video: on-first-retry @macos-latest-node20
❌ [playwright-test] › playwright.unhandled.spec.ts:51 › should produce uncaughtException when context.route raises @macos-latest-node20
❌ [playwright-test] › playwright.unhandled.spec.ts:67 › should produce unhandledRejection when context.route raises @macos-latest-node20
❌ [playwright-test] › reporter-base.spec.ts:259 › created › should print if globalTimeout is reached @macos-latest-node20
❌ [playwright-test] › reporter-junit.spec.ts:310 › created › should render existing attachments, but not missing ones @macos-latest-node20
❌ [playwright-test] › reporter-junit.spec.ts:337 › created › should render attachment paths relative to report file when report file name is specified @macos-latest-node20
❌ [playwright-test] › reporter-line.spec.ts:193 › merged › should show error context with relative path @macos-latest-node20
❌ [playwright-test] › reporter.spec.ts:251 › created › should not have internal error when steps are finished after timeout @macos-latest-node20
❌ [playwright-test] › reporter.spec.ts:251 › merged › should not have internal error when steps are finished after timeout @macos-latest-node20
❌ [playwright-test] › ui-mode-test-network-tab.spec.ts:371 › should not preserve selection across test runs @macos-latest-node20

4 flaky ⚠️ [chromium-page] › page/page-request-continue.spec.ts:754 › propagate headers cross origin redirect after interception `@ubuntu-22.04-chromium-tip-of-tree`
⚠️ [firefox-library] › library/inspector/cli-codegen-1.spec.ts:1082 › cli codegen › should not throw csp directive violation errors `@firefox-ubuntu-22.04-node20`
⚠️ [firefox-page] › page/page-wait-for-function.spec.ts:104 › should work with strict CSP policy `@firefox-ubuntu-22.04-node20`
⚠️ [firefox-page] › page/workers.spec.ts:175 › should clear upon cross-process navigation `@firefox-ubuntu-22.04-node20`

38539 passed, 843 skipped


Merge workflow run.

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.

[Bug]: Cannot choose files for <input type="file" /> when using remote browser

2 participants