Skip to content

Commit

Permalink
Updated locator to fix 2.8 clusterGroup failures (#242)
Browse files Browse the repository at this point in the history
* Updated locator to fix 2.8 clusterGroup failures

Signed-off-by: Satyajit Bulage <[email protected]>

* Handle 2 locotors for single element in 2.9+

Signed-off-by: Satyajit Bulage <[email protected]>

---------

Signed-off-by: Satyajit Bulage <[email protected]>
  • Loading branch information
sbulage authored Dec 16, 2024
1 parent c05f6ab commit 01f771c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,10 @@ Cypress.Commands.add('addFleetGitRepo', ({ repoName, repoUrl, branch, path, path
});

// Deploy To target functionality used in addGitRepo
// TODO: Remove div.labeled-select.create.hoverable, div.labeled-select.edit.hoverable locators, once 2.8 is disabled.
Cypress.Commands.add('deployToClusterOrClusterGroup', (deployToTarget) => {
cy.get('[data-testid="fleet-gitrepo-target-cluster"]').should('be.visible');
cy.get('[data-testid="fleet-gitrepo-target-cluster"]').click({ force: true });
cy.get('div.labeled-select.create.hoverable, div.labeled-select.edit.hoverable, [data-testid="fleet-gitrepo-target-cluster"]').first().should('be.visible');
cy.get('div.labeled-select.create.hoverable, div.labeled-select.edit.hoverable, [data-testid="fleet-gitrepo-target-cluster"]').first().click({ force: true });
cy.get('ul.vs__dropdown-menu > li').contains(deployToTarget).should("exist").click();
});

Expand Down

0 comments on commit 01f771c

Please sign in to comment.