Skip to content

Commit

Permalink
feat: [UIE-8269], [UIE-8290] - fix e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
mpolotsk-akamai committed Dec 5, 2024
1 parent f6ac765 commit cdcb32b
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,17 @@ const manageAccessControl = (allowedIps: string[], existingIps: number = 0) => {
cy.findByTestId('button-access-control').click();

ui.drawer
.findByTitle('Manage Access Controls')
.findByTitle('Manage Access')
.should('be.visible')
.within(() => {
allowedIps.forEach((allowedIp, index) => {
ui.button.findByTitle('Add an IP').click();

if (existingIps > 0) {
ui.button.findByTitle('Add Another IP').click();
} else {
ui.button.findByTitle('Add an IP').click();
}
cy.findByLabelText(
`Allowed IP Address(es) or Range(s) ip-address-${index + existingIps}`
`Allowed IP Addresses or Ranges ip-address-${index + existingIps}`
)
.click()
.type(allowedIp);
Expand Down Expand Up @@ -371,7 +374,7 @@ describe('Update database clusters', () => {

manageAccessControl([randomIp()], 1);
cy.wait('@updateDatabase');
ui.drawer.findByTitle('Manage Access Controls').within(() => {
ui.drawer.findByTitle('Manage Access').within(() => {
cy.findByText(errorMessage).should('be.visible');
ui.drawerCloseButton.find().click();
});
Expand Down

0 comments on commit cdcb32b

Please sign in to comment.