Skip to content

Commit

Permalink
Revert "fix(Dashboard): Only apply changes when editing properties (a…
Browse files Browse the repository at this point in the history
…pache#17392)" (apache#17618)

This reverts commit 0712be4.

(cherry picked from commit 8963cca)
  • Loading branch information
geido authored and jinghua-qa committed Dec 1, 2021
1 parent 757fd62 commit ef6c198
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,6 @@ class Header extends React.PureComponent {
);
}
}}
onlyApply
/>
)}

Expand Down

0 comments on commit ef6c198

Please sign in to comment.