Beispiel #1
0
		public void Test003_AddPendingSecurityRole()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Add a new pending Security Role'");

			var manageRolesPage = new ManageRolesPage(_driver);

			manageRolesPage.OpenUsingControlPanel(_baseUrl);

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

			manageRolesPage.AddNewSecurityRoleWithStatus(_pendingRoleName, "Pending");

			manageRolesPage.OpenUsingControlPanel(_baseUrl);

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the number of elements in the list increased by 1");
			Assert.That(manageRolesPage.FindElements(By.XPath(ManageRolesPage.SecurityRolesList)).Count,
			            Is.EqualTo(itemNumber + 1),
			            "The security role is not added correctly");

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the Manage Users link is disabled");
			Assert.IsFalse(
				manageRolesPage.ElementPresent(
					By.XPath("//tr[td[text() = '" + _pendingRoleName + "']]/td/a/img[contains(@src, 'Users_16X16_Standard.png')]")),
				"The Manage Users link is enabled");
		}