Next.js Supabase V3 (#463)
Version 3 of the kit: - Radix UI replaced with Base UI (using the Shadcn UI patterns) - next-intl replaces react-i18next - enhanceAction deprecated; usage moved to next-safe-action - main layout now wrapped with [locale] path segment - Teams only mode - Layout updates - Zod v4 - Next.js 16.2 - Typescript 6 - All other dependencies updated - Removed deprecated Edge CSRF - Dynamic Github Action runner
This commit is contained in:
committed by
GitHub
parent
4912e402a3
commit
7ebff31475
@@ -36,13 +36,13 @@ export class TeamAccountsPageObject {
|
||||
}
|
||||
|
||||
getTeamFromSelector(teamName: string) {
|
||||
return this.page.locator(`[data-test="account-selector-team"]`, {
|
||||
return this.page.locator('[data-test="workspace-team-item"]', {
|
||||
hasText: teamName,
|
||||
});
|
||||
}
|
||||
|
||||
getTeams() {
|
||||
return this.page.locator('[data-test="account-selector-team"]');
|
||||
return this.page.locator('[data-test="workspace-team-item"]');
|
||||
}
|
||||
|
||||
goToSettings() {
|
||||
@@ -83,10 +83,11 @@ export class TeamAccountsPageObject {
|
||||
|
||||
openAccountsSelector() {
|
||||
return expect(async () => {
|
||||
await this.page.click('[data-test="account-selector-trigger"]');
|
||||
await this.page.click('[data-test="workspace-dropdown-trigger"]');
|
||||
await this.page.click('[data-test="workspace-switch-submenu"]');
|
||||
|
||||
return expect(
|
||||
this.page.locator('[data-test="account-selector-content"]'),
|
||||
this.page.locator('[data-test="workspace-switch-content"]'),
|
||||
).toBeVisible();
|
||||
}).toPass();
|
||||
}
|
||||
@@ -115,7 +116,7 @@ export class TeamAccountsPageObject {
|
||||
async createTeam({ teamName, slug } = this.createTeamName()) {
|
||||
await this.openAccountsSelector();
|
||||
|
||||
await this.page.click('[data-test="create-team-account-trigger"]');
|
||||
await this.page.click('[data-test="create-team-trigger"]');
|
||||
|
||||
await this.page.fill(
|
||||
'[data-test="create-team-form"] [data-test="team-name-input"]',
|
||||
@@ -140,14 +141,13 @@ export class TeamAccountsPageObject {
|
||||
await this.openAccountsSelector();
|
||||
await expect(this.getTeamFromSelector(teamName)).toBeVisible();
|
||||
|
||||
// Close the selector
|
||||
await this.page.keyboard.press('Escape');
|
||||
await this.closeAccountsSelector();
|
||||
}
|
||||
|
||||
async createTeamWithNonLatinName(teamName: string, slug: string) {
|
||||
await this.openAccountsSelector();
|
||||
|
||||
await this.page.click('[data-test="create-team-account-trigger"]');
|
||||
await this.page.click('[data-test="create-team-trigger"]');
|
||||
|
||||
await this.page.fill(
|
||||
'[data-test="create-team-form"] [data-test="team-name-input"]',
|
||||
@@ -177,8 +177,15 @@ export class TeamAccountsPageObject {
|
||||
await this.openAccountsSelector();
|
||||
await expect(this.getTeamFromSelector(teamName)).toBeVisible();
|
||||
|
||||
// Close the selector
|
||||
await this.page.keyboard.press('Escape');
|
||||
await this.closeAccountsSelector();
|
||||
}
|
||||
|
||||
async closeAccountsSelector() {
|
||||
await this.page.locator('body').click({ position: { x: 0, y: 0 } });
|
||||
|
||||
await expect(
|
||||
this.page.locator('[data-test="workspace-switch-content"]'),
|
||||
).toBeHidden();
|
||||
}
|
||||
|
||||
getSlugField() {
|
||||
@@ -207,11 +214,10 @@ export class TeamAccountsPageObject {
|
||||
}
|
||||
|
||||
async deleteAccount(email: string) {
|
||||
await this.page.click('[data-test="delete-team-trigger"]');
|
||||
await this.otp.completeOtpVerification(email);
|
||||
|
||||
await expect(async () => {
|
||||
await this.page.click('[data-test="delete-team-trigger"]');
|
||||
|
||||
await this.otp.completeOtpVerification(email);
|
||||
|
||||
const click = this.page.click(
|
||||
'[data-test="delete-team-form-confirm-button"]',
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user