Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lyndsiWilliams committed Dec 20, 2021
1 parent 1f75105 commit 31cd8f4
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ describe('DatasourceEditor', () => {
});
userEvent.click(getToggles[0]);
const getTextboxes = screen.getAllByRole('textbox');
expect(getTextboxes.length).toEqual(5);
expect(getTextboxes.length).toEqual(12);

const inputLabel = screen.getByPlaceholderText('Label');
const inputDescription = screen.getByPlaceholderText('Description');
Expand Down Expand Up @@ -122,10 +122,9 @@ describe('DatasourceEditor', () => {
});
expect(addBtn).toBeInTheDocument();
userEvent.click(addBtn);
const newColumn = screen.getByRole('button', {
name: /<new column>/i,
});
expect(newColumn).toBeInTheDocument();
// newColumn (Column name) is the first textbox in the tab
const newColumn = screen.getAllByRole('textbox', { name: '' })[0];
expect(newColumn).toHaveValue('<new column>');
});

it('renders isSqla fields', () => {
Expand Down

0 comments on commit 31cd8f4

Please sign in to comment.