Skip to content

Commit

Permalink
ci: validate late injection config cache
Browse files Browse the repository at this point in the history
  • Loading branch information
sn-sap committed Oct 12, 2023
1 parent 446c49f commit 488cf49
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions examples/ui5-js-app/webapp/test/e2e/ui5-late.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ describe("ui5 basic", () => {
await ui5Service.injectUI5()
})

it("should verify the caching of the wdi5 config", async () => {
// open local app
await browser.url("http://localhost:8888")
// do the late injection
await ui5Service.injectUI5()
// check if config have been cached
expect(__wdi5Config.wdi5.waitForUI5Timeout).toBe(123456)
})

// after late injection, use wdi5 as usual
it("should get a button text via model binding", async () => {
const buttonText = await browser
Expand Down
2 changes: 1 addition & 1 deletion examples/ui5-ts-app/wdio-ui5-late.conf.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { config as baseConfig } from "./wdio-ui5.conf.js"

baseConfig.wdi5 = { skipInjectUI5OnStart: true }
baseConfig.wdi5 = { skipInjectUI5OnStart: true, waitForUI5Timeout: 123456 }
baseConfig.specs = ["./test/e2e/ui5-late.test.ts"]
delete baseConfig.exclude
baseConfig.baseUrl = "https://github.com/ui5-community/wdi5/"
Expand Down

0 comments on commit 488cf49

Please sign in to comment.