From 43f479299af5b4e13a12665ae698d8d27931b176 Mon Sep 17 00:00:00 2001 From: zomars Date: Wed, 11 May 2022 20:21:16 -0600 Subject: [PATCH] Fixes delete-me test --- .../playwright/auth/delete-account.test.ts | 24 +++++++------------ 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/apps/web/playwright/auth/delete-account.test.ts b/apps/web/playwright/auth/delete-account.test.ts index 3ba706388d..2bc1bb7a8c 100644 --- a/apps/web/playwright/auth/delete-account.test.ts +++ b/apps/web/playwright/auth/delete-account.test.ts @@ -1,19 +1,13 @@ -import { expect, test } from "@playwright/test"; +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(); -test("Can delete user account", async ({ page }) => { - //FIXME: This test depends on seed. - // Login to account to delete - await page.goto(`/auth/login`); - // Click input[name="email"] - await page.click('input[name="email"]'); - // Fill input[name="email"] - await page.fill('input[name="email"]', `delete-me@example.com`); - // Press Tab - await page.press('input[name="email"]', "Tab"); - // Fill input[name="password"] - await page.fill('input[name="password"]', "delete-me"); - // Press Enter - await page.press('input[name="password"]', "Enter"); await page.waitForSelector("[data-testid=dashboard-shell]"); await page.goto(`/settings/profile`);