it('user should see the product details', () => { driver.get('http://localhost:8081/#/products/1'); utils(driver).waitForElementVisible(By.css('.product-details')); expect('.product-details').dom.to.be.visible(); expect('.img-thumbnail').dom.to.be.visible(); expect('.img-thumbnail').dom.to.have.attribute('src', 'http://lorempixel.com/400/400/'); expect('h2').dom.to.have.text('abc'); expect('.description').dom.to.have.text('John the zoo'); expect('.price').dom.to.have.text('Price: $3.40'); });
it('user should see the product list', () => { driver.get('http://localhost:8081/#/products'); utils(driver).waitForElementVisible(By.css('.product-item')); expect('.product-item').dom.to.have.count(3); });