K
K
Konstantin Fedoev2017-11-19 23:00:56
JavaScript
Konstantin Fedoev, 2017-11-19 23:00:56

Write jsapi test for shopping cart?

There is an online store, you need to write a test for a basket of goods that measures the acceptable number of different products in the basket.
Using jsapi we put the product in the cart

Cart.addProduct({
  id: 10, 
  quantity: 3, 
  callback: function(success, product, cart){
    console.log(success); // true or false
    console.log(product.name);
  }
})

after which you need to reload the page, and continue methodically throwing the product with a reload. And at the moment of freezing / braking, stop the test and fix this fact.
Here's how to implement it in the form of a test? Help the kettle

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question