Skip to content

Commit

Permalink
Improve test
Browse files Browse the repository at this point in the history
  • Loading branch information
zeina-idris committed Oct 15, 2019
1 parent f9887be commit d7536e5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tests/e2e/specs/miniCart_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ describe('MiniCart', () => {

cy.addLineItem('/product/lemare-booties-0778-brown/M0E20000000E0XM', 2);
cy.get('[data-test=mini-cart-content]')
.should('be.visible')
.wait(3000)
.should('be.visible');
cy.wait(3000)
.should('not.be.visible');

cy.get('[data-test=mini-cart-open-button]').trigger('mouseenter');
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/specs/orderList_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ describe('my orders', () => {
cy.createOrder(cartDraft1, orderDraft1);
cy.createOrder(cartDraft2, orderDraft2);
cy.get('[data-test=my-orders-button]', { timeout: 20000 }).click();
cy.get('[data-test=order-list]', { timeout: 10000 })
cy.get('[data-test=order-list]')
.should('have.length', 2)
.eq(0)
.then(($order) => {
Expand Down
6 changes: 3 additions & 3 deletions tests/e2e/specs/userProfile_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe('user profile', () => {
.should('contain', email);

cy.get('[data-test=edit-profile-form-show]').click();
cy.get('input[data-test=edit-profile-form-email]')
cy.get('[data-test=edit-profile-form-email]')
.should('have.value', email);
cy.get('[data-test=edit-profile-form-cancel]').click();
cy.get('[data-test=user-profile-email]')
Expand All @@ -54,8 +54,8 @@ describe('user profile', () => {
cy.get('[data-test=change-password-form-newpassword]').type(password);
cy.get('[data-test=change-password-form-newpasswordconfirm]').type(password);

cy.get('[data-test="edit-profile-form-submit"]').click();
cy.get('[data-test="success-state-layer"]')
cy.get('[data-test=edit-profile-form-submit]').click();
cy.get('[data-test=success-state-layer]')
.should('have.class', 'state-layer fade-enter-active');

cy.get('[data-test=logout-button]').click();
Expand Down

0 comments on commit d7536e5

Please sign in to comment.