Skip to content

Commit 970b011

Browse files
authored
chore: roll @playwright/test to 0.9.6 (#3977)
1 parent 49bcf6e commit 970b011

File tree

5 files changed

+72
-140
lines changed

5 files changed

+72
-140
lines changed

package-lock.json

Lines changed: 51 additions & 122 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
"ws": "^7.3.1"
5050
},
5151
"devDependencies": {
52-
"@playwright/test-runner": "^0.9.1",
52+
"@playwright/test": "^0.9.6",
53+
"@playwright/test-runner": "^0.9.10",
5354
"@types/debug": "^4.1.5",
5455
"@types/extract-zip": "^1.6.2",
5556
"@types/mime": "^2.0.3",
@@ -72,7 +73,6 @@
7273
"ncp": "^2.0.0",
7374
"node-stream-zip": "^1.11.3",
7475
"pkg": "^4.4.9",
75-
"pwt": "^0.9.1",
7676
"socksv5": "0.0.6",
7777
"ts-loader": "^8.0.3",
7878
"typescript": "^4.0.2",

test/playwright.fixtures.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@ import { TestServer } from '../utils/testserver';
2424
import { Connection } from '../lib/client/connection';
2525
import { Transport } from '../lib/protocol/transport';
2626
import { installCoverageHooks } from './coverage';
27-
import { fixtures as baseFixtures } from '@playwright/test-runner';
27+
import { fixtures as baseFixtures, config } from '@playwright/test-runner';
2828
import assert from 'assert';
29+
import { expect } from '@playwright/test';
30+
export { expect } from '@playwright/test';
31+
export { config } from '@playwright/test-runner';
2932

3033
const mkdtempAsync = util.promisify(fs.mkdtemp);
3134
const removeFolderAsync = util.promisify(require('rimraf'));
@@ -83,7 +86,6 @@ export const beforeEach = fixtures.beforeEach;
8386
export const afterEach = fixtures.afterEach;
8487
export const beforeAll = fixtures.beforeAll;
8588
export const afterAll = fixtures.afterAll;
86-
export const expect = fixtures.expect;
8789

8890
export const options = {
8991
CHROMIUM: (parameters: PlaywrightParameters) => parameters.browserName === 'chromium',
@@ -127,7 +129,7 @@ const getExecutablePath = browserName => {
127129
return process.env.WKPATH;
128130
};
129131

130-
defineWorkerFixture('defaultBrowserOptions', async ({ browserName, testConfig }, runTest) => {
132+
defineWorkerFixture('defaultBrowserOptions', async ({ browserName }, runTest) => {
131133
const executablePath = getExecutablePath(browserName);
132134
if (executablePath)
133135
console.error(`Using executable at ${executablePath}`);
@@ -136,7 +138,7 @@ defineWorkerFixture('defaultBrowserOptions', async ({ browserName, testConfig },
136138
slowMo: options.SLOW_MO,
137139
headless: options.HEADLESS,
138140
executablePath,
139-
artifactsPath: testConfig.outputDir,
141+
artifactsPath: config.outputDir,
140142
});
141143
});
142144

@@ -261,9 +263,9 @@ defineWorkerFixture('expectedSSLError', async ({browserName, platform}, runTest)
261263
});
262264

263265
defineTestFixture('testOutputDir', async ({ testInfo }, runTest) => {
264-
const relativePath = path.relative(testInfo.config.testDir, testInfo.file).replace(/\.spec\.[jt]s/, '');
266+
const relativePath = path.relative(config.testDir, testInfo.file).replace(/\.spec\.[jt]s/, '');
265267
const sanitizedTitle = testInfo.title.replace(/[^\w\d]+/g, '_');
266-
const testOutputDir = path.join(testInfo.config.outputDir, relativePath, sanitizedTitle);
268+
const testOutputDir = path.join(config.outputDir, relativePath, sanitizedTitle);
267269
await fs.promises.mkdir(testOutputDir, { recursive: true });
268270
await runTest(testOutputDir);
269271
const files = await fs.promises.readdir(testOutputDir);
@@ -274,9 +276,9 @@ defineTestFixture('testOutputDir', async ({ testInfo }, runTest) => {
274276
}
275277
});
276278

277-
defineTestFixture('context', async ({ browser, testOutputDir, testConfig }, runTest) => {
279+
defineTestFixture('context', async ({ browser, testOutputDir }, runTest) => {
278280
const contextOptions: BrowserContextOptions = {
279-
relativeArtifactsPath: path.relative(testConfig.outputDir, testOutputDir),
281+
relativeArtifactsPath: path.relative(config.outputDir, testOutputDir),
280282
recordTrace: !!options.TRACING,
281283
recordVideos: !!options.TRACING,
282284
};

0 commit comments

Comments
 (0)