Example #1
0
		public void Test002_VerifyAdminLimitedAccess()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Verify Admin limited access to Extensions'");

			var adminExtensionsPage = new AdminExtensionsPage(_driver);
			adminExtensionsPage.OpenUsingButtons(_baseUrl);

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

			var adminExtensionsPage = new AdminExtensionsPage(_driver);
			adminExtensionsPage.OpenUsingButtons(_baseUrl);

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

			adminExtensionsPage.EditExtensionPermissions(_adminExtensionToEdit);

			adminExtensionsPage.OpenUsingButtons(_baseUrl);
			adminExtensionsPage.AccordionOpen(By.XPath(ExtensionsPage.ModulesAccordion));
			adminExtensionsPage.EditExtension(_adminExtensionToEdit);
			adminExtensionsPage.AccordionOpen(By.XPath(ExtensionsPage.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");
		}
Example #3
0
		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(@"P1\" + _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");
		}