Ejemplo n.º 1
0
		public void Test002_EnableLanguage()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Enable Language'");

			var adminLanguagesPage = new AdminLanguagesPage(_driver);
			adminLanguagesPage.OpenUsingButtons(_baseUrl);

			adminLanguagesPage.EnableLanguage(adminLanguagesPage.SetLanguageName(_languagePackToDeploy));

			var mainPage = new MainPage(_driver);
			mainPage.OpenUsingUrl(_baseUrl);

			Trace.WriteLine(BasePage.TraceLevelPage + "Two language flags should be available");
			Assert.That(adminLanguagesPage.FindElements(By.XPath(ControlPanelIDs.LanguageIcon)).Count, Is.EqualTo(2),
			            "The language flag number is not correct");
		}
Ejemplo n.º 2
0
		public void Test004_DisableContentLocalization()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Disable Content Localization'");

			var adminLanguagesPage = new AdminLanguagesPage(_driver);
			adminLanguagesPage.OpenUsingButtons(_baseUrl);

			adminLanguagesPage.DisableLocalization();

			Trace.WriteLine(BasePage.TraceLevelPage + "The localization table should NOT be present");
			Assert.IsFalse(adminLanguagesPage.ElementPresent(By.XPath(AdminLanguagesPage.LocalizationTable)),
						"The Localization table is still present");
		}
Ejemplo n.º 3
0
		public void Test003_EnableContentLocalization()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Enable Content Localization'");

			var hostSettingsPage = new HostSettingsPage(_driver);
			hostSettingsPage.OpenUsingButtons(_baseUrl);

			hostSettingsPage.EnableContentLocalization();

			var adminLanguagesPage = new AdminLanguagesPage(_driver);
			adminLanguagesPage.OpenUsingButtons(_baseUrl);

			adminLanguagesPage.EnableLocalization();

			Trace.WriteLine(BasePage.TraceLevelPage + "The localization table should be present");
			Assert.IsTrue(adminLanguagesPage.ElementPresent(By.XPath(AdminLanguagesPage.LocalizationTable)),
						"The Localization table is not present");
		}
Ejemplo n.º 4
0
		public void Test004_ExportTemplateWithLanguages()
		{
			string childSiteName = _childSiteName + "004";

			var adminAdvancedSettingsPage = new AdminAdvancedSettingsPage(_driver);
			adminAdvancedSettingsPage.OpenUsingButtons(_baseUrl);
			adminAdvancedSettingsPage.DeployLanguagePack(adminAdvancedSettingsPage.SetLanguageName(_languagePackToDeploy));

			var adminLanguagesPage = new AdminLanguagesPage(_driver);
			adminLanguagesPage.OpenUsingButtons(_baseUrl);
			adminLanguagesPage.EnableLanguage(adminLanguagesPage.SetLanguageName(_languagePackToDeploy));

			var hostSettingsPage = new HostSettingsPage(_driver);
			hostSettingsPage.OpenUsingButtons(_baseUrl);
			hostSettingsPage.EnableContentLocalization();
			
			adminLanguagesPage.OpenUsingButtons(_baseUrl);
			adminLanguagesPage.EnableLocalization(CheckBox.ActionType.Check);

			var hostSiteManagementPage = new HostSiteManagementPage(_driver);
			hostSiteManagementPage.OpenUsingButtons(_baseUrl);
			hostSiteManagementPage.ExportSiteTemplateWithContent(_siteName, "LanguageTemplate", "LanguageTemplate");

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

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

			aboutUsPage.SelectMenuOption(ControlPanelIDs.ControlPanelEditPageOption, ControlPanelIDs.PageSettingsOption);
			aboutUsPage.OpenTab(By.XPath(ControlPanelIDs.LocalizationTab));

			Trace.WriteLine(BasePage.TraceLevelPage + "Two language flags should be available");
			Assert.That(adminLanguagesPage.FindElements(By.XPath(ControlPanelIDs.LanguageIcon)).Count, Is.EqualTo(2),
						"The language flag number is not correct");

			Trace.WriteLine(BasePage.TraceLevelPage + "Two language pages should be available");
			Assert.That(aboutUsPage.FindElements(By.XPath("//tr[@class = 'pageHeaderRow']/th")).Count, Is.EqualTo(2));
		}