diff --git a/apps/e2e/playwright.config.ts b/apps/e2e/playwright.config.ts
index 504e978ce..1c8cdd282 100644
--- a/apps/e2e/playwright.config.ts
+++ b/apps/e2e/playwright.config.ts
@@ -15,8 +15,7 @@ export default defineConfig({
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
- /* Retry on CI only */
- retries: process.env.CI ? 2 : 0,
+ retries: process.env.CI ? 3 : 1,
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
diff --git a/apps/e2e/tests/account/account.po.ts b/apps/e2e/tests/account/account.po.ts
new file mode 100644
index 000000000..faa8589a5
--- /dev/null
+++ b/apps/e2e/tests/account/account.po.ts
@@ -0,0 +1,35 @@
+import { Page } from '@playwright/test';
+import { AuthPageObject } from '../authentication/auth.po';
+
+export class AccountPageObject {
+ private readonly page: Page;
+ public auth: AuthPageObject;
+
+ constructor(page: Page) {
+ this.page = page;
+ this.auth = new AuthPageObject(page);
+ }
+
+ async setup() {
+ return this.auth.signUpFlow('/home/settings');
+ }
+
+ async updateProfileName(name: string) {
+ await this.page.locator('[data-test="update-account-name-form"] input').fill(name);
+ await this.page.locator('[data-test="update-account-name-form"] button').click();
+ }
+
+ async updateProfileEmail(email: string) {
+ await this.page.locator('[data-test="account-email-form-email-input"]').fill(email);
+ await this.page.locator('[data-test="account-email-form-repeat-email-input"]').fill(email);
+ await this.page.locator('[data-test="account-email-form"] button').click();
+ }
+
+ getProfileName() {
+ return this.page.locator('[data-test="account-dropdown-display-name"]');
+ }
+
+ getProfileEmail() {
+ return this.page.locator('[data-test="account-dropdown-email"]');
+ }
+}
\ No newline at end of file
diff --git a/apps/e2e/tests/account/account.spec.ts b/apps/e2e/tests/account/account.spec.ts
new file mode 100644
index 000000000..1c06dc000
--- /dev/null
+++ b/apps/e2e/tests/account/account.spec.ts
@@ -0,0 +1,38 @@
+import { expect, Page, test } from '@playwright/test';
+import { AccountPageObject } from './account.po';
+
+test.describe('Account Settings', () => {
+ let page: Page;
+ let account: AccountPageObject;
+
+ test.beforeAll(async ({ browser }) => {
+ page = await browser.newPage();
+ account = new AccountPageObject(page);
+
+ await account.setup();
+ })
+
+ test('user can update their profile name', async () => {
+ const name = 'John Doe';
+
+ await account.updateProfileName(name);
+
+ await page.waitForResponse((resp) => {
+ return resp.url().includes('accounts');
+ });
+
+ await expect(account.getProfileName()).toHaveText(name);
+ });
+
+ test('user can update their email', async () => {
+ const email = account.auth.createRandomEmail();
+
+ await account.updateProfileEmail(email);
+
+ const req = await page.waitForResponse((resp) => {
+ return resp.url().includes('auth/v1/user');
+ });
+
+ expect(req.status()).toBe(200);
+ });
+});
\ No newline at end of file
diff --git a/apps/e2e/tests/authentication/auth.po.ts b/apps/e2e/tests/authentication/auth.po.ts
index 024fabb8a..da283969e 100644
--- a/apps/e2e/tests/authentication/auth.po.ts
+++ b/apps/e2e/tests/authentication/auth.po.ts
@@ -43,7 +43,7 @@ export class AuthPageObject {
async visitConfirmEmailLink(email: string) {
await this.page.waitForTimeout(300);
- return this.mailbox.visitMailbox(email);
+ await this.mailbox.visitMailbox(email);
}
createRandomEmail() {
@@ -51,4 +51,20 @@ export class AuthPageObject {
return `${value.toFixed(0)}@makerkit.dev`;
}
+
+ async signUpFlow(path: string) {
+ const email = this.createRandomEmail();
+
+ await this.page.goto(`/auth/sign-up?next=${path}`, {
+ waitUntil: 'networkidle',
+ });
+
+ await this.signUp({
+ email,
+ password: 'password',
+ repeatPassword: 'password',
+ });
+
+ await this.visitConfirmEmailLink(email);
+ }
}
\ No newline at end of file
diff --git a/apps/e2e/tests/utils/mailbox.ts b/apps/e2e/tests/utils/mailbox.ts
index 594fd02b9..32db5b687 100644
--- a/apps/e2e/tests/utils/mailbox.ts
+++ b/apps/e2e/tests/utils/mailbox.ts
@@ -18,6 +18,12 @@ export class Mailbox {
const json = await this.getInviteEmail(mailbox);
+ if (!json.body) {
+ console.log(json);
+
+ throw new Error('Email body was not found');
+ }
+
const html = (json.body as { html: string }).html;
const el = parse(html);
diff --git a/packages/features/accounts/src/components/personal-account-dropdown.tsx b/packages/features/accounts/src/components/personal-account-dropdown.tsx
index cab659cee..ec59020b4 100644
--- a/packages/features/accounts/src/components/personal-account-dropdown.tsx
+++ b/packages/features/accounts/src/components/personal-account-dropdown.tsx
@@ -88,9 +88,17 @@ export function PersonalAccountDropdown({
'fade-in animate-in flex w-full flex-col truncate text-left'
}
>
- {displayName}
+
+ {displayName}
+
-
+
{signedInAsLabel}
diff --git a/packages/features/accounts/src/components/personal-account-settings/account-settings-container.tsx b/packages/features/accounts/src/components/personal-account-settings/account-settings-container.tsx
index 63658a7f0..d0faabc3d 100644
--- a/packages/features/accounts/src/components/personal-account-settings/account-settings-container.tsx
+++ b/packages/features/accounts/src/components/personal-account-settings/account-settings-container.tsx
@@ -156,5 +156,9 @@ export function PersonalAccountSettingsContainer(
function useSupportMultiLanguage() {
const { i18n } = useTranslation();
- return i18n.options.supportedLngs && i18n.options.supportedLngs.length > 1;
+ const langs = (i18n.options.supportedLngs as string[]) ?? [];
+
+ const supportedLangs = langs.filter((lang) => lang !== 'cimode');
+
+ return supportedLangs.length > 1;
}
diff --git a/packages/features/accounts/src/components/personal-account-settings/email/update-email-form.tsx b/packages/features/accounts/src/components/personal-account-settings/email/update-email-form.tsx
index ceddac848..f4b7f11d1 100644
--- a/packages/features/accounts/src/components/personal-account-settings/email/update-email-form.tsx
+++ b/packages/features/accounts/src/components/personal-account-settings/email/update-email-form.tsx
@@ -3,6 +3,7 @@
import type { User } from '@supabase/supabase-js';
import { zodResolver } from '@hookform/resolvers/zod';
+import { CheckIcon } from '@radix-ui/react-icons';
import { useForm } from 'react-hook-form';
import { useTranslation } from 'react-i18next';
import { toast } from 'sonner';
@@ -74,11 +75,13 @@ export function UpdateEmailForm({