test: disable most codegen on headful firefox (#4839)

It has problems with focus.
This commit is contained in:
Dmitry Gozman 2020-12-28 17:39:30 -08:00 committed by GitHub
parent 7f8717f139
commit 8fbb984f64
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,8 +18,11 @@ import { folio } from './cli.fixtures';
import * as http from 'http'; import * as http from 'http';
import * as url from 'url'; import * as url from 'url';
const { it, expect } = folio; const { it, describe, expect } = folio;
describe('cli codegen', (test, { browserName, headful }) => {
test.fixme(browserName === 'firefox' && headful, 'Focus is off');
}, () => {
it('should click', async ({ page, recorder }) => { it('should click', async ({ page, recorder }) => {
await recorder.setContentAndWait(`<button onclick="console.log('click')">Submit</button>`); await recorder.setContentAndWait(`<button onclick="console.log('click')">Submit</button>`);
@ -193,9 +196,7 @@ it('should emit single keyup on ArrowDown', async ({ page, recorder }) => {
expect(messages[1].text()).toBe('up:ArrowDown'); expect(messages[1].text()).toBe('up:ArrowDown');
}); });
it('should check', (test, { browserName, headful }) => { it('should check', async ({ page, recorder }) => {
test.fixme(browserName === 'firefox' && headful, 'Focus is off');
}, async ({ page, recorder }) => {
await recorder.setContentAndWait(`<input id="checkbox" type="checkbox" name="accept" onchange="console.log(checkbox.checked)"></input>`); await recorder.setContentAndWait(`<input id="checkbox" type="checkbox" name="accept" onchange="console.log(checkbox.checked)"></input>`);
const selector = await recorder.focusElement('input'); const selector = await recorder.focusElement('input');
@ -213,9 +214,7 @@ it('should check', (test, { browserName, headful }) => {
expect(message.text()).toBe('true'); expect(message.text()).toBe('true');
}); });
it('should check with keyboard', (test, { browserName, headful }) => { it('should check with keyboard', async ({ page, recorder }) => {
test.fixme(browserName === 'firefox' && headful, 'Focus is off');
}, async ({ page, recorder }) => {
await recorder.setContentAndWait(`<input id="checkbox" type="checkbox" name="accept" onchange="console.log(checkbox.checked)"></input>`); await recorder.setContentAndWait(`<input id="checkbox" type="checkbox" name="accept" onchange="console.log(checkbox.checked)"></input>`);
const selector = await recorder.focusElement('input'); const selector = await recorder.focusElement('input');
@ -233,9 +232,7 @@ it('should check with keyboard', (test, { browserName, headful }) => {
expect(message.text()).toBe('true'); expect(message.text()).toBe('true');
}); });
it('should uncheck', (test, { browserName, headful }) => { it('should uncheck', async ({ page, recorder }) => {
test.fixme(browserName === 'firefox' && headful, 'Focus is off');
}, async ({ page, recorder }) => {
await recorder.setContentAndWait(`<input id="checkbox" type="checkbox" checked name="accept" onchange="console.log(checkbox.checked)"></input>`); await recorder.setContentAndWait(`<input id="checkbox" type="checkbox" checked name="accept" onchange="console.log(checkbox.checked)"></input>`);
const selector = await recorder.focusElement('input'); const selector = await recorder.focusElement('input');
@ -579,3 +576,4 @@ it('should check input with chaning id', async ({ page, recorder }) => {
page.click('input[id=checkbox]') page.click('input[id=checkbox]')
]); ]);
}); });
});