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:
StylusFrost
2025-10-15 16:12:57 +02:00
parent 73384ef326
commit cbe17b0fff
+2 -2
View File
@@ -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();
}
}