test: fix/fixme/update a few tests (#33006)
This commit is contained in:
parent
5b29ead6f0
commit
814f7eb556
|
@ -55,6 +55,6 @@ test('androidDevice.push', async function({ androidDevice }) {
|
|||
|
||||
test('androidDevice.fill', async function({ androidDevice }) {
|
||||
await androidDevice.shell('am start org.chromium.webview_shell/.WebViewBrowserActivity');
|
||||
await androidDevice.fill({ res: 'org.chromium.webview_shell:id/url_field' }, 'Hello');
|
||||
await androidDevice.fill({ res: 'org.chromium.webview_shell:id/url_field' }, 'Hello', { timeout: test.info().timeout });
|
||||
expect((await androidDevice.info({ res: 'org.chromium.webview_shell:id/url_field' })).text).toBe('Hello');
|
||||
});
|
||||
|
|
|
@ -47,7 +47,7 @@ test('should navigate page externally', async function({ androidDevice }) {
|
|||
const webview = await androidDevice.webView({ pkg: 'org.chromium.webview_shell' });
|
||||
const page = await webview.page();
|
||||
|
||||
await androidDevice.fill({ res: 'org.chromium.webview_shell:id/url_field' }, 'data:text/html,<title>Hello world!</title>');
|
||||
await androidDevice.fill({ res: 'org.chromium.webview_shell:id/url_field' }, 'data:text/html,<title>Hello world!</title>', { timeout: test.info().timeout });
|
||||
await Promise.all([
|
||||
page.waitForNavigation(),
|
||||
androidDevice.press({ res: 'org.chromium.webview_shell:id/url_field' }, 'Enter')
|
||||
|
|
|
@ -18,7 +18,9 @@
|
|||
import { test as it, expect } from './pageTest';
|
||||
import path from 'path';
|
||||
|
||||
it('should hover @smoke', async ({ page, server }) => {
|
||||
it('should hover @smoke', async ({ page, server, headless }) => {
|
||||
it.skip(!headless, 'headed messes up with hover');
|
||||
|
||||
await page.goto(server.PREFIX + '/input/scrollable.html');
|
||||
const button = page.locator('#button-6');
|
||||
await button.hover();
|
||||
|
|
|
@ -85,8 +85,9 @@ it('should click on a span with an inline element inside', async ({ page }) => {
|
|||
expect(await page.evaluate('CLICKED')).toBe(42);
|
||||
});
|
||||
|
||||
it('should not throw UnhandledPromiseRejection when page closes', async ({ page, isWebView2 }) => {
|
||||
it('should not throw UnhandledPromiseRejection when page closes', async ({ page, isWebView2, browserName, isWindows }) => {
|
||||
it.skip(isWebView2, 'Page.close() is not supported in WebView2');
|
||||
it.fixme(browserName === 'firefox' && isWindows, 'makes the next test to always timeout');
|
||||
|
||||
await Promise.all([
|
||||
page.close(),
|
||||
|
@ -94,9 +95,7 @@ it('should not throw UnhandledPromiseRejection when page closes', async ({ page,
|
|||
]).catch(e => {});
|
||||
});
|
||||
|
||||
it('should click the 1x1 div', async ({ page, browserName, isWindows }) => {
|
||||
it.fixme(browserName === 'firefox' && isWindows, 'always times out');
|
||||
|
||||
it('should click the 1x1 div', async ({ page }) => {
|
||||
await page.setContent(`<div style="width: 1px; height: 1px;" onclick="window.__clicked = true"></div>`);
|
||||
await page.click('div');
|
||||
expect(await page.evaluate('window.__clicked')).toBe(true);
|
||||
|
|
|
@ -563,7 +563,9 @@ it('propagate headers cross origin redirect', {
|
|||
{ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/13106' },
|
||||
{ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/32045' },
|
||||
]
|
||||
}, async ({ page, server }) => {
|
||||
}, async ({ page, server, isAndroid }) => {
|
||||
it.fixme(isAndroid, 'receives authorization:credentials header');
|
||||
|
||||
await page.goto(server.PREFIX + '/empty.html');
|
||||
let resolve;
|
||||
const serverRequestPromise = new Promise<http.IncomingMessage>(f => resolve = f);
|
||||
|
|
|
@ -244,6 +244,7 @@ it('should support extra http headers', {
|
|||
|
||||
it('should support offline', async ({ page, server, browserName }) => {
|
||||
it.fixme(browserName === 'firefox');
|
||||
it.fixme(browserName === 'webkit', 'flaky on all platforms');
|
||||
|
||||
const [worker] = await Promise.all([
|
||||
page.waitForEvent('worker'),
|
||||
|
|
|
@ -145,13 +145,13 @@ test('should ignore subprocess creation error because of SIGINT', async ({ inter
|
|||
process.kill(-testProcess.process.pid!, 'SIGINT');
|
||||
|
||||
const { exitCode } = await testProcess.exited;
|
||||
expect(exitCode).toBe(130);
|
||||
expect.soft(exitCode).toBe(130);
|
||||
|
||||
const result = parseTestRunnerOutput(testProcess.output);
|
||||
expect(result.passed).toBe(0);
|
||||
expect(result.failed).toBe(0);
|
||||
expect(result.didNotRun).toBe(2);
|
||||
expect(result.output).not.toContain('worker process exited unexpectedly');
|
||||
expect.soft(result.passed).toBe(0);
|
||||
expect.soft(result.failed).toBe(0);
|
||||
expect.soft(result.didNotRun).toBe(2);
|
||||
expect.soft(result.output).not.toContain('worker process exited unexpectedly');
|
||||
});
|
||||
|
||||
test('sigint should stop workers', async ({ interactWithTestRunner }) => {
|
||||
|
|
Loading…
Reference in New Issue