Update data-loader-supabase-nextjs version and refactor e2e tests
This commit involves updating the version of @makerkit/data-loader-supabase-nextjs to ^1.0.0 across multiple components. The end-to-end tests for team-accounts have also been refactored to improve their reliability and accuracy. Additionally, a new `.env.test` file has been added for improved testing.
This commit is contained in:
@@ -56,7 +56,7 @@ export class TeamAccountsPageObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
createTeamName() {
|
createTeamName() {
|
||||||
const random = (Math.random() * 100).toFixed(0);
|
const random = (Math.random() * 1000000000).toFixed(0);
|
||||||
|
|
||||||
const teamName = `Team-Name-${random}`;
|
const teamName = `Team-Name-${random}`;
|
||||||
const slug = `team-name-${random}`;
|
const slug = `team-name-${random}`;
|
||||||
|
|||||||
@@ -12,13 +12,13 @@ test.describe('Team Accounts', () => {
|
|||||||
await teamAccounts.setup();
|
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();
|
const {teamName, slug} = teamAccounts.createTeamName();
|
||||||
|
|
||||||
await teamAccounts.goToSettings();
|
await teamAccounts.goToSettings();
|
||||||
|
|
||||||
await teamAccounts.updateName(teamName);
|
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 page.waitForURL(`http://localhost:3000/home/${slug}/settings`);
|
||||||
|
|
||||||
await expect(await teamAccounts.getTeamFromSelector(slug)).toBeVisible();
|
await expect(await teamAccounts.getTeamFromSelector(slug)).toBeVisible();
|
||||||
|
|||||||
@@ -42,14 +42,4 @@ NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=
|
|||||||
NEXT_PUBLIC_ENABLE_ACCOUNT_DELETION=true
|
NEXT_PUBLIC_ENABLE_ACCOUNT_DELETION=true
|
||||||
NEXT_PUBLIC_ENABLE_PERSONAL_ACCOUNT_BILLING=true
|
NEXT_PUBLIC_ENABLE_PERSONAL_ACCOUNT_BILLING=true
|
||||||
NEXT_PUBLIC_ENABLE_ORGANIZATION_DELETION=true
|
NEXT_PUBLIC_ENABLE_ORGANIZATION_DELETION=true
|
||||||
NEXT_PUBLIC_ENABLE_ORGANIZATION_BILLING=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
|
|
||||||
45
apps/web/.env.test
Normal file
45
apps/web/.env.test
Normal file
@@ -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
|
||||||
@@ -14,6 +14,7 @@
|
|||||||
"start": "pnpm with-env next start",
|
"start": "pnpm with-env next start",
|
||||||
"typecheck": "tsc --noEmit",
|
"typecheck": "tsc --noEmit",
|
||||||
"with-env": "dotenv -e ./.env.local --",
|
"with-env": "dotenv -e ./.env.local --",
|
||||||
|
"with-env:test": "dotenv -e ./.env.test --",
|
||||||
"supabase:start": "supabase status || supabase start",
|
"supabase:start": "supabase status || supabase start",
|
||||||
"supabase:stop": "supabase stop",
|
"supabase:stop": "supabase stop",
|
||||||
"supabase:reset": "supabase db reset || supabase start",
|
"supabase:reset": "supabase db reset || supabase start",
|
||||||
@@ -45,7 +46,7 @@
|
|||||||
"@kit/team-accounts": "workspace:^",
|
"@kit/team-accounts": "workspace:^",
|
||||||
"@kit/ui": "workspace:^",
|
"@kit/ui": "workspace:^",
|
||||||
"@makerkit/data-loader-supabase-core": "^0.0.7",
|
"@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",
|
"@marsidev/react-turnstile": "^0.5.4",
|
||||||
"@radix-ui/react-icons": "^1.3.0",
|
"@radix-ui/react-icons": "^1.3.0",
|
||||||
"@supabase/supabase-js": "^2.42.0",
|
"@supabase/supabase-js": "^2.42.0",
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
"lint": "turbo lint --cache-dir=.turbo --continue -- --cache --cache-location 'node_modules/.cache/.eslintcache' && manypkg check",
|
"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",
|
"lint:fix": "turbo lint --cache-dir=.turbo --continue -- --fix --cache --cache-location 'node_modules/.cache/.eslintcache' && manypkg fix",
|
||||||
"typecheck": "turbo typecheck --cache-dir=.turbo",
|
"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:start": "pnpm --filter web supabase:start",
|
||||||
"supabase:web:stop": "pnpm --filter web supabase:stop",
|
"supabase:web:stop": "pnpm --filter web supabase:stop",
|
||||||
"supabase:web:typegen": "pnpm --filter web supabase:typegen",
|
"supabase:web:typegen": "pnpm --filter web supabase:typegen",
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
"@kit/supabase": "workspace:*",
|
"@kit/supabase": "workspace:*",
|
||||||
"@kit/ui": "workspace:*",
|
"@kit/ui": "workspace:*",
|
||||||
"@makerkit/data-loader-supabase-core": "^0.0.7",
|
"@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-query": "^5.29.0",
|
||||||
"@tanstack/react-table": "^8.15.3",
|
"@tanstack/react-table": "^8.15.3",
|
||||||
"lucide-react": "^0.367.0",
|
"lucide-react": "^0.367.0",
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
"@kit/tsconfig": "workspace:*",
|
"@kit/tsconfig": "workspace:*",
|
||||||
"@kit/ui": "workspace:^",
|
"@kit/ui": "workspace:^",
|
||||||
"@makerkit/data-loader-supabase-core": "^0.0.7",
|
"@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",
|
"@supabase/supabase-js": "^2.42.0",
|
||||||
"@tanstack/react-query": "5.29.0",
|
"@tanstack/react-query": "5.29.0",
|
||||||
"@tanstack/react-table": "^8.15.3",
|
"@tanstack/react-table": "^8.15.3",
|
||||||
|
|||||||
26
pnpm-lock.yaml
generated
26
pnpm-lock.yaml
generated
@@ -105,8 +105,8 @@ importers:
|
|||||||
specifier: ^0.0.7
|
specifier: ^0.0.7
|
||||||
version: 0.0.7(@supabase/postgrest-js@1.15.0)(@supabase/supabase-js@2.42.0)
|
version: 0.0.7(@supabase/postgrest-js@1.15.0)(@supabase/supabase-js@2.42.0)
|
||||||
'@makerkit/data-loader-supabase-nextjs':
|
'@makerkit/data-loader-supabase-nextjs':
|
||||||
specifier: ^0.0.9
|
specifier: ^1.0.0
|
||||||
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)
|
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':
|
'@marsidev/react-turnstile':
|
||||||
specifier: ^0.5.4
|
specifier: ^0.5.4
|
||||||
version: 0.5.4(react-dom@18.2.0)(react@18.2.0)
|
version: 0.5.4(react-dom@18.2.0)(react@18.2.0)
|
||||||
@@ -645,8 +645,8 @@ importers:
|
|||||||
specifier: ^0.0.7
|
specifier: ^0.0.7
|
||||||
version: 0.0.7(@supabase/postgrest-js@1.15.0)(@supabase/supabase-js@2.42.0)
|
version: 0.0.7(@supabase/postgrest-js@1.15.0)(@supabase/supabase-js@2.42.0)
|
||||||
'@makerkit/data-loader-supabase-nextjs':
|
'@makerkit/data-loader-supabase-nextjs':
|
||||||
specifier: ^0.0.9
|
specifier: ^1.0.0
|
||||||
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)
|
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':
|
'@supabase/supabase-js':
|
||||||
specifier: ^2.42.0
|
specifier: ^2.42.0
|
||||||
version: 2.42.0
|
version: 2.42.0
|
||||||
@@ -2378,19 +2378,19 @@ packages:
|
|||||||
'@supabase/supabase-js': 2.42.0
|
'@supabase/supabase-js': 2.42.0
|
||||||
ts-case-convert: 2.0.7
|
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):
|
/@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-FNn0Z3zlV0W6+GVoWAkokMC4Mzx29lByCGbYBi9F11VBkmxuEH8i4KbYYbImW+r8uvs6sdth+cqjx6Jo+VuTCw==}
|
resolution: {integrity: sha512-+gma4JSLi7ChJ0fU5Q5CKqzTpzehEJuoAo8OSwuHIfYYtOggg3gYH6DcOYj4tiz8uCSgKNr9ORi0rnk1XfqMsQ==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
'@supabase/supabase-js': '>=2.0.0'
|
'@supabase/supabase-js': '>=2.0.0'
|
||||||
|
'@tanstack/react-query': '>=5.0.0'
|
||||||
next: '>=13.4.0'
|
next: '>=13.4.0'
|
||||||
react: '>=18.0.0'
|
react: '>=18.0.0'
|
||||||
swr: '>=2.0.0'
|
|
||||||
dependencies:
|
dependencies:
|
||||||
'@makerkit/data-loader-supabase-core': 0.0.7(@supabase/postgrest-js@1.15.0)(@supabase/supabase-js@2.42.0)
|
'@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
|
'@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)
|
next: 14.2.0(@opentelemetry/api@1.8.0)(react-dom@18.2.0)(react@18.2.0)
|
||||||
react: 18.2.0
|
react: 18.2.0
|
||||||
swr: 2.2.5(react@18.2.0)
|
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@supabase/postgrest-js'
|
- '@supabase/postgrest-js'
|
||||||
|
|
||||||
@@ -13105,15 +13105,6 @@ packages:
|
|||||||
upper-case: 1.1.3
|
upper-case: 1.1.3
|
||||||
dev: false
|
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:
|
/tabbable@6.2.0:
|
||||||
resolution: {integrity: sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==}
|
resolution: {integrity: sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==}
|
||||||
dev: false
|
dev: false
|
||||||
@@ -13687,6 +13678,7 @@ packages:
|
|||||||
react: ^16.8.0 || ^17.0.0 || ^18.0.0
|
react: ^16.8.0 || ^17.0.0 || ^18.0.0
|
||||||
dependencies:
|
dependencies:
|
||||||
react: 18.2.0
|
react: 18.2.0
|
||||||
|
dev: false
|
||||||
|
|
||||||
/util-deprecate@1.0.2:
|
/util-deprecate@1.0.2:
|
||||||
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
|
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
|
||||||
|
|||||||
Reference in New Issue
Block a user