-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathweek2.test.js
36 lines (32 loc) · 1.01 KB
/
week2.test.js
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
const { wdi5 } = require("wdio-ui5-service")
const Main = require("./pageObjects/Main")
describe("week2: main page", () => {
before(async () => {
await Main.open()
})
it("should have localized title (i18n)", async () => {
const title = await browser.asControl({
selector: {
i18NText: {
propertyName: "text",
key: "mainTitleText"
},
controlType: "sap.m.Title",
viewName: Main._viewName
}
})
const titleText = await title.getText()
expect(titleText).toEqual("wdi5 rocks")
})
it("should have control that opens detail page", async () => {
const control = await browser.asControl({
selector: {
id: "myControl",
viewName: Main._viewName
}
})
await control.firePress()
const url = await browser.getUrl()
expect(url).toMatch(/.*#\/RouteDetail$/)
})
})