public void AccountSectionNotDisplayed() { var testUser = TestDataFactory.UserWithNoTermsAsPaymentOption(); string term = "40 Net Days, cool Stuff"; IndexPage indexPage = new IndexPage(driver, url); LoginPage loginPage = indexPage.Header.ClickOnSignIn(); indexPage = loginPage.Login(testUser.Email, testUser.Password); Assert.IsNotNull(indexPage, "Login failed"); PaymentOptionsHomePage viewPaymentsPage = indexPage.Header.ClickOnPaymentOptions(); bool accountLevelExist = viewPaymentsPage.AccountLevelExist(); Assert.IsFalse(accountLevelExist, "Account section is not hidden as expected"); //check for user: cannot have terms var paymentsInDropdown = viewPaymentsPage.GetPaymentsDropdownItems(AccessLevel.User); string termInDropdown = paymentsInDropdown.FirstOrDefault(item => item.Equals(term)); Assert.IsNull(termInDropdown, "User level cannot have terms"); viewPaymentsPage.Header.ClickOnSignOut(); }
public void AccountLevelSectionIsDisplayed() { var testUser = DataFactory.Users.CreateTestUserWithTerms("30 days cool stuff"); APIndexPage indexPage = new APIndexPage(Driver, Url); APLoginPage loginPage = indexPage.Header.ClickOnSignIn(); indexPage = loginPage.Login(testUser.Username, testUser.Password); PaymentOptionsHomePage viewPaymentsPage = indexPage.Header.ClickOnPaymentOptions(); bool accountLevelExist = viewPaymentsPage.AccountLevelExist(); Assert.IsTrue(accountLevelExist, "Account section is not displayed"); }
public void AccountLevelSectionIsDisplayed() { var testUser = TestDataFactory.CreateLoginAccount(); IndexPage indexPage = new IndexPage(driver, url); LoginPage loginPage = indexPage.Header.ClickOnSignIn(); indexPage = loginPage.Login(testUser.Email, testUser.Password); Assert.IsNotNull(loginPage, "login failed"); PaymentOptionsHomePage viewPaymentsPage = indexPage.Header.ClickOnPaymentOptions(); bool accountLevelExist = viewPaymentsPage.AccountLevelExist(); Assert.IsTrue(accountLevelExist, "Account section is not displayed"); viewPaymentsPage.Header.ClickOnSignOut(); }