mirror of
https://github.com/microsoft/playwright.git
synced 2026-11-22 22:05:11 -05:00
test(junit): expect native classname path separators (#44232)
The fileRoot test assumed forward slashes in `classname`, but JUnit preserves the native suite path. Use `path.join` for that assertion and keep the normalized `file` expectations unchanged. The existing test covers both direct and merged reports. Fixes https://github.com/microsoft/playwright/issues/44225 <sub>Triaged on Windows by the Playwright bot - [agent run](https://github.com/microsoft/devops.playwright.dev/actions/runs/44562945812)</sub> Co-authored-by: microsoft-playwright-automation[bot] <203992400+microsoft-playwright-automation[bot]@users.noreply.github.com>
This commit is contained in:
@@ -348,7 +348,10 @@ for (const useIntermediateMergeReport of [false, true] as const) {
|
||||
});
|
||||
|
||||
test('should add file attribute relative to fileRoot', {
|
||||
annotation: { type: 'issue', description: 'https://github.com/microsoft/playwright/issues/44099' },
|
||||
annotation: [
|
||||
{ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/44099' },
|
||||
{ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/44225' },
|
||||
],
|
||||
}, async ({ runInlineTest }) => {
|
||||
const files = {
|
||||
'packages/foo/playwright.config.ts': `
|
||||
@@ -371,7 +374,7 @@ for (const useIntermediateMergeReport of [false, true] as const) {
|
||||
};
|
||||
|
||||
const byDefault = await run({});
|
||||
expect(byDefault['classname']).toBe('auth/a.test.js');
|
||||
expect(byDefault['classname']).toBe(path.join('auth', 'a.test.js'));
|
||||
expect(byDefault['file']).toBe('src/auth/a.test.js');
|
||||
|
||||
// The option is relative to the config directory.
|
||||
|
||||
Reference in New Issue
Block a user