Skip to content

Commit

Permalink
chore: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tewshi authored and lukicenturi committed Nov 30, 2023
1 parent e661338 commit 2b39117
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion example/cypress/e2e/card.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('Dialog', () => {
cy.contains('h2[data-cy=cards]', 'Cards');

cy.get('div[data-cy=card-0-0]').as('card');
cy.get('@card').find('h6[class*=_header_]').as('header');
cy.get('@card').find('h5[class*=_header_]').as('header');
cy.get('@card').find('p[class*=_subheader_]');
cy.get('@card').find('div[class*=_content_]');
cy.get('@card').find('div[class*=_footer_]');
Expand Down
2 changes: 1 addition & 1 deletion src/components/cards/Card.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ describe('Card', () => {

expect(wrapper.find('div[class*=_image_').exists()).toBeTruthy();
expect(wrapper.find('div[class*=_prepend_').exists()).toBeTruthy();
expect(wrapper.find('h6[class*=_header_').exists()).toBeTruthy();
expect(wrapper.find('h5[class*=_header_').exists()).toBeTruthy();
expect(wrapper.find('p[class*=_subheader_').exists()).toBeTruthy();
expect(wrapper.find('div[class*=_content_').exists()).toBeTruthy();
expect(wrapper.find('div[class*=_footer_').exists()).toBeTruthy();
Expand Down
4 changes: 2 additions & 2 deletions src/components/forms/checkbox/Checkbox.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ describe('Forms/Checkbox', () => {

it('passes hint props', async () => {
const wrapper = createWrapper();
expect(wrapper.find('.details > div').text()).toBe('');
expect(wrapper.find('.details > div').exists()).toBeFalsy();

const hint = 'Checkbox Hints';
await wrapper.setProps({ hint });
Expand All @@ -78,7 +78,7 @@ describe('Forms/Checkbox', () => {

it('passes hint errorMessages', async () => {
const wrapper = createWrapper();
expect(wrapper.find('.details > div').text()).toBe('');
expect(wrapper.find('.details > div').exists()).toBeFalsy();

const errorMessage = 'Checkbox Error Message';
await wrapper.setProps({ errorMessages: [errorMessage] });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('Forms/RadioButton/RadioGroup', () => {

it('passes hint props', async () => {
const wrapper = createWrapper();
expect(wrapper.find('.details > div').text()).toBe('');
expect(wrapper.find('.details > div').exists()).toBeFalsy();

const hint = 'RadioGroup Hints';
await wrapper.setProps({ hint });
Expand All @@ -27,7 +27,7 @@ describe('Forms/RadioButton/RadioGroup', () => {

it('passes hint errorMessages', async () => {
const wrapper = createWrapper();
expect(wrapper.find('.details > div').text()).toBe('');
expect(wrapper.find('.details > div').exists()).toBeFalsy();

const errorMessage = 'RadioGroup Error Message';
await wrapper.setProps({ errorMessages: [errorMessage] });
Expand Down
4 changes: 2 additions & 2 deletions src/components/forms/radio-button/radio/Radio.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ describe('Forms/RadioButton/Radio', () => {
value: 'value',
},
});
expect(wrapper.find('.details > div').text()).toBe('');
expect(wrapper.find('.details > div').exists()).toBeFalsy();

const hint = 'Radio Hints';
await wrapper.setProps({ hint });
Expand All @@ -98,7 +98,7 @@ describe('Forms/RadioButton/Radio', () => {
value: 'value',
},
});
expect(wrapper.find('.details > div').text()).toBe('');
expect(wrapper.find('.details > div').exists()).toBeFalsy();

const errorMessage = 'Radio Error Message';
await wrapper.setProps({ errorMessages: [errorMessage] });
Expand Down
2 changes: 1 addition & 1 deletion src/components/forms/text-field/TextField.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('Forms/TextField', () => {

it('passes color props', async () => {
const wrapper = createWrapper();
expect(wrapper.find('div[class*=wrapper]').classes()).toMatch(/_grey_/);
expect(wrapper.find('div[class*=wrapper]').classes()).toMatch(/_default_/);

await wrapper.setProps({ color: 'primary' });
expect(wrapper.find('div[class*=wrapper]').classes()).toMatch(/_primary_/);
Expand Down

0 comments on commit 2b39117

Please sign in to comment.