-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: rm obsolete design time artifacts (#422)
- make the constructor parameters for the service implementation itself optional - add late-inject test in TS scope fixes #421
- Loading branch information
Showing
7 changed files
with
49 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// only requiring the service for late inject/init | ||
import Input from "sap/ui/webc/main/Input" | ||
import { default as _wdi5 } from "wdio-ui5-service" | ||
const wdi5 = new _wdi5() | ||
|
||
describe("late inject wdi5", () => { | ||
it('should show a non UI5 page, then advance to a UI5 page and late init "wdi5"', async () => { | ||
// native wdio functionality - navigates to the wdi5 github page | ||
await browser.$("#user-content-wdi5-").waitForDisplayed() | ||
// open local app | ||
await browser.url("http://localhost:8080/index.html") | ||
// do the late injection | ||
await wdi5.injectUI5() | ||
}) | ||
|
||
it("wdi5 should subsequently work with UI5 enablement", async () => { | ||
const webcomponentValue = await ( | ||
browser.asControl({ | ||
selector: { | ||
bindingPath: { | ||
modelName: "", | ||
propertyPath: "/Customers('TRAIH')/ContactName" | ||
}, | ||
viewName: "test.Sample.tsapp.view.Main", | ||
controlType: "sap.ui.webc.main.Input" | ||
} | ||
}) as unknown as Input | ||
).getValue() | ||
|
||
expect(webcomponentValue).toEqual("Helvetius Nagy") | ||
}) | ||
}) |
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,8 @@ | ||
import { config } from "./wdio-ui5.conf" | ||
|
||
config.wdi5 = { skipInjectUI5OnStart: true } | ||
config.specs = ["./test/e2e/ui5-late.test.ts"] | ||
delete config.exclude | ||
config.baseUrl = "https://github.com/ui5-community/wdi5/" | ||
|
||
exports.config = config |
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