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

			HostSiteManagementPage hostSiteManagementPage = new HostSiteManagementPage(_driver);
			hostSiteManagementPage.OpenUsingButtons(_baseUrl);

			int originaltemNumber = hostSiteManagementPage.FindElements(By.XPath(HostSiteManagementPage.PortalsList)).Count;

			hostSiteManagementPage.AddNewChildSite(_baseUrl, _siteAlias, _siteName);

			hostSiteManagementPage.OpenUsingButtons(_baseUrl);

			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");
		}
Example #2
0
		public void Test002_EditSite()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Edit the Child Site'");

			HostSiteManagementPage 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.FindElement(By.XPath(HostSiteManagementPage.SiteNameDescriptionTextBox)).Text, Is.EqualTo(_siteDescription), 
				"The site description is not added correctly");
		}
Example #3
0
		public void Test003_NavigateToChildSite()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Navigate to Child Site'");

			HostSiteManagementPage hostSiteManagementPage = new HostSiteManagementPage(_driver);

			hostSiteManagementPage.OpenUsingButtons(_baseUrl);

			hostSiteManagementPage.NavigateToChildSite(_baseUrl, _siteAlias);

			InstallerPage installerPage = new InstallerPage(_driver);

			installerPage.WelcomeScreen();

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT current window Title");
			Assert.That(installerPage.CurrentWindowTitle(), Is.StringContaining(_siteName + " > Home"),
			              "The website name is not correct");

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT current window Url");
			Assert.That(installerPage.CurrentWindowUrl(), Is.EqualTo("http://" + _baseUrl + "/" + _siteAlias),
						  "The website URL is not correct");
		}