public void SignUpAndLoginTest() { // app.Repl(); string username = Utills.ReadTestData("validCredentials", "userName"); string password = Utills.ReadTestData("validCredentials", "password"); // ReportUtill.extentTest.Log(Status.Info, "Given I Launch the App and Navigate to Sigup Screen"); LoginScreen loginScreen = new LoginScreen(app, platform); SignUpScreen signUpScreen = loginScreen.TapSignUpButton(); // ReportUtill.extentTest.Log(Status.Info, "And I Sign Up for a new account"); signUpScreen.PerformSignUp(username, password); // ReportUtill.extentTest.Log(Status.Info, "When I login to the App"); FirstPageScreen firstPageScreen = loginScreen.PerformLogin(username, password); // ReportUtill.extentTest.Log(Status.Info, "Then I confirm ,successful login"); Assert.IsTrue(firstPageScreen.QueryGoButton().Any(), "Not loged in."); }
// [Test] public void CancelSignUpTest() { //app.Repl(); string username = Utills.ReadTestData("validCredentials", "userName"); string password = Utills.ReadTestData("validCredentials", "password"); // ReportUtill.extentTest.Log(Status.Info, "Given I Launch the App"); LoginScreen loginScreen = new LoginScreen(app, platform); // ReportUtill.extentTest.Log(Status.Info, "When I tap on sign up button"); SignUpScreen signUpScreen = loginScreen.TapSignUpButton(); // ReportUtill.extentTest.Log(Status.Info, "When I enter a new username"); signUpScreen.EnterNewUsername(username); // ReportUtill.extentTest.Log(Status.Info, "And I enter a new password"); signUpScreen.EnterNewPassword(password); // ReportUtill.extentTest.Log(Status.Info, "When I tap on cancel button"); signUpScreen.TapCancelButton(); // ReportUtill.extentTest.Log(Status.Info, "Then I confirm sign up is cancelled"); Assert.IsTrue(loginScreen.QueryLoginButton().Any(), "Signup cancel unsuccessful."); }