]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/cypress/integration/block/images.po.ts
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / cypress / integration / block / images.po.ts
index c43b838e3f08e2f8163d503f74afa199e4800aa7..bf6cbc05263b00ad3b54b685f94450238f5817dd 100644 (file)
@@ -22,7 +22,7 @@ export class ImagesPageHelper extends PageHelper {
     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');
   }
 
@@ -35,7 +35,7 @@ export class ImagesPageHelper extends PageHelper {
     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);
@@ -51,9 +51,9 @@ export class ImagesPageHelper extends PageHelper {
 
     // 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();
@@ -71,15 +71,15 @@ export class ImagesPageHelper extends PageHelper {
     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();
@@ -102,7 +102,7 @@ export class ImagesPageHelper extends PageHelper {
       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');