0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-01 02:41:39 -05:00

Fixed Switch element tests

no issue

- Updated attaching onToggle to correct element on switch test
This commit is contained in:
Rish 2020-05-21 12:02:41 +05:30
parent ca0bdab60b
commit 9432e4f166
2 changed files with 2 additions and 2 deletions

View file

@ -13,7 +13,7 @@ function Switch({id, label, onToggle, checked = false}) {
/>
<span className="input-toggle-component" onClick={(e) => {
onToggle(e);
}}></span>
}} data-testid="switch-input"></span>
</label>
</div>
);

View file

@ -13,7 +13,7 @@ const setup = (overrides = {}) => {
<Switch {...props} />
);
const checkboxEl = utils.getByLabelText(props.label);
const checkboxEl = utils.getByTestId('switch-input');
return {
checkboxEl,
mockOnToggle,