diff --git a/angular-spring-boot-webapp/pom.xml b/angular-spring-boot-webapp/pom.xml index fdac693..093179b 100644 --- a/angular-spring-boot-webapp/pom.xml +++ b/angular-spring-boot-webapp/pom.xml @@ -337,7 +337,7 @@ ${failsafeArgLine} ${skipITs} - **/*SerenityIT.class + **/*IT.class ${threadCount.uitest} classes diff --git a/angular-spring-boot-webapp/src/test/java/ngSpring/demo/integration/pages/LoginPage.java b/angular-spring-boot-webapp/src/test/java/ngSpring/demo/integration/pages/LoginPage.java index 8cf7a75..7b824fd 100644 --- a/angular-spring-boot-webapp/src/test/java/ngSpring/demo/integration/pages/LoginPage.java +++ b/angular-spring-boot-webapp/src/test/java/ngSpring/demo/integration/pages/LoginPage.java @@ -8,14 +8,17 @@ /** * @author mreinhardt */ -// tag::serenity-ui-test[] @DefaultUrl("http://localhost:9000/login") +// tag::serenity-ui-test[] public class LoginPage extends CmsPage { + // end::serenity-ui-test[] public LoginPage(WebDriver driver) { super(driver); } + // tag::serenity-ui-test[] + @FindBy(id = "username") private WebElement userInput; diff --git a/angular-spring-boot-webapp/src/test/java/ngSpring/demo/integration/steps/EventSteps.java b/angular-spring-boot-webapp/src/test/java/ngSpring/demo/integration/steps/EventSteps.java index bab4624..20c837a 100644 --- a/angular-spring-boot-webapp/src/test/java/ngSpring/demo/integration/steps/EventSteps.java +++ b/angular-spring-boot-webapp/src/test/java/ngSpring/demo/integration/steps/EventSteps.java @@ -20,7 +20,6 @@ public class EventSteps { public SystemPropertiesConfiguration systemPropertiesConfiguration; // tag::serenity-rest-test[] - @StepGroup public Response getEvent(String username, String password, String eventId) { return RestAssured.given() diff --git a/angular-spring-boot-webapp/src/test/java/ngSpring/demo/integration/steps/LoginSteps.java b/angular-spring-boot-webapp/src/test/java/ngSpring/demo/integration/steps/LoginSteps.java index f7c3624..6fd0557 100644 --- a/angular-spring-boot-webapp/src/test/java/ngSpring/demo/integration/steps/LoginSteps.java +++ b/angular-spring-boot-webapp/src/test/java/ngSpring/demo/integration/steps/LoginSteps.java @@ -13,6 +13,7 @@ */ // tag::serenity-ui-test[] public class LoginSteps extends ScenarioSteps { + // tag::serenity-ui-test[] private static final long serialVersionUID = -566491664850250304L; @@ -20,14 +21,13 @@ public LoginSteps(Pages pages) { super(pages); } + // end::serenity-ui-test[] // PAGES - public LoginPage loginPage() { return getPages().currentPageAt(LoginPage.class); } // STEPS - @Step public void inputUsername(String user) { loginPage().inputUserName(user); @@ -61,10 +61,12 @@ public void userShouldSeeAnErrorMessage() { assertThat("There should be an error message ", loginPage().errorMessageIsVisible()); assertThat("There should be only one info message ", loginPage().onlyOneErrorMessageIsVisible()); } + // end::serenity-ui-test[] @Step public void userShouldSeeNoErrorMessage() { assertThat("There should be no error message ", !loginPage().errorMessageIsVisible()); } + // tag::serenity-ui-test[] } // end::serenity-ui-test[] diff --git a/angular-spring-boot-webapp/src/test/java/ngSpring/demo/integration/ui/LoginSerenityIT.java b/angular-spring-boot-webapp/src/test/java/ngSpring/demo/integration/ui/LoginIT.java similarity index 95% rename from angular-spring-boot-webapp/src/test/java/ngSpring/demo/integration/ui/LoginSerenityIT.java rename to angular-spring-boot-webapp/src/test/java/ngSpring/demo/integration/ui/LoginIT.java index 3ddf781..6670a7c 100644 --- a/angular-spring-boot-webapp/src/test/java/ngSpring/demo/integration/ui/LoginSerenityIT.java +++ b/angular-spring-boot-webapp/src/test/java/ngSpring/demo/integration/ui/LoginIT.java @@ -19,7 +19,7 @@ @Narrative(text = "Login") @RunWith(SerenityParameterizedRunner.class) @UseTestDataFrom(value = "testdata/login.csv") -public class LoginSerenityIT extends AbstractSerenityITTestBase { +public class LoginIT extends AbstractSerenityITTestBase { @Steps public LoginSteps loginSteps;