Skip to content

Commit

Permalink
test(Stepper): add visual test
Browse files Browse the repository at this point in the history
  • Loading branch information
mainframev committed Dec 1, 2023
1 parent 9411b3e commit 0fd1642
Show file tree
Hide file tree
Showing 50 changed files with 59 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/orbit-components/src/Stepper/Stepper.ct-story.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from "react";

import type { Props } from "./types";

import Stepper from ".";

export default function StepperStory(props: Props) {
return <Stepper {...props} />;
}
50 changes: 50 additions & 0 deletions packages/orbit-components/src/Stepper/Stepper.ct.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import * as React from "react";
import { test, expect } from "@playwright/experimental-ct-react";

import StepperStory from "./Stepper.ct-story";

test.describe("visual Stepper", () => {
test("default Stepper", async ({ mount }) => {
const component = await mount(
<StepperStory titleIncrement="increment" titleDecrement="decrement" />,
);

await expect(component).toHaveScreenshot();
});

test("Stepper disabled", async ({ mount }) => {
const component = await mount(
<StepperStory titleIncrement="increment" titleDecrement="decrement" disabled />,
);

await expect(component).toHaveScreenshot();
});

test("Stepper disabled increment", async ({ mount }) => {
const component = await mount(
<StepperStory
titleIncrement="increment"
titleDecrement="decrement"
maxValue={10}
defaultValue={10}
minValue={0}
/>,
);

await expect(component).toHaveScreenshot();
});

test("Stepper disabled decrement", async ({ mount }) => {
const component = await mount(
<StepperStory
titleIncrement="increment"
titleDecrement="decrement"
maxValue={10}
defaultValue={0}
minValue={0}
/>,
);

await expect(component).toHaveScreenshot();
});
});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0fd1642

Please sign in to comment.