Skip to content

Commit

Permalink
Fix issue in checkClusterStatus with RM 2.10
Browse files Browse the repository at this point in the history
Signed-off-by: Julien ADAMEK <[email protected]>
  • Loading branch information
juadk committed Nov 15, 2024
1 parent 6acd99d commit 3a4a443
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,15 @@ export function burgerMenuToggle() {
* @remarks : Checked in the Home page
* @param clusterName : Name of the cluster
* @param clusterStatus : Expected status of the cluster
* @param rancherVersion : Rancher version
* @param timeout : Timeout for the check
*/
export function checkClusterStatus(clusterName, clusterStatus, timeout) {
cy.contains('Home')
.click();
// The new cluster must be in active state
cy.contains(new RegExp(clusterStatus+'.*'+clusterName), {timeout: timeout});
export function checkClusterStatus(clusterName, clusterStatus, rancherVersion, timeout) {
cy.contains('Home')
.click();
(rancherVersion == '2.10') ?
cy.contains(clusterStatus+clusterName, {timeout: timeout}) :
cy.contains(clusterStatus+' '+clusterName, {timeout: timeout});
};

/**
Expand Down

0 comments on commit 3a4a443

Please sign in to comment.