mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-23 12:31:54 +00:00
test(ui): update GitHub sign-in button locator in E2E tests
- Changed the locator for the GitHub sign-in button in the sign-up page tests to use the input type and value attributes for better accuracy. - This update enhances the reliability of the E2E tests by ensuring the correct element is targeted during the GitHub OAuth flow.
This commit is contained in:
@@ -172,7 +172,7 @@ export class SignUpPage extends BasePage {
|
||||
|
||||
async submitGithubLogin(): Promise<void> {
|
||||
// Click Github Sign in button
|
||||
await this.page.getByRole("button", { name: "Sign in" }).click();
|
||||
await this.page.locator('input[type="submit"][name="commit"][value="Sign in"]').click();
|
||||
}
|
||||
|
||||
async completeGithubOAuth(username: string, password: string): Promise<void> {
|
||||
@@ -194,7 +194,7 @@ export class SignUpPage extends BasePage {
|
||||
// Verify GitHub OAuth form elements are present
|
||||
await expect(this.page.getByRole("textbox", { name: /username or email/i })).toBeVisible();
|
||||
await expect(this.page.getByRole("textbox", { name: /password/i })).toBeVisible();
|
||||
await expect(this.page.getByRole("button", { name: "Sign in" })).toBeVisible();
|
||||
await expect(this.page.locator('input[type="submit"][name="commit"][value="Sign in"]')).toBeVisible();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user