Skip to content

Commit 027216f

Browse files
authored
chore: restructure storybook folders (#1092)
* chore: restructure storybook folders * update snapshots
1 parent d6f96a2 commit 027216f

494 files changed

Lines changed: 386 additions & 202 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/component-library/.storybook/manager.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@ import { darkTheme, lightTheme } from "./shopwareTheme";
33

44
addons.setConfig({
55
theme: darkTheme,
6+
sidebar: {
7+
collapsedRoots: ["composables", "directives"],
8+
},
69
});

packages/component-library/.storybook/preview.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ setup((app) => {
3636

3737
const preview: Preview = {
3838
parameters: {
39+
options: {
40+
storySort: {
41+
method: "alphabetical",
42+
},
43+
},
3944
controls: {
4045
matchers: {
4146
color: /(background|color)$/i,

packages/component-library/.storybook/test-runner.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,24 @@ export default {
1414

1515
// use bigger viewport for data-table and toasts
1616
if (
17-
context.id.startsWith("interaction-tests-table-and-list") ||
18-
context.id.startsWith("interaction-tests-entity-mt-entity-data-table") ||
19-
context.id.startsWith("interaction-tests-feedback-indicator-mt-toast")
17+
context.id.startsWith("components-mt-data-table-interaction-tests") ||
18+
context.id.startsWith("components-mt-entity-data-table-interaction-tests") ||
19+
context.id.startsWith("components-mt-toast-interaction-tests")
2020
) {
2121
await page.setViewportSize({ width: 1600, height: 900 });
2222
}
2323

2424
// use smaller viewport to test wrapping of multi select
2525
if (
2626
context.id ===
27-
"interaction-tests-form-mt-select--visual-test-ensure-correct-multi-selection-wrapping"
27+
"components-mt-select-interaction-tests--visual-test-ensure-correct-multi-selection-wrapping"
2828
) {
2929
await page.setViewportSize({ width: 500, height: 650 });
3030
}
3131
},
3232
async postRender(page, context) {
3333
// Render screenshots only for interaction tests with Visual Test name
34-
if (!context.id.startsWith("interaction-tests") || !context.name.startsWith("Visual Test")) {
34+
if (!context.id.includes("-interaction-tests--") || !context.name.startsWith("Visual Test")) {
3535
return;
3636
}
3737

31 KB
4.3 KB
15.1 KB
21.5 KB
15.5 KB

0 commit comments

Comments
 (0)