test: unskip aria tests (#10953)
This commit is contained in:
parent
4bdb113df7
commit
3f79beb71a
@ -97,6 +97,8 @@ export abstract class Realm implements Disposable {
|
||||
return await waitTask.result;
|
||||
}
|
||||
|
||||
abstract adoptBackendNode(backendNodeId?: number): Promise<JSHandle<Node>>;
|
||||
|
||||
get disposed(): boolean {
|
||||
return this.#disposed;
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ import {type EvaluateFunc, type HandleFor} from '../common/types.js';
|
||||
import {withSourcePuppeteerURLIfNone} from '../common/util.js';
|
||||
|
||||
import {type BrowsingContext} from './BrowsingContext.js';
|
||||
import {BidiElementHandle} from './ElementHandle.js';
|
||||
import {type BidiFrame} from './Frame.js';
|
||||
import {type BidiRealm as BidiRealm} from './Realm.js';
|
||||
/**
|
||||
@ -117,4 +118,16 @@ export class Sandbox extends Realm {
|
||||
await handle.dispose();
|
||||
return transferredHandle as unknown as T;
|
||||
}
|
||||
|
||||
override async adoptBackendNode(
|
||||
backendNodeId?: number
|
||||
): Promise<JSHandle<Node>> {
|
||||
const {object} = await this.environment.client.send('DOM.resolveNode', {
|
||||
backendNodeId: backendNodeId,
|
||||
});
|
||||
return new BidiElementHandle(this, {
|
||||
handle: object.objectId,
|
||||
type: 'node',
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -23,8 +23,6 @@ import {type AwaitableIterable} from '../common/types.js';
|
||||
import {assert} from '../util/assert.js';
|
||||
import {AsyncIterableUtil} from '../util/AsyncIterableUtil.js';
|
||||
|
||||
import {type IsolatedWorld} from './IsolatedWorld.js';
|
||||
|
||||
const queryAXTree = async (
|
||||
client: CDPSession,
|
||||
element: ElementHandle<Node>,
|
||||
@ -114,9 +112,9 @@ export class ARIAQueryHandler extends QueryHandler {
|
||||
role
|
||||
);
|
||||
yield* AsyncIterableUtil.map(results, node => {
|
||||
return (element.realm as IsolatedWorld).adoptBackendNode(
|
||||
node.backendDOMNodeId
|
||||
) as Promise<ElementHandle<Node>>;
|
||||
return element.realm.adoptBackendNode(node.backendDOMNodeId) as Promise<
|
||||
ElementHandle<Node>
|
||||
>;
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -236,7 +236,7 @@ export class IsolatedWorld extends Realm {
|
||||
}
|
||||
};
|
||||
|
||||
async adoptBackendNode(
|
||||
override async adoptBackendNode(
|
||||
backendNodeId?: Protocol.DOM.BackendNodeId
|
||||
): Promise<JSHandle<Node>> {
|
||||
const executionContext = await this.#executionContext();
|
||||
|
@ -1379,6 +1379,48 @@
|
||||
"parameters": ["chrome", "webDriverBiDi"],
|
||||
"expectations": ["FAIL", "TIMEOUT"]
|
||||
},
|
||||
{
|
||||
"testIdPattern": "[ariaqueryhandler.spec] AriaQueryHandler parseAriaSelector should find button",
|
||||
"platforms": ["darwin", "linux", "win32"],
|
||||
"parameters": ["chrome", "webDriverBiDi"],
|
||||
"expectations": ["PASS"]
|
||||
},
|
||||
{
|
||||
"testIdPattern": "[ariaqueryhandler.spec] AriaQueryHandler queryAll should find menu by name",
|
||||
"platforms": ["darwin", "linux", "win32"],
|
||||
"parameters": ["chrome", "webDriverBiDi"],
|
||||
"expectations": ["PASS"]
|
||||
},
|
||||
{
|
||||
"testIdPattern": "[ariaqueryhandler.spec] AriaQueryHandler queryAllArray $$eval should handle many elements",
|
||||
"platforms": ["darwin", "linux", "win32"],
|
||||
"parameters": ["chrome", "webDriverBiDi"],
|
||||
"expectations": ["PASS"]
|
||||
},
|
||||
{
|
||||
"testIdPattern": "[ariaqueryhandler.spec] AriaQueryHandler queryOne should find button by name and role",
|
||||
"platforms": ["darwin", "linux", "win32"],
|
||||
"parameters": ["chrome", "webDriverBiDi"],
|
||||
"expectations": ["PASS"]
|
||||
},
|
||||
{
|
||||
"testIdPattern": "[ariaqueryhandler.spec] AriaQueryHandler queryOne should find button by role",
|
||||
"platforms": ["darwin", "linux", "win32"],
|
||||
"parameters": ["chrome", "webDriverBiDi"],
|
||||
"expectations": ["PASS"]
|
||||
},
|
||||
{
|
||||
"testIdPattern": "[ariaqueryhandler.spec] AriaQueryHandler queryOne should find by name",
|
||||
"platforms": ["darwin", "linux", "win32"],
|
||||
"parameters": ["chrome", "webDriverBiDi"],
|
||||
"expectations": ["PASS"]
|
||||
},
|
||||
{
|
||||
"testIdPattern": "[ariaqueryhandler.spec] AriaQueryHandler queryOne should find first matching element",
|
||||
"platforms": ["darwin", "linux", "win32"],
|
||||
"parameters": ["chrome", "webDriverBiDi"],
|
||||
"expectations": ["PASS"]
|
||||
},
|
||||
{
|
||||
"testIdPattern": "[ariaqueryhandler.spec] AriaQueryHandler waitForSelector (aria) should throw when frame is detached",
|
||||
"platforms": ["darwin", "linux", "win32"],
|
||||
|
Loading…
Reference in New Issue
Block a user