Skip to content

Commit

Permalink
Fixed a bug
Browse files Browse the repository at this point in the history
Rewrote the test
  • Loading branch information
Fewwy committed May 5, 2022
1 parent 6f5cfb5 commit 6d6c4f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Components/ClusterRules/ClusterRules.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ const ClusterRules = ({ cluster }) => {
};

const onSort = (_e, index, direction) => {
setExpandFirst(false);
setFirstRule('');
return updateFilters({
...filters,
Expand Down
4 changes: 2 additions & 2 deletions src/Components/ClusterRules/ClusterRules.spec.ct.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,13 +208,13 @@ describe('cluster rules table', () => {
});

it('expand one row then sort', () => {
cy.get(ROOT).find('#expandable-toggle0').click();
cy.get(ROOT).find('#expandable-toggle2').click();
cy.get(ROOT)
.find('th[data-label=Description]')
.find('button')
.click()
.click();
cy.get('table').find('tr').find('td[id="expanded-content11"]');
cy.get(EXPANDABLES).should('have.length', 2);
});

describe('sorting', () => {
Expand Down

0 comments on commit 6d6c4f7

Please sign in to comment.