diff --git a/apps/e2e/tests/team-accounts/team-accounts.po.ts b/apps/e2e/tests/team-accounts/team-accounts.po.ts index e1a5059d6..912f29884 100644 --- a/apps/e2e/tests/team-accounts/team-accounts.po.ts +++ b/apps/e2e/tests/team-accounts/team-accounts.po.ts @@ -56,7 +56,7 @@ export class TeamAccountsPageObject { } createTeamName() { - const random = (Math.random() * 100).toFixed(0); + const random = (Math.random() * 1000000000).toFixed(0); const teamName = `Team-Name-${random}`; const slug = `team-name-${random}`; diff --git a/apps/e2e/tests/team-accounts/team-accounts.spec.ts b/apps/e2e/tests/team-accounts/team-accounts.spec.ts index 9c516d551..c9ba3e7f4 100644 --- a/apps/e2e/tests/team-accounts/team-accounts.spec.ts +++ b/apps/e2e/tests/team-accounts/team-accounts.spec.ts @@ -12,13 +12,13 @@ test.describe('Team Accounts', () => { await teamAccounts.setup(); }); - test('user can update their profile name', async () => { + test('user can update their team name (and slug)', async () => { const {teamName, slug} = teamAccounts.createTeamName(); await teamAccounts.goToSettings(); - await teamAccounts.updateName(teamName); + // the slug should be updated to match the new team name await page.waitForURL(`http://localhost:3000/home/${slug}/settings`); await expect(await teamAccounts.getTeamFromSelector(slug)).toBeVisible(); diff --git a/apps/web/.env.development b/apps/web/.env.development index 04263427b..ad64067d2 100644 --- a/apps/web/.env.development +++ b/apps/web/.env.development @@ -42,14 +42,4 @@ NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY= NEXT_PUBLIC_ENABLE_ACCOUNT_DELETION=true NEXT_PUBLIC_ENABLE_PERSONAL_ACCOUNT_BILLING=true NEXT_PUBLIC_ENABLE_ORGANIZATION_DELETION=true -NEXT_PUBLIC_ENABLE_ORGANIZATION_BILLING=true - -# LOCALES -NEXT_PUBLIC_LOCALES_PATH=apps/web/public/locales - -# PATHS -# Please make sure to update these in the app's paths configuration as well -SIGN_IN_PATH=/auth/sign-in -SIGN_UP_PATH=/auth/sign-up -TEAM_ACCOUNTS_HOME_PATH=/home -INVITATION_PAGE_PATH=/join \ No newline at end of file +NEXT_PUBLIC_ENABLE_ORGANIZATION_BILLING=true \ No newline at end of file diff --git a/apps/web/.env.test b/apps/web/.env.test new file mode 100644 index 000000000..ad64067d2 --- /dev/null +++ b/apps/web/.env.test @@ -0,0 +1,45 @@ +# SITE +NEXT_PUBLIC_SITE_URL=http://localhost:3000 +NEXT_PUBLIC_PRODUCT_NAME=Makerkit +NEXT_PUBLIC_SITE_TITLE="Makerkit - The easiest way to build and manage your SaaS" +NEXT_PUBLIC_SITE_DESCRIPTION="Makerkit is the easiest way to build and manage your SaaS. It provides you with the tools you need to build your SaaS, without the hassle of building it from scratch." +NEXT_PUBLIC_DEFAULT_THEME_MODE=light +NEXT_PUBLIC_THEME_COLOR="#ffffff" +NEXT_PUBLIC_THEME_COLOR_DARK="#0a0a0a" + +# CMS +CMS_CLIENT=keystatic + +# KEYSTATIC +NEXT_PUBLIC_KEYSTATIC_CONTENT_PATH=./content + +# AUTH +NEXT_PUBLIC_AUTH_PASSWORD=true +NEXT_PUBLIC_AUTH_MAGIC_LINK=false + +# BILLING +NEXT_PUBLIC_BILLING_PROVIDER=stripe + +# SUPABASE +NEXT_PUBLIC_SUPABASE_URL=http://127.0.0.1:54321 +NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0 +NEXT_PUBLIC_REQUIRE_EMAIL_CONFIRMATION=true + +## THIS IS FOR DEVELOPMENT ONLY - DO NOT USE IN PRODUCTION +SUPABASE_DB_WEBHOOK_SECRET=WEBHOOKSECRET + +EMAIL_SENDER=test@makerkit.dev +EMAIL_PORT=54325 +EMAIL_HOST=localhost +EMAIL_TLS=false +EMAIL_USER=user +EMAIL_PASSWORD=password + +# STRIPE +NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY= + +# FEATURE FLAGS +NEXT_PUBLIC_ENABLE_ACCOUNT_DELETION=true +NEXT_PUBLIC_ENABLE_PERSONAL_ACCOUNT_BILLING=true +NEXT_PUBLIC_ENABLE_ORGANIZATION_DELETION=true +NEXT_PUBLIC_ENABLE_ORGANIZATION_BILLING=true \ No newline at end of file diff --git a/apps/web/package.json b/apps/web/package.json index e8e0afcae..2fdb9544a 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -14,6 +14,7 @@ "start": "pnpm with-env next start", "typecheck": "tsc --noEmit", "with-env": "dotenv -e ./.env.local --", + "with-env:test": "dotenv -e ./.env.test --", "supabase:start": "supabase status || supabase start", "supabase:stop": "supabase stop", "supabase:reset": "supabase db reset || supabase start", @@ -45,7 +46,7 @@ "@kit/team-accounts": "workspace:^", "@kit/ui": "workspace:^", "@makerkit/data-loader-supabase-core": "^0.0.7", - "@makerkit/data-loader-supabase-nextjs": "^0.0.9", + "@makerkit/data-loader-supabase-nextjs": "^1.0.0", "@marsidev/react-turnstile": "^0.5.4", "@radix-ui/react-icons": "^1.3.0", "@supabase/supabase-js": "^2.42.0", diff --git a/package.json b/package.json index d37d81a73..81cbe3972 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "lint": "turbo lint --cache-dir=.turbo --continue -- --cache --cache-location 'node_modules/.cache/.eslintcache' && manypkg check", "lint:fix": "turbo lint --cache-dir=.turbo --continue -- --fix --cache --cache-location 'node_modules/.cache/.eslintcache' && manypkg fix", "typecheck": "turbo typecheck --cache-dir=.turbo", - "test": "turbo test", + "test": "turbo test --cache-dir=.turbo", "supabase:web:start": "pnpm --filter web supabase:start", "supabase:web:stop": "pnpm --filter web supabase:stop", "supabase:web:typegen": "pnpm --filter web supabase:typegen", diff --git a/packages/features/admin/package.json b/packages/features/admin/package.json index 69c60ab1f..6aeabddff 100644 --- a/packages/features/admin/package.json +++ b/packages/features/admin/package.json @@ -15,7 +15,7 @@ "@kit/supabase": "workspace:*", "@kit/ui": "workspace:*", "@makerkit/data-loader-supabase-core": "^0.0.7", - "@makerkit/data-loader-supabase-nextjs": "^0.0.9", + "@makerkit/data-loader-supabase-nextjs": "^1.0.0", "@tanstack/react-query": "^5.29.0", "@tanstack/react-table": "^8.15.3", "lucide-react": "^0.367.0", @@ -34,7 +34,7 @@ "@kit/tsconfig": "workspace:*", "@kit/ui": "workspace:^", "@makerkit/data-loader-supabase-core": "^0.0.7", - "@makerkit/data-loader-supabase-nextjs": "^0.0.9", + "@makerkit/data-loader-supabase-nextjs": "^1.0.0", "@supabase/supabase-js": "^2.42.0", "@tanstack/react-query": "5.29.0", "@tanstack/react-table": "^8.15.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d513fe284..49ff50349 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -105,8 +105,8 @@ importers: specifier: ^0.0.7 version: 0.0.7(@supabase/postgrest-js@1.15.0)(@supabase/supabase-js@2.42.0) '@makerkit/data-loader-supabase-nextjs': - specifier: ^0.0.9 - version: 0.0.9(@supabase/postgrest-js@1.15.0)(@supabase/supabase-js@2.42.0)(next@14.2.0)(react@18.2.0)(swr@2.2.5) + specifier: ^1.0.0 + version: 1.0.0(@supabase/postgrest-js@1.15.0)(@supabase/supabase-js@2.42.0)(@tanstack/react-query@5.29.0)(next@14.2.0)(react@18.2.0) '@marsidev/react-turnstile': specifier: ^0.5.4 version: 0.5.4(react-dom@18.2.0)(react@18.2.0) @@ -645,8 +645,8 @@ importers: specifier: ^0.0.7 version: 0.0.7(@supabase/postgrest-js@1.15.0)(@supabase/supabase-js@2.42.0) '@makerkit/data-loader-supabase-nextjs': - specifier: ^0.0.9 - version: 0.0.9(@supabase/postgrest-js@1.15.0)(@supabase/supabase-js@2.42.0)(next@14.2.0)(react@18.2.0)(swr@2.2.5) + specifier: ^1.0.0 + version: 1.0.0(@supabase/postgrest-js@1.15.0)(@supabase/supabase-js@2.42.0)(@tanstack/react-query@5.29.0)(next@14.2.0)(react@18.2.0) '@supabase/supabase-js': specifier: ^2.42.0 version: 2.42.0 @@ -2378,19 +2378,19 @@ packages: '@supabase/supabase-js': 2.42.0 ts-case-convert: 2.0.7 - /@makerkit/data-loader-supabase-nextjs@0.0.9(@supabase/postgrest-js@1.15.0)(@supabase/supabase-js@2.42.0)(next@14.2.0)(react@18.2.0)(swr@2.2.5): - resolution: {integrity: sha512-FNn0Z3zlV0W6+GVoWAkokMC4Mzx29lByCGbYBi9F11VBkmxuEH8i4KbYYbImW+r8uvs6sdth+cqjx6Jo+VuTCw==} + /@makerkit/data-loader-supabase-nextjs@1.0.0(@supabase/postgrest-js@1.15.0)(@supabase/supabase-js@2.42.0)(@tanstack/react-query@5.29.0)(next@14.2.0)(react@18.2.0): + resolution: {integrity: sha512-+gma4JSLi7ChJ0fU5Q5CKqzTpzehEJuoAo8OSwuHIfYYtOggg3gYH6DcOYj4tiz8uCSgKNr9ORi0rnk1XfqMsQ==} peerDependencies: '@supabase/supabase-js': '>=2.0.0' + '@tanstack/react-query': '>=5.0.0' next: '>=13.4.0' react: '>=18.0.0' - swr: '>=2.0.0' dependencies: '@makerkit/data-loader-supabase-core': 0.0.7(@supabase/postgrest-js@1.15.0)(@supabase/supabase-js@2.42.0) '@supabase/supabase-js': 2.42.0 + '@tanstack/react-query': 5.29.0(react@18.2.0) next: 14.2.0(@opentelemetry/api@1.8.0)(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 - swr: 2.2.5(react@18.2.0) transitivePeerDependencies: - '@supabase/postgrest-js' @@ -13105,15 +13105,6 @@ packages: upper-case: 1.1.3 dev: false - /swr@2.2.5(react@18.2.0): - resolution: {integrity: sha512-QtxqyclFeAsxEUeZIYmsaQ0UjimSq1RZ9Un7I68/0ClKK/U3LoyQunwkQfJZr2fc22DfIXLNDc2wFyTEikCUpg==} - peerDependencies: - react: ^16.11.0 || ^17.0.0 || ^18.0.0 - dependencies: - client-only: 0.0.1 - react: 18.2.0 - use-sync-external-store: 1.2.0(react@18.2.0) - /tabbable@6.2.0: resolution: {integrity: sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==} dev: false @@ -13687,6 +13678,7 @@ packages: react: ^16.8.0 || ^17.0.0 || ^18.0.0 dependencies: react: 18.2.0 + dev: false /util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}