Skip to content

Commit 6898d7c

Browse files
author
Niraj Acharya
committed
test: add test for mfa
1 parent 74628db commit 6898d7c

14 files changed

Lines changed: 3638 additions & 28 deletions

File tree

.drone.star

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,8 @@ config = {
221221
"earlyFail": True,
222222
"skip": False,
223223
"features": [
224-
"specs/admin-settings/spaces.spec.ts",
224+
"specs/keycloak/mfa.spec.ts",
225+
# "specs/admin-settings/spaces.spec.ts",
225226
],
226227
"extraServerEnvironment": {
227228
"PROXY_AUTOPROVISION_ACCOUNTS": "true",
@@ -236,6 +237,11 @@ config = {
236237
"GRAPH_ASSIGN_DEFAULT_USER_ROLE": "false",
237238
"GRAPH_USERNAME_MATCH": "none",
238239
"KEYCLOAK_DOMAIN": "keycloak:8443",
240+
"OCIS_MFA_ENABLED": "true",
241+
"WEB_OIDC_SCOPE": "openid profile email acr",
242+
},
243+
"testEnv": {
244+
"MFA": "true",
239245
},
240246
},
241247
},
@@ -308,14 +314,13 @@ def beforePipelines(ctx):
308314
return checkStarlark() + \
309315
licenseCheck(ctx) + \
310316
documentation(ctx) + \
311-
changelog(ctx) + \
312317
pnpmCache(ctx) + \
313318
cacheOcisPipeline(ctx) + \
314319
pipelinesDependsOn(buildCacheWeb(ctx), pnpmCache(ctx)) + \
315320
pipelinesDependsOn(pnpmlint(ctx), pnpmCache(ctx))
316321

317322
def stagePipelines(ctx):
318-
unit_test_pipelines = unitTests(ctx)
323+
unit_test_pipelines = [] # unitTests(ctx)
319324

320325
# run only unit tests when publishing a standalone package
321326
if (determineReleasePackage(ctx) != None):
@@ -616,6 +621,7 @@ def e2eTestsOnPlaywright(ctx):
616621
"extraServerEnvironment": {},
617622
"skipA11y": True,
618623
"reportTracing": False,
624+
"testEnv": {},
619625
}
620626

621627
pipelines = []
@@ -696,6 +702,8 @@ def e2eTestsOnPlaywright(ctx):
696702
if "keycloak" in suite:
697703
environment["KEYCLOAK"] = "true"
698704
environment["KEYCLOAK_HOST"] = "keycloak:8443"
705+
if params["testEnv"]:
706+
environment.update(params["testEnv"])
699707
e2e_volumes.append({
700708
"name": "certs",
701709
"temp": {},
@@ -1968,7 +1976,7 @@ def keycloakService():
19681976
},
19691977
"commands": [
19701978
"mkdir -p /opt/keycloak/data/import",
1971-
"cp tests/drone/ocis_keycloak/ocis-ci-realm.dist.json /opt/keycloak/data/import/oCIS-realm.json",
1979+
"cp tests/drone/ocis_keycloak/ocis-mfa-ci-realm.dist.json /opt/keycloak/data/import/oCIS-realm.json",
19721980
"/opt/keycloak/bin/kc.sh start-dev --proxy-headers xforwarded --spi-connections-http-client-default-disable-trust-manager=true --import-realm --health-enabled=true",
19731981
],
19741982
"volumes": [

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@
6767
"git-repo-info": "2.1.1",
6868
"globals": "^16.5.0",
6969
"happy-dom": "20.0.10",
70+
"jimp": "^1.6.0",
7071
"jsdom": "^27.2.0",
72+
"jsqr": "^1.4.0",
7173
"license-checker-rseidelsohn": "4.4.2",
7274
"multiple-cucumber-html-reporter": "^3.9.3",
7375
"node-fetch": "3.3.2",
@@ -79,6 +81,7 @@
7981
"rollup-plugin-gzip": "^4.1.1",
8082
"rollup-plugin-visualizer": "6.0.5",
8183
"simple-git": "3.32.3",
84+
"speakeasy": "^2.0.0",
8285
"ts-node": "10.9.2",
8386
"tslib": "2.8.1",
8487
"typescript": "5.9.3",

0 commit comments

Comments
 (0)