test: use platform specific path separator (#23311)

The test has been failing recently
https://devops.playwright.dev/flakiness.html#filter_spec=should+list+files&timestamp=1685115453114
This commit is contained in:
Yury Semikhatsky 2023-05-26 09:18:53 -07:00 committed by GitHub
parent fa86f2aee0
commit 57e496c978
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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'
},