chore: rename root index-for-dev.js into index.js (#2337)
This commit is contained in:
parent
79ec3c916e
commit
43eed027bd
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
14
test/types.d.ts
vendored
14
test/types.d.ts
vendored
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
//@ts-check
|
||||
const 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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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]) {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue