package com.github.gwtd3.demo.client.testcases;

import org.assertj.core.api.Assertions;
import org.junit.Test;
import org.openqa.selenium.By;

import com.github.gwtd3.demo.client.pageobjects.DemoApplication;
import com.github.gwtd3.demo.client.pageobjects.TestSuiteScreen;

public class TestCases extends AbstractSeleniumTest {

    @Test
    public void basic() throws Exception {
        DemoApplication application = DemoApplication.getInstance(driver);
        Assertions.assertThat(driver.getTitle()).isEqualTo("GWT-D3 Demo");
    }

    @Test
    public void testCasesPass() {
        driver.findElement(By.xpath("div . mybutton")).click();

        DemoApplication application = DemoApplication.getInstance(driver);

        TestSuiteScreen testSuite = application.testCaseButton().click();
        testSuite.clickRun().waitTestsAreAllDone();
        Assertions.assertThat(testSuite.unitTestsAreSuccess()).isTrue();
    }

}

@@ -112,40 +112,8 @@
 st;%0D
-%0Aimport org.openqa.selenium.By;%0D
 %0A%0D%0Ai
@@ -568,75 +568,8 @@
  %7B%0D%0A
-        driver.findElement(By.xpath(%22div . mybutton%22)).click();%0D%0A%0D%0A
     

fix test case