playwright 1.56.0-alpha-2025-09-16 → 1.56.0-alpha-1758061937000

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -144,7 +144,10 @@ const setupPage = (0, import_testTool.defineTestTool)({
144
144
  let testLocation = params.testLocation;
145
145
  if (!testLocation) {
146
146
  testLocation = ".template.spec.ts";
147
- const templateFile = import_path.default.join(configDir, testLocation);
147
+ const config = await testRunner.loadConfig();
148
+ const project = params.project ? config.projects.find((p) => p.project.name === params.project) : config.projects[0];
149
+ const testDir = project?.project.testDir || configDir;
150
+ const templateFile = import_path.default.join(testDir, testLocation);
148
151
  if (!import_fs.default.existsSync(templateFile)) {
149
152
  await import_fs.default.promises.writeFile(templateFile, `
150
153
  import { test, expect } from '@playwright/test';
@@ -95,6 +95,12 @@ class TestRunner extends import_events.default {
95
95
  const executables = import_server.registry.defaultExecutables();
96
96
  await import_server.registry.install(executables, false);
97
97
  }
98
+ async loadConfig() {
99
+ const { config, error } = await this._loadConfig(this._configCLIOverrides);
100
+ if (config)
101
+ return config;
102
+ throw new Error("Failed to load config: " + (error ? error.message : "Unknown error"));
103
+ }
98
104
  async runGlobalSetup(userReporters) {
99
105
  await this.runGlobalTeardown();
100
106
  const reporter = new import_internalReporter.InternalReporter(userReporters);
@@ -96,6 +96,8 @@ class Fixture {
96
96
  this._selfTeardownComplete = (async () => {
97
97
  try {
98
98
  await this.registration.fn(params, useFunc, info);
99
+ if (!useFuncStarted.isDone())
100
+ throw new Error(`use() was not called in fixture "${this.registration.name}"`);
99
101
  } catch (error) {
100
102
  this.failed = true;
101
103
  if (!useFuncStarted.isDone())
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "playwright",
3
- "version": "1.56.0-alpha-2025-09-16",
3
+ "version": "1.56.0-alpha-1758061937000",
4
4
  "description": "A high-level API to automate web browsers",
5
5
  "repository": {
6
6
  "type": "git",
@@ -64,7 +64,7 @@
64
64
  },
65
65
  "license": "Apache-2.0",
66
66
  "dependencies": {
67
- "playwright-core": "1.56.0-alpha-2025-09-16"
67
+ "playwright-core": "1.56.0-alpha-1758061937000"
68
68
  },
69
69
  "optionalDependencies": {
70
70
  "fsevents": "2.3.2"