Skip to content

Commit 5d968b5

Browse files
author
nicogeburek
committed
new test file for week2
1 parent a975030 commit 5d968b5

File tree

5 files changed

+45
-3
lines changed

5 files changed

+45
-3
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
66

77
## [Unreleased]
88

9+
## [1.1.0] - 2022-06-15
10+
11+
### Added
12+
13+
- New test file for week 2 of the challenge.
14+
915
## [1.0.1] - 2022-06-14
1016

1117
### Changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ui5-challenge",
3-
"version": "1.0.1",
3+
"version": "1.1.0",
44
"description": "SAP Community Code Challenge: This repository contains an empty OpenUI5 application and end-to-end test written with wdi5. Take part in the challenge and develop an app that passes the tests.",
55
"scripts": {
66
"start": "ui5 serve --port 8080",

webapp/test/e2e/week1.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const { wdi5 } = require("wdio-ui5-service")
22
const Main = require("./pageObjects/Main")
33

4-
describe("main page", () => {
4+
describe("week1: main page", () => {
55
before(async () => {
66
await Main.open()
77
})

webapp/test/e2e/week2.test.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
const { wdi5 } = require("wdio-ui5-service")
2+
const Main = require("./pageObjects/Main")
3+
4+
describe("week2: main page", () => {
5+
before(async () => {
6+
await Main.open()
7+
})
8+
9+
it("should have localized title (i18n)", async () => {
10+
const title = await browser.asControl({
11+
selector: {
12+
i18NText: {
13+
propertyName: "text",
14+
key: "mainTitleText"
15+
},
16+
controlType: "sap.m.Title",
17+
viewName: Main._viewName
18+
}
19+
})
20+
21+
const titleText = await title.getText()
22+
expect(titleText).toEqual("wdi5 rocks")
23+
})
24+
25+
it("should have control that opens detail page", async () => {
26+
const control = await browser.asControl({
27+
selector: {
28+
id: "myControl",
29+
viewName: Main._viewName
30+
}
31+
})
32+
await control.firePress()
33+
const url = await browser.getUrl()
34+
expect(url).toMatch(/.*#\/RouteDetail$/)
35+
})
36+
})

0 commit comments

Comments
 (0)