From 57e496c9788a6f8e12f989ea893720058e58da91 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Fri, 26 May 2023 09:18:53 -0700 Subject: [PATCH] test: use platform specific path separator (#23311) The test has been failing recently https://devops.playwright.dev/flakiness.html#filter_spec=should+list+files×tamp=1685115453114 --- tests/playwright-test/list-files.spec.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/playwright-test/list-files.spec.ts b/tests/playwright-test/list-files.spec.ts index 40945197d8..00038dbe0c 100644 --- a/tests/playwright-test/list-files.spec.ts +++ b/tests/playwright-test/list-files.spec.ts @@ -14,6 +14,7 @@ * limitations under the License. */ +import path from 'path'; import { test, expect } from './playwright-test-fixtures'; test('should list files', async ({ runListFiles }) => { @@ -31,7 +32,7 @@ test('should list files', async ({ runListFiles }) => { { name: 'foo', testDir: expect.stringContaining('list-files-should-list-files-playwright-test'), - outputDir: expect.stringContaining('list-files-should-list-files-playwright-test/test-results'), + outputDir: expect.stringContaining(path.join('list-files-should-list-files-playwright-test', 'test-results')), use: {}, files: [ expect.stringContaining('a.test.js') @@ -40,7 +41,7 @@ test('should list files', async ({ runListFiles }) => { { name: 'bar', testDir: expect.stringContaining('list-files-should-list-files-playwright-test'), - outputDir: expect.stringContaining('list-files-should-list-files-playwright-test/test-results'), + outputDir: expect.stringContaining(path.join('list-files-should-list-files-playwright-test', 'test-results')), use: {}, files: [ expect.stringContaining('a.test.js') @@ -67,7 +68,7 @@ test('should include testIdAttribute', async ({ runListFiles }) => { { name: '', testDir: expect.stringContaining('list-files-should-include-testIdAttribute-playwright-test'), - outputDir: expect.stringContaining('list-files-should-include-testIdAttribute-playwright-test/test-results'), + outputDir: expect.stringContaining(path.join('list-files-should-include-testIdAttribute-playwright-test', 'test-results')), use: { testIdAttribute: 'myid' },