Search in sources :

Example 1 with Attribute

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

the class HttpRedisJsonTest method createAttribute.

@Test
public void createAttribute() {
    LoginPage login = HomePage.go(this.driver, LoginPage.class);
    HomePage home = login.form().login(HomePage.class);
    // @formatter:off
    home = home.form().attributeName("Demo Key").attributeValue("Demo Value").submit(HomePage.class);
    // @formatter:on
    List<Attribute> attributes = home.attributes();
    assertThat(attributes).extracting("attributeName").contains("Demo Key");
    assertThat(attributes).extracting("attributeValue").contains("Demo Value");
}
Also used : HomePage(sample.pages.HomePage) Attribute(sample.pages.HomePage.Attribute) LoginPage(sample.pages.LoginPage) Test(org.junit.Test) SpringBootTest(org.springframework.boot.test.context.SpringBootTest)

Example 2 with Attribute

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

the class AttributeTests method createAttribute.

@Test
public void createAttribute() {
    HomePage home = HomePage.go(this.driver, HomePage.class);
    // @formatter:off
    home = home.form().attributeName("a").attributeValue("b").submit(HomePage.class);
    // @formatter:on
    List<Attribute> attributes = home.attributes();
    assertThat(attributes).hasSize(1);
    Attribute row = attributes.get(0);
    assertThat(row.getAttributeName()).isEqualTo("a");
    assertThat(row.getAttributeValue()).isEqualTo("b");
}
Also used : HomePage(sample.pages.HomePage) Attribute(sample.pages.HomePage.Attribute) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)2 HomePage (sample.pages.HomePage)2 Attribute (sample.pages.HomePage.Attribute)2 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)1 LoginPage (sample.pages.LoginPage)1