Search in sources :

Example 1 with IOTHomePage

use of org.wso2.iot.integration.ui.pages.home.IOTHomePage in project product-iots by wso2.

the class NewUserRegistrationTest method userRegisterTest.

@Test(description = "Verify new User registration")
public void userRegisterTest() throws IOException {
    LoginPage login = new LoginPage(driver);
    NewUserRegisterPage registerTest = login.registerNewUser();
    LoginPage loginPage = registerTest.registerUser(Constants.User.Register.FIRST_NAME, Constants.User.Register.LAST_NAME, Constants.User.Register.EMAIL, Constants.User.Register.USER_NAME, Constants.User.Register.PASSWORD, Constants.User.Register.CONFIRM_PASSWORD);
    IOTHomePage homePage = loginPage.loginAsUser(Constants.User.Register.USER_NAME, Constants.User.Register.PASSWORD);
    Assert.assertTrue(homePage.checkUserName());
}
Also used : NewUserRegisterPage(org.wso2.iot.integration.ui.pages.uesr.NewUserRegisterPage) LoginPage(org.wso2.iot.integration.ui.pages.login.LoginPage) IOTHomePage(org.wso2.iot.integration.ui.pages.home.IOTHomePage) Test(org.testng.annotations.Test)

Example 2 with IOTHomePage

use of org.wso2.iot.integration.ui.pages.home.IOTHomePage in project product-iots by wso2.

the class NewUserRegistrationTest method logoutTest.

@Test(description = "Test user logout function", dependsOnMethods = { "userRegisterTest" })
public void logoutTest() throws IOException {
    IOTHomePage homePage = new IOTHomePage(driver);
    homePage.logout();
    Assert.assertEquals(driver.getTitle(), Constants.User.Login.PAGE_TITLE);
}
Also used : IOTHomePage(org.wso2.iot.integration.ui.pages.home.IOTHomePage) Test(org.testng.annotations.Test)

Aggregations

Test (org.testng.annotations.Test)2 IOTHomePage (org.wso2.iot.integration.ui.pages.home.IOTHomePage)2 LoginPage (org.wso2.iot.integration.ui.pages.login.LoginPage)1 NewUserRegisterPage (org.wso2.iot.integration.ui.pages.uesr.NewUserRegisterPage)1