From f396ff3441e8c1a70c2972fae10e18711707fe91 Mon Sep 17 00:00:00 2001 From: Elio Bischof Date: Wed, 21 Jun 2023 06:47:54 +0200 Subject: [PATCH] single runs test against prod build --- ...adel.settings.v2alpha.SettingsService.json | 12 ++++++- apps/login/package.json | 8 ++--- apps/login/turbo.json | 35 +++++-------------- 3 files changed, 23 insertions(+), 32 deletions(-) diff --git a/apps/login/mock/initial-stubs/zitadel.settings.v2alpha.SettingsService.json b/apps/login/mock/initial-stubs/zitadel.settings.v2alpha.SettingsService.json index efbf078ae07..d9e207340c3 100644 --- a/apps/login/mock/initial-stubs/zitadel.settings.v2alpha.SettingsService.json +++ b/apps/login/mock/initial-stubs/zitadel.settings.v2alpha.SettingsService.json @@ -3,5 +3,15 @@ "service": "zitadel.settings.v2alpha.SettingsService", "method": "GetBrandingSettings", "out": {} + }, + { + "service": "zitadel.settings.v2alpha.SettingsService", + "method": "GetLegalAndSupportSettings", + "out": {} + }, + { + "service": "zitadel.settings.v2alpha.SettingsService", + "method": "GetPasswordComplexitySettings", + "out": {} } -] +] \ No newline at end of file diff --git a/apps/login/package.json b/apps/login/package.json index 76e8cda8050..e5fe189d1c1 100644 --- a/apps/login/package.json +++ b/apps/login/package.json @@ -7,7 +7,7 @@ "test:watch": "concurrently --kill-others 'npm:test:unit:watch' 'npm:test:integration:watch'", "test:unit": "jest --config ./__test__/jest.config.ts", "test:unit:watch": "pnpm test:unit --watch", - "test:integration": "pnpm mock:build && concurrently --group --names 'mock,test' --success command-test --kill-others 'pnpm:mock' 'ZITADEL_API_URL=http://localhost:22222 start-server-and-test dev http://localhost:3000 \"test:integration:run\"'", + "test:integration": "export ZITADEL_API_URL=http://localhost:22222; pnpm mock:build && concurrently --group --names 'mock,test' --success command-test --kill-others 'pnpm:mock' 'start-server-and-test start http://localhost:3000 \"test:integration:run\"'", "test:integration:watch": "concurrently --names 'mock,test' --kill-others 'pnpm:mock' 'ZITADEL_API_URL=http://localhost:22222 start-server-and-test dev http://localhost:3000 \"pnpm nodemon -e js,jsx,ts,tsx,css,scss --ignore \\\"__test__/**\\\" --exec \\\"pnpm test:integration:run\\\"\"'", "test:integration:run": "cypress run --config-file ./cypress/cypress.config.ts --quiet", "test:integration:open": "cypress open --config-file ./cypress/cypress.config.ts", @@ -20,9 +20,9 @@ "lint:fix": "prettier --write .", "lint-staged": "lint-staged", "build": "next build", - "prestart": "build", + "prestart": "pnpm build", "start": "next start", - "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf .next" + "clean": "pnpm mock:destroy && rm -rf .turbo && rm -rf node_modules && rm -rf .next" }, "git": { "pre-commit": "lint-staged" @@ -87,4 +87,4 @@ "typescript": "5.0.4", "zitadel-tailwind-config": "workspace:*" } -} +} \ No newline at end of file diff --git a/apps/login/turbo.json b/apps/login/turbo.json index 601cd33efbc..ff7aaf0a494 100644 --- a/apps/login/turbo.json +++ b/apps/login/turbo.json @@ -1,40 +1,21 @@ { - "extends": [ - "//" - ], + "extends": ["//"], "pipeline": { "build": { - "outputs": [ - "dist/**", - ".next/**", - "!.next/cache/**" - ], - "dependsOn": [ - "^build" - ] + "outputs": ["dist/**", ".next/**", "!.next/cache/**"], + "dependsOn": ["^build"] }, "test": { - "dependsOn": [ - "@zitadel/server#build", - "@zitadel/react#build" - ] + "dependsOn": ["@zitadel/server#build", "@zitadel/react#build"] }, "test:integration": { - "dependsOn": [ - "@zitadel/server#build", - "@zitadel/react#build" - ] + "dependsOn": ["@zitadel/server#build", "@zitadel/react#build"] }, "test:unit": { - "dependsOn": [ - "@zitadel/server#build" - ] + "dependsOn": ["@zitadel/server#build"] }, "test:watch": { - "dependsOn": [ - "@zitadel/server#build", - "@zitadel/react#build" - ] + "dependsOn": ["@zitadel/server#build", "@zitadel/react#build"] } } -} \ No newline at end of file +}