From de8eb9ee48bbd0474652e0652bc7fbf6cfacf64b Mon Sep 17 00:00:00 2001 From: lyndsiWilliams Date: Wed, 7 Sep 2022 15:28:57 -0500 Subject: [PATCH] 2 act errors removed from SaveDatasetActionButton test --- .../SaveDatasetActionButton.test.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/superset-frontend/src/SqlLab/components/SaveDatasetActionButton/SaveDatasetActionButton.test.tsx b/superset-frontend/src/SqlLab/components/SaveDatasetActionButton/SaveDatasetActionButton.test.tsx index d6e0d7aa6caa2..316404e3e4f3a 100644 --- a/superset-frontend/src/SqlLab/components/SaveDatasetActionButton/SaveDatasetActionButton.test.tsx +++ b/superset-frontend/src/SqlLab/components/SaveDatasetActionButton/SaveDatasetActionButton.test.tsx @@ -29,7 +29,7 @@ const overlayMenu = ( ); describe('SaveDatasetActionButton', () => { - it('renders a split save button', () => { + test('renders a split save button', async () => { render( true} @@ -40,11 +40,14 @@ describe('SaveDatasetActionButton', () => { const saveBtn = screen.getByRole('button', { name: /save/i }); const caretBtn = screen.getByRole('button', { name: /caret-down/i }); + expect( + await screen.findByRole('button', { name: /save/i }), + ).toBeInTheDocument(); expect(saveBtn).toBeVisible(); expect(caretBtn).toBeVisible(); }); - it('renders a "save dataset" dropdown menu item when user clicks caret button', () => { + test('renders a "save dataset" dropdown menu item when user clicks caret button', async () => { render( true} @@ -53,6 +56,9 @@ describe('SaveDatasetActionButton', () => { ); const caretBtn = screen.getByRole('button', { name: /caret-down/i }); + expect( + await screen.findByRole('button', { name: /caret-down/i }), + ).toBeInTheDocument(); userEvent.click(caretBtn); const saveDatasetMenuItem = screen.getByText(/save dataset/i);