Skip to content

Commit

Permalink
chore: fix compass components tests
Browse files Browse the repository at this point in the history
  • Loading branch information
himanshusinghs committed Jul 10, 2024
1 parent 628c98d commit 1c53976
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,15 +258,15 @@ describe('Document', function () {
prop3: 'prop3',
prop4: 'prop4',
});
hadronDoc.setVisibleElementsCount(2);
hadronDoc.setMaxVisibleElementsCount(2);
render(<Document value={hadronDoc}></Document>);
expect(screen.getByText('prop1')).to.exist;
expect(screen.getByText('prop2')).to.exist;
expect(() => screen.getByText('prop3')).to.throw;
expect(() => screen.getByText('prop4')).to.throw;
expect(screen.getByText('Show 2 more fields')).to.exist;

hadronDoc.setVisibleElementsCount(25);
hadronDoc.setMaxVisibleElementsCount(25);
await waitFor(() => {
expect(screen.getByText('prop3')).to.exist;
expect(screen.getByText('prop4')).to.exist;
Expand All @@ -291,7 +291,7 @@ describe('Document', function () {
expect(screen.getByText('prop3')).to.exist;
expect(screen.getByText('prop4')).to.exist;

nestedElement.setVisibleElementsCount(2);
nestedElement.setMaxVisibleElementsCount(2);
await waitFor(() => {
expect(() => screen.getByText('prop3')).to.throw;
expect(() => screen.getByText('prop4')).to.throw;
Expand Down

0 comments on commit 1c53976

Please sign in to comment.