Skip to content

Commit 5593f28

Browse files
committed
[test] Add failing test for StepButton
1 parent 91ccd96 commit 5593f28

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

packages/material-ui/src/StepButton/StepButton.test.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { createMount, getClasses } from '@material-ui/core/test-utils';
55
import describeConformance from '../test-utils/describeConformance';
66
import { createClientRender } from 'test/utils/createClientRender';
77
import StepButton from './StepButton';
8+
import Step from '../Step';
89
import StepLabel from '../StepLabel';
910
import ButtonBase from '../ButtonBase';
1011
import { fireEvent } from '@testing-library/dom';
@@ -114,4 +115,17 @@ describe('<StepButton />', () => {
114115
expect(handleTouchStart).to.have.property('callCount', 2);
115116
});
116117
});
118+
119+
it('can be used as a child of `Step`', () => {
120+
// a simple smoke test to check that these two
121+
// integrate without any errors/warnings
122+
// TODO: move into integration test for Stepper component
123+
const { getByRole } = render(
124+
<Step>
125+
<StepButton>Next</StepButton>
126+
</Step>,
127+
);
128+
129+
expect(getByRole('button')).to.be.ok;
130+
});
117131
});

0 commit comments

Comments
 (0)