mirror of
https://github.com/fastapi/full-stack-fastapi-template.git
synced 2026-11-03 12:29:42 +00:00
♻️ Serve frontend from FastAPI (#2393)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
588dfd46e5
commit
e80d92452e
@@ -56,13 +56,11 @@ test("User can reset password successfully using the link", async ({
|
||||
|
||||
const selector = 'a[href*="/reset-password?token="]'
|
||||
|
||||
let url = await page.getAttribute(selector, "href")
|
||||
|
||||
// TODO: update var instead of doing a replace
|
||||
url = url!.replace("http://localhost/", "http://localhost:5173/")
|
||||
const url = await page.getAttribute(selector, "href")
|
||||
const resetUrl = new URL(url!)
|
||||
|
||||
// Set the new password and confirm it
|
||||
await page.goto(url)
|
||||
await page.goto(`${resetUrl.pathname}${resetUrl.search}`)
|
||||
|
||||
await page.getByTestId("new-password-input").fill(newPassword)
|
||||
await page.getByTestId("confirm-password-input").fill(newPassword)
|
||||
@@ -110,11 +108,11 @@ test("Weak new password validation", async ({ page, request }) => {
|
||||
)
|
||||
|
||||
const selector = 'a[href*="/reset-password?token="]'
|
||||
let url = await page.getAttribute(selector, "href")
|
||||
url = url!.replace("http://localhost/", "http://localhost:5173/")
|
||||
const url = await page.getAttribute(selector, "href")
|
||||
const resetUrl = new URL(url!)
|
||||
|
||||
// Set a weak new password
|
||||
await page.goto(url)
|
||||
await page.goto(`${resetUrl.pathname}${resetUrl.search}`)
|
||||
await page.getByTestId("new-password-input").fill(weakPassword)
|
||||
await page.getByTestId("confirm-password-input").fill(weakPassword)
|
||||
await page.getByRole("button", { name: "Reset Password" }).click()
|
||||
|
||||
Reference in New Issue
Block a user