package ru.stqa.study.selenium.tests;




import org.junit.Assert;
import org.junit.Test;
import static org.openqa.selenium.support.ui.ExpectedConditions.*;

import java.beans.Visibility;


/**
 * Created by oleg on 18.12.16.
 */
public class TestWorkBacketNew extends TestBase {

    @Test
    public void testWorkBacketNew() throws Exception {
        app.addProductToShoppingBasket("Small");
        sleep(1000);
        Assert.assertEquals(app.productPage.countProductsInBasket.getText(),"1");
        app.productPage.open();
        sleep(500);
        app.productPage.redDuckP3.click();
        sleep(500);
        app.productPage.addProductToBacket.click();
        sleep(1000);
        app.productPage.open();
        sleep(500);
        app.productPage.yellowDuck3.click();
        sleep(500);
        app.productPage.selectProduct("Small");
        app.productPage.addProductToBacket.click();
        sleep(1000);
        Assert.assertEquals(app.productPage.countProductsInBasket.getText(),"3");
        app.productPage.backet.click();
      visibilityOf(app.productPage.tableElement);

        while ( app.productPage.removeBackets.size() !=0)
    {
        app.productPage.removeBacket.click();
    }
    sleep(1000);
        stalenessOf(app.productPage.tableElement);







    }








}


@@ -33,18 +33,16 @@
 ests;%0A%0A%0A
-%0A%0A
 import o
@@ -81,16 +81,17 @@
 t.Test;%0A
+%0A
 import s
@@ -150,31 +150,86 @@
 ons.
-*;%0A%0Aimport java.beans.V
+stalenessOf;%0Aimport static org.openqa.selenium.support.ui.ExpectedConditions.v
 isib
@@ -233,16 +233,18 @@
 sibility
+Of
 ;%0A%0A%0A/**%0A
@@ -541,16 +541,17 @@
 tText(),
+ 
 %221%22);%0A  
@@ -1050,16 +1050,17 @@
 tText(),
+ 
 %223%22);%0A  
@@ -1093,24 +1093,26 @@
 et.click();%0A
+  
       visibi
@@ -1165,17 +1165,16 @@
  while (
- 
 app.prod
@@ -1208,17 +1208,18 @@
 ) !=
+ 
 0)
+ %7B
 %0A    
-%7B%0A
     
@@ -1264,18 +1264,26 @@
 ();%0A    
-%7D%0A
+    %7D%0A    
     slee
@@ -1348,24 +1348,13 @@
 ;%0A%0A%0A
-%0A%0A%0A%0A%0A    %7D%0A%0A%0A%0A%0A%0A
+    %7D
 %0A%0A%0A%7D

reformat code