test(ui): update ProvidersPage locators to use role-based queries

- Refactored input locators in ProvidersPage tests to utilize role-based queries for improved accessibility and consistency across the UI tests.
This commit is contained in:
StylusFrost
2025-10-21 11:35:29 +02:00
parent 5384d30fd5
commit a500339138
+6 -6
View File
@@ -95,8 +95,8 @@ export class ProvidersPage extends BasePage {
this.githubProviderRadio = page.getByRole("radio", { name: /GitHub/i });
// AWS provider form inputs
this.accountIdInput = page.getByLabel("Account ID");
this.aliasInput = page.getByLabel("Provider alias (optional)");
this.accountIdInput = page.getByRole("textbox", { name: "Account ID" });
this.aliasInput = page.getByRole("textbox", { name: "Provider alias (optional)" });
// Navigation buttons in the form (next and back)
this.nextButton = page
@@ -122,12 +122,12 @@ export class ProvidersPage extends BasePage {
});
// Inputs for IAM Role credentials
this.roleArnInput = page.getByLabel("Role ARN");
this.externalIdInput = page.getByLabel("External ID");
this.roleArnInput = page.getByRole("textbox", { name: "Role ARN" });
this.externalIdInput = page.getByRole("textbox", { name: "External ID" });
// Inputs for static credentials
this.accessKeyIdInput = page.getByLabel("Access Key ID");
this.secretAccessKeyInput = page.getByLabel("Secret Access Key");
this.accessKeyIdInput = page.getByRole("textbox", { name: "Access Key ID" });
this.secretAccessKeyInput = page.getByRole("textbox", { name: "Secret Access Key" });
// Delete button
this.deleteProviderConfirmationButton = page.locator(