Пример #1
0
        [TestCase("user", "password")] //enters valid username and password
        public void TestFirstnameAndLastnameInProfilePage(string user, string password)
        {
            //calls helper method InitLoginPage
            InitLoginPage(user, password, null, null, null);

            Thread.Sleep(2000);
            //creates instance of NavigationControl object
            Navigationcontrol navControl = new Navigationcontrol(driver);

            //verifies navigation links
            VerifyNavigationControl(navControl);
            //clicks on profile link
            navControl.GotoProfile();
            Thread.Sleep(2000);
            //creates new Profile page object
            ProfilePage profilePage = new ProfilePage(driver);

            //checks username in profile container
            profilePage.VerifyTextboxes();
            Thread.Sleep(2000);
            //enters firstname and last name
            profilePage.EnterFirstAndLastName("John", "Sanders");
            //clicks on home link
            navControl.GotoHome();
            Thread.Sleep(2000);
            //verifies first and last name in home page profile container
            profilePage.VerifyFullNameInHome("John ", "Sanders");
            //clicks on profile link
            navControl.GotoProfile();
            //resets to original value
            profilePage.ResetToOriginal();
        }
Пример #2
0
        [TestCase("pinkfloyd", "password")] //enters valid username and password
        public void TestProfilePageTitleAndFooter(string user, string password)
        {
            //calls helper method InitLoginPage
            InitLoginPage(user, password, null, null, null);

            Thread.Sleep(2000);
            //creates instance of NavigationControl object
            Navigationcontrol navControl = new Navigationcontrol(driver);

            //verifies navigation links
            VerifyNavigationControl(navControl);
            //clicks on profile link
            navControl.GotoProfile();
            Thread.Sleep(2000);
            //creates new Explore page object
            ProfilepageTitleandFooter profilepageTitle = new ProfilepageTitleandFooter(driver);

            Thread.Sleep(2000);
            //explore title
            var expected = "PinkFloyd's profile - BC Yips!";
            var actual   = driver.Title;

            Assert.AreEqual(expected, actual, "title does not match");
            //verifies footer on home page
            expected = "© 2020 - Bellevue College";
            actual   = profilepageTitle.FooterBC.Text;
            Assert.AreEqual(expected, actual, "Footer does not match");
        }
Пример #3
0
        [TestCase("pinkfloyd", "password")] //enters valid username and password
        public void TestProfilePageSearchBox(string user, string password)
        {
            //calls helper method InitLoginPage
            InitLoginPage(user, password, null, null, null);
            //creates instance of NavigationControl object
            Navigationcontrol navControl = new Navigationcontrol(driver);

            //verifies navigation links
            VerifyNavigationControl(navControl);
            //clicks on Profile link
            navControl.GotoProfile();
            //creates instance of Searchbox object
            SearchBox searchBox = new SearchBox(driver);

            Thread.Sleep(2000);
            //verifies search box elements
            searchBox.VerifyElement();
            Thread.Sleep(2000);
            //send text into search box
            searchBox.SearchYip("wind chimes");
            Thread.Sleep(2000);
            //verifies explore page title
            searchBox.VerifyTitle();
            //asserts text with search label
            searchBox.VerifySearchLabel("wind chimes");
        }
Пример #4
0
        [TestCase("user", "password", "[]\\;'/", "[]\\;'/")]     //enters valid username and password
        public void TestChangePasswordFields(string user, string password, string newPassword, string confirmNewPassword)
        {
            //calls helper method InitLoginPage
            InitLoginPage(user, password, null, null, null);

            Thread.Sleep(2000);
            //creates instance of NavigationControl object
            Navigationcontrol navControl = new Navigationcontrol(driver);

            //verifies navigation links
            VerifyNavigationControl(navControl);
            //clicks on profile link
            navControl.GotoProfile();
            Thread.Sleep(2000);
            //creates new Profile page object
            ProfilePageChangePassword changePassword = new ProfilePageChangePassword(driver);

            changePassword.VerifyChangePassword(password, newPassword, confirmNewPassword);
            Thread.Sleep(2000);
            //clicks on sign-out link
            navControl.SignOut();
            Thread.Sleep(2000);
            //sign in again with a new password
            InitLoginPage(user, newPassword, null, null, null);
            Thread.Sleep(2000);
            //creates new homepage object
            HomePage homepage = new HomePage(driver);

            //verifies homepage title
            homepage.VerifyTitleAndFooter();
            //clicks on profile link
            navControl.GotoProfile();
            Thread.Sleep(2000);
            //creates new Profile page object
            changePassword = new ProfilePageChangePassword(driver);
            //resets to original password
            changePassword.VerifyChangePassword(newPassword, password, password);
        }
Пример #5
0
        [TestCase("user", "password")] //enters valid username and password
        public void TestUserNameInProfileContainer(string user, string password)
        {
            //calls helper method InitLoginPage
            InitLoginPage(user, password, null, null, null);

            Thread.Sleep(2000);
            //creates instance of NavigationControl object
            Navigationcontrol navControl = new Navigationcontrol(driver);

            //verifies navigation links
            VerifyNavigationControl(navControl);
            //clicks on profile link
            navControl.GotoProfile();
            Thread.Sleep(2000);
            //creates new Explore page object
            ProfilePage profilePage = new ProfilePage(driver);

            //checks username in profile container
            profilePage.VerifyUserName("user");
        }
Пример #6
0
        [TestCase("pinkfloyd", "password")] //enters valid username and password
        public void TestUserProfileAndYippersHeader(string user, string password)
        {
            //calls helper method InitLoginPage
            InitLoginPage(user, password, null, null, null);

            Thread.Sleep(2000);
            //creates instance of NavigationControl object
            Navigationcontrol navControl = new Navigationcontrol(driver);

            //verifies navigation links
            VerifyNavigationControl(navControl);
            //clicks on profile link
            navControl.GotoProfile();
            Thread.Sleep(2000);
            //creates new Explore page object
            ProfilepageTitleandFooter profilepageTitle = new ProfilepageTitleandFooter(driver);

            Thread.Sleep(2000);
            //checks user profile and yippers header
            profilepageTitle.VerifyUserProfileAndYippersHeader("PinkFloyd");
        }
Пример #7
0
        [TestCase("user", "password", "", "", "The New password field is required.")]                                                                      //enters valid username and password, but invalid new password

        public void TestInvalidChangePasswordFields(string user, string password, string newPassword, string confirmNewPassword, string errorMessage)
        {
            //calls helper method InitLoginPage
            InitLoginPage(user, password, null, null, null);

            Thread.Sleep(2000);
            //creates instance of NavigationControl object
            Navigationcontrol navControl = new Navigationcontrol(driver);

            //verifies navigation links
            VerifyNavigationControl(navControl);
            //clicks on profile link
            navControl.GotoProfile();
            Thread.Sleep(2000);
            //creates new Profile page object
            ProfilePageChangePassword changePassword = new ProfilePageChangePassword(driver);

            //sends current, new and confirm new password into textboxes
            changePassword.VerifyChangePassword(password, newPassword, confirmNewPassword);
            //verifies error message
            changePassword.VerifyErrorLabel(errorMessage);
        }