]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/cypress/integration/cluster/mgr-modules.po.ts
import ceph quincy 17.2.4
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / cypress / integration / cluster / mgr-modules.po.ts
index 8faaff09afae5df1eb91c6e528254bf114c6a98b..04d2eee46142f4b4e857a154d87ddb450bed5d52 100644 (file)
@@ -33,10 +33,12 @@ export class ManagerModulesPageHelper extends PageHelper {
 
     // Clears the editable fields
     for (const input of inputs) {
-      const id = `#${input.id}`;
-      cy.get(id).clear();
       if (input.oldValue) {
-        cy.get(id).type(input.oldValue);
+        const id = `#${input.id}`;
+        cy.get(id).clear();
+        if (input.oldValue) {
+          cy.get(id).type(input.oldValue);
+        }
       }
     }
 
@@ -44,10 +46,12 @@ export class ManagerModulesPageHelper extends PageHelper {
     cy.contains('button', 'Update').click();
     this.getExpandCollapseElement(name).should('be.visible').click();
     for (const input of inputs) {
-      cy.get('.datatable-body')
-        .eq(1)
-        .should('contain', input.id)
-        .and('not.contain', input.newValue);
+      if (input.oldValue) {
+        cy.get('.datatable-body')
+          .eq(1)
+          .should('contain', input.id)
+          .and('not.contain', input.newValue);
+      }
     }
   }
 }