From 668e0e82a052a9d1d6abf46378aec1717da0aa53 Mon Sep 17 00:00:00 2001 From: Gao Sun Date: Mon, 11 Sep 2023 12:36:21 +0800 Subject: [PATCH] refactor(test): rename directories --- packages/integration-tests/package.json | 2 +- .../tests/{ui => console}/applications/constants.ts | 0 .../src/tests/{ui => console}/applications/helpers.ts | 0 .../tests/{ui => console}/applications/index.test.ts | 0 .../src/tests/{ui => console}/bootstrap.test.ts | 0 .../src/tests/{ui => console}/connectors/helpers.ts | 0 .../connectors/passwordless-connector-test-cases.ts | 0 .../connectors/passwordless-connectors.test.ts | 0 .../connectors/social-connector-test-cases.ts | 0 .../connectors/social-connectors.test.ts | 0 .../src/tests/{ui => console}/rbac.test.ts | 0 .../sign-in-experience/branding.test.ts | 0 .../{ui => console}/sign-in-experience/helpers.ts | 0 .../sign-in-experience/sign-in-preview.test.ts | 0 .../sign-up-and-sign-in/connector-setup-helpers.ts | 0 .../sign-up-and-sign-in/happy-path.test.ts | 0 .../sign-in-experience/sign-up-and-sign-in/helpers.ts | 0 .../sign-up-and-sign-in/sad-path.test.ts | 0 .../src/tests/{ui => console}/user-management.test.ts | 0 .../src/tests/{ui => console}/webhooks/helpers.ts | 0 .../src/tests/{ui => console}/webhooks/index.test.ts | 0 .../src/tests/flows/bootstrap.test.ts | 11 +++++++++++ 22 files changed, 12 insertions(+), 1 deletion(-) rename packages/integration-tests/src/tests/{ui => console}/applications/constants.ts (100%) rename packages/integration-tests/src/tests/{ui => console}/applications/helpers.ts (100%) rename packages/integration-tests/src/tests/{ui => console}/applications/index.test.ts (100%) rename packages/integration-tests/src/tests/{ui => console}/bootstrap.test.ts (100%) rename packages/integration-tests/src/tests/{ui => console}/connectors/helpers.ts (100%) rename packages/integration-tests/src/tests/{ui => console}/connectors/passwordless-connector-test-cases.ts (100%) rename packages/integration-tests/src/tests/{ui => console}/connectors/passwordless-connectors.test.ts (100%) rename packages/integration-tests/src/tests/{ui => console}/connectors/social-connector-test-cases.ts (100%) rename packages/integration-tests/src/tests/{ui => console}/connectors/social-connectors.test.ts (100%) rename packages/integration-tests/src/tests/{ui => console}/rbac.test.ts (100%) rename packages/integration-tests/src/tests/{ui => console}/sign-in-experience/branding.test.ts (100%) rename packages/integration-tests/src/tests/{ui => console}/sign-in-experience/helpers.ts (100%) rename packages/integration-tests/src/tests/{ui => console}/sign-in-experience/sign-in-preview.test.ts (100%) rename packages/integration-tests/src/tests/{ui => console}/sign-in-experience/sign-up-and-sign-in/connector-setup-helpers.ts (100%) rename packages/integration-tests/src/tests/{ui => console}/sign-in-experience/sign-up-and-sign-in/happy-path.test.ts (100%) rename packages/integration-tests/src/tests/{ui => console}/sign-in-experience/sign-up-and-sign-in/helpers.ts (100%) rename packages/integration-tests/src/tests/{ui => console}/sign-in-experience/sign-up-and-sign-in/sad-path.test.ts (100%) rename packages/integration-tests/src/tests/{ui => console}/user-management.test.ts (100%) rename packages/integration-tests/src/tests/{ui => console}/webhooks/helpers.ts (100%) rename packages/integration-tests/src/tests/{ui => console}/webhooks/index.test.ts (100%) create mode 100644 packages/integration-tests/src/tests/flows/bootstrap.test.ts diff --git a/packages/integration-tests/package.json b/packages/integration-tests/package.json index abc008a69..cbb94d267 100644 --- a/packages/integration-tests/package.json +++ b/packages/integration-tests/package.json @@ -14,7 +14,7 @@ "test:only": "NODE_OPTIONS=--experimental-vm-modules jest", "test": "pnpm build && pnpm test:api && pnpm test:ui", "test:api": "pnpm test:only -i ./lib/tests/api/", - "test:ui": "pnpm test:only -i --config=jest.config.ui.js ./lib/tests/ui/", + "test:ui": "pnpm test:only -i --config=jest.config.ui.js ./lib/tests/console/ ./lib/tests/flows/", "lint": "eslint --ext .ts src", "lint:report": "pnpm lint --format json --output-file report.json", "start": "pnpm test" diff --git a/packages/integration-tests/src/tests/ui/applications/constants.ts b/packages/integration-tests/src/tests/console/applications/constants.ts similarity index 100% rename from packages/integration-tests/src/tests/ui/applications/constants.ts rename to packages/integration-tests/src/tests/console/applications/constants.ts diff --git a/packages/integration-tests/src/tests/ui/applications/helpers.ts b/packages/integration-tests/src/tests/console/applications/helpers.ts similarity index 100% rename from packages/integration-tests/src/tests/ui/applications/helpers.ts rename to packages/integration-tests/src/tests/console/applications/helpers.ts diff --git a/packages/integration-tests/src/tests/ui/applications/index.test.ts b/packages/integration-tests/src/tests/console/applications/index.test.ts similarity index 100% rename from packages/integration-tests/src/tests/ui/applications/index.test.ts rename to packages/integration-tests/src/tests/console/applications/index.test.ts diff --git a/packages/integration-tests/src/tests/ui/bootstrap.test.ts b/packages/integration-tests/src/tests/console/bootstrap.test.ts similarity index 100% rename from packages/integration-tests/src/tests/ui/bootstrap.test.ts rename to packages/integration-tests/src/tests/console/bootstrap.test.ts diff --git a/packages/integration-tests/src/tests/ui/connectors/helpers.ts b/packages/integration-tests/src/tests/console/connectors/helpers.ts similarity index 100% rename from packages/integration-tests/src/tests/ui/connectors/helpers.ts rename to packages/integration-tests/src/tests/console/connectors/helpers.ts diff --git a/packages/integration-tests/src/tests/ui/connectors/passwordless-connector-test-cases.ts b/packages/integration-tests/src/tests/console/connectors/passwordless-connector-test-cases.ts similarity index 100% rename from packages/integration-tests/src/tests/ui/connectors/passwordless-connector-test-cases.ts rename to packages/integration-tests/src/tests/console/connectors/passwordless-connector-test-cases.ts diff --git a/packages/integration-tests/src/tests/ui/connectors/passwordless-connectors.test.ts b/packages/integration-tests/src/tests/console/connectors/passwordless-connectors.test.ts similarity index 100% rename from packages/integration-tests/src/tests/ui/connectors/passwordless-connectors.test.ts rename to packages/integration-tests/src/tests/console/connectors/passwordless-connectors.test.ts diff --git a/packages/integration-tests/src/tests/ui/connectors/social-connector-test-cases.ts b/packages/integration-tests/src/tests/console/connectors/social-connector-test-cases.ts similarity index 100% rename from packages/integration-tests/src/tests/ui/connectors/social-connector-test-cases.ts rename to packages/integration-tests/src/tests/console/connectors/social-connector-test-cases.ts diff --git a/packages/integration-tests/src/tests/ui/connectors/social-connectors.test.ts b/packages/integration-tests/src/tests/console/connectors/social-connectors.test.ts similarity index 100% rename from packages/integration-tests/src/tests/ui/connectors/social-connectors.test.ts rename to packages/integration-tests/src/tests/console/connectors/social-connectors.test.ts diff --git a/packages/integration-tests/src/tests/ui/rbac.test.ts b/packages/integration-tests/src/tests/console/rbac.test.ts similarity index 100% rename from packages/integration-tests/src/tests/ui/rbac.test.ts rename to packages/integration-tests/src/tests/console/rbac.test.ts diff --git a/packages/integration-tests/src/tests/ui/sign-in-experience/branding.test.ts b/packages/integration-tests/src/tests/console/sign-in-experience/branding.test.ts similarity index 100% rename from packages/integration-tests/src/tests/ui/sign-in-experience/branding.test.ts rename to packages/integration-tests/src/tests/console/sign-in-experience/branding.test.ts diff --git a/packages/integration-tests/src/tests/ui/sign-in-experience/helpers.ts b/packages/integration-tests/src/tests/console/sign-in-experience/helpers.ts similarity index 100% rename from packages/integration-tests/src/tests/ui/sign-in-experience/helpers.ts rename to packages/integration-tests/src/tests/console/sign-in-experience/helpers.ts diff --git a/packages/integration-tests/src/tests/ui/sign-in-experience/sign-in-preview.test.ts b/packages/integration-tests/src/tests/console/sign-in-experience/sign-in-preview.test.ts similarity index 100% rename from packages/integration-tests/src/tests/ui/sign-in-experience/sign-in-preview.test.ts rename to packages/integration-tests/src/tests/console/sign-in-experience/sign-in-preview.test.ts diff --git a/packages/integration-tests/src/tests/ui/sign-in-experience/sign-up-and-sign-in/connector-setup-helpers.ts b/packages/integration-tests/src/tests/console/sign-in-experience/sign-up-and-sign-in/connector-setup-helpers.ts similarity index 100% rename from packages/integration-tests/src/tests/ui/sign-in-experience/sign-up-and-sign-in/connector-setup-helpers.ts rename to packages/integration-tests/src/tests/console/sign-in-experience/sign-up-and-sign-in/connector-setup-helpers.ts diff --git a/packages/integration-tests/src/tests/ui/sign-in-experience/sign-up-and-sign-in/happy-path.test.ts b/packages/integration-tests/src/tests/console/sign-in-experience/sign-up-and-sign-in/happy-path.test.ts similarity index 100% rename from packages/integration-tests/src/tests/ui/sign-in-experience/sign-up-and-sign-in/happy-path.test.ts rename to packages/integration-tests/src/tests/console/sign-in-experience/sign-up-and-sign-in/happy-path.test.ts diff --git a/packages/integration-tests/src/tests/ui/sign-in-experience/sign-up-and-sign-in/helpers.ts b/packages/integration-tests/src/tests/console/sign-in-experience/sign-up-and-sign-in/helpers.ts similarity index 100% rename from packages/integration-tests/src/tests/ui/sign-in-experience/sign-up-and-sign-in/helpers.ts rename to packages/integration-tests/src/tests/console/sign-in-experience/sign-up-and-sign-in/helpers.ts diff --git a/packages/integration-tests/src/tests/ui/sign-in-experience/sign-up-and-sign-in/sad-path.test.ts b/packages/integration-tests/src/tests/console/sign-in-experience/sign-up-and-sign-in/sad-path.test.ts similarity index 100% rename from packages/integration-tests/src/tests/ui/sign-in-experience/sign-up-and-sign-in/sad-path.test.ts rename to packages/integration-tests/src/tests/console/sign-in-experience/sign-up-and-sign-in/sad-path.test.ts diff --git a/packages/integration-tests/src/tests/ui/user-management.test.ts b/packages/integration-tests/src/tests/console/user-management.test.ts similarity index 100% rename from packages/integration-tests/src/tests/ui/user-management.test.ts rename to packages/integration-tests/src/tests/console/user-management.test.ts diff --git a/packages/integration-tests/src/tests/ui/webhooks/helpers.ts b/packages/integration-tests/src/tests/console/webhooks/helpers.ts similarity index 100% rename from packages/integration-tests/src/tests/ui/webhooks/helpers.ts rename to packages/integration-tests/src/tests/console/webhooks/helpers.ts diff --git a/packages/integration-tests/src/tests/ui/webhooks/index.test.ts b/packages/integration-tests/src/tests/console/webhooks/index.test.ts similarity index 100% rename from packages/integration-tests/src/tests/ui/webhooks/index.test.ts rename to packages/integration-tests/src/tests/console/webhooks/index.test.ts diff --git a/packages/integration-tests/src/tests/flows/bootstrap.test.ts b/packages/integration-tests/src/tests/flows/bootstrap.test.ts new file mode 100644 index 000000000..736d6ba79 --- /dev/null +++ b/packages/integration-tests/src/tests/flows/bootstrap.test.ts @@ -0,0 +1,11 @@ +/** + * NOTE: This test suite assumes test cases will run sequentially (which is Jest default). + * Parallel execution will lead to errors. + */ +// Tip: See https://github.com/argos-ci/jest-puppeteer/blob/main/packages/expect-puppeteer/README.md +// for convenient expect methods +describe('smoke testing for the main flow', () => { + it('should not explode', async () => { + expect(true); + }); +});