Skip to content

Commit

Permalink
try to fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
tiyiprh committed Aug 21, 2024
1 parent 024cab2 commit 0221ad6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend/awx/administration/instances/InstanceForm.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ describe('Add instance Form', () => {
it('should validate required fields on save', () => {
cy.mount(<AddInstance />);
cy.get('[data-cy="listener-port"]').type('0');
cy.clickButton(/^Save instance$/);
cy.clickButton(/^Create instance$/);
cy.contains('Host name is required.').should('be.visible');
});

Expand All @@ -16,7 +16,7 @@ describe('Add instance Form', () => {
body: { hostname: ['whitespaces in hostnames are illegal'] },
}).as('postInstance');
cy.get('[data-cy="hostname"]').type('illegal hostname test');
cy.clickButton(/^Save instance$/);
cy.clickButton(/^Create instance$/);
cy.wait('@postInstance');
cy.contains('whitespaces in hostnames are illegal').should('be.visible');
});
Expand All @@ -34,7 +34,7 @@ describe('Add instance Form', () => {
},
}).as('addInstance');
cy.get('[data-cy="hostname"]').type('AddInstanceMock');
cy.clickButton(/^Save instance$/);
cy.clickButton(/^Create instance$/);
cy.wait('@addInstance')
.its('request.body')
.then((instance: Instance) => {
Expand Down Expand Up @@ -81,7 +81,7 @@ describe('Add instance Form', () => {
cy.get('[data-cy="managed_by_policy"]').click();
cy.get('[data-cy="peers_from_control_nodes"]').click();

cy.clickButton(/^Save instance$/);
cy.clickButton(/^Create instance$/);
cy.wait('@addInstanceWithPeers')
.its('request.body')
.then((instance: Instance) => {
Expand Down

0 comments on commit 0221ad6

Please sign in to comment.