Skip to content

Commit

Permalink
Changed test to step through hidden element
Browse files Browse the repository at this point in the history
  • Loading branch information
josercarcamo committed Jan 18, 2025
1 parent a46227d commit da25db2
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,10 @@ describe("calcite-stepper", () => {
<calcite-stepper-item heading="Step 2" id="step-2" disabled>
<div>Step 2 content</div>
</calcite-stepper-item>
<calcite-stepper-item heading="Step 3" id="step-3">
<calcite-stepper-item heading="Step 3" id="step-3" hidden>
<div>Step 3 content</div>
</calcite-stepper-item>
<calcite-stepper-item heading="Step 4" id="step-4" hidden>
<calcite-stepper-item heading="Step 4" id="step-4">
<div>Step 4 content</div>
</calcite-stepper-item>
</calcite-stepper>`,
Expand All @@ -288,12 +288,12 @@ describe("calcite-stepper", () => {
await page.waitForChanges();
expect(step1).not.toHaveAttribute("selected");
expect(step2).not.toHaveAttribute("selected");
expect(step3).toHaveAttribute("selected");
expect(step4).not.toHaveAttribute("selected");
expect(step3).not.toHaveAttribute("selected");
expect(step4).toHaveAttribute("selected");
expect(await step1Content.isVisible()).toBe(false);
expect(await step2Content.isVisible()).toBe(false);
expect(await step3Content.isVisible()).toBe(true);
expect(await step4Content.isVisible()).toBe(false);
expect(await step3Content.isVisible()).toBe(false);
expect(await step4Content.isVisible()).toBe(true);
await element.callMethod("prevStep");
await page.waitForChanges();
expect(step1).toHaveAttribute("selected");
Expand Down

0 comments on commit da25db2

Please sign in to comment.