feat(profile): account-deletion flow + terminal deleted screen
Profile gains a Delete-account control (durable accounts) opening a step-up dialog: a
mailed code for an email account, or the typed DELETE phrase for a platform-only one.
On success the app swaps to a terminal AccountDeleted screen ('Учётная запись удалена')
with a Close that closes the host Mini App (telegramClose / vkClose; web = no close).
Wires deleteRequest/deleteConfirm through client/transport/mock/codec; ru/en i18n;
codec wire test + Chromium/WebKit e2e.
This commit is contained in:
@@ -345,6 +345,20 @@ test('link then unlink Telegram from the sign-in methods', async ({ page }) => {
|
||||
await expect(page.getByRole('button', { name: 'Link Telegram' })).toBeVisible();
|
||||
});
|
||||
|
||||
test('account deletion: the mailed-code step-up leads to the terminal deleted screen', async ({ page }) => {
|
||||
await loginLobby(page);
|
||||
await openProfile(page);
|
||||
|
||||
// The mock profile holds an email, so deletion asks for the mailed code.
|
||||
await page.getByRole('button', { name: 'Delete account' }).click();
|
||||
await expect(page.getByText('Delete your account?')).toBeVisible();
|
||||
await page.getByRole('dialog').locator('.codein').fill('123456');
|
||||
await page.getByRole('dialog').getByRole('button', { name: 'Delete permanently' }).click();
|
||||
|
||||
// The app swaps to the terminal account-deleted screen.
|
||||
await expect(page.getByText('Account deleted')).toBeVisible();
|
||||
});
|
||||
|
||||
test('chat: one message per turn — the field shows, then a caption replaces it after sending', async ({ page }) => {
|
||||
await loginLobby(page);
|
||||
await page.getByRole('button', { name: /Ann/ }).click(); // g1: your turn
|
||||
|
||||
Reference in New Issue
Block a user