Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
chore: rename root `index-for-dev.js` into `index.js` (#2337)
Andrey Lushnikov43eed027bd71
diff --git a/index-for-dev.js b/index.jssimilarity index 100%rename from index-for-dev.jsrename to index.jsdiff --git a/test/fixtures.spec.js b/test/fixtures.spec.jsindex 870c6d2eb8..196857f217 100644--- a/test/fixtures.spec.js+++ b/test/fixtures.spec.js@@ -33,7 +33,7 @@ class Wrapper {logger: undefined,};const options = {- playwrightFile: path.join(state.playwrightPath, 'index-for-dev'),+ playwrightFile: path.join(state.playwrightPath, 'index'),browserTypeName: state.browserType.name(),launchOptions,...extraOptions,diff --git a/test/test.js b/test/test.jsindex 3020069647..b2c306967b 100644--- a/test/test.js+++ b/test/test.js@@ -74,7 +74,7 @@ function collect(browserNames) {// TODO: this should be a preinstalled playwright by default.const playwrightPath = config.playwrightPath;- const playwright = require(path.join(playwrightPath, 'index-for-dev'));+ const playwright = require('..');const { setUnderTest } = require(require('path').join(playwrightPath, 'lib/helper.js'));setUnderTest();diff --git a/test/types.d.ts b/test/types.d.tsindex 5582579070..b92944add8 100644--- a/test/types.d.ts+++ b/test/types.d.ts@@ -48,8 +48,8 @@ interface TestSetup<STATE> {MAC: boolean;LINUX: boolean;WIN: boolean;- playwright: typeof import('../index-for-dev');- browserType: import('../index-for-dev').BrowserType<import('../index-for-dev').Browser>;+ playwright: typeof import('../index');+ browserType: import('../index').BrowserType<import('../index').Browser>;selectors: import('../src/selectors').Selectors;expect<T>(value: T): Expect<T>;defaultBrowserOptions: import('../src/server/browserType').LaunchOptions;@@ -65,16 +65,16 @@ type TestState = {};type BrowserState = TestState & {- browser: import('../index-for-dev').Browser;- browserServer: import('../index-for-dev').BrowserServer;+ browser: import('../index').Browser;+ browserServer: import('../index').BrowserServer;};type PageState = BrowserState & {- context: import('../index-for-dev').BrowserContext;- page: import('../index-for-dev').Page;+ context: import('../index').BrowserContext;+ page: import('../index').Page;};type ChromiumPageState = PageState & {- browser: import('../index-for-dev').ChromiumBrowser;+ browser: import('../index').ChromiumBrowser;};type TestSuite = (setup: TestSetup<TestState>) => void;type BrowserTestSuite = (setup: TestSetup<BrowserState>) => void;diff --git a/utils/doclint/check_public_api/test/test.js b/utils/doclint/check_public_api/test/test.jsindex 8864773a4a..eaeba36ccc 100644--- a/utils/doclint/check_public_api/test/test.js+++ b/utils/doclint/check_public_api/test/test.js@@ -15,7 +15,7 @@*/const path = require('path');-const playwright = require('../../../../index-for-dev');+const playwright = require('../../../../');const checkPublicAPI = require('..');const Source = require('../../Source');const mdBuilder = require('../MDBuilder');@@ -119,4 +119,4 @@ function serializeType(type) {name: type.name,properties: type.properties.length ? type.properties.map(serializeMember) : undefined}-}\ No newline at end of file+}diff --git a/utils/doclint/cli.js b/utils/doclint/cli.jsindex bc5580d05c..4b8bdf3408 100755--- a/utils/doclint/cli.js+++ b/utils/doclint/cli.js@@ -15,7 +15,7 @@* limitations under the License.*/-const playwright = require('../../index-for-dev');+const playwright = require('../../');const path = require('path');const Source = require('./Source');const Message = require('./Message');diff --git a/utils/generate_types/index.js b/utils/generate_types/index.jsindex 03b2a6b2e8..bb23908a52 100644--- a/utils/generate_types/index.js+++ b/utils/generate_types/index.js@@ -17,7 +17,7 @@//@ts-checkconst path = require('path');const Source = require('../doclint/Source');-const {chromium} = require('../../index-for-dev');+const {chromium} = require('../..');const Documentation = require('../doclint/check_public_api/Documentation');const PROJECT_DIR = path.join(__dirname, '..', '..');const fs = require('fs');@@ -404,4 +404,4 @@ function mergeClasses(mdClass, jsClass) {for (const member of mdClass.membersArray)member.templates = jsClass.members.get(member.name).templates;return mdClass;-}\ No newline at end of file+}diff --git a/utils/print_versions.js b/utils/print_versions.jsindex 543a42ae79..914ed65521 100755--- a/utils/print_versions.js+++ b/utils/print_versions.js@@ -15,7 +15,7 @@* limitations under the License.*/-const pw = require('../index-for-dev.js');+const pw = require('..');const child_process = require('child_process');for (const browserType of [pw.chromium, pw.firefox]) {diff --git a/utils/protocol-types-generator/index.js b/utils/protocol-types-generator/index.jsindex f539426c60..dd90a289a6 100644--- a/utils/protocol-types-generator/index.js+++ b/utils/protocol-types-generator/index.js@@ -17,7 +17,7 @@ async function generateProtocol(name, executablePath) {async function generateChromiumProtocol(executablePath) {const outputPath = path.join(__dirname, '..', '..', 'src', 'chromium', 'protocol.ts');- const playwright = await require('../../index-for-dev').chromium;+ const playwright = require('../../index').chromium;const defaultArgs = playwright._defaultArgs.bind(playwright);playwright._defaultArgs = (...args) => {const result = defaultArgs(...args);