Skip to content

Commit

Permalink
docs(asciidoc-markers): Refactor code marker
Browse files Browse the repository at this point in the history
  • Loading branch information
hypery2k committed Jun 4, 2017
1 parent 3dde596 commit 50937de
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion angular-spring-boot-webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@
<argLine>${failsafeArgLine}</argLine>
<skipTests>${skipITs}</skipTests>
<includes>
<include>**/*SerenityIT.class</include>
<include>**/*IT.class</include>
</includes>
<threadCount>${threadCount.uitest}</threadCount>
<parallel>classes</parallel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@
*/
// tag::serenity-ui-test[]
public class LoginSteps extends ScenarioSteps {
// tag::serenity-ui-test[]

private static final long serialVersionUID = -566491664850250304L;

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);
Expand Down Expand Up @@ -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[]
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 50937de

Please sign in to comment.