You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by di...@apache.org on 2021/12/01 16:58:59 UTC

[superset] branch revert-17392-fix/issue_17243_discard_changes created (now b4c0d14)

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

diegopucci pushed a change to branch revert-17392-fix/issue_17243_discard_changes
in repository https://gitbox.apache.org/repos/asf/superset.git.


      at b4c0d14  Revert "fix(Dashboard): Only apply changes when editing properties (#17392)"

This branch includes the following new commits:

     new b4c0d14  Revert "fix(Dashboard): Only apply changes when editing properties (#17392)"

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: Revert "fix(Dashboard): Only apply changes when editing properties (#17392)"

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

diegopucci pushed a commit to branch revert-17392-fix/issue_17243_discard_changes
in repository https://gitbox.apache.org/repos/asf/superset.git

commit b4c0d14e3d107cbb739e07a358d6abb2d1cfa63d
Author: Geido <60...@users.noreply.github.com>
AuthorDate: Wed Dec 1 18:57:45 2021 +0200

    Revert "fix(Dashboard): Only apply changes when editing properties (#17392)"
    
    This reverts commit 0712be4c124ff90152d80c8bb11444415db4a7c7.
---
 .../cypress/integration/dashboard/edit_properties.test.ts     |  2 +-
 .../HeaderActionsDropdown/HeaderActionsDropdown.test.tsx      | 11 +----------
 superset-frontend/src/dashboard/components/Header/index.jsx   |  1 -
 3 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/superset-frontend/cypress-base/cypress/integration/dashboard/edit_properties.test.ts b/superset-frontend/cypress-base/cypress/integration/dashboard/edit_properties.test.ts
index 1cb84b3..9e2fe49 100644
--- a/superset-frontend/cypress-base/cypress/integration/dashboard/edit_properties.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/dashboard/edit_properties.test.ts
@@ -103,7 +103,7 @@ describe('Dashboard edit action', () => {
 
     // save edit changes
     cy.get('.ant-modal-footer')
-      .contains('Apply')
+      .contains('Save')
       .click()
       .then(() => {
         // assert that modal edit window has closed
diff --git a/superset-frontend/src/dashboard/components/Header/HeaderActionsDropdown/HeaderActionsDropdown.test.tsx b/superset-frontend/src/dashboard/components/Header/HeaderActionsDropdown/HeaderActionsDropdown.test.tsx
index d6d20c8..1b1cb30 100644
--- a/superset-frontend/src/dashboard/components/Header/HeaderActionsDropdown/HeaderActionsDropdown.test.tsx
+++ b/superset-frontend/src/dashboard/components/Header/HeaderActionsDropdown/HeaderActionsDropdown.test.tsx
@@ -17,7 +17,7 @@
  * under the License.
  */
 import React from 'react';
-import { render, screen, waitFor } from 'spec/helpers/testing-library';
+import { render, screen } from 'spec/helpers/testing-library';
 import userEvent from '@testing-library/user-event';
 import fetchMock from 'fetch-mock';
 import { HeaderDropdownProps } from 'src/dashboard/components/Header/types';
@@ -198,12 +198,3 @@ test('should show the properties modal', async () => {
   userEvent.click(screen.getByText('Edit dashboard properties'));
   expect(editModeOnProps.showPropertiesModal).toHaveBeenCalledTimes(1);
 });
-
-test('should display the Apply button when opening the modal', async () => {
-  render(setup(editModeOnProps));
-  await openDropdown();
-  userEvent.click(screen.getByText('Edit dashboard properties'));
-  waitFor(() => {
-    expect(screen.getByRole('button', { name: 'Apply' })).toBeInTheDocument();
-  });
-});
diff --git a/superset-frontend/src/dashboard/components/Header/index.jsx b/superset-frontend/src/dashboard/components/Header/index.jsx
index 075bb12..f43480d 100644
--- a/superset-frontend/src/dashboard/components/Header/index.jsx
+++ b/superset-frontend/src/dashboard/components/Header/index.jsx
@@ -638,7 +638,6 @@ class Header extends React.PureComponent {
                   );
                 }
               }}
-              onlyApply
             />
           )}