Esempio n. 1
0
		public void Test001_InstallHostExtension()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Install a 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.InstallExtension(_hostFileToUpload);

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

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the number of elements in the list increased by 1");
			Assert.That(hostExtensionsPage.FindElements(By.XPath(HostExtensionsPage.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");
		}
Esempio n. 2
0
		public void Test005_CreateNewModule()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Create a new Module'");

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

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

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

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

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the number of elements in the list increased by 1");
			Assert.That(hostExtensionsPage.FindElements(By.XPath(HostExtensionsPage.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");
		}