Skip to content

Commit

Permalink
test(Drawer): replace chromatic visual test with playwright
Browse files Browse the repository at this point in the history
  • Loading branch information
mainframev authored and mvidalgarcia committed Feb 7, 2024
1 parent 9de4999 commit 160c53d
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/orbit-components/src/Drawer/Drawer.ct-story.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React from "react";

import Button from "../Button";

import Drawer from ".";

export default function DrawerVisualStory() {
return (
<Drawer title="Drawer" onClose={() => {}} shown actions={<Button>Button</Button>}>
Stuffs
</Drawer>
);
}
12 changes: 12 additions & 0 deletions packages/orbit-components/src/Drawer/Drawer.ct.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import * as React from "react";
import { test, expect } from "@playwright/experimental-ct-react";

import DrawerStory from "./Drawer.ct-story";

test.describe("visual Drawer", () => {
test("Drawer", async ({ mount }) => {
const component = await mount(<DrawerStory />);

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.

0 comments on commit 160c53d

Please sign in to comment.