Search in sources :

Example 1 with HomePage

use of sample.pages.HomePage in project spring-session by spring-projects.

the class FindByUsernameTests method login.

@Test
public void login() {
    LoginPage login = HomePage.go(this.driver);
    HomePage home = login.form().login(HomePage.class);
    home.assertAt();
    home.containCookie("SESSION");
    home.doesNotContainCookie("JSESSIONID");
    home.terminateButtonDisabled();
}
Also used : HomePage(sample.pages.HomePage) LoginPage(sample.pages.LoginPage) Test(org.junit.Test) SpringBootTest(org.springframework.boot.test.context.SpringBootTest)

Example 2 with HomePage

use of sample.pages.HomePage in project spring-session by spring-projects.

the class AttributeTests method noAttributes.

@Test
public void noAttributes() {
    HomePage home = HomePage.go(this.driver, HomePage.class);
    assertThat(home.attributes()).isEmpty();
}
Also used : HomePage(sample.pages.HomePage) Test(org.junit.Test)

Example 3 with HomePage

use of sample.pages.HomePage in project spring-session by spring-projects.

the class HttpRedisJsonTest method login.

@Test
public void login() {
    LoginPage login = HomePage.go(this.driver, LoginPage.class);
    HomePage home = login.form().login(HomePage.class);
    home.containCookie("SESSION");
    home.doesNotContainCookie("JSESSIONID");
}
Also used : HomePage(sample.pages.HomePage) LoginPage(sample.pages.LoginPage) Test(org.junit.Test) SpringBootTest(org.springframework.boot.test.context.SpringBootTest)

Example 4 with HomePage

use of sample.pages.HomePage in project spring-session by spring-projects.

the class BootTests method logout.

@Test
public void logout() {
    LoginPage login = HomePage.go(this.driver);
    HomePage home = login.form().login(HomePage.class);
    home.logout();
    login.assertAt();
}
Also used : HomePage(sample.pages.HomePage) LoginPage(sample.pages.LoginPage) Test(org.junit.Test) SpringBootTest(org.springframework.boot.test.context.SpringBootTest)

Example 5 with HomePage

use of sample.pages.HomePage in project spring-session by spring-projects.

the class SecurityTests method unauthenticatedUserSentToLogInPage.

@Test
public void unauthenticatedUserSentToLogInPage() {
    HomePage homePage = HomePage.go(this.driver);
    LoginPage loginPage = homePage.unauthenticated();
    loginPage.assertAt();
}
Also used : HomePage(sample.pages.HomePage) LoginPage(sample.pages.LoginPage) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)13 HomePage (sample.pages.HomePage)13 LoginPage (sample.pages.LoginPage)10 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)5 Attribute (sample.pages.HomePage.Attribute)2 Cookie (org.openqa.selenium.Cookie)1 WebElement (org.openqa.selenium.WebElement)1