Skip to content

Commit

Permalink
Fix login test
Browse files Browse the repository at this point in the history
  • Loading branch information
kcze committed Dec 24, 2024
1 parent 1e5498c commit fa2951c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const PasswordInput = forwardRef<HTMLInputElement, InputProps>(
type={showPassword ? "text" : "password"}
className={cn("hide-password-toggle pr-10", className)}
ref={ref}
title="password"
{...props}
/>
<Button
Expand Down
8 changes: 4 additions & 4 deletions autogpt_platform/frontend/src/tests/pages/login.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ export class LoginPage {
console.log("Attempting login with:", { email, password }); // Debug log

// Fill email
const emailInput = this.page.getByPlaceholder("user@email.com");
const emailInput = this.page.getByPlaceholder("m@example.com");
await emailInput.waitFor({ state: "visible" });
await emailInput.fill(email);

// Fill password
const passwordInput = this.page.getByPlaceholder("password");
const passwordInput = this.page.getByTitle("Password");
await passwordInput.waitFor({ state: "visible" });
await passwordInput.fill(password);

Expand All @@ -22,12 +22,12 @@ export class LoginPage {
await termsCheckbox.click();

// TODO: This is a workaround to wait for the page to load after filling the email and password
const emailInput2 = this.page.getByPlaceholder("user@email.com");
const emailInput2 = this.page.getByPlaceholder("m@example.com");
await emailInput2.waitFor({ state: "visible" });
await emailInput2.fill(email);

// Fill password
const passwordInput2 = this.page.getByPlaceholder("password");
const passwordInput2 = this.page.getByTitle("Password");
await passwordInput2.waitFor({ state: "visible" });
await passwordInput2.fill(password);

Expand Down

0 comments on commit fa2951c

Please sign in to comment.