-
Notifications
You must be signed in to change notification settings - Fork 481
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38998 from code-dot-org/dtl_candidate_a511d294
- Loading branch information
Showing
71 changed files
with
695 additions
and
318 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
84 changes: 12 additions & 72 deletions
84
apps/src/templates/sectionProgress/progressTables/ProgressTableDetailView.story.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,15 @@ | ||
import React from 'react'; | ||
import ProgressTableDetailView from '@cdo/apps/templates/sectionProgress/progressTables/ProgressTableDetailView'; | ||
import {Provider} from 'react-redux'; | ||
import {createStore, wrapTable} from '../sectionProgressTestHelpers'; | ||
import {detailTableStories} from '@cdo/apps/templates/sectionProgress/progressTables/sectionProgressTableStoryBuilder'; | ||
|
||
/** | ||
* Stories for the SummaryView and DetailView are identical other than the | ||
* actual component to render, so we build them using common code in | ||
* `sectionProgressTableStoryBuilder`. | ||
* | ||
* Note: there is a flag in that file to enable additional stories that is | ||
* disabled by default to prevent slowing down our test pipeline. | ||
*/ | ||
export default storybook => { | ||
storybook.storiesOf('SectionProgress/DetailView', module).addStoryTable([ | ||
{ | ||
name: 'Tiny section, small script', | ||
story: () => { | ||
const store = createStore(3, 10); | ||
return wrapTable( | ||
<Provider store={store}> | ||
<ProgressTableDetailView /> | ||
</Provider> | ||
); | ||
} | ||
}, | ||
{ | ||
name: 'Tiny section, large script', | ||
story: () => { | ||
const store = createStore(3, 30); | ||
return wrapTable( | ||
<Provider store={store}> | ||
<ProgressTableDetailView /> | ||
</Provider> | ||
); | ||
} | ||
}, | ||
{ | ||
name: 'Small section, small script', | ||
story: () => { | ||
const store = createStore(30, 10); | ||
return wrapTable( | ||
<Provider store={store}> | ||
<ProgressTableDetailView /> | ||
</Provider> | ||
); | ||
} | ||
}, | ||
{ | ||
name: 'Small section, large script', | ||
story: () => { | ||
const store = createStore(30, 30); | ||
return wrapTable( | ||
<Provider store={store}> | ||
<ProgressTableDetailView /> | ||
</Provider> | ||
); | ||
} | ||
}, | ||
{ | ||
name: 'Large section, small script', | ||
story: () => { | ||
const store = createStore(200, 10); | ||
return wrapTable( | ||
<Provider store={store}> | ||
<ProgressTableDetailView /> | ||
</Provider> | ||
); | ||
} | ||
}, | ||
{ | ||
name: 'Large section, large script', | ||
story: () => { | ||
const store = createStore(200, 30); | ||
return wrapTable( | ||
<Provider store={store}> | ||
<ProgressTableDetailView /> | ||
</Provider> | ||
); | ||
} | ||
} | ||
]); | ||
storybook | ||
.storiesOf('SectionProgress/DetailView', module) | ||
.addStoryTable(detailTableStories); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
84 changes: 12 additions & 72 deletions
84
apps/src/templates/sectionProgress/progressTables/ProgressTableSummaryView.story.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,15 @@ | ||
import React from 'react'; | ||
import ProgressTableSummaryView from '@cdo/apps/templates/sectionProgress/progressTables/ProgressTableSummaryView'; | ||
import {Provider} from 'react-redux'; | ||
import {createStore, wrapTable} from '../sectionProgressTestHelpers'; | ||
import {summaryTableStories} from '@cdo/apps/templates/sectionProgress/progressTables/sectionProgressTableStoryBuilder'; | ||
|
||
/** | ||
* Stories for the SummaryView and DetailView are identical other than the | ||
* actual component to render, so we build them using common code in | ||
* `sectionProgressTableStoryBuilder`. | ||
* | ||
* Note: there is a flag in that file to enable additional stories that is | ||
* disabled by default to prevent slowing down our test pipeline. | ||
*/ | ||
export default storybook => { | ||
storybook.storiesOf('SectionProgress/SummaryView', module).addStoryTable([ | ||
{ | ||
name: 'Tiny section, small script', | ||
story: () => { | ||
const store = createStore(3, 10); | ||
return wrapTable( | ||
<Provider store={store}> | ||
<ProgressTableSummaryView /> | ||
</Provider> | ||
); | ||
} | ||
}, | ||
{ | ||
name: 'Tiny section, large script', | ||
story: () => { | ||
const store = createStore(3, 30); | ||
return wrapTable( | ||
<Provider store={store}> | ||
<ProgressTableSummaryView /> | ||
</Provider> | ||
); | ||
} | ||
}, | ||
{ | ||
name: 'Small section, small script', | ||
story: () => { | ||
const store = createStore(30, 10); | ||
return wrapTable( | ||
<Provider store={store}> | ||
<ProgressTableSummaryView /> | ||
</Provider> | ||
); | ||
} | ||
}, | ||
{ | ||
name: 'Small section, large script', | ||
story: () => { | ||
const store = createStore(30, 30); | ||
return wrapTable( | ||
<Provider store={store}> | ||
<ProgressTableSummaryView /> | ||
</Provider> | ||
); | ||
} | ||
}, | ||
{ | ||
name: 'Large section, small script', | ||
story: () => { | ||
const store = createStore(200, 10); | ||
return wrapTable( | ||
<Provider store={store}> | ||
<ProgressTableSummaryView /> | ||
</Provider> | ||
); | ||
} | ||
}, | ||
{ | ||
name: 'Large section, large script', | ||
story: () => { | ||
const store = createStore(200, 30); | ||
return wrapTable( | ||
<Provider store={store}> | ||
<ProgressTableSummaryView /> | ||
</Provider> | ||
); | ||
} | ||
} | ||
]); | ||
storybook | ||
.storiesOf('SectionProgress/SummaryView', module) | ||
.addStoryTable(summaryTableStories); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.