File tree Expand file tree Collapse file tree 4 files changed +36
-10
lines changed
Expand file tree Collapse file tree 4 files changed +36
-10
lines changed Original file line number Diff line number Diff line change 22 "name" : " @wpsyntex/e2e-test-utils" ,
33 "version" : " 0.1.0" ,
44 "description" : " End-to-end test utilities for Polylang projects." ,
5+ "type" : " module" ,
6+ "main" : " ./src/index.js" ,
7+ "exports" : {
8+ "." : {
9+ "require" : " ./src/index.js" ,
10+ "import" : " ./src/index.js" ,
11+ "default" : " ./src/index.js"
12+ }
13+ },
14+ "module" : " ./src/index.js" ,
515 "scripts" : {
616 "lint:js" : " wp-scripts lint-js"
717 },
Original file line number Diff line number Diff line change 11import { defineConfig , devices } from '@playwright/test' ;
22import path from 'path' ;
3+ import { fileURLToPath } from 'url' ;
4+
5+ const __filename = fileURLToPath ( import . meta. url ) ;
6+ const __dirname = path . dirname ( __filename ) ;
37
48const STORAGE_STATE_PATH =
59 process . env . STORAGE_STATE_PATH ||
@@ -16,7 +20,7 @@ const STORAGE_STATE_PATH =
1620export function getPlaywrightConfig ( options = { } ) {
1721 return defineConfig ( {
1822 testDir : './specs' ,
19- globalSetup : require . resolve ( '../setup/global.setup.js' ) ,
23+ globalSetup : path . resolve ( __dirname , '../setup/global.setup.js' ) ,
2024 fullyParallel : false ,
2125 forbidOnly : ! ! process . env . CI ,
2226 retries : process . env . CI ? 2 : 0 ,
Original file line number Diff line number Diff line change 1+ import { getAllLanguages , deleteAllLanguages } from './languages/index.js' ;
2+ import { resetAllSettings , setSetting , getSettings } from './settings/index.js' ;
3+ import {
4+ getAllTerms ,
5+ deleteAllTerms ,
6+ getTermBySlug ,
7+ } from './taxonomies/index.js' ;
8+ import { getPlaywrightConfig } from './config/index.js' ;
9+ import globalSetup from './setup/global.setup.js' ;
10+
111export {
2- getLanguage ,
312 getAllLanguages ,
4- createLanguage ,
5- deleteLanguage ,
613 deleteAllLanguages ,
7- } from './languages' ;
8- export { resetAllSettings , setSetting , getSettings } from './settings' ;
9- export { getAllTerms , deleteAllTerms , getTermBySlug } from './taxonomies' ;
10- export { getPlaywrightConfig } from './config' ;
11- export { default as globalSetup } from './setup/global.setup' ;
14+ resetAllSettings ,
15+ setSetting ,
16+ getSettings ,
17+ getAllTerms ,
18+ deleteAllTerms ,
19+ getTermBySlug ,
20+ getPlaywrightConfig ,
21+ globalSetup ,
22+ } ;
Original file line number Diff line number Diff line change 11import { request } from '@playwright/test' ;
22import { RequestUtils } from '@wordpress/e2e-test-utils-playwright' ;
3- import { deleteAllLanguages , resetAllSettings } from '..' ;
3+ import { deleteAllLanguages } from '../languages/index.js' ;
4+ import { resetAllSettings } from '../settings/index.js' ;
45
56/**
67 * Partially copied from Gutenberg and converted from Typescript.
You can’t perform that action at this time.
0 commit comments