-
-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathmanualEntry.test.ts
More file actions
44 lines (31 loc) · 1.47 KB
/
manualEntry.test.ts
File metadata and controls
44 lines (31 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import "detox";
import { expect } from "detox";
import { waitForWebview } from "./helper";
describe("Manual entry", () => {
beforeEach(async () => {
await device.launchApp({ resetAppState: true });
});
it("url only", async () => {
await element(by.id("manualEntry")).tap();
await element(by.id("@serverFormTitle/input")).typeText("Local");
await element(by.id("@serverFormUrl/input")).typeText("localhost:7070");
await expect(element(by.id("@serverFormAuthUser/input"))).not.toExist();
await expect(element(by.id("@serverFormAuthPassword/input"))).not.toExist();
await element(by.id("serverFormAuth")).swipe("up");
await element(by.id("serverFormCheckAndSave")).tap();
await waitForWebview();
});
it("with basic auth", async () => {
await element(by.id("manualEntry")).tap();
await element(by.id("@serverFormTitle/input")).typeText("Local Auth");
await element(by.id("@serverFormUrl/input")).typeText("localhost:7080");
await expect(element(by.id("@serverFormAuthUser/input"))).not.toExist();
await expect(element(by.id("@serverFormAuthPassword/input"))).not.toExist();
await element(by.id("serverFormAuth")).tap();
await element(by.id("serverFormAuth")).swipe("up");
await element(by.id("@serverFormAuthUser/input")).typeText("admin");
await element(by.id("@serverFormAuthPassword/input")).typeText("secret");
await element(by.id("serverFormCheckAndSave")).tap();
await waitForWebview();
});
});