cy.get('#size').type(size);
// Click the create button and wait for image to be made
- cy.contains('button', 'Create RBD').click();
+ cy.get('[data-cy=submitBtn]').click();
this.getFirstTableCell(name).should('exist');
}
cy.get('#name').clear().type(newName);
cy.get('#size').clear().type(newSize); // click the size box and send new size
- cy.contains('button', 'Edit RBD').click();
+ cy.get('[data-cy=submitBtn]').click();
this.getExpandCollapseElement(newName).click();
cy.get('.table.table-striped.table-bordered').contains('td', newSize);
// click on the drop down and selects the move to trash option
cy.get('.table-actions button.dropdown-toggle').first().click();
- cy.get('li.move-to-trash').click();
+ cy.get('button.move-to-trash').click();
- cy.contains('button', 'Move Image').should('be.visible').click();
+ cy.get('[data-cy=submitBtn]').should('be.visible').click();
// Clicks trash tab
cy.contains('.nav-link', 'Trash').click();
cy.contains('button', 'Restore').click();
// wait for pop-up to be visible (checks for title of pop-up)
- cy.get('#name').should('be.visible');
+ cy.get('cd-modal #name').should('be.visible');
// If a new name for the image is passed, it changes the name of the image
if (newName !== undefined) {
// click name box and send new name
- cy.get('#name').clear().type(newName);
+ cy.get('cd-modal #name').clear().type(newName);
}
- cy.contains('button', 'Restore Image').click();
+ cy.get('[data-cy=submitBtn]').click();
// clicks images tab
cy.contains('.nav-link', 'Images').click();
this.selectOption('poolName', pool);
cy.get('#poolName').should('have.class', 'ng-valid'); // check if pool is selected
}
- cy.get('#purgeFormButton').click();
+ cy.get('[data-cy=submitBtn]').click();
// Wait for image to delete and check it is not present
this.getFirstTableCell(name).should('not.exist');