Skip to content

Commit 2ce0693

Browse files
committed
Update preview-page.test.tsx
1 parent 3f50340 commit 2ce0693

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/test/suite/views/data-browsing-app/preview-page.test.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ describe('PreviewPage test suite', function () {
1515
it('should render the preview page with toolbar', function () {
1616
render(<PreviewPage />);
1717
expect(screen.getByLabelText('Insert Document')).to.exist;
18-
expect(screen.getByLabelText('Sort order')).to.exist;
19-
expect(screen.getByLabelText('Items per page')).to.exist;
18+
expect(screen.getByLabelText(/Sort order/)).to.exist;
19+
expect(screen.getByLabelText(/Items per page/)).to.exist;
2020
});
2121

2222
it('should request documents on mount', function () {
2323
const postMessageStub = Sinon.stub(vscode, 'postMessage');
2424
render(<PreviewPage />);
25-
25+
2626
expect(postMessageStub).to.have.been.calledWith({
2727
command: PreviewMessageType.getDocuments,
2828
});
@@ -101,9 +101,9 @@ describe('PreviewPage test suite', function () {
101101
expect(screen.queryByText('Loading documents...')).to.not.exist;
102102
});
103103

104-
const sortSelect = screen.getByLabelText('Sort order');
104+
const sortSelect = screen.getByLabelText(/Sort order/);
105105
await userEvent.click(sortSelect);
106-
106+
107107
const ascOption = screen.getByText('Ascending');
108108
await userEvent.click(ascOption);
109109

@@ -163,4 +163,3 @@ describe('PreviewPage test suite', function () {
163163
expect(screen.getByText('11-20 of 25')).to.exist;
164164
});
165165
});
166-

0 commit comments

Comments
 (0)