コード例 #1
0
        public void CheckTranslationOnHomeUsersPage()
        {
            WelcomePage welcome = new WelcomePage();

            welcome.Init(driver);
            var login = welcome.SignIn();
            var home  = (UsersHomePage)login.Login("*****@*****.**", "Admin123");

            home.ChangeToUKR();
            home.Init(driver);
            var role = home.GetRoleText();

            Assert.AreEqual(t.User.ToLower(), role.ToLower());
            var addresses = home.GetAddressesText();

            Assert.AreEqual(t.Addresses.ToLower(), addresses.ToLower());
            var connectedUtilities = home.GetConnectedUtilitiesText();

            Assert.AreEqual(t.ConnectedUtilities.ToLower(), connectedUtilities.ToLower());
            var payments = home.GetPaymentsText();

            Assert.AreEqual(t.Payments.ToLower(), payments.ToLower());
            var paymentsHistory = home.GetPaymentsHistoryText();

            Assert.AreEqual(t.PaymentsHistory.ToLower(), paymentsHistory.ToLower());
            var rateInspectors = home.GetRateInspectorsText();

            Assert.AreEqual(t.RateInspectors.ToLower(), rateInspectors.ToLower());
            var mainPageTitle = home.GetMainPageTitleText();

            Assert.AreEqual(t.MainPage.ToLower(), mainPageTitle.ToLower());
            var xTitle = home.GetXTitleText();

            Assert.AreEqual(t.SomeText.ToLower(), xTitle.ToLower());
        }
コード例 #2
0
        public void UserIsUnableToLoginNonValidData()
        {
            WelcomePage welcome = new WelcomePage();

            welcome.Init(driver);
            var login = welcome.SignIn();
            var test  = (LoginPage)login.Login("*****@*****.**", "Admin12345");

            Assert.IsTrue(test.IsErrorPresent());
        }
コード例 #3
0
        public void UserIsAbleToLogin()
        {
            WelcomePage welcome = new WelcomePage();

            welcome.Init(driver);
            var login = welcome.SignIn();
            var home  = (UsersHomePage)login.Login("*****@*****.**", "Admin123");

            Assert.IsTrue(home.GetRole() == true);
        }
コード例 #4
0
        public void VerifyThatAdminCanEditManager()
        {
            driver.GoToURL();
            WelcomePage welcome = new WelcomePage();

            welcome.Init(driver);
            var login     = welcome.SignIn();
            var home      = (HomePageAdmin)login.Login("*****@*****.**", "Admin123");
            var utilities = home.ClickOnUtilities();
        }
コード例 #5
0
        public void LoginAsAdminWithNonValidData()
        {
            driver.GoToURL();
            WelcomePage welcome = new WelcomePage();

            welcome.Init(driver);
            var login = welcome.SignIn();
            var home  = login.Login("*****@*****.**", "Admin5677");
            //var role = home.GetTextRole();
            //Assert.AreEqual("ADMIN", role);
        }
コード例 #6
0
        public void VerifyThatListOfUtilitiesIsVisibleForAdmin()
        {
            driver.GoToURL();
            WelcomePage welcome = new WelcomePage();

            welcome.Init(driver);
            var login     = welcome.SignIn();
            var home      = (HomePageAdmin)login.Login("*****@*****.**", "Admin123");
            var utilities = home.ClickOnUtilities();

            Assert.IsTrue(utilities.TableOfUtilitiesIsVisible());
        }
コード例 #7
0
        public void VerifyThatAdminHasAbilityToAccessHisProfile()
        {
            driver.GoToURL();
            WelcomePage welcome = new WelcomePage();

            welcome.Init(driver);
            var login = welcome.SignIn();
            var home  = (HomePageAdmin)login.Login("*****@*****.**", "Admin123");
            var prof  = home.GoToProfile();

            Assert.AreEqual("Profile", prof.GetTitle());
        }
コード例 #8
0
        public void VerifyThatAdminHasAbilityToAccessHisDashboard()
        {
            driver.GoToURL();
            WelcomePage welcome = new WelcomePage();

            welcome.Init(driver);
            var login = welcome.SignIn();
            var home  = (HomePageAdmin)login.Login("*****@*****.**", "Admin123");
            var role  = home.GetTextRole();

            Assert.AreEqual("ADMIN", role);
        }
コード例 #9
0
        public void PersonalInfoMatch()
        {
            WelcomePage welcome = new WelcomePage();

            welcome.Init(driver);
            var login   = welcome.SignIn();
            var home    = (UsersHomePage)login.Login("*****@*****.**", "Admin123");
            var profile = home.GoToProfile();

            Assert.AreEqual("Masha", profile.GetName());
            Assert.AreEqual("Chuikina", profile.GetSurname());
            Assert.AreEqual("+380968780876", profile.GetPhoneNumber());
        }
コード例 #10
0
        public void PersonalCabinetAccess()
        {
            WelcomePage welcome = new WelcomePage();

            welcome.Init(driver);
            var login   = welcome.SignIn();
            var home    = (UsersHomePage)login.Login("*****@*****.**", "Admin123");
            var profile = home.GoToProfile();

            Assert.IsTrue(profile.NameIsVisible());
            Assert.IsTrue(profile.SurnameIsVisible());
            Assert.IsTrue(profile.PhoneNumberIsVisible());
        }
コード例 #11
0
        /// <summary>
        /// коли буде мерж з адміновскькою пейджою
        /// тоді і хпаси перейдуть на адмін пейдж в ПОМ
        /// </summary>
        public void IsUserSignedUp()
        {
            WelcomePage welcome = new WelcomePage();

            welcome.Init(driver);
            var login = welcome.SignIn();
            var home  = login.Login("*****@*****.**", "Admin123");

            driver.GetByXpath("//*[@href='/admin/management-users']").Click();
            var user = driver.GetByXpath("//td[text()='*****@*****.**']");

            Assert.IsTrue(user.IsDisplayed());
        }
コード例 #12
0
        public void NameCanContainUALetters()
        {
            WelcomePage welcome = new WelcomePage();

            welcome.Init(driver);
            var login   = welcome.SignIn();
            var home    = (UsersHomePage)login.Login("*****@*****.**", "Admin123");
            var profile = home.GoToProfile();

            profile.SetName("Вася");
            profile.UpdateProfile();
            Assert.IsFalse(profile.IsErrorAlertDisplayed());
        }
コード例 #13
0
        public void VerifyThatAdminCanChangeRole()
        {
            driver.GoToURL();
            WelcomePage welcome = new WelcomePage();

            welcome.Init(driver);
            var login = welcome.SignIn();
            var home  = (HomePageAdmin)login.Login("*****@*****.**", "Admin123");
            var user  = home.ClickOnUsers();

            user.ChangeRoleToManager();
            Assert.AreNotEqual("USER", user.GetRole());
            user.ChangeRoleToUser();
        }
コード例 #14
0
        public void IsNameChanging()
        {
            WelcomePage welcome = new WelcomePage();

            welcome.Init(driver);
            var login   = welcome.SignIn();
            var home    = (UsersHomePage)login.Login("*****@*****.**", "Admin123");
            var profile = home.GoToProfile();

            profile.SetName("Masha");
            profile.UpdateProfile();
            Assert.True(profile.IsSuccessAlertDisplayed());
            Assert.AreEqual("Masha", profile.GetName());
        }
コード例 #15
0
        public void VerifyThatAdminHasAbilityToCheckHisProfile() //False
        {
            driver.GoToURL();
            WelcomePage welcome = new WelcomePage();

            welcome.Init(driver);
            var login = welcome.SignIn();
            var home  = (HomePageAdmin)login.Login("*****@*****.**", "Admin123");
            var prof  = home.GoToProfile();

            prof.EditData("Ivan", "Petrov", "+380938780876", "Admin123", "Admin1234");
            Assert.AreEqual("Success", prof.GetSuccessText());

            prof.EditPassword("Admin1234", "Admin123");
        }
コード例 #16
0
        public void IsPersonalInfoTranslationIsCorrect()
        {
            WelcomePage welcome = new WelcomePage();

            welcome.Init(driver);
            var         login   = welcome.SignIn();
            var         home    = (UsersHomePage)login.Login("*****@*****.**", "Admin123");
            var         profile = home.GoToProfile();
            ProfilePage changed = profile.ChangeToUKR();

            profile.Init(driver);
            var name = profile.GetName();

            Assert.AreEqual(t.Mariya.ToLower(), name.ToLower());
            var surname = profile.GetSurname();

            Assert.AreEqual(t.Chuikina.ToLower(), surname.ToLower());
        }