Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 10 additions & 0 deletions code/core/src/manager-api/tests/stories.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ describe('stories API', () => {
});
expect(index!['component-a--story-1']).toMatchObject({
type: 'story',
subtype: 'story',
id: 'component-a--story-1',
parent: 'component-a',
title: 'Component A',
Expand Down Expand Up @@ -172,6 +173,7 @@ describe('stories API', () => {
});
expect(index!['design-system-some-component--my-story']).toMatchObject({
type: 'story',
subtype: 'story',
title: ' Design System / Some Component ', // title is kept as-is, because it may be used as identifier
name: ' My Story ', // story name is kept as-is, because it's set directly on the story
});
Expand Down Expand Up @@ -251,6 +253,7 @@ describe('stories API', () => {
});
expect(index!['a-b--1']).toMatchObject({
type: 'story',
subtype: 'story',
id: 'a-b--1',
parent: 'a-b',
name: '1',
Expand Down Expand Up @@ -285,6 +288,7 @@ describe('stories API', () => {
});
expect(index!['a--1']).toMatchObject({
type: 'story',
subtype: 'story',
id: 'a--1',
parent: 'a',
title: 'a',
Expand Down Expand Up @@ -329,6 +333,7 @@ describe('stories API', () => {
});
expect(index!['a--1']).toMatchObject({
type: 'story',
subtype: 'story',
id: 'a--1',
parent: 'a',
title: 'a',
Expand All @@ -337,6 +342,7 @@ describe('stories API', () => {
});
expect(index!['a--2']).toMatchObject({
type: 'story',
subtype: 'story',
id: 'a--2',
parent: 'a',
title: 'a',
Expand Down Expand Up @@ -489,6 +495,7 @@ describe('stories API', () => {
const { index } = store.getState();
expect(index!['prepared--story']).toMatchObject({
type: 'story',
subtype: 'story',
id: 'prepared--story',
parent: 'prepared',
title: 'Prepared',
Expand Down Expand Up @@ -624,6 +631,7 @@ describe('stories API', () => {
entries: {
'component-a--story-1': {
type: 'story',
subtype: 'story',
id: 'component-a--story-1',
title: 'Component A',
name: 'Story 1',
Expand Down Expand Up @@ -675,6 +683,7 @@ describe('stories API', () => {
entries: {
'component-a--story-1': {
type: 'story',
subtype: 'story',
id: 'component-a--story-1',
title: 'Component A',
name: 'Story 1',
Expand Down Expand Up @@ -1220,6 +1229,7 @@ describe('stories API', () => {
const { index } = store.getState();
expect(index!['component-a--story-1']).toMatchObject({
type: 'story',
subtype: 'story',
id: 'component-a--story-1',
parent: 'component-a',
title: 'Component A',
Expand Down
3 changes: 2 additions & 1 deletion code/core/src/manager-api/tests/url.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ describe('initModule', () => {
fullAPI: Object.assign(fullAPI, {
getCurrentStoryData: () => ({
type: 'story',
subtype: 'story',
args: { a: 1, b: 2 },
initialArgs: { a: 1, b: 1 },
}),
Expand Down Expand Up @@ -218,7 +219,7 @@ describe('initModule', () => {
state: { location },
navigate,
fullAPI: Object.assign(fullAPI, {
getCurrentStoryData: () => ({ type: 'story', args: { a: 1 } }),
getCurrentStoryData: () => ({ type: 'story', subtype: 'story', args: { a: 1 } }),
}),
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const mockManagerStore: any = {
},
someStoryId: {
type: 'story',
subtype: 'story',
id: 'someStoryId',
name: 'story',
parent: 'someComponentId',
Expand Down Expand Up @@ -121,6 +122,7 @@ export const LongStoryName: Story = {
},
someStoryId: {
type: 'story',
subtype: 'story',
id: 'someStoryId',
name: 'someLongStoryName',
parent: 'someComponentId',
Expand Down
1 change: 1 addition & 0 deletions code/core/src/manager/components/sidebar/Tree.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ export const SingleStoryComponents: Story = {
},
'single--single': {
type: 'story',
subtype: 'story',
id: 'single--single',
title: 'Single',
name: 'Single',
Expand Down
Loading