Skip to content

Commit 7bb4c41

Browse files
authored
fix: Cluster state (#3955)
1 parent d0864ba commit 7bb4c41

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/components/Clusters/shared.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export function addCluster(
4343
switchCluster = true,
4444
) {
4545
const { setClusters } = clustersInfo;
46-
setClusters({ [params.contextName]: params });
46+
setClusters(prev => ({ ...prev, [params.contextName]: params }));
4747
if (switchCluster) {
4848
addCurrentCluster(params, clustersInfo);
4949
}

tests/integration/tests/namespace/test-reduced-permissions.spec.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -233,14 +233,14 @@ context('Test reduced permissions', () => {
233233
selectSearchResult: true,
234234
});
235235

236+
// remove cluster
236237
cy.changeCluster('all-clusters');
237238

238-
cy.wait(500)
239-
.get('ui5-input[id="search-input"]:visible')
240-
.find('input')
241-
.type(SA_NAME);
242-
243-
cy.wait(1000);
239+
cy.deleteFromGenericList('Cluster', SA_NAME, {
240+
confirmationEnabled: true,
241+
deletedVisible: false,
242+
clearSearch: false,
243+
});
244244

245245
cy.contains(/No clusters found/).should('exist');
246246
});

0 commit comments

Comments
 (0)