Files
calendar/apps/web/playwright/auth/delete-account.e2e.ts
T
fc74b686b6 Hotfix/fix tests (#4494)
* Comment userv2Banner

* Fixed wipemycal test

* Fixed 'Delete my account' and WipeMyCal tests

* Fixed at least one test, need stripe for others.

* Disable embed tests for now

* Fixed console error due to illegal setState

* Hopefully fixed change-password functionality

* Partially implement new team flow

* Fix Change password test by setting a password with both capital and small letters

* recurring event text fix

* Fixed hash-my-url test

* Fixed event-types tests, done?

* fixing event type edit first event e2e

* Temp disable

Co-authored-by: Alan <alannnc@gmail.com>
Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
Co-authored-by: Leo Giovanetti <hello@leog.me>
2022-09-15 16:59:48 +00:00

24 lines
781 B
TypeScript

import { expect } from "@playwright/test";
import { test } from "../lib/fixtures";
test("Can delete user account", async ({ page, users }) => {
const user = await users.create({
username: "delete-me",
});
await user.login();
await page.waitForSelector("[data-testid=dashboard-shell]");
await page.goto(`/settings/profile`);
await page.click("[data-testid=delete-account]");
if (!user.username) throw Error(`Test user doesn't have a username`);
const $passwordField = page.locator("[data-testid=password]");
await $passwordField.fill(user.username);
await Promise.all([page.waitForNavigation({ url: "/auth/logout" }), page.click("text=Delete my account")]);
await expect(page.locator(`[id="modal-title"]`)).toHaveText("You've been logged out");
});