Skip to content

Commit

Permalink
fix(ui5-wizard): disabled steps are no longer clickable (#9459)
Browse files Browse the repository at this point in the history
* fix(ui5-wizard): disabled step is no longer clickable

* fix(ui5-wizard): disabled step is no longer clickable

* fix(ui5-wizard): disabled step is no longer clickable
  • Loading branch information
ivoplashkov authored Jul 16, 2024
1 parent 02059bc commit 2ea26ca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/fiori/src/Wizard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ class Wizard extends UI5Element {
}

get enabledStepsInHeaderDOM() {
return this.stepsInHeaderDOM;
return this.stepsInHeaderDOM.filter(step => !step.disabled);
}

get navAriaRoleDescription() {
Expand Down
7 changes: 7 additions & 0 deletions packages/fiori/test/specs/Wizard.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ describe("Wizard general interaction", () => {
"Step has aria-label set to the number of the step and its title.");
});

it("Disabled step should not be interactive", async () => {
const wiz = await browser.$("#wizTest");
const disabledStep = await wiz.shadow$(`[data-ui5-index="2"]`);

assert.notOk(await disabledStep.isClickable(), "Disabled step should not be clickable");
});

it("move to next step by API", async () => {
const wiz = await browser.$("#wizTest");
const btnToStep2 = await browser.$("#toStep2");
Expand Down

0 comments on commit 2ea26ca

Please sign in to comment.