Skip to content

Commit

Permalink
ci/ui: update html selector for Cypress
Browse files Browse the repository at this point in the history
  • Loading branch information
juadk committed Dec 6, 2023
1 parent d3d2e0f commit 5e9f170
Showing 1 changed file with 10 additions and 6 deletions.
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

0 comments on commit 5e9f170

Please sign in to comment.