mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-14 14:53:10 +00:00
5
apps/login/cypress/fixtures/example.json
Normal file
5
apps/login/cypress/fixtures/example.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "Using fixtures to represent data",
|
||||
"email": "hello@cypress.io",
|
||||
"body": "Fixtures are a great way to mock data for responses to routes"
|
||||
}
|
||||
13
apps/login/cypress/fixtures/verifyemail.yaml
Normal file
13
apps/login/cypress/fixtures/verifyemail.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
- key: verify_email_custom
|
||||
expect:
|
||||
grpc:
|
||||
service: zitadel.user.v2alpha.UserService
|
||||
method: VerifyEmail
|
||||
actions:
|
||||
- reply_grpc:
|
||||
payload: >
|
||||
{
|
||||
"details": {
|
||||
"resourceOwner": "dinigrossmueter"
|
||||
}
|
||||
}
|
||||
10
apps/login/cypress/integration/verify.cy.ts
Normal file
10
apps/login/cypress/integration/verify.cy.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
describe('/verify', () => {
|
||||
it('redirects after successful email verification', () => {
|
||||
cy.visit("/verify?userID=123&code=abc&submit=true")
|
||||
cy.location('pathname').should('eq', '/username')
|
||||
})
|
||||
it('shows an error if validation failed', () => {
|
||||
cy.visit("/verify?userID=123&code=abc&submit=true")
|
||||
cy.contains('error validating code')
|
||||
})
|
||||
})
|
||||
3
apps/login/cypress/screenshots/verify-email.cy.ts/.gitignore
vendored
Normal file
3
apps/login/cypress/screenshots/verify-email.cy.ts/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
*
|
||||
!.gitignore
|
||||
!.gitkeep
|
||||
37
apps/login/cypress/support/commands.ts
Normal file
37
apps/login/cypress/support/commands.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
/// <reference types="cypress" />
|
||||
// ***********************************************
|
||||
// This example commands.ts shows you how to
|
||||
// create various custom commands and overwrite
|
||||
// existing commands.
|
||||
//
|
||||
// For more comprehensive examples of custom
|
||||
// commands please read more here:
|
||||
// https://on.cypress.io/custom-commands
|
||||
// ***********************************************
|
||||
//
|
||||
//
|
||||
// -- This is a parent command --
|
||||
// Cypress.Commands.add('login', (email, password) => { ... })
|
||||
//
|
||||
//
|
||||
// -- This is a child command --
|
||||
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
|
||||
//
|
||||
//
|
||||
// -- This is a dual command --
|
||||
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
|
||||
//
|
||||
//
|
||||
// -- This will overwrite an existing command --
|
||||
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
|
||||
//
|
||||
// declare global {
|
||||
// namespace Cypress {
|
||||
// interface Chainable {
|
||||
// login(email: string, password: string): Chainable<void>
|
||||
// drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
|
||||
// dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
|
||||
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
20
apps/login/cypress/support/e2e.ts
Normal file
20
apps/login/cypress/support/e2e.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
// ***********************************************************
|
||||
// This example support/e2e.ts is processed and
|
||||
// loaded automatically before your test files.
|
||||
//
|
||||
// This is a great place to put global configuration and
|
||||
// behavior that modifies Cypress.
|
||||
//
|
||||
// You can change the location of this file or turn off
|
||||
// automatically serving support files with the
|
||||
// 'supportFile' configuration option.
|
||||
//
|
||||
// You can read more here:
|
||||
// https://on.cypress.io/configuration
|
||||
// ***********************************************************
|
||||
|
||||
// Import commands.js using ES2015 syntax:
|
||||
import "./commands";
|
||||
|
||||
// Alternatively you can use CommonJS syntax:
|
||||
// require('./commands')
|
||||
17
apps/login/cypress/tsconfig.json
Normal file
17
apps/login/cypress/tsconfig.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"lib": [
|
||||
"es5",
|
||||
"dom"
|
||||
],
|
||||
"types": [
|
||||
"cypress",
|
||||
"node"
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"**/*.ts"
|
||||
],
|
||||
}
|
||||
3
apps/login/cypress/videos/.gitignore
vendored
Normal file
3
apps/login/cypress/videos/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
*
|
||||
!.gitignore
|
||||
!.gitkeep
|
||||
0
apps/login/cypress/videos/.gitkeep
Normal file
0
apps/login/cypress/videos/.gitkeep
Normal file
Reference in New Issue
Block a user