test(playwright-test): fix fixtures test (#6967)

🤷‍♂️
This commit is contained in:
Andrey Lushnikov 2021-06-08 13:10:15 -07:00 committed by GitHub
parent 557a564c5f
commit 37af9ce3cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -529,7 +529,7 @@ test('should create a new worker for worker fixtures', async ({ runInlineTest })
'a.test.ts': `
const { test } = pwt;
test('base test', async ({}, testInfo) => {
expect(testInfo.workerIndex).toBe(1);
expect(testInfo.workerIndex).toBe(0);
});
const test2 = test.extend({
@ -539,7 +539,7 @@ test('should create a new worker for worker fixtures', async ({ runInlineTest })
}, { scope: 'worker' }],
});
test2('a test', async ({ foo }, testInfo) => {
expect(testInfo.workerIndex).toBe(0);
expect(testInfo.workerIndex).toBe(1);
});
`,
'b.test.ts': `
@ -551,7 +551,7 @@ test('should create a new worker for worker fixtures', async ({ runInlineTest })
},
});
test2('b test', async ({ bar }, testInfo) => {
expect(testInfo.workerIndex).toBe(1);
expect(testInfo.workerIndex).toBe(0);
});
`,
}, { workers: 1 });