Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci/ui: update html selector for Cypress #1120

Merged
merged 1 commit into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/cypress/latest/e2e/unit_tests/upgrade.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ describe('Upgrade tests', () => {
cy.contains('Target Cluster')
cy.getBySel('cluster-target')
.click();
cy.get('#vs5__listbox')
cy.get('#vs7__listbox')
.contains(clusterName)
.click();
if (utils.isK8sVersion("k3s")) {
Expand Down
16 changes: 10 additions & 6 deletions tests/cypress/latest/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@ Cypress.Commands.add('createMachReg', (
// Build the ISO according to the elemental operator version
// Most of the time, it uses the latest dev version but sometimes
// before releasing, we want to test staging/stable artifacts
cy.getBySel('select-os-version-build-iso')
cy.getBySel('select-media-type-build-media')
.click();
cy.contains('Iso')
.click();
cy.getBySel('select-os-version-build-media')
.click();
// Never build from dev ISO in upgrade scenario
if (utils.isCypressTag('upgrade')) {
Expand All @@ -124,19 +128,19 @@ Cypress.Commands.add('createMachReg', (
cy.contains('ISO x86_64 (unstable)')
.click();
}
cy.getBySel('build-iso-btn')
cy.getBySel('build-media-btn')
.click();
cy.getBySel('build-iso-btn')
cy.getBySel('build-media-btn')
.get('.icon-spin');
// Download button is disabled while ISO is building
cy.getBySel('download-iso-btn').should(($input) => {
cy.getBySel('download-media-btn').should(($input) => {
expect($input).to.have.attr('disabled')
})
// Download button is enabled once ISO building done
cy.getBySel('download-iso-btn', { timeout: 600000 }).should(($input) => {
cy.getBySel('download-media-btn', { timeout: 600000 }).should(($input) => {
expect($input).to.not.have.attr('disabled')
})
cy.getBySel('download-iso-btn')
cy.getBySel('download-media-btn')
.click()
cy.verifyDownload('.iso', { contains:true, timeout: 180000, interval: 5000 });
}
Expand Down