Skip to content

Commit

Permalink
Refactored code
Browse files Browse the repository at this point in the history
  • Loading branch information
zaxovaiko committed Apr 19, 2024
1 parent e16db3c commit ab85d95
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions packages/uniforms/__suites__/wrapField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -219,19 +219,16 @@ export function testWrapField(
),
schema: z.object({}),
});
const x = screen.getByTestId('x');
if (options?.skipForAntD) {
expect(
screen
.getByTestId('x')
.closest('.ant-form-item-has-feedback.ant-form-item-has-error'),
x.closest('.ant-form-item-has-feedback.ant-form-item-has-error'),
).toBeInTheDocument();
} else {
expect(
screen
.getByTestId('x')
.parentElement?.classList.contains(
options?.onlyForBootstrap3 ? 'has-error' : 'is-invalid',
),
x.parentElement?.classList.contains(
options?.onlyForBootstrap3 ? 'has-error' : 'is-invalid',
),
).toBe(true);
}
},
Expand Down

0 comments on commit ab85d95

Please sign in to comment.