Skip to content

Commit e1ce6f3

Browse files
Progress Indicator: Add snapshot tests
1 parent bd30c03 commit e1ce6f3

13 files changed

+1205
-2
lines changed

components/progress-indicator/__docs__/storybook-stories.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ const ExampleProgressIndicator = createReactClass({
4545
return (
4646
<div style={{ padding: '2rem 1rem 0px' }}>
4747
<ProgressIndicator
48+
id="example-progress-indicator"
4849
steps={this.props.steps}
4950
selectedStep={this.props.selectedStep}
5051
disabledSteps={this.props.disabledSteps}
@@ -84,13 +85,14 @@ storiesOf(PROGRESS_INDICATOR, module)
8485
))
8586
.add('Step Error', () => (
8687
<StepError
88+
id="example-progress-indicator"
8789
steps={steps}
8890
selectedStep={steps[1]}
8991
completedSteps={steps.slice(0, 1)}
9092
errorSteps={steps.slice(1, 2)}
9193
/>
9294
))
93-
.add('In A Modal (With Step Error)', () => <Modal />)
95+
.add('In A Modal (With Step Error) - Needs DOM', () => (typeof document !== 'undefined' ? <Modal /> : null))
9496
.add('Completed Progress', () => (
9597
<ExampleProgressIndicator
9698
steps={steps}

components/progress-indicator/__examples__/default.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ class Example extends React.Component {
5050
}}
5151
>
5252
<ProgressIndicator
53+
id="example-progress-indicator"
5354
completedSteps={this.state.completedSteps}
5455
disabledSteps={this.state.disabledSteps}
5556
onStepClick={this.handleStepEvent}

components/story-based-tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export Tree from '../components/tree/__docs__/storybook-stories';
6363
// export Notification from '../components/notification/__docs__/storybook-stories';
6464
// export Panel from '../components/panel/__docs__/storybook-stories';
6565
// export Popover from '../components/popover/__docs__/storybook-stories';
66-
// export ProgressIndicator from '../components/progress-indicator/__docs__/storybook-stories';
66+
export ProgressIndicator from '../components/progress-indicator/__docs__/storybook-stories';
6767
// export Picklist from '../components/menu-picklist/__docs__/storybook-stories';
6868
// export Spinner from '../components/spinner/__docs__/storybook-stories';
6969
// export TimePicker from '../components/time-picker/__docs__/storybook-stories';

0 commit comments

Comments
 (0)