public void Test001_ExportTemplateWithNoContent()
		{
			string childSiteName = _childSiteName + "001";

			var hostSiteManagementPage = new HostSiteManagementPage(_driver);
			hostSiteManagementPage.OpenUsingButtons(_baseUrl);
			hostSiteManagementPage.WaitAndClick(By.XPath(HostSiteManagementPage.ExportSiteTemplateButton));
			hostSiteManagementPage.AccordionOpen(By.XPath(HostSiteManagementPage.AdvancedConfigurationAccordion));

			int orignalNumber =
				hostSiteManagementPage.FindElements(By.XPath(HostSiteManagementPage.PagesList)).Count;

			hostSiteManagementPage.OpenUsingButtons(_baseUrl);
			hostSiteManagementPage.ExportSiteTemplate(_siteName, "NoContentTemplate", "NoContentTemplate");

			hostSiteManagementPage.OpenUsingButtons(_baseUrl);
			hostSiteManagementPage.AddNewChildSite(_baseUrl, childSiteName, "title", "NoContentTemplate");

			var adminPageManagementPage = new AdminPageManagementPage(_driver);
			adminPageManagementPage.OpenUsingButtons(_baseUrl + "/" + childSiteName);

			Trace.WriteLine(BasePage.TraceLevelPage + "The page Module should be present");
			Assert.IsTrue(adminPageManagementPage.ElementPresent(By.XPath(AdminPageManagementPage.Module)));

			Trace.WriteLine(BasePage.TraceLevelPage + "The number of pages is correct");
			Assert.That(adminPageManagementPage.FindElements(By.XPath(HostSiteManagementPage.PagesList)).Count, Is.EqualTo(orignalNumber), "");

			var aboutUsPage = new AboutUsPage(_driver);
			aboutUsPage.OpenUsingLink(_baseUrl + "/" + childSiteName);

			Trace.WriteLine(BasePage.TraceLevelPage + "The page doesn't have a Content");
			Assert.IsFalse(adminPageManagementPage.ElementPresent(By.XPath(AboutUsPage.PageContent)));
		}
Exemple #2
0
		public void Test001_AddPage()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Add a new Page'");

			var blankPage = new BlankPage(_driver);

			blankPage.OpenAddNewPageFrameUsingControlPanel(_baseUrl);

			blankPage.AddNewPage(_pageName);

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the user redirected to newly created page: " + "http://" +
							_baseUrl.ToLower() + "/" + _pageName);
			Assert.That(blankPage.CurrentWindowUrl(), Is.StringStarting("http://" + _baseUrl.ToLower() + "/" + _pageName),
						"The page URL is not correct");

			var adminPageManagementPage = new AdminPageManagementPage(_driver);
			adminPageManagementPage.OpenUsingButtons(_baseUrl);

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the page: " + _pageName + " is present in the list");
			Assert.IsTrue(
				adminPageManagementPage.ElementPresent(
					By.XPath("//div[contains(@id, 'Tabs_ctlPages')]//li[@class= 'rtLI']//span[contains(text(), '" + _pageName + "')]")),
				"The page is not present in the list");
		}
Exemple #3
0
		public void Test004_DeletePage()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Delete a Page'");

			BlankPage blankPage = new BlankPage(_driver);
			blankPage.OpenUsingUrl(_baseUrl, _pageName);

			blankPage.DeletePage(_pageName);

			AdminPageManagementPage adminPageManagementPage = new AdminPageManagementPage(_driver);
			adminPageManagementPage.OpenUsingButtons(_baseUrl);

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the page: " + _pageName + "is NOT present in the list");
			Assert.IsFalse(adminPageManagementPage.ElementPresent(By.XPath("//div[contains(@id, 'Tabs_ctlPages')]//li[@class= 'rtLI']//span[contains(text(), '" + _pageName + "')]")),
				"The page is present in the list");

			AdminRecycleBinPage adminRecycleBinPage = new AdminRecycleBinPage(_driver);
			adminRecycleBinPage.OpenUsingButtons(_baseUrl);

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the page: " + _pageName + "is present in Recycle Bin");
			Assert.IsTrue(adminRecycleBinPage.ElementPresent(By.XPath(AdminRecycleBinPage.RecycleBinPageContainerOption + "[contains(text(), '" + _pageName + "')]")));
		}
Exemple #4
0
		public void Test001_AddWebPage()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Add a new Website Page'");

			var adminPageManagementPage = new AdminPageManagementPage(_driver);
			adminPageManagementPage.OpenUsingButtons(_baseUrl);

			adminPageManagementPage.AddPage(_pageName, AdminPageManagementPage.PageType.Web, _addWebAfter);

			adminPageManagementPage.OpenUsingButtons(_baseUrl);

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the page: " + _pageName + "is present in the list");
			Assert.IsTrue(
				adminPageManagementPage.ElementPresent(
					By.XPath(AdminPageManagementPage.PageList + "//li[div/span[text() = '" + _addWebAfter +
					         " ']]//div/span[text() = '" + _pageName + " ']")),
				"The page is not present in the list");
		}
Exemple #5
0
		public void Test013_ImportPage()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Import a Page'");

			var pageImportPage = new PageImportPage(_driver);
			pageImportPage.OpenUsingControlPanel(_baseUrl);

			pageImportPage.ImportPage(_templateName, _importedPageName, _insertPageAfter);

			//Assert.That(pageImportPage.CurrentWindowUrl(), Is.EqualTo("http://" + _baseUrl.ToLower() + "/" + _importedPageName),
			//					"The page URL is not correct");

			var adminPageManagementPage = new AdminPageManagementPage(_driver);
			adminPageManagementPage.OpenUsingButtons(_baseUrl);

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the page: " + _importedPageName + "is present in the list");
			Assert.IsTrue(
				adminPageManagementPage.ElementPresent(
					By.XPath("//li[div/span[text() = '" + _insertPageAfter + " ']]/following-sibling::li[div/span[text() = '" +
					         _importedPageName + " ']]")),
				"The page is not present in the list");
		}
Exemple #6
0
		public void Test011_CopyPage()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Copy a Page'");
			var blankPage = new BlankPage(_driver);

			blankPage.OpenCopyPageFrameUsingControlPanel(_baseUrl);
			blankPage.CopyPage(_copiedPageName, _parentPageName, _copyFromPage);

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the user redirected to newly created page: " + "http://" +
			                _baseUrl.ToLower() + "/" + _parentPageName + "/" + _copiedPageName);
			Assert.That(blankPage.CurrentWindowUrl(),
			            Is.EqualTo("http://" + _baseUrl.ToLower() + "/" + _parentPageName + "/" + _copiedPageName),
			            "The page URL is not correct");

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT 3 new modules added.");
			Assert.That(blankPage.FindElements(By.XPath("//li[@class = 'actionMenuMove']")).Count, Is.EqualTo(3),
			            "The Modules are not added correctly");

			var adminPageManagementPage = new AdminPageManagementPage(_driver);
			adminPageManagementPage.OpenUsingButtons(_baseUrl);

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the page: " + _copiedPageName + "is present in the list");
			Assert.IsTrue(
				adminPageManagementPage.ElementPresent(
					By.XPath(AdminPageManagementPage.PageList + "//li[div/span[text() = '" + _parentPageName +
					         " ']]//div/span[text() = '" + _copiedPageName + " ']")),
				"The page is not present in the list");
		}
Exemple #7
0
		public void Test010_DeleteHostPage()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Delete a Page'");

			var adminPageManagementPage = new AdminPageManagementPage(_driver);
			adminPageManagementPage.OpenUsingButtons(_baseUrl);

			adminPageManagementPage.DeletePage(_pageName, AdminPageManagementPage.PageType.Host);

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the page: " + _pageName + "is  NOT present in the list");
			Assert.IsFalse(
				adminPageManagementPage.ElementPresent(
					By.XPath(AdminPageManagementPage.PageList + "//li[div/span[text() = '" + _addHostAfter +
					         " ']]//div/span[text() = '" + _pageName + " ']")),
				"The page " + _pageName + " is present in the list");
		}
Exemple #8
0
		public void Test007_AddHostMultiplePages()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Add new Host Pages'");

			var adminPageManagementPage = new AdminPageManagementPage(_driver);
			adminPageManagementPage.OpenUsingButtons(_baseUrl);

			adminPageManagementPage.AddPages(_pageName1, _pageName2, _pageName3, _pageName4, AdminPageManagementPage.PageType.Host, _addHostAfter);

			adminPageManagementPage.OpenUsingButtons(_baseUrl);
			adminPageManagementPage.RadioButtonSelect(By.XPath(AdminPageManagementPage.HostPagesRadioButton));
			adminPageManagementPage.WaitForElement(By.XPath("//div[contains(@id, 'Tabs_ctlPages')]//span[text() = 'Host ']"));

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the page: " + _pageName1 + "is present in the list");
			Assert.IsTrue(
				adminPageManagementPage.ElementPresent(
					By.XPath(AdminPageManagementPage.PageList + "//li[div/span[text() = '" + _addHostAfter +
					         " ']]//div/span[text() = '" + _pageName1 + " ']")),
				"The page " + _pageName1 + " is not present in the list");

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the page: " + _pageName2 + "is present in the list");
			Assert.IsTrue(
				adminPageManagementPage.ElementPresent(
					By.XPath(AdminPageManagementPage.PageList + "//li[div/span[text() = '" + _addHostAfter +
					         " ']]//div/span[text() = '" + _pageName2 + " ']")),
				"The page " + _pageName2 + " is not present in the list");

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the page: " + _pageName3 + "is present in the list");
			Assert.IsTrue(
				adminPageManagementPage.ElementPresent(
					By.XPath(AdminPageManagementPage.PageList + "//li[div/span[text() = '" + _pageName2 + " ']]//div/span[text() = '" +
					         _pageName3 + " ']")),
				"The page " + _pageName3 + " is not present in the list");

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the page: " + _pageName4 + "is present in the list");
			Assert.IsTrue(
				adminPageManagementPage.ElementPresent(
					By.XPath(AdminPageManagementPage.PageList + "//li[div/span[text() = '" + _pageName2 + " ']]//div/span[text() = '" +
					         _pageName4 + " ']")),
				"The page " + _pageName4 + " is not present in the list");
		}
Exemple #9
0
		public void Test004_MoveWebPage()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Move a Page'");

			var adminPageManagementPage = new AdminPageManagementPage(_driver);
			adminPageManagementPage.OpenUsingButtons(_baseUrl);

			adminPageManagementPage.MovePage(_pageName, _moveAfterWebPage, AdminPageManagementPage.PageType.Web);

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the page: " + _pageName + "is NOT present in the old location");
			Assert.IsFalse(
				adminPageManagementPage.ElementPresent(
					By.XPath(AdminPageManagementPage.PageList + "//li[div/span[text() = '" + _addWebAfter +
					         " ']]//div/span[text() = '" + _pageName + " ']")),
				"The page " + _pageName + " is present in the list after Page '" + _addWebAfter + "'");

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the page: " + _pageName + "is present in the new location");
			Assert.IsTrue(
				adminPageManagementPage.ElementPresent(
					By.XPath(AdminPageManagementPage.PageList + "//li[div/span[text() = '" + _moveAfterWebPage +
					         " ']]//div/span[text() = '" + _pageName + " ']")),
				"The page " + _pageName + " is not present in the list");
		}
Exemple #10
0
		public void Test006_AddHostPage()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Add a new Host Page'");

			var adminPageManagementPage = new AdminPageManagementPage(_driver);
			adminPageManagementPage.OpenUsingButtons(_baseUrl);

			adminPageManagementPage.AddPage(_pageName, "Host", _addHostAfter);

			adminPageManagementPage.OpenUsingButtons(_baseUrl);
			adminPageManagementPage.RadioButtonSelect(By.XPath(AdminPageManagementPage.HostPagesRadioButton));
			adminPageManagementPage.WaitForElement(By.XPath(AdminPageManagementPage.PageList + "//span[text() = 'Host ']"));

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the page: " + _pageName + "is present in the list");
			Assert.IsTrue(
				adminPageManagementPage.ElementPresent(
					By.XPath(AdminPageManagementPage.PageList + "//li[div/span[text() = '" + _addHostAfter +
					         " ']]//div/span[text() = '" + _pageName + " ']")),
				"The page is not present in the list");
		}