Esempio n. 1
0
		public void Test003_DeleteSecurityRoleGroup()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Delete the Security Role Group'");

			var manageRolesPage = new ManageRolesPage(_driver);

			manageRolesPage.OpenUsingControlPanel(_baseUrl);

			int itemNumber = manageRolesPage.FindElements(By.XPath(ManageRolesPage.FilterByGroupDropdownList)).Count;

			manageRolesPage.DeleteSecurityRoleGroup(_roleGroupName);

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the number of elements in the drop-down decreased by 1");
			Assert.That(itemNumber - 1,
			            Is.EqualTo(manageRolesPage.FindElements(By.XPath(ManageRolesPage.FilterByGroupDropdownList)).Count),
			            "The security role is not deleted correctly");

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the Security role is not present in the list");
			Assert.IsFalse(
				manageRolesPage.ElementPresent(
					By.XPath(ManageRolesPage.FilterByGroupDropdownList + "[text() = '" + _roleGroupName + "']")),
				"The Security role is not deleted correctly");
		}