예제 #1
0
		public void Test001_AddNewSite()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Add a new Child Site'");

			var hostSiteManagementPage = new HostSiteManagementPage(_driver);

			hostSiteManagementPage.OpenUsingButtons(_baseUrl);
			hostSiteManagementPage.WaitForElement(By.XPath(HostSiteManagementPage.PortalsTable));
			int originaltemNumber = hostSiteManagementPage.FindElements(By.XPath(HostSiteManagementPage.PortalsList)).Count;

			hostSiteManagementPage.AddNewChildSite(_baseUrl, _siteAlias, _siteName);

			hostSiteManagementPage.OpenUsingButtons(_baseUrl);
			hostSiteManagementPage.WaitForElement(By.XPath(HostSiteManagementPage.PortalsTable));

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the number of elements in the list increased by 1");
			Assert.That(originaltemNumber + 1,
			            Is.EqualTo(hostSiteManagementPage.FindElements(By.XPath(HostSiteManagementPage.PortalsList)).Count),
			            "The Child site is not added correctly");

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the Site name is present in the list");
			Assert.IsTrue(
				hostSiteManagementPage.ElementPresent(
					By.XPath("//tr/td/span[contains(@id, 'lblPortalAliases')]/a[contains(string(), '" + _baseUrl + "/" + _siteAlias +
					         "')]")),
				"The Child site is not added correctly");
		}
예제 #2
0
		public void Test002_EditSite()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Edit the Child Site'");

			var hostSiteManagementPage = new HostSiteManagementPage(_driver);

			hostSiteManagementPage.OpenUsingButtons(_baseUrl);
			
			hostSiteManagementPage.AddDescriptionToSite(_baseUrl, _siteAlias, _siteDescription);

			hostSiteManagementPage.OpenUsingButtons(_baseUrl);

			hostSiteManagementPage.EditSite(_baseUrl, _siteAlias);

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the Site description is present");
			Assert.That(hostSiteManagementPage.WaitForElement(By.XPath(HostSiteManagementPage.SiteNameDescriptionTextBox)).Text,
			            Is.EqualTo(_siteDescription),
			            "The site description is not added correctly");
		}
예제 #3
0
		public void EditSite(string siteName, string siteDescription)
		{
			var hostSiteManagementPage = new HostSiteManagementPage(_driver);

			hostSiteManagementPage.OpenUsingButtons(_baseUrl);

			hostSiteManagementPage.AddDescriptionToSite(siteName, siteDescription);

			hostSiteManagementPage.OpenUsingButtons(_baseUrl);

			hostSiteManagementPage.EditSite(siteName);

			Trace.WriteLine("ASSERT the Site description is present");
			Assert.That(hostSiteManagementPage.WaitForElement(By.XPath(HostSiteManagementPage.SiteNameDescriptionTextBox)).Text,
			            Is.EqualTo(siteDescription),
			            "The site description is not added correctly");
		}