Skip to content

Commit cddccaf

Browse files
committed
feat: add support of @testing-library/dom queries
1 parent 3981b08 commit cddccaf

File tree

9 files changed

+540
-6
lines changed

9 files changed

+540
-6
lines changed

package-lock.json

Lines changed: 184 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
"@jspm/core": "2.0.1",
7070
"@puppeteer/browsers": "2.7.1",
7171
"@rrweb/record": "2.0.0-alpha.18",
72+
"@testing-library/dom": "10.4.0",
7273
"@testplane/devtools": "8.32.3",
7374
"@testplane/wdio-protocols": "9.4.6",
7475
"@testplane/wdio-utils": "9.5.3",

src/browser/browser.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { AsyncEmitter } from "../events";
1313
import { BrowserConfig } from "../config/browser-config";
1414
import type { Callstack } from "./history/callstack";
1515
import type { WdProcess, WebdriverPool } from "../browser-pool/webdriver-pool";
16+
import { setupBrowser } from "./queries";
1617

1718
const CUSTOM_SESSION_OPTS = [
1819
"outputDir",
@@ -102,6 +103,10 @@ export class Browser {
102103
this._addExtendOptionsMethod(this._session!);
103104
}
104105

106+
protected _addQueries(): void {
107+
setupBrowser(this._session!);
108+
}
109+
105110
protected _addSteps(): void {
106111
addRunStepCommand(this);
107112
}

src/browser/existing-browser.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ export class ExistingBrowser extends Browser {
8484

8585
this._extendStacktrace();
8686
this._addSteps();
87+
this._addQueries();
8788
this._addHistory();
8889

8990
await history.runGroup(

src/browser/new-browser.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ export class NewBrowser extends Browser {
7373

7474
this._extendStacktrace();
7575
this._addSteps();
76+
this._addQueries();
7677
this._addHistory();
7778

7879
await runGroup(

0 commit comments

Comments
 (0)