Skip to content

Commit

Permalink
Apply test on another product in order list
Browse files Browse the repository at this point in the history
  • Loading branch information
zeina-idris committed Oct 16, 2019
1 parent d7536e5 commit 85682b3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/e2e/specs/orderList_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ describe('my orders', () => {
};
const orderDraft1 = {
orderNumber: '1234',
paymentState: 'Pending',
shipmentState: 'Shipped',
};

const orderDraft2 = {
orderNumber: '4321',
paymentState: 'Pending',
shipmentState: 'Shipped',
};

const cartDraft1 = {
Expand Down Expand Up @@ -46,21 +46,21 @@ describe('my orders', () => {
it('shows my orders', () => {
cy.createOrder(cartDraft1, orderDraft1);
cy.createOrder(cartDraft2, orderDraft2);
cy.changeLanguage('Deutsch');
cy.get('[data-test=my-orders-button]', { timeout: 20000 }).click();
cy.get('[data-test=order-list]')
.should('have.length', 2)
.eq(0)
.eq(1)
.then(($order) => {
cy.wrap($order)
.find('[data-test=total-price]')
.contains(/^\s*368,75\s\s*$/);
.contains(/^\s*372,50\s\s*$/);
cy.wrap($order)
.find('[data-test=order-date]')
.contains(/^\s*\d{1,2}\.*\s*[A-Za-zäÄöÖüÜß].+\s*\d{4}\s*$/);
cy.wrap($order)
.find('[data-test=order-number]')
.contains('1234');
cy.changeLanguage('Deutsch');
.contains('4321');
cy.wrap($order)
.find('[data-test=shipment-state]')
.contains('Versandt');
Expand Down

0 comments on commit 85682b3

Please sign in to comment.