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

Feature/csf #1050

Merged
merged 30 commits into from
Nov 14, 2022
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
1f5a231
convertion of 3 tests to CSF
Oct 20, 2022
2ee7186
added missing dependencies to make the interaction testing run
Oct 24, 2022
1ee5036
converted alert trigger, asyncimage and autocomplete chroma
Oct 26, 2022
4703889
reworked stories to CSF
Oct 27, 2022
55410ef
L to M components CSF version
Oct 27, 2022
e08b450
added last doable tests
Oct 28, 2022
c550469
some tests were not converted by mistake
Oct 31, 2022
0cf2f68
fixed linting error
Oct 31, 2022
bf4eab2
added missing file
Oct 31, 2022
5788bec
removed unnecessary dependency / reworked tests syntax
Nov 1, 2022
068d5bc
fixed linting errors
Nov 2, 2022
8070de1
renamed some stories that were not named as before the conversion
Nov 2, 2022
bcbe75d
added await to userEvents
Nov 2, 2022
46a4952
added await on promises
Nov 4, 2022
26818a5
revert to user-event version pre story / removed await for type / tab…
Nov 10, 2022
7c52a81
indentation fix
Nov 10, 2022
c3914b9
merge master
Nov 10, 2022
0f58574
fix for new eslint config
Nov 10, 2022
e9c5634
removed unnecessary depedency
Nov 10, 2022
e18573a
moved story names next to their declarations
Nov 10, 2022
70e1566
reworked storyname position in certain tests
Nov 10, 2022
d57b061
removed last awaits on userEvents
Nov 10, 2022
bd47927
Replacement of the new property with a class selector
alexasselin008 Nov 10, 2022
b702758
change the way to get the last element
alexasselin008 Nov 10, 2022
2ffc6b8
move dependencies to main package.json
alexasselin008 Nov 10, 2022
50f39db
fix selector to not use lastchild
alexasselin008 Nov 10, 2022
92a1245
change to last child
alexasselin008 Nov 10, 2022
2498631
Merge branch 'master' into feature/csf
Nov 14, 2022
0e617f3
Merge branch 'feature/csf' of github.com:gsoft-inc/sg-orbit into feat…
Nov 14, 2022
4a73322
removed unnecessary chromaticPauseAnimationAtEnd
Nov 14, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@
"@storybook/addon-a11y": "6.5.13-alpha.0",
"@storybook/addon-essentials": "6.5.13-alpha.0",
"@storybook/react": "6.5.13-alpha.0 ",
"@storybook/testing-library": "0.0.13",
"@storybook/testing-react": "1.3.0",
"@svgr/core": "6.2.1",
"@svgr/webpack": "5.5.0",
"@testing-library/dom": "^8.18.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,32 @@ import { Alert, AlertTrigger } from "@components/alert";
import { Button } from "@components/button";
import { Content } from "@components/placeholders";
import { Heading } from "@components/typography";
import { storiesOfBuilder } from "@stories/utils";

function stories(segment) {
return storiesOfBuilder(module, "Chromatic/AlertTrigger")
.segment(segment)
.build();
}
export default {
title: "Chromatic/AlertTrigger",
component: AlertTrigger
};

stories()
.add("default", () =>
<AlertTrigger>
<Button variant="secondary">Open</Button>
<Alert primaryButtonLabel="Yes">
<Heading>Launch</Heading>
<Content>Are you sure you want to launch the space shuttle?</Content>
</Alert>
</AlertTrigger>
)
.add("default open", () =>
<AlertTrigger defaultOpen>
<Button variant="secondary">Open</Button>
<Alert primaryButtonLabel="Yes">
<Heading>Launch</Heading>
<Content>Are you sure you want to launch the space shuttle?</Content>
</Alert>
</AlertTrigger>
);
export const Default = () => (
<AlertTrigger>
<Button variant="secondary">Open</Button>
<Alert primaryButtonLabel="Yes">
<Heading>Launch</Heading>
<Content>Are you sure you want to launch the space shuttle?</Content>
</Alert>
</AlertTrigger>
);

Default.storyName = "default";

export const DefaultOpen = () => (
<AlertTrigger defaultOpen>
<Button variant="secondary">Open</Button>
<Alert primaryButtonLabel="Yes">
<Heading>Launch</Heading>
<Content>Are you sure you want to launch the space shuttle?</Content>
</Alert>
</AlertTrigger>
);

DefaultOpen.storyName = "default open";