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

chore: replace chromatic visual test with playwright #4232

Merged
merged 34 commits into from
Feb 7, 2024
Merged
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
dae185b
test(Accordion): replace chromatic test with playwright
mainframev Jan 16, 2024
e31feda
test(AirportIllustration): replace chromatic visual test with playwright
mvidalgarcia Feb 5, 2024
c201071
test(Badge): replace chromatic visual tests with playwright
mainframev Jan 16, 2024
fc4181e
test(BadgeList): replace chromatic visual test with playwright
mainframev Jan 16, 2024
49b4a4d
test(BaggageStepper): replace chromatic visual test with playwright
mainframev Jan 16, 2024
2dc1e18
test(Breadcrumbs): replace chromatic visual test with playwright
mainframev Jan 16, 2024
1abd2e0
test(Button): replace chromatic visual test with playwright
mainframev Jan 16, 2024
4f21b10
test(ButtonGroup): replace chromatic visual test with playwright
mainframev Jan 18, 2024
62aee31
test(ButtonLink): replace chromatic visual test with playwright
mainframev Jan 18, 2024
752ee4b
test(ButtonMobileStore): replace chromatic visual test with playwright
mainframev Jan 18, 2024
1121ac7
test(CallOutBanner): replace chromatic visual test with playwright
mainframev Jan 18, 2024
c232b43
test(Card): replace chromatic visual test with playwright
mainframev Jan 18, 2024
ca8aae6
test(CarrierLogo): replace chromatic visual test with playwright
mainframev Jan 18, 2024
2e7554c
test(Checkbox): replace chromatic visual test with playwright
mainframev Jan 18, 2024
b34ade4
test(ChoiceGroup): replace chromatic visual test with playwright
mainframev Jan 18, 2024
ef52d91
test(Collapse): replace chromatic visual test with playwright
mainframev Jan 18, 2024
1ea5003
test(Coupon): replace chromatic visual test with playwright
mainframev Jan 18, 2024
9de4999
test(Dialog): replace chromatic visual test with playwright
mainframev Jan 18, 2024
160c53d
test(Drawer): replace chromatic visual test with playwright
mainframev Jan 18, 2024
d7949da
test(FeatureIcon): replace chromatic visual test with playwright
mainframev Jan 18, 2024
6a2b767
test(Heading): replace chromatic visual test with playwright
mainframev Jan 18, 2024
67b1895
test(HorizontalScroll): replace chromatic visual test with playwright
mainframev Jan 18, 2024
c2f1e09
test(Illustration): replace chromatic visual test with playwright
mvidalgarcia Feb 7, 2024
4624b5a
test(ListChoice): replace chromatic visual test with playwright
mainframev Jan 18, 2024
1b8988c
test(Modal): replace chromatic visual test with playwright
mainframev Jan 18, 2024
5b97b8e
test(NotificationBadge): replace chromatic visual test with playwright
mainframev Jan 18, 2024
a868612
test(Separator): replace chromatic visual test with playwright
mainframev Jan 18, 2024
9decc91
test(Skeleton): replace chromatic visual test with playwright
mainframev Jan 18, 2024
e25fd98
test(Tile): replace chromatic visual test with playwright
mainframev Jan 18, 2024
6d1b18c
test(TileGroup): replace chromatic visual test with playwright
mainframev Jan 18, 2024
4d81c7a
test(Truncate): replace chromatic visual test with playwright
mainframev Jan 18, 2024
8b47126
test(Tag): replace chromatic visual test with playwright
mainframev Jan 26, 2024
0860d17
chore: remove pkg script leftover
mvidalgarcia Feb 2, 2024
89b6903
test: add linux screenshots
mainframev Jan 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test(Card): replace chromatic visual test with playwright
mainframev authored and mvidalgarcia committed Feb 7, 2024
commit c232b43febbb773b0a54a17f603c16b02f1d33dc
61 changes: 61 additions & 0 deletions packages/orbit-components/src/Card/Card.ct-story.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import React from "react";

import ButtonLink from "../ButtonLink";
import Text from "../Text";

import Card, { CardSection } from ".";

export default function CardVisualStory() {
return (
<div className="space-y-xs bg-ink-light flex flex-col">
<Card title="Somebody once" />
<Card title="Somebody once" description="Told me the world is gonna roll me" />
<Card
title="Somebody once"
description="Told me the world is gonna roll me"
actions={
<ButtonLink compact size="small">
Sharpest tool
</ButtonLink>
}
/>
<Card title="Somebody once" description="Told me the world is gonna roll me">
<CardSection title="I ain't">
<Text>The sharpest tool in the shed</Text>
</CardSection>
</Card>
<Card title="Somebody once" description="Told me the world is gonna roll me">
<CardSection title="I ain't" expandable>
<Text>The sharpest tool in the shed</Text>
</CardSection>
</Card>
<Card title="Somebody once" description="Told me the world is gonna roll me">
<CardSection title="I ain't" expandable initialExpanded>
<Text>The sharpest tool in the shed</Text>
</CardSection>
</Card>
<Card title="Somebody once" description="Told me the world is gonna roll me">
<CardSection title="I ain't">
<Text>The sharpest tool in the shed</Text>
</CardSection>
<CardSection title="I ain't" expandable>
The sharpest tool in the shed
</CardSection>
<CardSection title="I ain't" expandable initialExpanded>
The sharpest tool in the shed
</CardSection>
<CardSection
expandable
title="I ain't"
actions={
<ButtonLink compact size="small">
All star
</ButtonLink>
}
>
<Text>The sharpest tool in the shed</Text>
</CardSection>
</Card>
</div>
);
}
12 changes: 12 additions & 0 deletions packages/orbit-components/src/Card/Card.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 CardStory from "./Card.ct-story";

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

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.