Skip to content

Commit

Permalink
[Rahul] | Fix. ObsControl Test Cases
Browse files Browse the repository at this point in the history
  • Loading branch information
rahu1ramesh committed Dec 9, 2024
1 parent 1fa7900 commit bd0adfa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions test/components/CodedControl.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ describe('CodedControl', () => {

expect(wrapper).to.have.exactly(1).descendants('DummyControl');
expect(Object.keys(wrapper.find('DummyControl').props())).to.have.length(
11
12
);

expect(wrapper.find('DummyControl'))
Expand Down Expand Up @@ -275,7 +275,7 @@ describe('CodedControl', () => {

expect(wrapper).to.have.exactly(1).descendants('DummyControl');
expect(Object.keys(wrapper.find('DummyControl').props())).to.have.length(
11
12
);

expect(wrapper.find('DummyControl'))
Expand Down Expand Up @@ -418,7 +418,7 @@ describe('CodedControl', () => {

expect(wrapper).to.have.exactly(1).descendants('DummyControl');
expect(Object.keys(wrapper.find('DummyControl').props())).to.have.length(
14
15
);

expect(wrapper.find('DummyControl'))
Expand Down
5 changes: 2 additions & 3 deletions test/components/ObsControl.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,10 @@ describe('ObsControl', () => {
expect(wrapper).to.have.exactly(1).descendants('Label');
expect(wrapper).to.have.exactly(1).descendants('DummyControl');
expect(wrapper).to.have.exactly(1).descendants('input');

expect(wrapper.find('DummyControl')).to.have.prop('validate').to.deep.eql(false);
expect(wrapper.find('DummyControl')).not.to.have.prop('options');
expect(wrapper.find('Label')).to.have.prop('metadata')
.to.deep.eql({ ...label, units: '(/min)' });
.to.deep.eql({ ...label, units: '(/min)', ...getConcept('Text') });
});

it('should render child control with options when metadata has options', () => {
Expand All @@ -111,7 +110,7 @@ describe('ObsControl', () => {


expect(wrapper.find('DummyControl')).to.have.prop('options').to.deep.eql([]);
expect(wrapper.find('Label')).to.have.prop('metadata').to.deep.eql({ ...label, units: '' });
expect(wrapper.find('Label')).to.have.prop('metadata').to.deep.eql({ ...label, units: '', ...getConcept('Text') });
});

it('should render child control with options when concept has answers', () => {
Expand Down

0 comments on commit bd0adfa

Please sign in to comment.