You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ly...@apache.org on 2022/09/07 20:29:25 UTC

[superset] branch lyndsi/savedatasetactionbutton-act-cleanup created (now de8eb9ee48)

This is an automated email from the ASF dual-hosted git repository.

lyndsi pushed a change to branch lyndsi/savedatasetactionbutton-act-cleanup
in repository https://gitbox.apache.org/repos/asf/superset.git


      at de8eb9ee48 2 act errors removed from SaveDatasetActionButton test

This branch includes the following new commits:

     new de8eb9ee48 2 act errors removed from SaveDatasetActionButton test

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[superset] 01/01: 2 act errors removed from SaveDatasetActionButton test

Posted by ly...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lyndsi pushed a commit to branch lyndsi/savedatasetactionbutton-act-cleanup
in repository https://gitbox.apache.org/repos/asf/superset.git

commit de8eb9ee48bbd0474652e0652bc7fbf6cfacf64b
Author: lyndsiWilliams <kc...@gmail.com>
AuthorDate: Wed Sep 7 15:28:57 2022 -0500

    2 act errors removed from SaveDatasetActionButton test
---
 .../SaveDatasetActionButton/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 d6e0d7aa6c..316404e3e4 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(
       <SaveDatasetActionButton
         setShowSave={() => 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(
       <SaveDatasetActionButton
         setShowSave={() => 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);