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(Truncate): replace chromatic visual test with playwright
mainframev authored and mvidalgarcia committed Feb 7, 2024
commit 4d81c7a3e204d5c43f78244a54be24f47d1f5ed7
34 changes: 34 additions & 0 deletions packages/orbit-components/src/Truncate/Truncate.ct-story.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import React from "react";

import Text from "../Text";
import Stack from "../Stack";
import Heading from "../Heading";

import Truncate from ".";

export default function TileStory() {
const content =
"Duis ante orci, molestie vitae vehicula venenatis, tincidunt ac pede. Duis bibendum, lectus ut viverra rhoncus, dolor nunc faucibus libero, eget facilisis enim ipsum id lacus. Nulla pulvinar eleifend sem. Sed ac dolor sit amet purus malesuada congue. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae. Pellentesque pretium lectus id turpis. Etiam dictum tincidunt diam.";

return (
<div className="space-y-sm">
<Truncate maxWidth="20%">
<Text>{content}</Text>
</Truncate>
<Stack direction="row">
<Truncate maxWidth="20%">
<Text>{content}</Text>
</Truncate>
<Truncate maxWidth="50%">
<Text>{content}</Text>
</Truncate>
<Truncate>
<Text>{content}</Text>
</Truncate>
</Stack>
<Truncate maxWidth="60%">
<Heading>This is a Heading component inside a Truncate</Heading>
</Truncate>
</div>
);
}
12 changes: 12 additions & 0 deletions packages/orbit-components/src/Truncate/Truncate.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 TruncateStory from "./Truncate.ct-story";

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

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.