public void Test001_InstallHostExtension()
        {
            Trace.WriteLine(BasePage.RunningTestKeyWord + "'Install a Host Extension'");

            var hostExtensionsPage = new HostExtensionsPage(_driver);

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

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

            hostExtensionsPage.InstallExtension(_hostFileToUpload);

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

            Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the number of elements in the list increased by 1");
            Assert.That(hostExtensionsPage.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(
                hostExtensionsPage.ElementPresent(By.XPath("//tr[td/span[text() = '" + _hostExtensionNameToInstall + "']]")),
                "The Extension name is not present in the list");
        }
        public void Test005_CreateNewModule()
        {
            Trace.WriteLine(BasePage.RunningTestKeyWord + "'Create a new Module'");

            var hostExtensionsPage = new HostExtensionsPage(_driver);

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

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

            hostExtensionsPage.CreateNewModule(_moduleNameToCreate, "Admin", "Banners", "file.cs");

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

            Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the number of elements in the list increased by 1");
            Assert.That(hostExtensionsPage.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(hostExtensionsPage.ElementPresent(By.XPath("//tr[td/span[text() = '" + _moduleNameToCreate + "']]")),
                          "The Extension name is not present in the list");
        }
Esempio n. 3
0
        public void Test002_EditHostExtension()
        {
            Trace.WriteLine(BasePage.RunningTestKeyWord + "'Edit the Host Extension'");

            HostExtensionsPage hostExtensionsPage = new HostExtensionsPage(_driver);

            hostExtensionsPage.OpenUsingButtons(_baseUrl);
            hostExtensionsPage.AccordionOpen(By.XPath(HostExtensionsPage.ModulesAccordion));

            hostExtensionsPage.EditExtensionDescription(_hostExtensionToEdit, _newDescription);

            hostExtensionsPage.OpenUsingButtons(_baseUrl);
            hostExtensionsPage.AccordionOpen(By.XPath(HostExtensionsPage.ModulesAccordion));

            Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the Extension description is present in the list");
            Assert.That(hostExtensionsPage.FindElement(By.XPath("//tr[td/span[text() = '" + _hostExtensionToEdit + "']]/td[contains(@class, 'Header')]/span")).Text, Is.EqualTo(_newDescription),
                        "The Extension name is not present in the list");
        }
Esempio n. 4
0
        public void Test006_UnInstallLanguagePack()
        {
            Trace.WriteLine(BasePage.RunningTestKeyWord + "'UnInstall Language pack'");

            var hostExtensionsPage = new HostExtensionsPage(_driver);

            //Extension pack
            hostExtensionsPage.OpenUsingUrl(_baseUrl);
            hostExtensionsPage.AccordionOpen(By.XPath(ExtensionsPage.ExtensionLanguagePacksAccordion));

            int itemNumber =
                hostExtensionsPage.FindElements(
                    By.XPath(
                        ExtensionsPage.ExtensionLanguagePacksPanel + "/following-sibling :: *//tr[td/span[contains(text(), '" +
                        hostExtensionsPage.SetLanguageName(_languagePackToDeploy) + "')]]")).Count;

            while (itemNumber > 0)
            {
                Trace.WriteLine(BasePage.TraceLevelComposite + "Delete Extension: ");

                hostExtensionsPage.DeleteLanguagePack(ExtensionsPage.ExtensionLanguagePacksPanel, _languagePackToDeploy);

                itemNumber = itemNumber - 1;
            }

            hostExtensionsPage.OpenUsingButtons(_baseUrl);
            hostExtensionsPage.AccordionOpen(By.XPath(ExtensionsPage.CoreLanguagePacksAccordion));

            hostExtensionsPage.DeleteLanguagePack(ExtensionsPage.CoreLanguagePacksPanel, _languagePackToDeploy);

            hostExtensionsPage.OpenUsingButtons(_baseUrl);
            hostExtensionsPage.AccordionOpen(By.XPath(ExtensionsPage.CoreLanguagePacksAccordion));

            Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the number of elements in the list is zero");
            Assert.That(hostExtensionsPage.FindElements(By.XPath(ExtensionsPage.CoreLanguagePacksList)).Count, Is.EqualTo(0),
                        "The Extension is not deleted correctly");
        }
Esempio n. 5
0
        public void Test003_DeleteHostExtension()
        {
            Trace.WriteLine(BasePage.RunningTestKeyWord + "'Delete the Host Extension'");

            HostExtensionsPage hostExtensionsPage = new HostExtensionsPage(_driver);

            hostExtensionsPage.OpenUsingButtons(_baseUrl);
            hostExtensionsPage.AccordionOpen(By.XPath(HostExtensionsPage.ModulesAccordion));

            int itemNumber = hostExtensionsPage.FindElements(By.XPath(HostExtensionsPage.ModulesExtensionsList)).Count;

            hostExtensionsPage.DeleteExtension(_hostExtensionNameToInstall);

            hostExtensionsPage.OpenUsingButtons(_baseUrl);
            hostExtensionsPage.AccordionOpen(By.XPath(HostExtensionsPage.ModulesAccordion));

            Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the number of elements in the list decreased by 1");
            Assert.That(hostExtensionsPage.FindElements(By.XPath(HostExtensionsPage.ModulesExtensionsList)).Count, Is.EqualTo(itemNumber - 1),
                        "The Extension is not deleted correctly");

            Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the Extension name is present in the list");
            Assert.IsFalse(hostExtensionsPage.ElementPresent(By.XPath("//tr[td/span[text() = '" + _hostExtensionNameToInstall + "']]")),
                           "The Extension name is present in the list");
        }