Issue: There was some inconsistency in naming attributes of cypress test IDs, both `data-testid` and `data-cy` were being used across the code.
Changes: Replaces all `data-cy` attributes with `data-testid` to keep it consistent across the codebase.
Fixes: https://tracker.ceph.com/issues/70986
Signed-off-by: Mohammad saif <samdto987@gmail.com>
cy.get('#size').type(size);
// Click the create button and wait for image to be made
- cy.get('[data-cy=submitBtn]').click();
+ cy.get('[data-testid=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.get('[data-cy=submitBtn]').click();
+ cy.get('[data-testid=submitBtn]').click();
this.getExpandCollapseElement(newName).click();
cy.get('[data-testid=rbd-details-table]').contains('td', newSize);
cy.get('[data-testid="table-action-btn"]').click({ multiple: true });
cy.get('button.move-to-trash').click({ force: true });
- cy.get('[data-cy=submitBtn] button').should('be.visible').click({ force: true });
+ cy.get('[data-testid=submitBtn] button').should('be.visible').click({ force: true });
// Clicks trash tab
cy.contains('.nav-link', 'Trash').click();
cy.get('cds-modal #name').clear().type(newName);
}
- cy.get('[data-cy=submitBtn]').click();
+ cy.get('[data-testid=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('[data-cy=submitBtn]').click();
+ cy.get('[data-testid=submitBtn]').click();
// Wait for image to delete and check it is not present
this.getFirstTableCell(name).should('not.exist');
cy.get(`#${i}`).clear();
}
// Clicks save button and checks that values are not present for the selected config
- cy.get('[data-cy=submitBtn]').click();
+ cy.get('[data-testid=submitBtn]').click();
cy.wait(3 * 1000);
// Clicks save button then waits until the desired config is visible, clicks it,
// then checks that each desired value appears with the desired number
- cy.get('[data-cy=submitBtn]').click();
+ cy.get('[data-testid=submitBtn]').click();
cy.wait(3 * 1000);
// Enter config setting name into filter box
});
And('I click on submit button', () => {
- cy.get('[data-cy=submitBtn]').click();
+ cy.get('[data-testid=submitBtn]').click();
});
/**
cy.get('#description').type(description);
// Click the create button and wait for role to be made
- cy.get('[data-cy=submitBtn]').click();
+ cy.get('[data-testid=submitBtn]').click();
cy.get('[data-testid="active-breadcrumb-item"]').should('not.have.text', 'Create');
this.getFirstTableCell(name).should('exist');
cy.get('#description').clear().type(description);
// Click the edit button and check new values are present in table
- cy.get('[data-cy=submitBtn]').click();
+ cy.get('[data-testid=submitBtn]').click();
cy.get('[data-testid="active-breadcrumb-item"]').should('not.have.text', 'Edit');
this.getFirstTableCell(name).should('exist');
cy.get('#email').type(email);
// Click the create button and wait for user to be made
- cy.get('[data-cy=submitBtn]').click();
+ cy.get('[data-testid=submitBtn]').click();
this.getFirstTableCell(username).should('exist');
}
cy.get('#email').clear().type(email);
// Click the edit button and check new values are present in table
- const editButton = cy.get('[data-cy=submitBtn]');
+ const editButton = cy.get('[data-testid=submitBtn]');
editButton.click();
this.getFirstTableCell(email).should('exist');
this.getFirstTableCell(name).should('exist');
[disabled]="disabled"
[form]="form"
[ariaLabel]="submitText"
- data-cy="submitBtn"
+ data-testid="submitBtn"
[buttonType]="submitBtnType">{{ submitText }}</cd-submit-button>
</div>
</ng-container>
[disabled]="disabled"
[form]="form"
[ariaLabel]="submitText"
- data-cy="submitBtn"
+ data-testid="submitBtn"
[modalForm]="modalForm"
[buttonType]="submitBtnType"
class="w-100">{{ submitText }}</cd-submit-button>