-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: sap build workzone std ed enablement, ias authentication capabi…
- Loading branch information
Showing
20 changed files
with
472 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,32 @@ | ||
import Input from "sap/m/Input" | ||
import { wdi5Selector } from "wdio-ui5-service" | ||
|
||
const inputSelector: wdi5Selector = { | ||
selector: { | ||
id: "mainUserInput", | ||
viewName: "test.Sample.tsapp.view.Main" | ||
} | ||
} | ||
|
||
describe("Input", async () => { | ||
it("should read name from username field", async () => { | ||
const inputText: wdi5Selector = { | ||
selector: { | ||
id: "mainUserInput", | ||
viewName: "test.Sample.tsapp.view.Main" | ||
} | ||
} | ||
const input = await browser.asControl<Input>(inputText) | ||
const input = await browser.asControl<Input>(inputSelector) | ||
const value = await input.getValue() | ||
expect(value).toEqual("Helvetius Nagy") | ||
}) | ||
|
||
it("should check if the field is writeable", async () => { | ||
const inputText: wdi5Selector = { | ||
selector: { | ||
id: "mainUserInput", | ||
viewName: "test.Sample.tsapp.view.Main" | ||
} | ||
} | ||
await (browser.asControl(inputText) as unknown as Input).setValue("Smith Smithersson") | ||
const input = await (browser.asControl(inputText) as unknown as Input).getValue() | ||
expect(input).toEqual("Smith Smithersson") | ||
const newValue = "Smith Smithersson" | ||
await browser.asControl<Input>(inputSelector).setValue(newValue) | ||
const input = await browser.asControl<Input>(inputSelector).getValue() | ||
expect(input).toEqual(newValue) | ||
}) | ||
|
||
it("should retrieve the webcomponent's bound path via a managed object", async () => { | ||
const control = await browser.asControl(inputSelector) | ||
const bindingInfo = await control.getBindingInfo("value") | ||
// @ts-ignore | ||
const parts = await bindingInfo.parts | ||
expect(parts[0].path).toEqual("/Customers('TRAIH')/ContactName") | ||
}) | ||
}) |
5 changes: 5 additions & 0 deletions
5
examples/ui5-ts-app/test/e2e/workzone/regular-journey.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
describe.skip("drive in Work Zone with standard wdi5/wdio APIs", () => { | ||
it("should see the List Report page", async () => {}) | ||
|
||
it("should see the Object Pages load and then returns to list", async () => {}) | ||
}) |
59 changes: 59 additions & 0 deletions
59
examples/ui5-ts-app/test/e2e/workzone/testlib-journey.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
describe("drive in Work Zone with testlib support", () => { | ||
let FioriElementsFacade | ||
before(async () => { | ||
FioriElementsFacade = await browser.fe.initialize({ | ||
onTheMainPage: { | ||
ListReport: { | ||
appId: "sap.fe.cap.travel", | ||
componentId: "TravelList", | ||
entitySet: "Travel" | ||
} | ||
}, | ||
onTheDetailPage: { | ||
ObjectPage: { | ||
appId: "sap.fe.cap.travel", | ||
componentId: "TravelObjectPage", | ||
entitySet: "Travel" | ||
} | ||
}, | ||
onTheItemPage: { | ||
ObjectPage: { | ||
appId: "sap.fe.cap.travel", | ||
componentId: "BookingObjectPage", | ||
entitySet: "Booking" | ||
} | ||
}, | ||
onTheShell: { | ||
Shell: {} | ||
} | ||
}) | ||
}) | ||
|
||
it("should see the List Report page", async () => { | ||
await FioriElementsFacade.execute((Given, When, Then) => { | ||
Then.onTheMainPage.iSeeThisPage() | ||
}) | ||
}) | ||
|
||
it("should see the Object Pages load and then returns to list", async () => { | ||
await FioriElementsFacade.execute((Given, When, Then) => { | ||
When.onTheMainPage.onTable().iPressRow(1) | ||
Then.onTheDetailPage.iSeeThisPage() | ||
|
||
When.onTheDetailPage.onTable({ property: "to_Booking" }).iPressRow({ BookingID: "1" }) | ||
Then.onTheItemPage.iSeeThisPage() | ||
|
||
// When.onTheShell.iNavigateBack() // beh, b/c wrong iframe | ||
}) | ||
|
||
await FioriElementsFacade.onTheShell.iNavigateBack() | ||
await FioriElementsFacade.onTheShell.iNavigateBack() | ||
|
||
// REVISIT: we want the testlib to expose its back navigation capability | ||
// ~ could look like: await wdi5.wz.iNavigateBack() | ||
|
||
await FioriElementsFacade.execute((Given, When, Then) => { | ||
Then.onTheMainPage.iSeeThisPage() | ||
}) | ||
}) | ||
}) |
Oops, something went wrong.