Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add watch support for authentication #372

Merged
merged 8 commits into from
Nov 21, 2022
5 changes: 3 additions & 2 deletions examples/ui5-ts-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "ui5-t-sapp",
"name": "ui5-ts-app",
"version": "0.8.15-notimportant",
"private": true,
"description": "UI5 Application: tsapp",
"author": "[email protected]",
"license": "Apache-2.0",
Expand Down Expand Up @@ -34,7 +35,7 @@
"mbt": "^1.2.18",
"ts-deepmerge": "^5.0.0",
"ui5-middleware-simpleproxy": "^0.9.0",
"wdio-ui5-service": "latest"
"wdio-ui5-service": "*"
},
"ui5": {
"dependencies": [
Expand Down
7 changes: 7 additions & 0 deletions examples/ui5-ts-app/test/e2e/Authentication.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { wdi5 } from "wdio-ui5-service"

describe("wdi5 authentication", async () => {
it("wdi5.isLoggedIn", async () => {
expect(await wdi5.isLoggedIn()).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { wdi5 } from "wdio-ui5-service"

describe("MultiRemote Authentication", async () => {
it("isLoggedIn status", async () => {
expect(await wdi5.isLoggedIn("one")).toBeTruthy()
expect(await wdi5.isLoggedIn("two")).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const config: _wdi5Config = {

services: ["chromedriver", "ui5"],

specs: ["./test/e2e/Basic.test.ts"],
specs: ["./test/e2e/Basic.test.ts", "./test/e2e/Authentication.test.ts"],

maxInstances: 10,
logLevel: "error",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ const _config = {
capabilities: multiRemoteCapability
}
const config = merge(baseConf, _config)
config.specs = ["./test/e2e/multiremote.test.ts"]
config.specs = ["./test/e2e/multiremote.test.ts", "./test/e2e/BasicMultiRemoteAuthentication.test.ts"]
export { config }
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ const _config = {
// we silently acknowledge that this is not a UI5 app
// being tested, so browser-scoped errors are ok
baseUrl: "https://the-internet.herokuapp.com/login",
capabilities: [capability]
capabilities: [capability],
wdi5: {
skipInjectUI5OnStart: true
}
}
const config = merge(baseConf, _config)
config.specs = ["./test/e2e/Custom.test.ts"]
Expand Down
7 changes: 6 additions & 1 deletion examples/ui5-ts-app/wdio-ui5.conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ export const config: wdi5Config = {

specs: ["./test/e2e/**/*.test.ts"],
// these are for authentication tests only
exclude: ["./test/e2e/Custom.test.ts", "./test/e2e/multiremote.test.ts"],
exclude: [
"./test/e2e/Custom.test.ts",
"./test/e2e/multiremote.test.ts",
"./test/e2e/BasicMultiRemoteAuthentication.test.ts",
"./test/e2e/Authentication.test.ts"
],

maxInstances: 10,
capabilities: [
Expand Down
Loading