Skip to content

Commit

Permalink
feat: add tests for two step login
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-jonas committed Jun 20, 2024
1 parent b07329d commit 57b6a6f
Show file tree
Hide file tree
Showing 17 changed files with 581 additions and 146 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,4 @@ test/e2e/kratos.*.yml
# VSCode debug artifact
__debug_bin
.debug.sqlite.db
.last-run.json
2 changes: 1 addition & 1 deletion test/e2e/cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
import dayjs from "dayjs"
import YAML from "yamljs"
import { MailMessage, Strategy } from "."
import { OryKratosConfiguration } from "./config"
import { OryKratosConfiguration } from "../../shared/config"
import { UiNode } from "@ory/kratos-client"
import { ConfigBuilder } from "./configHelpers"

Expand Down
2 changes: 1 addition & 1 deletion test/e2e/cypress/support/configHelpers.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright © 2023 Ory Corp
// SPDX-License-Identifier: Apache-2.0

import { OryKratosConfiguration } from "./config"
import { OryKratosConfiguration } from "../../shared/config"

export class ConfigBuilder {
constructor(readonly config: OryKratosConfiguration) {}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/cypress/support/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0

import { Session as KratosSession } from "@ory/kratos-client"
import { OryKratosConfiguration } from "./config"
import { OryKratosConfiguration } from "../../shared/config"
import { ConfigBuilder } from "./configHelpers"

export interface MailMessage {
Expand Down
12 changes: 3 additions & 9 deletions test/e2e/cypress/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,9 @@
"compilerOptions": {
"baseUrl": "../../../node_modules",
"target": "es5",
"lib": [
"es2015",
"dom"
],
"lib": ["es2015", "dom"],
"types": ["cypress", "node"],
"esModuleInterop": true,
"esModuleInterop": true
},
"include": [
"**/*.ts",
"support/index.ts",
],
"include": ["**/*.ts", "support/index.ts", "../shared/config.d.ts"]
}
194 changes: 139 additions & 55 deletions test/e2e/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions test/e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
"wait-on": "wait-on"
},
"dependencies": {
"@faker-js/faker": "7.6.0",
"@faker-js/faker": "8.4.1",
"async-retry": "1.3.3",
"mailhog": "4.16.0"
},
"devDependencies": {
"@ory/kratos-client": "0.0.0-next.8d3b018594f7",
"@playwright/test": "1.34.0",
"@ory/kratos-client": "1.2.0",
"@playwright/test": "1.44.1",
"@types/async-retry": "1.4.5",
"@types/node": "16.9.6",
"@types/yamljs": "0.2.31",
Expand Down
Loading

0 comments on commit 57b6a6f

Please sign in to comment.