Skip to content

Commit

Permalink
fixed failed unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dzonidoo committed Jul 18, 2024
1 parent 5e963bd commit b0d5119
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/apps/vocabularies/tests/vocabularies.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import {mount} from 'enzyme';
import {noop} from 'lodash';
import {VocabularyItemsViewEdit} from '../components/VocabularyItemsViewEdit';
import {s} from 'core/helpers/testUtils';
import {s} from './../../../../e2e/client/playwright/utils';

const getPromise = () => Promise.resolve({});

Expand Down Expand Up @@ -190,13 +190,13 @@ describe('vocabularies', () => {

wrapper.update();

wrapper.find(s(['vocabulary-items-view-edit', 'field--name']))
wrapper.find(s('vocabulary-items-view-edit', 'vocabulary-item-field=name'))
.simulate('change', {target: {value: 'abc'}});

setTimeout(() => {
expect(onSetItemValidSpy).toHaveBeenCalledWith(false);

wrapper.find(s(['vocabulary-items-view-edit', 'field--qcode']))
wrapper.find(s('vocabulary-items-view-edit', 'vocabulary-item-field=qcode'))
.simulate('change', {target: {value: 'abc'}});

setTimeout(() => {
Expand Down Expand Up @@ -229,7 +229,7 @@ describe('vocabularies', () => {

expect(instance.getItemsForSaving().length).toBe(1);

wrapper.find(s(['vocabulary-items-view-edit', 'remove']))
wrapper.find(s('vocabulary-items-view-edit', 'remove'))
.simulate('click');

expect(instance.getItemsForSaving().length).toBe(0);
Expand Down

0 comments on commit b0d5119

Please sign in to comment.