Skip to content

Commit

Permalink
[test] Add failing test for StepButton
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Jan 21, 2020
1 parent 91ccd96 commit 5593f28
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/material-ui/src/StepButton/StepButton.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { createMount, getClasses } from '@material-ui/core/test-utils';
import describeConformance from '../test-utils/describeConformance';
import { createClientRender } from 'test/utils/createClientRender';
import StepButton from './StepButton';
import Step from '../Step';
import StepLabel from '../StepLabel';
import ButtonBase from '../ButtonBase';
import { fireEvent } from '@testing-library/dom';
Expand Down Expand Up @@ -114,4 +115,17 @@ describe('<StepButton />', () => {
expect(handleTouchStart).to.have.property('callCount', 2);
});
});

it('can be used as a child of `Step`', () => {
// a simple smoke test to check that these two
// integrate without any errors/warnings
// TODO: move into integration test for Stepper component
const { getByRole } = render(
<Step>
<StepButton>Next</StepButton>
</Step>,
);

expect(getByRole('button')).to.be.ok;
});
});

0 comments on commit 5593f28

Please sign in to comment.