diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8866870a07..b310b6a614 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -277,11 +277,7 @@ jobs: - name: Start Android Emulator run: utils/avd_start.sh - name: Run tests - run: npm run build-folio && node tests/folio/cli.js --config=tests/config/android.config.ts - env: - FOLIO_JSON_OUTPUT_NAME: "test-results/report-new.json" - - name: Run page tests - run: npx folio test/page -p browserName=chromium --workers=1 --forbid-only --timeout=120000 --global-timeout=5400000 --retries=3 --reporter=dot,json + run: npm run build-folio && node tests/folio/cli.js --config=tests/config/android.config.ts --reporter=dot,json - run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json if: always() && github.repository == 'microsoft/playwright' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-')) - uses: actions/upload-artifact@v1 diff --git a/test/browsercontext-set-extra-http-headers.spec.ts b/test/browsercontext-set-extra-http-headers.spec.ts index 2ee4a1fe79..5fe0a97c1c 100644 --- a/test/browsercontext-set-extra-http-headers.spec.ts +++ b/test/browsercontext-set-extra-http-headers.spec.ts @@ -33,3 +33,8 @@ it('should override extra headers from browser context', async ({browser, server expect(request.headers['foo']).toBe('Bar'); expect(request.headers['bar']).toBe('foO'); }); + +it('should throw for non-string header values', async ({browser}) => { + const error3 = await browser.newContext({ extraHTTPHeaders: { 'foo': null } }).catch(e => e); + expect(error3.message).toContain('Expected value of header "foo" to be String, but "object" is found.'); +}); diff --git a/test/page/README.md b/test/page/README.md deleted file mode 100644 index 38e7463716..0000000000 --- a/test/page/README.md +++ /dev/null @@ -1 +0,0 @@ -Put tests that are scoped to a page and can run on Chrome for Android, WebView, Electron, etc. \ No newline at end of file diff --git a/tests/config/androidEnv.ts b/tests/config/androidEnv.ts index be24da10ac..250e0f782d 100644 --- a/tests/config/androidEnv.ts +++ b/tests/config/androidEnv.ts @@ -41,6 +41,8 @@ export class AndroidEnv implements Env { isChromium: true, isFirefox: false, isWebKit: false, + browserName: 'chromium' as const, + browserChannel: undefined, isWindows: os.platform() === 'win32', isMac: os.platform() === 'darwin', isLinux: os.platform() === 'linux', diff --git a/tests/config/pageTest.ts b/tests/config/pageTest.ts index e146352dcd..17698c98e2 100644 --- a/tests/config/pageTest.ts +++ b/tests/config/pageTest.ts @@ -26,6 +26,8 @@ export type CommonTestArgs = { playwright: typeof import('../../index'); toImpl: (rpcObject: any) => any; + browserName: 'chromium' | 'firefox' | 'webkit'; + browserChannel: string | undefined; isChromium: boolean; isFirefox: boolean; diff --git a/tests/config/playwrightTest.ts b/tests/config/playwrightTest.ts index d3942e255a..c14650a18f 100644 --- a/tests/config/playwrightTest.ts +++ b/tests/config/playwrightTest.ts @@ -22,9 +22,7 @@ import { RemoteServer, RemoteServerOptions } from './remoteServer'; export { expect } from 'folio'; export type PlaywrightTestArgs = CommonTestArgs & { - browserName: 'chromium' | 'firefox' | 'webkit'; browserType: BrowserType; - browserChannel: string | undefined; browserOptions: LaunchOptions; headful: boolean; createUserDataDir: () => Promise; diff --git a/test/page/elementhandle-click.spec.ts b/tests/elementhandle-click.spec.ts similarity index 98% rename from test/page/elementhandle-click.spec.ts rename to tests/elementhandle-click.spec.ts index 0434b2acd3..5d495ba810 100644 --- a/test/page/elementhandle-click.spec.ts +++ b/tests/elementhandle-click.spec.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { it, expect } from '../fixtures'; +import { test as it, expect } from './config/pageTest'; it('should work', async ({ page, server }) => { await page.goto(server.PREFIX + '/input/button.html'); diff --git a/test/page/elementhandle-content-frame.spec.ts b/tests/elementhandle-content-frame.spec.ts similarity index 95% rename from test/page/elementhandle-content-frame.spec.ts rename to tests/elementhandle-content-frame.spec.ts index afeb3ee989..9ca6225a3d 100644 --- a/test/page/elementhandle-content-frame.spec.ts +++ b/tests/elementhandle-content-frame.spec.ts @@ -15,8 +15,8 @@ * limitations under the License. */ -import { it, expect } from '../fixtures'; -import { attachFrame } from '../utils'; +import { test as it, expect } from './config/pageTest'; +import { attachFrame } from '../test/utils'; it('should work', async ({ page, server }) => { await page.goto(server.EMPTY_PAGE); diff --git a/test/page/elementhandle-convenience.spec.ts b/tests/elementhandle-convenience.spec.ts similarity index 99% rename from test/page/elementhandle-convenience.spec.ts rename to tests/elementhandle-convenience.spec.ts index a5379cc9ed..b4754893b5 100644 --- a/test/page/elementhandle-convenience.spec.ts +++ b/tests/elementhandle-convenience.spec.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { it, expect } from '../fixtures'; +import { test as it, expect } from './config/pageTest'; it('should have a nice preview', async ({ page, server }) => { await page.goto(`${server.PREFIX}/dom.html`); diff --git a/test/page/elementhandle-eval-on-selector.spec.ts b/tests/elementhandle-eval-on-selector.spec.ts similarity index 98% rename from test/page/elementhandle-eval-on-selector.spec.ts rename to tests/elementhandle-eval-on-selector.spec.ts index 94a7c6cdcf..3b1b164c6a 100644 --- a/test/page/elementhandle-eval-on-selector.spec.ts +++ b/tests/elementhandle-eval-on-selector.spec.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { it, expect } from '../fixtures'; +import { test as it, expect } from './config/pageTest'; it('should work', async ({page, server}) => { await page.setContent('
10
'); diff --git a/test/page/elementhandle-misc.spec.ts b/tests/elementhandle-misc.spec.ts similarity index 98% rename from test/page/elementhandle-misc.spec.ts rename to tests/elementhandle-misc.spec.ts index 63b51efb5e..ca8320ddc0 100644 --- a/test/page/elementhandle-misc.spec.ts +++ b/tests/elementhandle-misc.spec.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { it, expect } from '../fixtures'; +import { test as it, expect } from './config/pageTest'; it('should hover', async ({ page, server }) => { await page.goto(server.PREFIX + '/input/scrollable.html'); diff --git a/test/page/elementhandle-owner-frame.spec.ts b/tests/elementhandle-owner-frame.spec.ts similarity index 97% rename from test/page/elementhandle-owner-frame.spec.ts rename to tests/elementhandle-owner-frame.spec.ts index 51557888ed..e5ce7f674b 100644 --- a/test/page/elementhandle-owner-frame.spec.ts +++ b/tests/elementhandle-owner-frame.spec.ts @@ -15,8 +15,8 @@ * limitations under the License. */ -import { it, expect } from '../fixtures'; -import { attachFrame } from '../utils'; +import { test as it, expect } from './config/pageTest'; +import { attachFrame } from '../test/utils'; it('should work', async ({ page, server }) => { await page.goto(server.EMPTY_PAGE); diff --git a/test/page/elementhandle-press.spec.ts b/tests/elementhandle-press.spec.ts similarity index 97% rename from test/page/elementhandle-press.spec.ts rename to tests/elementhandle-press.spec.ts index b5cffde123..ec88eeddd5 100644 --- a/test/page/elementhandle-press.spec.ts +++ b/tests/elementhandle-press.spec.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { it, expect } from '../fixtures'; +import { test as it, expect } from './config/pageTest'; it('should work', async ({ page }) => { await page.setContent(``); diff --git a/test/page/elementhandle-query-selector.spec.ts b/tests/elementhandle-query-selector.spec.ts similarity index 98% rename from test/page/elementhandle-query-selector.spec.ts rename to tests/elementhandle-query-selector.spec.ts index c606cc2754..202d386660 100644 --- a/test/page/elementhandle-query-selector.spec.ts +++ b/tests/elementhandle-query-selector.spec.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { it, expect } from '../fixtures'; +import { test as it, expect } from './config/pageTest'; it('should query existing element', async ({page, server}) => { await page.goto(server.PREFIX + '/playground.html'); diff --git a/test/page/elementhandle-scroll-into-view.spec.ts b/tests/elementhandle-scroll-into-view.spec.ts similarity index 96% rename from test/page/elementhandle-scroll-into-view.spec.ts rename to tests/elementhandle-scroll-into-view.spec.ts index 11c65581ad..5742b5c863 100644 --- a/test/page/elementhandle-scroll-into-view.spec.ts +++ b/tests/elementhandle-scroll-into-view.spec.ts @@ -15,11 +15,11 @@ * limitations under the License. */ -import { it, expect } from '../fixtures'; +import { test as it, expect } from './config/pageTest'; + +it('should work', async ({ page, server }) => { + it.fixme(process.env.PW_ANDROID_TESTS); -it('should work', test => { - test.fixme(process.env.PW_ANDROID_TESTS); -}, async ({ page, server }) => { await page.goto(server.PREFIX + '/offscreenbuttons.html'); for (let i = 0; i < 11; ++i) { const button = await page.$('#btn' + i); diff --git a/test/page/elementhandle-select-text.spec.ts b/tests/elementhandle-select-text.spec.ts similarity index 98% rename from test/page/elementhandle-select-text.spec.ts rename to tests/elementhandle-select-text.spec.ts index 018912fac2..4c88f504f3 100644 --- a/test/page/elementhandle-select-text.spec.ts +++ b/tests/elementhandle-select-text.spec.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { it, expect } from '../fixtures'; +import { test as it, expect } from './config/pageTest'; it('should select textarea', async ({ page, server, isFirefox }) => { await page.goto(server.PREFIX + '/input/textarea.html'); diff --git a/test/page/elementhandle-type.spec.ts b/tests/elementhandle-type.spec.ts similarity index 97% rename from test/page/elementhandle-type.spec.ts rename to tests/elementhandle-type.spec.ts index 44e9fa8f93..bce65b2362 100644 --- a/test/page/elementhandle-type.spec.ts +++ b/tests/elementhandle-type.spec.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { it, expect } from '../fixtures'; +import { test as it, expect } from './config/pageTest'; it('should work', async ({ page }) => { await page.setContent(``); diff --git a/test/page/elementhandle-wait-for-element-state.spec.ts b/tests/elementhandle-wait-for-element-state.spec.ts similarity index 96% rename from test/page/elementhandle-wait-for-element-state.spec.ts rename to tests/elementhandle-wait-for-element-state.spec.ts index 7d255406a4..a90b296900 100644 --- a/test/page/elementhandle-wait-for-element-state.spec.ts +++ b/tests/elementhandle-wait-for-element-state.spec.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { it, expect } from '../fixtures'; +import { test as it, expect } from './config/pageTest'; async function giveItAChanceToResolve(page) { for (let i = 0; i < 5; i++) @@ -114,9 +114,9 @@ it('should wait for disabled button', async ({page}) => { await promise; }); -it('should wait for stable position', (test, { browserName, platform }) => { - test.fixme(browserName === 'firefox' && platform === 'linux'); -}, async ({page, server}) => { +it('should wait for stable position', async ({page, server, isFirefox, platform}) => { + it.fixme(isFirefox && platform === 'linux'); + await page.goto(server.PREFIX + '/input/button.html'); const button = await page.$('button'); await page.$eval('button', button => { diff --git a/test/page/eval-on-selector-all.spec.ts b/tests/eval-on-selector-all.spec.ts similarity index 98% rename from test/page/eval-on-selector-all.spec.ts rename to tests/eval-on-selector-all.spec.ts index 564c19e71a..1b53f7ff98 100644 --- a/test/page/eval-on-selector-all.spec.ts +++ b/tests/eval-on-selector-all.spec.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { it, expect } from '../fixtures'; +import { test as it, expect } from './config/pageTest'; it('should work with css selector', async ({page, server}) => { await page.setContent('
hello
beautiful
world!
'); diff --git a/test/page/eval-on-selector.spec.ts b/tests/eval-on-selector.spec.ts similarity index 99% rename from test/page/eval-on-selector.spec.ts rename to tests/eval-on-selector.spec.ts index 47fd64794e..c1188ace49 100644 --- a/test/page/eval-on-selector.spec.ts +++ b/tests/eval-on-selector.spec.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { it, expect } from '../fixtures'; +import { test as it, expect } from './config/pageTest'; it('should work with css selector', async ({page, server}) => { await page.setContent('
43543
'); diff --git a/test/page/jshandle-evaluate.spec.ts b/tests/jshandle-evaluate.spec.ts similarity index 95% rename from test/page/jshandle-evaluate.spec.ts rename to tests/jshandle-evaluate.spec.ts index ac5755b3d1..337dc5fc97 100644 --- a/test/page/jshandle-evaluate.spec.ts +++ b/tests/jshandle-evaluate.spec.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { it, expect } from '../fixtures'; +import { test as it, expect } from './config/pageTest'; it('should work with function', async ({page}) => { const windowHandle = await page.evaluateHandle(() => { diff --git a/test/page/jshandle-json-value.spec.ts b/tests/jshandle-json-value.spec.ts similarity index 96% rename from test/page/jshandle-json-value.spec.ts rename to tests/jshandle-json-value.spec.ts index f9af18643d..5cad2b592c 100644 --- a/test/page/jshandle-json-value.spec.ts +++ b/tests/jshandle-json-value.spec.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { it, expect } from '../fixtures'; +import { test as it, expect } from './config/pageTest'; it('should work', async ({page}) => { const aHandle = await page.evaluateHandle(() => ({foo: 'bar'})); diff --git a/test/page/jshandle-properties.spec.ts b/tests/jshandle-properties.spec.ts similarity index 97% rename from test/page/jshandle-properties.spec.ts rename to tests/jshandle-properties.spec.ts index 46b77a8f49..3afc5f1986 100644 --- a/test/page/jshandle-properties.spec.ts +++ b/tests/jshandle-properties.spec.ts @@ -15,8 +15,8 @@ * limitations under the License. */ -import { it, expect } from '../fixtures'; -import type { ElementHandle } from '../..'; +import { test as it, expect } from './config/pageTest'; +import type { ElementHandle } from '../index'; it('should work', async ({page}) => { const aHandle = await page.evaluateHandle(() => ({ diff --git a/test/page/jshandle-to-string.spec.ts b/tests/jshandle-to-string.spec.ts similarity index 98% rename from test/page/jshandle-to-string.spec.ts rename to tests/jshandle-to-string.spec.ts index e99ae218cb..cec0417dfd 100644 --- a/test/page/jshandle-to-string.spec.ts +++ b/tests/jshandle-to-string.spec.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { it, expect } from '../fixtures'; +import { test as it, expect } from './config/pageTest'; it('should work for primitives', async ({page}) => { const numberHandle = await page.evaluateHandle(() => 2); diff --git a/test/page/page-add-init-script.spec.ts b/tests/page-add-init-script.spec.ts similarity index 95% rename from test/page/page-add-init-script.spec.ts rename to tests/page-add-init-script.spec.ts index 9fdf1880c2..4aaf68d061 100644 --- a/test/page/page-add-init-script.spec.ts +++ b/tests/page-add-init-script.spec.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { it, expect } from '../fixtures'; +import { test as it, expect } from './config/pageTest'; import path from 'path'; it('should evaluate before anything else on the page', async ({ page, server }) => { @@ -27,7 +27,7 @@ it('should evaluate before anything else on the page', async ({ page, server }) }); it('should work with a path', async ({ page, server }) => { - await page.addInitScript({ path: path.join(__dirname, '../assets/injectedfile.js') }); + await page.addInitScript({ path: path.join(__dirname, '../test/assets/injectedfile.js') }); await page.goto(server.PREFIX + '/tamperable.html'); expect(await page.evaluate(() => window['result'])).toBe(123); }); diff --git a/test/page/page-add-script-tag.spec.ts b/tests/page-add-script-tag.spec.ts similarity index 87% rename from test/page/page-add-script-tag.spec.ts rename to tests/page-add-script-tag.spec.ts index eb093d5a60..184c4d9a14 100644 --- a/test/page/page-add-script-tag.spec.ts +++ b/tests/page-add-script-tag.spec.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { it, expect } from '../fixtures'; +import { test as it, expect } from './config/pageTest'; import path from 'path'; it('should throw an error if no options are provided', async ({page, server}) => { @@ -44,7 +44,7 @@ it('should work with a url and type=module', async ({page, server}) => { it('should work with a path and type=module', async ({page, server}) => { await page.goto(server.EMPTY_PAGE); - await page.addScriptTag({ path: path.join(__dirname, '../assets/es6/es6pathimport.js'), type: 'module' }); + await page.addScriptTag({ path: path.join(__dirname, '../test/assets/es6/es6pathimport.js'), type: 'module' }); await page.waitForFunction('window.__es6injected'); expect(await page.evaluate(() => window['__es6injected'])).toBe(42); }); @@ -69,16 +69,16 @@ it('should throw an error if loading from url fail', async ({page, server}) => { it('should work with a path', async ({page, server}) => { await page.goto(server.EMPTY_PAGE); - const scriptHandle = await page.addScriptTag({ path: path.join(__dirname, '../assets/injectedfile.js') }); + const scriptHandle = await page.addScriptTag({ path: path.join(__dirname, '../test/assets/injectedfile.js') }); expect(scriptHandle.asElement()).not.toBeNull(); expect(await page.evaluate(() => window['__injected'])).toBe(42); }); -it('should include sourceURL when path is provided', (test, { browserName }) => { - test.skip(browserName === 'webkit'); -}, async ({page, server}) => { +it('should include sourceURL when path is provided', async ({page, server, isWebKit}) => { + it.skip(isWebKit); + await page.goto(server.EMPTY_PAGE); - await page.addScriptTag({ path: path.join(__dirname, '../assets/injectedfile.js') }); + await page.addScriptTag({ path: path.join(__dirname, '../test/assets/injectedfile.js') }); const result = await page.evaluate(() => window['__injectedError'].stack); expect(result).toContain(path.join('assets', 'injectedfile.js')); }); @@ -98,9 +98,9 @@ it('should throw when added with content to the CSP page', async ({page, server} expect(error).toBeTruthy(); }); -it('should throw when added with URL to the CSP page', test => { - test.skip(process.env.PW_ANDROID_TESTS); -}, async ({page, server}) => { +it('should throw when added with URL to the CSP page', async ({page, server}) => { + it.skip(process.env.PW_ANDROID_TESTS); + await page.goto(server.PREFIX + '/csp.html'); let error = null; await page.addScriptTag({ url: server.CROSS_PROCESS_PREFIX + '/injectedfile.js' }).catch(e => error = e); diff --git a/test/page/page-add-style-tag.spec.ts b/tests/page-add-style-tag.spec.ts similarity index 90% rename from test/page/page-add-style-tag.spec.ts rename to tests/page-add-style-tag.spec.ts index ac0fc16ebe..2bb22423f1 100644 --- a/test/page/page-add-style-tag.spec.ts +++ b/tests/page-add-style-tag.spec.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { it, expect } from '../fixtures'; +import { test as it, expect } from './config/pageTest'; import path from 'path'; it('should throw an error if no options are provided', async ({page, server}) => { @@ -49,14 +49,14 @@ it('should throw an error if loading from url fail', async ({page, server}) => { it('should work with a path', async ({page, server}) => { await page.goto(server.EMPTY_PAGE); - const styleHandle = await page.addStyleTag({ path: path.join(__dirname, '../assets/injectedstyle.css') }); + const styleHandle = await page.addStyleTag({ path: path.join(__dirname, '../test/assets/injectedstyle.css') }); expect(styleHandle.asElement()).not.toBeNull(); expect(await page.evaluate(`window.getComputedStyle(document.querySelector('body')).getPropertyValue('background-color')`)).toBe('rgb(255, 0, 0)'); }); it('should include sourceURL when path is provided', async ({page, server}) => { await page.goto(server.EMPTY_PAGE); - await page.addStyleTag({ path: path.join(__dirname, '../assets/injectedstyle.css') }); + await page.addStyleTag({ path: path.join(__dirname, '../test/assets/injectedstyle.css') }); const styleHandle = await page.$('style'); const styleContent = await page.evaluate(style => style.innerHTML, styleHandle); expect(styleContent).toContain(path.join('assets', 'injectedstyle.css')); @@ -76,9 +76,9 @@ it('should throw when added with content to the CSP page', async ({page, server} expect(error).toBeTruthy(); }); -it('should throw when added with URL to the CSP page', test => { - test.skip(process.env.PW_ANDROID_TESTS); -}, async ({page, server}) => { +it('should throw when added with URL to the CSP page', async ({page, server}) => { + it.skip(process.env.PW_ANDROID_TESTS); + await page.goto(server.PREFIX + '/csp.html'); let error = null; await page.addStyleTag({ url: server.CROSS_PROCESS_PREFIX + '/injectedstyle.css' }).catch(e => error = e); diff --git a/test/page/page-check.spec.ts b/tests/page-check.spec.ts similarity index 98% rename from test/page/page-check.spec.ts rename to tests/page-check.spec.ts index 3fa48fcc3b..6d85173370 100644 --- a/test/page/page-check.spec.ts +++ b/tests/page-check.spec.ts @@ -14,7 +14,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { it, expect } from '../fixtures'; + +import { test as it, expect } from './config/pageTest'; it('should check the box', async ({page}) => { await page.setContent(``); diff --git a/test/page/page-click-react.spec.ts b/tests/page-click-react.spec.ts similarity index 93% rename from test/page/page-click-react.spec.ts rename to tests/page-click-react.spec.ts index 83b04c5b8c..d41c75ce5e 100644 --- a/test/page/page-click-react.spec.ts +++ b/tests/page-click-react.spec.ts @@ -14,15 +14,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { it, expect } from '../fixtures'; + +import { test as it, expect } from './config/pageTest'; declare const renderComponent; declare const e; declare const MyButton; -it('should report that selector does not match anymore', test => { - test.fail(true); -}, async ({page, server}) => { +it('should report that selector does not match anymore', async ({page, server}) => { + it.fail(); + await page.goto(server.PREFIX + '/react.html'); await page.evaluate(() => { renderComponent(e('div', {}, [e(MyButton, { name: 'button1' }), e(MyButton, { name: 'button2' })])); @@ -41,9 +42,9 @@ it('should report that selector does not match anymore', test => { expect(error.message).toContain('element does not match the selector anymore'); }); -it('should not retarget the handle when element is recycled', test => { - test.fixme(true); -}, async ({page, server}) => { +it('should not retarget the handle when element is recycled', async ({page, server}) => { + it.fixme(); + await page.goto(server.PREFIX + '/react.html'); await page.evaluate(() => { renderComponent(e('div', {}, [e(MyButton, { name: 'button1' }), e(MyButton, { name: 'button2', disabled: true })])); @@ -70,9 +71,9 @@ it('should timeout when click opens alert', async ({page, server}) => { await dialog.dismiss(); }); -it('should retarget when element is recycled during hit testing', test => { - test.fixme(true); -}, async ({page, server}) => { +it('should retarget when element is recycled during hit testing', async ({page, server}) => { + it.fixme(); + await page.goto(server.PREFIX + '/react.html'); await page.evaluate(() => { renderComponent(e('div', {}, [e(MyButton, { name: 'button1' }), e(MyButton, { name: 'button2' })])); @@ -87,9 +88,9 @@ it('should retarget when element is recycled during hit testing', test => { expect(await page.evaluate('window.button2')).toBe(undefined); }); -it('should retarget when element is recycled before enabled check', test => { - test.fixme(true); -}, async ({page, server}) => { +it('should retarget when element is recycled before enabled check', async ({page, server}) => { + it.fixme(); + await page.goto(server.PREFIX + '/react.html'); await page.evaluate(() => { renderComponent(e('div', {}, [e(MyButton, { name: 'button1' }), e(MyButton, { name: 'button2', disabled: true })])); diff --git a/test/page/page-click-scroll.spec.ts b/tests/page-click-scroll.spec.ts similarity index 81% rename from test/page/page-click-scroll.spec.ts rename to tests/page-click-scroll.spec.ts index 83ae91c2b2..1e9c781fc2 100644 --- a/test/page/page-click-scroll.spec.ts +++ b/tests/page-click-scroll.spec.ts @@ -14,12 +14,12 @@ * limitations under the License. */ -import { it } from '../fixtures'; +import { test as it } from './config/pageTest'; + +it('should not hit scroll bar', async ({page, server, isWebKit, platform}) => { + it.fixme(isWebKit && platform === 'darwin'); + it.skip(process.env.PW_ANDROID_TESTS); -it('should not hit scroll bar', (test, { browserName, platform }) => { - test.fixme(browserName === 'webkit' && platform === 'darwin'); - test.skip(process.env.PW_ANDROID_TESTS); -}, async ({page, server}) => { await page.setContent(`