Skip to content

Commit

Permalink
cypress fail test
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaJ2305 committed Jan 19, 2025
1 parent d22de89 commit efa1430
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions cypress/pageObject/Users/UserCreation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,20 @@ export class UserCreation {
}

fillUsername(username: string) {
cy.typeIntoField('[data-cy="username-input"]', username);
cy.get('[data-cy="username-input"]')
.should("exist")
.should("be.visible")
.clear()
.type(username, { force: true });
return this;
}

fillPassword(password: string) {
cy.typeIntoField('[data-cy="password-input"]', password);
cy.get('[data-cy="password-input"]')
.should("exist") // Ensure the field exists
.should("be.visible") // Ensure the field is visible
.clear() // Clear the field before typing
.type(password, { force: true }); // Type the password
return this;
}

Expand Down

0 comments on commit efa1430

Please sign in to comment.