public void Test006_InstallAdminExtension()
        {
            Trace.WriteLine(BasePage.RunningTestKeyWord + "'Install an Admin Extension'");

            var adminExtensionsPage = new AdminExtensionsPage(_driver);

            adminExtensionsPage.OpenUsingButtons(_baseUrl);

            int itemNumber = adminExtensionsPage.FindElements(By.XPath(ExtensionsPage.ModulesExtensionsList)).Count;

            adminExtensionsPage.InstallExtension(_adminFileToUpload);

            adminExtensionsPage.OpenUsingButtons(_baseUrl);
            adminExtensionsPage.AccordionOpen(By.XPath(ExtensionsPage.ModulesAccordion));

            Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the number of elements in the list increased by 1");
            Assert.That(adminExtensionsPage.FindElements(By.XPath(ExtensionsPage.ModulesExtensionsList)).Count,
                        Is.EqualTo(itemNumber + 1),
                        "The Extension is not added correctly");

            Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the Extension name is present in the list");
            Assert.IsTrue(
                adminExtensionsPage.ElementPresent(By.XPath("//tr[td/span[text() = '" + _adminExtensionNameToInstall + "']]")),
                "The Extension name is not present in the list");
        }
        public void Test002_VerifyAdminLimitedAccess()
        {
            Trace.WriteLine(BasePage.RunningTestKeyWord + "'Verify Admin limited access to Extensions'");

            AdminExtensionsPage adminExtensionsPage = new AdminExtensionsPage(_driver);

            adminExtensionsPage.OpenUsingButtons(_baseUrl);

            Assert.That(adminExtensionsPage.FindElements(By.XPath(AdminExtensionsPage.ButtonsList)).Count, Is.EqualTo(0),
                        "The number of available Action buttons is not correct");
        }
Beispiel #3
0
        public void Test007_EditAdminExtension()
        {
            Trace.WriteLine(BasePage.RunningTestKeyWord + "'Edit the Admin Extension'");

            AdminExtensionsPage adminExtensionsPage = new AdminExtensionsPage(_driver);

            adminExtensionsPage.OpenUsingButtons(_baseUrl);
            adminExtensionsPage.AccordionOpen(By.XPath(AdminExtensionsPage.ModulesAccordion));

            adminExtensionsPage.EditExtensionPermissions(_adminExtensionToEdit);

            adminExtensionsPage.OpenUsingButtons(_baseUrl);
            adminExtensionsPage.AccordionOpen(By.XPath(AdminExtensionsPage.ModulesAccordion));
            adminExtensionsPage.EditExtension(_adminExtensionToEdit);
            adminExtensionsPage.AccordionOpen(By.XPath(AdminExtensionsPage.ModuleSettingsAccordion));

            Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the Permission is granted");
            Assert.That(adminExtensionsPage.WaitForElement(By.XPath(AdminExtensionsPage.PermissionTable + "'All Users'" + "]]/td/img")).GetAttribute("src"),
                        Is.StringContaining("Grant"),
                        "The Permission is not granted");
        }