Skip to content

Commit

Permalink
Merge pull request #25916 from storybookjs/jeppe/enable-preset-server…
Browse files Browse the repository at this point in the history
…-tests

Tests: Re-enable tests for presets/server-webpack
  • Loading branch information
ndelangen authored Feb 6, 2024
2 parents 6b09633 + 41d17bd commit ae48497
Show file tree
Hide file tree
Showing 13 changed files with 108 additions and 142 deletions.
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`json-to-csf-compiler a11y.json 1`] = `
"
export default {
title: \\"Addons/a11y\\",
title: "Addons/a11y",
parameters: {
options: {
selectedPanel: \\"storybook/a11y/panel\\"
selectedPanel: "storybook/a11y/panel"
}
}
};

export const Label = {
name: \\"Label\\",
name: "Label",
parameters: {
server: {
id: \\"addons/a11y/label\\"
id: "addons/a11y/label"
}
}
};
"
`;
Original file line number Diff line number Diff line change
@@ -1,30 +1,25 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`json-to-csf-compiler actions.json 1`] = `
"
export default {
title: \\"Addons/Actions\\",
title: "Addons/Actions",
parameters: {
options: {
selectedPanel: \\"storybook/actions/panel\\"
selectedPanel: "storybook/actions/panel"
}
}
};

export const Multiple_actions_config = {
name: \\"Multiple actions + config\\",
name: "Multiple actions + config",
parameters: {
actions: [
\\"click\\",
\\"contextmenu\\",
"click",
"contextmenu",
{
clearOnStoryChange: false
}
],
server: {
id: \\"addons/actions/story3\\"
id: "addons/actions/story3"
}
}
};
"
`;
Original file line number Diff line number Diff line change
@@ -1,31 +1,26 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`json-to-csf-compiler backgrounds.json 1`] = `
"
export default {
title: \\"Addons/Backgrounds\\",
title: "Addons/Backgrounds",
parameters: {
backgrounds: [
{
name: \\"light\\",
value: \\"#eeeeee\\"
name: "light",
value: "#eeeeee"
},
{
name: \\"dark\\",
value: \\"#222222\\",
name: "dark",
value: "#222222",
default: true
}
]
}
};

export const Story_1 = {
name: \\"Story 1\\",
name: "Story 1",
parameters: {
server: {
id: \\"addons/backgrounds/story1\\"
id: "addons/backgrounds/story1"
}
}
};
"
`;
Original file line number Diff line number Diff line change
@@ -1,62 +1,57 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`json-to-csf-compiler controls.json 1`] = `
"
export default {
title: \\"Addons/Controls\\",
title: "Addons/Controls",
parameters: {
options: {
selectedPanel: \\"storybook/controls/panel\\"
selectedPanel: "storybook/controls/panel"
}
}
};

export const Simple = {
name: \\"Simple\\",
name: "Simple",
parameters: {
server: {
id: \\"addons/controls/simple\\"
id: "addons/controls/simple"
}
},
args: {
name: \\"John Doe\\",
birthday: \\"1960-12-25T00:42:03.600Z\\",
favorite_color: \\"red\\",
name: "John Doe",
birthday: "1960-12-25T00:42:03.600Z",
favorite_color: "red",
active: true,
pets: 2,
sports: [
\\"football\\",
\\"baseball\\"
"football",
"baseball"
],
favorite_food: \\"Ice Cream\\",
favorite_food: "Ice Cream",
other_things: {
hair: \\"Brown\\",
eyes: \\"Blue\\"
hair: "Brown",
eyes: "Blue"
}
},
argTypes: {
birthday: {
control: {
type: \\"date\\"
type: "date"
}
},
favorite_color: {
control: {
type: \\"color\\"
type: "color"
}
},
favorite_food: {
control: {
type: \\"select\\",
type: "select",
options: {
hot_dog: \\"Hot Dog\\",
pizza: \\"Pizza\\",
burgers: \\"Burgers\\",
ice_cream: \\"Ice Cream\\"
hot_dog: "Hot Dog",
pizza: "Pizza",
burgers: "Burgers",
ice_cream: "Ice Cream"
}
}
}
}
};
"
`;
Original file line number Diff line number Diff line change
@@ -1,62 +1,57 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`json-to-csf-compiler kitchen_sink.json 1`] = `
"
export default {
title: \\"Kitchen Sink\\",
title: "Kitchen Sink",
parameters: {
backgrounds: [
{
name: \\"light\\",
value: \\"#eeeeee\\"
name: "light",
value: "#eeeeee"
},
{
name: \\"dark\\",
value: \\"#222222\\",
name: "dark",
value: "#222222",
default: true
}
],
options: {
selectedPanel: \\"storybook/a11y/panel\\"
selectedPanel: "storybook/a11y/panel"
},
server: {
params: {
color: \\"red\\"
color: "red"
}
}
}
};

export const Heading = {
name: \\"Heading\\",
name: "Heading",
parameters: {
actions: [
\\"click\\",
\\"contextmenu\\",
"click",
"contextmenu",
{
clearOnStoryChange: false
}
],
server: {
id: \\"demo/heading\\",
id: "demo/heading",
params: {
color: \\"orange\\"
color: "orange"
}
}
},
args: {
name: \\"John Doe\\",
name: "John Doe",
age: 44
}
};

export const Button = {
name: \\"Button\\",
name: "Button",
parameters: {
server: {
id: \\"demo/button\\"
id: "demo/button"
}
}
};
"
`;
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`json-to-csf-compiler links.json 1`] = `
"
export default {
title: \\"Welcome\\",
title: "Welcome",
};

export const Welcome = {
name: \\"Welcome\\",
name: "Welcome",
parameters: {
server: {
id: \\"welcome/welcome\\"
id: "welcome/welcome"
}
}
};
"
`;
Original file line number Diff line number Diff line change
@@ -1,36 +1,31 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`json-to-csf-compiler multiple_stories.json 1`] = `
"
export default {
title: \\"Demo\\",
title: "Demo",
};

export const Heading = {
name: \\"Heading\\",
name: "Heading",
parameters: {
server: {
id: \\"demo/heading\\"
id: "demo/heading"
}
}
};

export const Headings = {
name: \\"Headings\\",
name: "Headings",
parameters: {
server: {
id: \\"demo/headings\\"
id: "demo/headings"
}
}
};

export const Button = {
name: \\"Button\\",
name: "Button",
parameters: {
server: {
id: \\"demo/button\\"
id: "demo/button"
}
}
};
"
`;
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"title": "Params",
"parameters": {
"server": {
"params": { "color": "red" }
"params": { "color": "red" },
"1200x600": { "viewport": { "width": 1200, "height": 600 } }
}
},
"stories": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`json-to-csf-compiler params.json 1`] = `
"
export default {
title: \\"Params\\",
title: "Params",
parameters: {
server: {
params: {
color: \\"red\\"
color: "red"
},
1200x600: {
viewport: {
width: 1200,
height: 600
}
}
}
}
};

export const Story = {
name: \\"Story\\",
name: "Story",
parameters: {
server: {
id: \\"params/story\\",
id: "params/story",
params: {
message: \\"Hello World\\"
message: "Hello World"
}
}
}
};
"
`;
Loading

0 comments on commit ae48497

Please sign in to comment.