public void TestChangeName(User admin, string[] names) { LoginPage loginPage = Application.Get().Login(); UsersPage usersPage = loginPage.SuccessAdminLogin(admin); // Test steps // Go to EditProfile page and check if this page is really opened YourProfilePage yourProfilePage = usersPage.GotoEditProfile(); Assert.IsNotNull(yourProfilePage.YourProfileLabel); yourProfilePage.ClickEditName(); Assert.IsNotNull(yourProfilePage.GetNewNameField()); // Set name with digits and try to change it. Check if appropriate message appears yourProfilePage.SetNewName(names[0]); yourProfilePage.ChangeName(admin); Assert.AreEqual(YourProfilePage.ErrorMessageForNameWithDigits, yourProfilePage.GetMessageText()); // Set name with specific symbols and try to change it. Check if appropriate message appears yourProfilePage.SetNewName(names[1]); yourProfilePage.ChangeName(admin); Assert.AreEqual(YourProfilePage.ErrorMessageForNameWithSymbols, yourProfilePage.GetMessageText()); // Set correct name try to change it. Check if name is really changed yourProfilePage.SetNewName(names[2]); yourProfilePage.ChangeName(admin); Assert.AreEqual(names[2], admin.GetName()); // Return to previous state loginPage = yourProfilePage.GotoLogOut(); }
public void BFC_LowScore_NoCompanyNumber_AutoAddress_ApplyDecision_ApplyProfileProduct() //No Matches { StartPage.ClickCookie(); StartPage.FillOutStartPage("25345", "testy14223"); YourBusinessPage.FillOutYourBusinessPage("Sole trader", "NG11 1AA", 1823, "51000", "Asset purchase", "No"); AboutYouPage.FillOutAboutYouPage("Jack", "Bro", "*****@*****.**", "01234567890"); YourMatchesPage.GetCertainty(); CertaintyApprovalPage.FillOutCertaintyApprovalAuto("NG11 1AA", "12", "12", "1975"); ApplyWithConfidencePage.ApplyForBestDecision(1); YourProfilePage.FundNextProduct(); }
public void BFC_LowScore_CompanyNumber_AutoAddress_FundOther() { StartPage.ClickCookie(); StartPage.FillOutStartPage("43500", "jacks"); YourBusinessPage.FillOutYourBusinessPage(611, "3300", "Asset purchase", "No"); AboutYouPage.FillOutAboutYouPage("Jack34", "Bro34", "*****@*****.**", "01234567811"); YourMatchesPage.GetCertainty(); CertaintyApprovalPage.FillOutCertaintyApprovalAuto("NG1 1AA", "12", "12", "1990", "No"); ApplyWithConfidencePage.NoMatches(); YourProfilePage.FundOtherMatch(); }
public void BFC_HighScore_NoCompanyNumber_AutoAddress_CardPayments_ApplyDecision_FundNext() //No matches { StartPage.ClickCookie(); StartPage.FillOutStartPage("51000", "Pizzaaaa"); YourBusinessPage.FillOutYourBusinessPage("Sole trader", "NG1 1AA", 60600000, "1555456", "Asset purchase", "A large proportion of my customers"); AboutYouPage.FillOutAboutYouPage("Jack", "Bro", "*****@*****.**", "01234567890"); YourMatchesPage.GetCertainty(); CertaintyApprovalPage.FillOutCertaintyApprovalAuto("12345", "12", "12", "1960", "Financial Services", "32345", "Barclaycard"); ApplyWithConfidencePage.ApplyForBestDecision(1); YourProfilePage.FundNextProduct(); }
public void CancelButtonTest(User admin, string newName, string newPassword) { // --- Precondition --- // admin.SetEmail("*****@*****.**"); admin.SetPassword("blackstar"); // Login LoginPage loginPage = Application.Get(ApplicationSourcesRepository.ChromeByIP()).Login(); UsersPage usersPage = loginPage.SuccessAdminLogin(admin); // --- Test Steps --- // // 1. Go to 'Edit Profile' page YourProfilePage yourProfilePage = usersPage.GotoEditProfile(); Assert.IsNotNull(yourProfilePage.YourProfileLabel); admin.SetName(yourProfilePage.GetNameValue()); // Get Current Name // 2. Go to 'Edit Name' form yourProfilePage.ClickEditName(); Assert.IsNotNull(yourProfilePage.GetNewNameField()); // 3. Set new name yourProfilePage.SetNewName(newName); // 4. Press 'Cancel' and check if information wasn't saved. yourProfilePage.ClickCancel(); Assert.AreNotEqual(admin.GetName(), newName); // 5. Go to 'Edit Password' form yourProfilePage.ClickEditPassword(); Assert.IsNotNull(yourProfilePage.YourProfileLabel); // 6. Set new password yourProfilePage.SetCurrentPassword(admin.GetPassword()); yourProfilePage.SetNewPassword(newPassword); yourProfilePage.SetConfirmPassword(newPassword); // 7. Press 'Cancel' and check if information wasn't saved. yourProfilePage.ClickCancelPassword(); Assert.AreNotEqual(admin.GetPassword(), newPassword); // --- Logout --- // loginPage = yourProfilePage.GotoLogOut(); Console.WriteLine("Test Done!"); }