Example #1
0
        public void Test8_checkIfLoggedInAdminPannel()
        {
            string userEmail    = ConfigurationReader.GetValue("User1", "Username");
            string userPassword = ConfigurationReader.GetValue("User1", "Password");

            string adminName     = ConfigurationReader.GetValue("Admin", "Username");
            string adminPassword = ConfigurationReader.GetValue("Admin", "Password");

            string expectedUserName = "******";

            _homePage.GoToHomepage();
            _homePage.GoToLogin();
            _logInPage.LogIn(userEmail, userPassword);
            _logInPage.OpenNewTab();


            _adminLoginPage.GoToAdminPage();
            _adminLoginPage.LogIn(adminName, adminPassword);
            _adminPage.ClosePopup();
            _adminPage.HoverCustomers();
            _adminPage.GoToOnlineCustomersPage();
            _customersPage.ClickOnFirstListItem();

            Assert.That(_customerInfo.GetCustomersFullName, Contains.Substring(expectedUserName));
        }
Example #2
0
        public void test3_adminLogin()
        {
            string userName       = ConfigurationReader.GetValue("Admin", "Username");
            string password       = ConfigurationReader.GetValue("Admin", "Password");
            string expectedResult = "Logged in as SandboxAdmin";

            _adminLoginPage.GoToAdminPage();
            _adminLoginPage.LogIn(userName, password);

            _adminPage.ClosePopup();

            string actualResult = _adminPage.GetInfoBar();

            Assert.That(actualResult, Contains.Substring(expectedResult));
        }