Skip to content

Commit 4207457

Browse files
committed
updated setup, removed sync example
1 parent 0366207 commit 4207457

File tree

6 files changed

+2264
-2293
lines changed

6 files changed

+2264
-2293
lines changed

__tests__/sync.ts

Lines changed: 0 additions & 24 deletions
This file was deleted.

__tests__/async.ts renamed to __tests__/test1.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ afterAll(async () => {
1111
await browser.deleteSession();
1212
});
1313

14-
test("asynchronous WebdriverIO test", async () => {
14+
test("WebdriverIO test 1", async () => {
1515
await browser.url("https://webdriver.io");
1616
expect(await browser.getTitle()).toContain("WebdriverIO");
1717
const searchButton = await browser.$(".DocSearch-Button");

__tests__/test2.spec.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { remote, Browser } from "webdriverio";
2+
import { config } from "../wdio.conf";
3+
4+
let browser: Browser<"async">;
5+
6+
beforeAll(async () => {
7+
browser = await remote(config);
8+
});
9+
10+
afterAll(async () => {
11+
await browser.deleteSession();
12+
});
13+
14+
test("WebdriverIO test 2", async () => {
15+
await browser.url("https://webdriver.io");
16+
expect(await browser.getTitle()).toContain("WebdriverIO");
17+
const searchButton = await browser.$(".DocSearch-Button");
18+
await searchButton.click();
19+
const searchBar = await browser.$("#docsearch-input");
20+
await searchBar.setValue("click");
21+
const suggestions = await browser.$(".DocSearch-Hit");
22+
await suggestions.waitForExist();
23+
});
File renamed without changes.

0 commit comments

Comments
 (0)