Пример #1
0
        public void ManageUserAccessPage_LHN_Employees()
        {
            // page objects
            var mainMenu                   = new MainMenu(_driver);
            var superSuitNav               = new SuperSuitNavigation(_driver);
            var manageUserAccessPage       = new ManageUserAccessPage(_driver);
            var employeeAdminDashboardPage = new EmployeeAdminDashboardPage(_driver);
            var expectedMenuItems          = new StringCollection
            {
                "Employee Dashboard",
                "Create New Employee",
                "Employee List",
                "Alpha Groups",
                "Location",
                "Position",
                "Folder",
                "Search Form",
                "Employee Evaluations Dashboard",
                "Employee Timelines Dashboard",
                "View Help Requests",
                "Help Request Categories",
                "Manage Timelines"
            };

            try
            {
                _driver.Navigate().GoToUrl(_muapUrl);
                manageUserAccessPage.WaitForPageToLoad();
                _test.Log(LogStatus.Info, $"Navigate to the MUAP: {_muapUrl}");

                superSuitNav.ClickEmployees();
                CollectionAssert.AreEqual(mainMenu.GetNavLinkText(), expectedMenuItems, "Employee menu did not load correctly.");
                _test.Log(LogStatus.Pass, "Employee Menu items loaded correctly.");

                Assert.IsTrue(employeeAdminDashboardPage.IsDisplayed(), "Employee dashboard did not load correctly.");
                _test.Log(LogStatus.Pass, "Employee dashboard loaded correctly.");
            }
            catch (Exception e)
            {
                HandleException(e, _driver);
                throw;
            }
        }
Пример #2
0
        public void LHN_Employees()
        {
            var mainMenu = new MainMenu(_driver);
            var employeeAdminDashboardPage = new EmployeeAdminDashboardPage(_driver);

            var expectedMenuItems = new StringCollection
            {
                "Employee Dashboard",
                "Create New Employee",
                "Employee List",
                "Alpha Groups",
                "Location",
                "Position",
                "Folder",
                "Search Form",
                "Employee Evaluations Dashboard",
                "Employee Timelines Dashboard",
                "View Help Requests",
                "Help Request Categories",
                "Manage Timelines"
            };

            try
            {
                mainMenu.ClickEmployees();
                _test.Log(LogStatus.Pass, "Navigate to Employees");

                CollectionAssert.AreEqual(expectedMenuItems, mainMenu.GetNavLinkText(),
                                          "The Employees menu does not contain the correct items");

                _test.Log(LogStatus.Pass, "The Employees menu contains the correct items");

                Assert.IsTrue(employeeAdminDashboardPage.IsDisplayed(), "Employee dashboard did not load correctly.");
                _test.Log(LogStatus.Pass, "Employee dashboard loaded correctly.");
            }
            catch (Exception e)
            {
                HandleException(e, _driver);
                throw;
            }
        }