Skip to content

Commit

Permalink
flaky specs
Browse files Browse the repository at this point in the history
  • Loading branch information
tsubik committed Nov 13, 2024
1 parent e6282dd commit 561240b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions e2e/cypress/e2e/operator.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ describe('Operator', function () {
cy.get('#input-details').clear().type('Details about Interholco');
cy.get('#input-website').clear().type('https://example.com');
cy.get('#input-address').clear().type('Some address');
// clear old image if exists
cy.get(".file-button").then(($button) => {
if ($button.length) {
cy.wrap($button).click();
}
});
cy.get('.file-dropzone').attachFile('acme-logo.png', { subjectType: 'drag-n-drop' });
cy.get('button').contains('Update producer').click();
cy.get('.rrt-text', {timeout: 35000}).should('have.text', 'Profile saved correctly');
Expand Down
4 changes: 2 additions & 2 deletions e2e/cypress/e2e/user.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ describe('User', () => {
cy.get('#input-email').type('[email protected]');
cy.get('#input-password').type('password');
cy.get('#input-password_confirmation').type('password2');
cy.get('button').contains('Sign up').click();
cy.contains('.error', 'The field is required');
cy.contains('.error', 'The field should have at least 10 characters');
cy.contains('.error', 'The field should have at least one capital (uppercase) letter');
cy.contains('.error', 'The field should have at least one digit');
cy.contains('.error', 'The field should have at least 10 characters');
cy.contains('.error', 'The field should be equal to password');
cy.get('button').contains('Sign up').click();
cy.get('.rrt-text').should('have.text', 'Fill all the required fields');
cy.get('#input-password').clear().type('Superpassword1');
cy.get('#input-password_confirmation').clear().type('Superpassword1');
Expand Down

0 comments on commit 561240b

Please sign in to comment.