Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue/5154 Accessibility compliance #5745

Closed
wants to merge 13 commits into from
6 changes: 6 additions & 0 deletions changelogs/unreleased/5154-axe-compliance-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
description: "Automate axe compliance testing."
issue-nr: 5154
change-type: patch
destination-branches: [master, iso7]
sections:
minor-improvement: "{{description}}"
72 changes: 36 additions & 36 deletions cypress/e2e/scenario-1-environment.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,31 +317,31 @@ describe("Environment", () => {
'[aria-label="EnumInput-agent_trigger_method_on_auto_deployFilterInput"]',
).click();
cy.get('[role="option"]').contains("push_full_deploy").click();
cy.get('[aria-label="Warning"]').should("exist");
cy.get('[data-testid="Warning"]').should("exist");
cy.get('[aria-label="Row-agent_trigger_method_on_auto_deploy"]')
.find('[aria-label="SaveAction"]')
.click();
cy.get('[aria-label="Warning"]').should("not.exist");
cy.get('[data-testid="Warning"]').should("not.exist");
cy.get(
'[aria-label="EnumInput-agent_trigger_method_on_auto_deployFilterInput"]',
).should("have.value", "push_full_deploy");

//Change auto_deploy
cy.get('[aria-label="Row-auto_deploy"]').find(".pf-v5-c-switch").click();
cy.get('[aria-label="Warning"]').should("exist");
cy.get('[data-testid="Warning"]').should("exist");
cy.get('[aria-label="Row-auto_deploy"]')
.find('[aria-label="SaveAction"]')
.click();
cy.get('[aria-label="Warning"]').should("not.exist");
cy.get('[data-testid="Warning"]').should("not.exist");

//Change auto_full_compile
cy.get('[aria-label="Row-auto_full_compile"]').clear();
cy.get('[aria-label="Row-auto_full_compile"]').type("1 2 3 4 5");
cy.get('[aria-label="Warning"]').should("exist");
cy.get('[data-testid="Warning"]').should("exist");
cy.get('[aria-label="Row-auto_full_compile"]')
.find('[aria-label="SaveAction"]')
.click();
cy.get('[aria-label="Warning"]').should("not.exist");
cy.get('[data-testid="Warning"]').should("not.exist");
cy.get('[aria-label="Row-auto_full_compile"]')
.find(".pf-v5-c-form-control input")
.should("have.value", "1 2 3 4 5");
Expand All @@ -350,11 +350,11 @@ describe("Environment", () => {
cy.get('[aria-label="Row-autostart_agent_deploy_interval"]')
.find(".pf-v5-c-form-control")
.type("{selectAll}610");
cy.get('[aria-label="Warning"]').should("exist");
cy.get('[data-testid="Warning"]').should("exist");
cy.get('[aria-label="Row-autostart_agent_deploy_interval"]')
.find('[aria-label="SaveAction"]')
.click();
cy.get('[aria-label="Warning"]').should("not.exist");
cy.get('[data-testid="Warning"]').should("not.exist");
cy.get('[aria-label="Row-autostart_agent_deploy_interval"]')
.find(".pf-v5-c-form-control input")
.should("have.value", "610");
Expand All @@ -363,11 +363,11 @@ describe("Environment", () => {
cy.get('[aria-label="Row-autostart_agent_deploy_splay_time"]')
.find(".pf-v5-c-form-control")
.type("{selectAll}20");
cy.get('[aria-label="Warning"]').should("exist");
cy.get('[data-testid="Warning"]').should("exist");
cy.get('[aria-label="Row-autostart_agent_deploy_splay_time"]')
.find('[aria-label="SaveAction"]')
.click();
cy.get('[aria-label="Warning"]').should("not.exist");
cy.get('[data-testid="Warning"]').should("not.exist");
cy.get('[aria-label="Row-autostart_agent_deploy_splay_time"]')
.find(".pf-v5-c-form-control input")
.should("have.value", "20");
Expand All @@ -379,11 +379,11 @@ describe("Environment", () => {
return $el.value === "local:";
})
.type("{selectAll}{backspace}new value");
cy.get('[aria-label="Warning"]').should("exist");
cy.get('[data-testid="Warning"]').should("exist");
cy.get('[aria-label="Row-autostart_agent_map"]')
.find('[aria-label="SaveAction"]')
.click();
cy.get('[aria-label="Warning"]').should("not.exist");
cy.get('[data-testid="Warning"]').should("not.exist");
cy.get('[aria-label="Row-autostart_agent_map"]')
.find('[aria-label="editEntryValue"]')
.should("have.value", "new value");
Expand All @@ -392,11 +392,11 @@ describe("Environment", () => {
cy.get('[aria-label="Row-autostart_agent_repair_interval"]')
.find(".pf-v5-c-form-control")
.type("{selectAll}86410");
cy.get('[aria-label="Warning"]').should("exist");
cy.get('[data-testid="Warning"]').should("exist");
cy.get('[aria-label="Row-autostart_agent_repair_interval"]')
.find('[aria-label="SaveAction"]')
.click();
cy.get('[aria-label="Warning"]').should("not.exist");
cy.get('[data-testid="Warning"]').should("not.exist");
cy.get('[aria-label="Row-autostart_agent_repair_interval"]')
.find(".pf-v5-c-form-control input")
.should("have.value", "86410");
Expand All @@ -405,11 +405,11 @@ describe("Environment", () => {
cy.get('[aria-label="Row-autostart_agent_repair_splay_time"]')
.find(".pf-v5-c-form-control")
.type("{selectAll}610");
cy.get('[aria-label="Warning"]').should("exist");
cy.get('[data-testid="Warning"]').should("exist");
cy.get('[aria-label="Row-autostart_agent_repair_splay_time"]')
.find('[aria-label="SaveAction"]')
.click();
cy.get('[aria-label="Warning"]').should("not.exist");
cy.get('[data-testid="Warning"]').should("not.exist");
cy.get('[aria-label="Row-autostart_agent_repair_splay_time"]')
.find(".pf-v5-c-form-control input")
.should("have.value", "610");
Expand All @@ -418,21 +418,21 @@ describe("Environment", () => {
cy.get('[aria-label="Row-autostart_on_start"]')
.find(".pf-v5-c-switch")
.click();
cy.get('[aria-label="Warning"]').should("exist");
cy.get('[data-testid="Warning"]').should("exist");
cy.get('[aria-label="Row-autostart_on_start"]')
.find('[aria-label="SaveAction"]')
.click();
cy.get('[aria-label="Warning"]').should("not.exist");
cy.get('[data-testid="Warning"]').should("not.exist");

//Change available_versions_to_keep
cy.get('[aria-label="Row-available_versions_to_keep"]')
.find(".pf-v5-c-form-control")
.type("{selectAll}110");
cy.get('[aria-label="Warning"]').should("exist");
cy.get('[data-testid="Warning"]').should("exist");
cy.get('[aria-label="Row-available_versions_to_keep"]')
.find('[aria-label="SaveAction"]')
.click();
cy.get('[aria-label="Warning"]').should("not.exist");
cy.get('[data-testid="Warning"]').should("not.exist");
cy.get('[aria-label="Row-available_versions_to_keep"]')
.find(".pf-v5-c-form-control input")
.should("have.value", "110");
Expand All @@ -442,11 +442,11 @@ describe("Environment", () => {
'[aria-label="EnumInput-environment_agent_trigger_methodFilterInput"]',
).click();
cy.get('[role="option"]').contains("push_full_deploy").click();
cy.get('[aria-label="Warning"]').should("exist");
cy.get('[data-testid="Warning"]').should("exist");
cy.get('[aria-label="Row-environment_agent_trigger_method"]')
.find('[aria-label="SaveAction"]')
.click();
cy.get('[aria-label="Warning"]').should("not.exist");
cy.get('[data-testid="Warning"]').should("not.exist");
cy.get(
'[aria-label="EnumInput-environment_agent_trigger_methodFilterInput"]',
).should("have.value", "push_full_deploy");
Expand All @@ -458,22 +458,22 @@ describe("Environment", () => {
.find(".pf-v5-c-switch")
.click();

cy.get('[aria-label="Warning"]').should("exist");
cy.get('[data-testid="Warning"]').should("exist");
cy.get('[aria-label="Row-lsm_partial_compile"]')
.find('[aria-label="SaveAction"]')
.click();
cy.get('[aria-label="Warning"]').should("not.exist");
cy.get('[data-testid="Warning"]').should("not.exist");
}

//change notification_retention
cy.get('[aria-label="Row-notification_retention"]')
.find(".pf-v5-c-form-control")
.type("{selectAll}375");
cy.get('[aria-label="Warning"]').should("exist");
cy.get('[data-testid="Warning"]').should("exist");
cy.get('[aria-label="Row-notification_retention"]')
.find('[aria-label="SaveAction"]')
.click();
cy.get('[aria-label="Warning"]').should("not.exist");
cy.get('[data-testid="Warning"]').should("not.exist");
cy.get('[aria-label="Row-notification_retention"]')
.find(".pf-v5-c-form-control input")
.should("have.value", "375");
Expand All @@ -482,52 +482,52 @@ describe("Environment", () => {
cy.get('[aria-label="Row-protected_environment"]')
.find(".pf-v5-c-switch")
.click();
cy.get('[aria-label="Warning"]').should("exist");
cy.get('[data-testid="Warning"]').should("exist");
cy.get('[aria-label="Row-protected_environment"]')
.find('[aria-label="SaveAction"]')
.click();
cy.get('[aria-label="Warning"]').should("not.exist");
cy.get('[data-testid="Warning"]').should("not.exist");

//Change push_on_auto_deploy
cy.get('[aria-label="Row-push_on_auto_deploy"]')
.find(".pf-v5-c-switch")
.click();
cy.get('[aria-label="Warning"]').should("exist");
cy.get('[data-testid="Warning"]').should("exist");
cy.get('[aria-label="Row-push_on_auto_deploy"]')
.find('[aria-label="SaveAction"]')
.click();
cy.get('[aria-label="Warning"]').should("not.exist");
cy.get('[data-testid="Warning"]').should("not.exist");

//Change resource_action_logs_retention
cy.get('[aria-label="Row-resource_action_logs_retention"]')
.find(".pf-v5-c-form-control")
.type("{selectAll}8");
cy.get('[aria-label="Warning"]').should("exist");
cy.get('[data-testid="Warning"]').should("exist");
cy.get('[aria-label="Row-resource_action_logs_retention"]')
.find('[aria-label="SaveAction"]')
.click();
cy.get('[aria-label="Warning"]').should("not.exist");
cy.get('[data-testid="Warning"]').should("not.exist");
cy.get('[aria-label="Row-resource_action_logs_retention"]')
.find(".pf-v5-c-form-control input")
.should("have.value", "8");

//change server_compile
cy.get('[aria-label="Row-server_compile"]').find(".pf-v5-c-switch").click();
cy.get('[aria-label="Warning"]').should("exist");
cy.get('[data-testid="Warning"]').should("exist");
cy.get('[aria-label="Row-server_compile"]')
.find('[aria-label="SaveAction"]')
.click();
cy.get('[aria-label="Warning"]').should("not.exist");
cy.get('[data-testid="Warning"]').should("not.exist");

//re-enable to delete env
cy.get('[aria-label="Row-protected_environment"]')
.find(".pf-v5-c-switch")
.click();
cy.get('[aria-label="Warning"]').should("exist");
cy.get('[data-testid="Warning"]').should("exist");
cy.get('[aria-label="Row-protected_environment"]')
.find('[aria-label="SaveAction"]')
.click();
cy.get('[aria-label="Warning"]').should("not.exist");
cy.get('[data-testid="Warning"]').should("not.exist");

cy.get(".pf-v5-c-tabs__list")
.find("button")
Expand Down
8 changes: 4 additions & 4 deletions cypress/e2e/scenario-2.4-expert-mode.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ if (Cypress.env("edition") === "iso") {
cy.get('[aria-label="Row-enable_lsm_expert_mode"]')
.find(".pf-v5-c-switch")
.click();
cy.get('[aria-label="Warning"]').should("exist");
cy.get('[data-testid="Warning"]').should("exist");
cy.get('[aria-label="Row-enable_lsm_expert_mode"]')
.find('[aria-label="SaveAction"]')
.click();
cy.get('[aria-label="Warning"]').should("not.exist");
cy.get('[data-testid="Warning"]').should("not.exist");
cy.get("[id='expert-mode-banner']")
.should("exist")
.and("contain", "LSM expert mode is enabled, proceed with caution.");
Expand Down Expand Up @@ -353,11 +353,11 @@ if (Cypress.env("edition") === "iso") {
cy.get('[aria-label="Row-enable_lsm_expert_mode"]')
.find(".pf-v5-c-switch")
.click();
cy.get('[aria-label="Warning"]').should("exist");
cy.get('[data-testid="Warning"]').should("exist");
cy.get('[aria-label="Row-enable_lsm_expert_mode"]')
.find('[aria-label="SaveAction"]')
.click();
cy.get('[aria-label="Warning"]').should("not.exist");
cy.get('[data-testid="Warning"]').should("not.exist");
cy.get("[id='expert-mode-banner']").should("not.exist");
});
});
Expand Down
44 changes: 22 additions & 22 deletions cypress/e2e/scenario-4-desired-state.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ describe("Scenario 4 Desired State", () => {
} else {
cy.get('[aria-label="DesiredStatesView-Success"]', { timeout: 60000 })
.find("tbody", { timeout: 60000 })
.should("have.length", 2);
.should("have.length", 3);
cy.get("tbody")
.eq(0)
.should("contain", "lsm_export")
Expand Down Expand Up @@ -198,7 +198,7 @@ describe("Scenario 4 Desired State", () => {
cy.get(".pf-v5-c-description-list__group")
.eq(1)
.find(".pf-v5-c-description-list__description")
.should("have.text", "3");
.should("have.text", "4");

cy.get(".pf-v5-c-description-list__group")
.eq(2)
Expand Down Expand Up @@ -313,7 +313,7 @@ describe("Scenario 4 Desired State", () => {

// the first element in the table shouldn't be available to promote, since it is already active.
cy.get("tbody").eq(0).find('[aria-label="actions-toggle"]').click();
cy.get('[aria-label="promote"]').find("button").should("be.disabled");
cy.get('[data-testid="promote"]').find("button").should("be.disabled");
});

// Update the settings to disable the auto-deploy setting.
Expand Down Expand Up @@ -400,14 +400,14 @@ describe("Scenario 4 Desired State", () => {
);
cy.get('[aria-label="DiffItemList"]').within(() => {
if (isIso) {
cy.get("#toggle-button").eq(0).click();
cy.get("#toggle-button").eq(1).click();
cy.get('[aria-label="Details"]').eq(0).click();
cy.get('[aria-label="Details"]').eq(1).click();
} else {
cy.get("#toggle-button").eq(0).click();
cy.get("#toggle-button").eq(1).click();
cy.get("#toggle-button").eq(2).click();
cy.get("#toggle-button").eq(3).click();
cy.get("#toggle-button").eq(4).click();
cy.get('[aria-label="Details"]').eq(0).click();
cy.get('[aria-label="Details"]').eq(1).click();
cy.get('[aria-label="Details"]').eq(2).click();
cy.get('[aria-label="Details"]').eq(3).click();
cy.get('[aria-label="Details"]').eq(4).click();
}
});

Expand Down Expand Up @@ -469,14 +469,14 @@ describe("Scenario 4 Desired State", () => {
);
cy.get('[aria-label="DiffItemList"]').within(() => {
if (isIso) {
cy.get("#toggle-button").eq(0).click();
cy.get("#toggle-button").eq(1).click();
cy.get('[aria-label="Details"]').eq(0).click();
cy.get('[aria-label="Details"]').eq(1).click();
} else {
cy.get("#toggle-button").eq(0).click();
cy.get("#toggle-button").eq(1).click();
cy.get("#toggle-button").eq(2).click();
cy.get("#toggle-button").eq(3).click();
cy.get("#toggle-button").eq(4).click();
cy.get('[aria-label="Details"]').eq(0).click();
cy.get('[aria-label="Details"]').eq(1).click();
cy.get('[aria-label="Details"]').eq(2).click();
cy.get('[aria-label="Details"]').eq(3).click();
cy.get('[aria-label="Details"]').eq(4).click();
}
});

Expand Down Expand Up @@ -538,13 +538,13 @@ describe("Scenario 4 Desired State", () => {
cy.get('[aria-label="StatusFilter"]').click();

cy.get('[aria-label="DiffItemList"]').within(() => {
cy.get("#toggle-button").eq(0).click();
cy.get("#toggle-button").eq(1).click();
cy.get('[aria-label="Details"]').eq(0).click();
cy.get('[aria-label="Details"]').eq(1).click();

if (!isIso) {
cy.get("#toggle-button").eq(2).click();
cy.get("#toggle-button").eq(3).click();
cy.get("#toggle-button").eq(4).click();
cy.get('[aria-label="Details"]').eq(2).click();
cy.get('[aria-label="Details"]').eq(3).click();
cy.get('[aria-label="Details"]').eq(4).click();
}
});
// expect the view to still contain the diff of the last dry-run comparison
Expand Down
Loading
Loading