alpha to beta change integration test, rm unused dep

This commit is contained in:
peintnermax
2023-09-21 10:27:49 +02:00
parent 363abd204d
commit 2cf06fc1c0
7 changed files with 396 additions and 226 deletions

View File

@@ -2,7 +2,7 @@ import { stub } from "../support/mock";
describe("login", () => {
beforeEach(() => {
stub("zitadel.session.v2alpha.SessionService", "CreateSession", {
stub("zitadel.session.v2beta.SessionService", "CreateSession", {
data: {
details: {
sequence: 859,
@@ -16,7 +16,7 @@ describe("login", () => {
},
});
stub("zitadel.session.v2alpha.SessionService", "GetSession", {
stub("zitadel.session.v2beta.SessionService", "GetSession", {
data: {
session: {
id: "221394658884845598",
@@ -37,7 +37,7 @@ describe("login", () => {
},
});
stub("zitadel.settings.v2alpha.SettingsService", "GetLoginSettings", {
stub("zitadel.settings.v2beta.SettingsService", "GetLoginSettings", {
data: {
settings: {
passkeysType: 1,
@@ -47,15 +47,11 @@ describe("login", () => {
});
describe("password login", () => {
beforeEach(() => {
stub(
"zitadel.user.v2alpha.UserService",
"ListAuthenticationMethodTypes",
{
stub("zitadel.user.v2beta.UserService", "ListAuthenticationMethodTypes", {
data: {
authMethodTypes: [1], // 1 for password authentication
},
}
);
});
});
it("should redirect a user with password authentication to /password", () => {
cy.visit("/loginname?loginName=john%40zitadel.com&submit=true");
@@ -63,7 +59,7 @@ describe("login", () => {
});
describe("with passkey prompt", () => {
beforeEach(() => {
stub("zitadel.session.v2alpha.SessionService", "SetSession", {
stub("zitadel.session.v2beta.SessionService", "SetSession", {
data: {
details: {
sequence: 859,
@@ -90,15 +86,11 @@ describe("login", () => {
});
describe("passkey login", () => {
beforeEach(() => {
stub(
"zitadel.user.v2alpha.UserService",
"ListAuthenticationMethodTypes",
{
stub("zitadel.user.v2beta.UserService", "ListAuthenticationMethodTypes", {
data: {
authMethodTypes: [2], // 2 for passwordless authentication
},
}
);
});
});
it("should redirect a user with passwordless authentication to /passkey/login", () => {
cy.visit("/loginname?loginName=john%40zitadel.com&submit=true");

View File

@@ -4,7 +4,7 @@ const IDP_URL = "https://example.com/idp/url";
describe("register idps", () => {
beforeEach(() => {
stub("zitadel.user.v2alpha.UserService", "StartIdentityProviderIntent", {
stub("zitadel.user.v2beta.UserService", "StartIdentityProviderIntent", {
data: {
authUrl: IDP_URL,
},

View File

@@ -2,7 +2,7 @@ import { stub } from "../support/mock";
describe("register", () => {
beforeEach(() => {
stub("zitadel.user.v2alpha.UserService", "AddHumanUser", {
stub("zitadel.user.v2beta.UserService", "AddHumanUser", {
data: {
userId: "123",
},

View File

@@ -2,12 +2,12 @@ import { stub } from "../support/mock";
describe("/verify", () => {
it("redirects after successful email verification", () => {
stub("zitadel.user.v2alpha.UserService", "VerifyEmail");
stub("zitadel.user.v2beta.UserService", "VerifyEmail");
cy.visit("/verify?userID=123&code=abc&submit=true");
cy.location("pathname", { timeout: 10_000 }).should("eq", "/loginname");
});
it("shows an error if validation failed", () => {
stub("zitadel.user.v2alpha.UserService", "VerifyEmail", {
stub("zitadel.user.v2beta.UserService", "VerifyEmail", {
code: 3,
error: "error validating code",
});

View File

@@ -1,11 +1,11 @@
[
{
"service": "zitadel.settings.v2alpha.SettingsService",
"service": "zitadel.settings.v2beta.SettingsService",
"method": "GetBrandingSettings",
"out": {}
},
{
"service": "zitadel.settings.v2alpha.SettingsService",
"service": "zitadel.settings.v2beta.SettingsService",
"method": "GetLegalAndSupportSettings",
"out": {
"data": {
@@ -18,7 +18,7 @@
}
},
{
"service": "zitadel.settings.v2alpha.SettingsService",
"service": "zitadel.settings.v2beta.SettingsService",
"method": "GetActiveIdentityProviders",
"out": {
"data": {
@@ -33,7 +33,7 @@
}
},
{
"service": "zitadel.settings.v2alpha.SettingsService",
"service": "zitadel.settings.v2beta.SettingsService",
"method": "GetPasswordComplexitySettings",
"out": {
"data": {

View File

@@ -40,7 +40,6 @@
"@zitadel/react": "workspace:*",
"@zitadel/server": "workspace:*",
"clsx": "1.2.1",
"date-fns": "2.29.3",
"moment": "^2.29.4",
"next": "13.4.12",
"next-themes": "^0.2.1",

569
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff