feat(active): emulate active state on webkit (#941)
This commit is contained in:
parent
0d16d144b2
commit
d05feec740
|
|
@ -10,7 +10,7 @@
|
|||
"playwright": {
|
||||
"chromium_revision": "740289",
|
||||
"firefox_revision": "1028",
|
||||
"webkit_revision": "1141"
|
||||
"webkit_revision": "1143"
|
||||
},
|
||||
"scripts": {
|
||||
"ctest": "cross-env BROWSER=chromium node test/test.js",
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ export class WKPage implements PageDelegate {
|
|||
private async _initializePageProxySession() {
|
||||
const promises: Promise<any>[] = [
|
||||
this._pageProxySession.send('Dialog.enable'),
|
||||
this._pageProxySession.send('Emulation.setActiveAndFocused', { active: true }),
|
||||
this.authenticate(this._page._state.credentials)
|
||||
];
|
||||
const contextOptions = this._page.context()._options;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
/**
|
||||
* @type {PageTestSuite}
|
||||
*/
|
||||
module.exports.describe = function({testRunner, expect, playwright, FFOX, CHROMIUM, WEBKIT}) {
|
||||
module.exports.describe = function({testRunner, expect, playwright, headless, FFOX, CHROMIUM, WEBKIT}) {
|
||||
const {describe, xdescribe, fdescribe} = testRunner;
|
||||
const {it, fit, xit, dit} = testRunner;
|
||||
const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;
|
||||
|
|
@ -221,4 +221,9 @@ module.exports.describe = function({testRunner, expect, playwright, FFOX, CHROMI
|
|||
});
|
||||
});
|
||||
|
||||
describe('focus', function() {
|
||||
it.skip(!headless)('should think that it is focused by default', async({page}) => {
|
||||
expect(await page.evaluate('document.hasFocus()')).toBe(true);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue