示例#1
0
		public void Test002_EditSuperUser()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Edit Super User'");

			var hostSuperUserAccountsPage = new HostSuperUserAccountsPage(_driver);

			hostSuperUserAccountsPage.OpenUsingButtons(_baseUrl);

			hostSuperUserAccountsPage.AddPhoneNumber(_superUserName, _phoneNumber);

			hostSuperUserAccountsPage.OpenUsingButtons(_baseUrl);

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the Phone Number is present in the list");
			Assert.IsTrue(
				hostSuperUserAccountsPage.ElementPresent(
					By.XPath("//tr[td[contains(text(), '" + _superUserName + "')]]/td/span[text() = '" + _phoneNumber + "']")),
				"The Phone Number is not added correctly");
		}
示例#2
0
		public void Test001_AddSuperUser()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Add a new Super User'");

			var hostSuperUserAccountsPage = new HostSuperUserAccountsPage(_driver);

			hostSuperUserAccountsPage.OpenUsingButtons(_baseUrl);
			hostSuperUserAccountsPage.WaitForElement(By.XPath(HostSuperUserAccountsPage.SuperUsersTable));
			int itemNumber = hostSuperUserAccountsPage.FindElements(By.XPath(HostSuperUserAccountsPage.SuperUsersList)).Count;

			hostSuperUserAccountsPage.AddNewUser(_superUserName, _superUserDisplayName, _superUserEmail, _superUserPassword);

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the number of elements in the list increased by 1");
			Assert.That(hostSuperUserAccountsPage.FindElements(By.XPath(HostSuperUserAccountsPage.SuperUsersList)).Count,
			            Is.EqualTo(itemNumber + 1),
			            "The Super user is not added correctly");

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the SuperUser is present in the list");
			Assert.IsTrue(
				hostSuperUserAccountsPage.ElementPresent(By.XPath("//tr[td[contains(text(), '" + _superUserName + "')]]")),
				"The Super user is not added correctly");
		}
示例#3
0
		public void Test003_DeleteSuperUser()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Delete the Super User'");

			var hostSuperUserAccountsPage = new HostSuperUserAccountsPage(_driver);

			hostSuperUserAccountsPage.OpenUsingButtons(_baseUrl);
			hostSuperUserAccountsPage.WaitForElement(By.XPath(HostSuperUserAccountsPage.SuperUsersTable));
			int itemNumber = hostSuperUserAccountsPage.FindElements(By.XPath(HostSuperUserAccountsPage.SuperUsersList)).Count;

			hostSuperUserAccountsPage.DeleteUser(_superUserName);

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the number of elements in the list is not changed");
			Assert.That(hostSuperUserAccountsPage.FindElements(By.XPath(HostSuperUserAccountsPage.SuperUsersList)).Count,
			            Is.EqualTo(itemNumber),
			            "The Super user is not deleted correctly");

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the SuperUser is present in the list");
			Assert.IsTrue(
				hostSuperUserAccountsPage.ElementPresent(By.XPath("//tr[td[contains(text(), '" + _superUserName + "')]]")),
				"The Super user is not deleted correctly");
		}