chore: role selectors non-experimental (#14021)

This commit is contained in:
Dmitry Gozman 2022-05-08 11:07:01 +01:00 committed by GitHub
parent c3cf7ee4a7
commit 64cd55089a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 3 deletions

View File

@ -47,6 +47,7 @@ export class Selectors {
'data-test', 'data-test:light',
'nth', 'visible', 'control', 'has',
'left-of', 'right-of', 'above', 'below', 'near',
'role',
]);
this._builtinEnginesInMainWorld = new Set([
'_react', '_vue',
@ -135,7 +136,6 @@ export class Selectors {
}
parseSelector(selector: string | ParsedSelector, strict: boolean): SelectorInfo {
this._builtinEngines.add('role');
const parsed = typeof selector === 'string' ? parseSelector(selector) : selector;
let needsMainWorld = false;
for (const name of allEngineNames(parsed)) {

View File

@ -16,8 +16,6 @@
import { test, expect } from './pageTest';
test.skip(({ mode }) => mode !== 'default', 'Experimental features only work in default mode');
test('should detect roles', async ({ page }) => {
await page.setContent(`
<button>Hello</button>