Skip to content

Commit

Permalink
Revert "fix focus-flow in RadioButton tests (#1630)"
Browse files Browse the repository at this point in the history
This reverts commit e34c1bc.

That commit, part of #1630, introduced a dependency on some
`@folio/stripes-testing` components that have not yet been released and
are not targeted for kiwi.
  • Loading branch information
zburke committed Oct 25, 2021
1 parent 4074748 commit 26d971b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/RadioButton/tests/RadioButton-ReduxForm-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { describe, beforeEach, it } from 'mocha';
import { expect } from 'chai';

import { Field } from 'redux-form';
import { RadioButton as Interactor, converge } from '@folio/stripes-testing';
import { RadioButton as Interactor } from '@folio/stripes-testing';
import { mountWithContext } from '../../../tests/helpers';
import TestForm from '../../../tests/TestForm';

Expand All @@ -25,10 +25,8 @@ describe('RadioButton with Redux Form', () => {
onChange={(event) => {
output = event.target.checked;
}}
validate={value => (value === 'green' ? 'Not ready to eat' : undefined)}
type="radio"
value="green"
warn={value => (value === 'ripe' ? 'Warning: may be mushy' : undefined)}
/>
</div>
<div id="radio-button-2">
Expand All @@ -50,17 +48,15 @@ describe('RadioButton with Redux Form', () => {

describe('clicking the label', () => {
beforeEach(async () => {
await radioButton1.focus();
await radioButton1.click();
await radioButton1.blur();
await radioButton2.focus();
});

it('toggles the value', () => expect(output).to.be.true);

it('displays the input as checked', () => radioButton1.is({ checked: true }));

it('displays the error text', () => converge(() => radioButton1.has({ feedbackText: 'Not ready to eat' })));
it('displays the error text', () => radioButton1.has({ feedbackText: 'Not ready to eat' }));

it('applies an error class', () => radioButton1.has({ hasError: true }));

Expand Down

0 comments on commit 26d971b

Please sign in to comment.