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:
parent
ca0bdab60b
commit
9432e4f166
2 changed files with 2 additions and 2 deletions
|
@ -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>
|
||||
);
|
||||
|
|
|
@ -13,7 +13,7 @@ const setup = (overrides = {}) => {
|
|||
<Switch {...props} />
|
||||
);
|
||||
|
||||
const checkboxEl = utils.getByLabelText(props.label);
|
||||
const checkboxEl = utils.getByTestId('switch-input');
|
||||
return {
|
||||
checkboxEl,
|
||||
mockOnToggle,
|
||||
|
|
Loading…
Add table
Reference in a new issue