Example #1
0
		public void Test002_EditVocabulary()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Edit the Vocabulary'");

			AdminTaxonomyPage adminTaxonomyPage = new AdminTaxonomyPage(_driver);
			adminTaxonomyPage.OpenUsingButtons(_baseUrl);

			adminTaxonomyPage.AddDescription(_vocabularyName, _vocabularyDescription);
			
			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the Vocabulary Description is updated in the list");
			Assert.That(adminTaxonomyPage.WaitForElement(By.XPath("//tr[td[text() = '" + _vocabularyName + "']]/td[3]")).Text, Is.EqualTo(_vocabularyDescription),
						"The Vocabulary description is not updated correctly");
		}
Example #2
0
		public void Test001_AddNewVocabulary()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Add a new Vocabulary");

			var adminTaxonomyPage = new AdminTaxonomyPage(_driver);
			adminTaxonomyPage.OpenUsingButtons(_baseUrl);

			int itemNumber = adminTaxonomyPage.FindElements(By.XPath(AdminTaxonomyPage.VocabularyList)).Count;

			adminTaxonomyPage.AddNewVocabulary(_vocabularyName, _vocabularyType, _vocabularyScope);

			adminTaxonomyPage.OpenUsingButtons(_baseUrl);
			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the number of elements in the list increased by 1");
			Assert.That( adminTaxonomyPage.FindElements(By.XPath(AdminTaxonomyPage.VocabularyList)).Count, Is.EqualTo(itemNumber + 1),
			            "The Vocabulary is not added correctly");

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the Vocabulary is present in the list");
			Assert.IsTrue(adminTaxonomyPage.ElementPresent(By.XPath("//tr[td[text() = '" + _vocabularyName + "']]")),
			              "The Vocabulary is not added correctly");
		}
Example #3
0
		public void Test003_DeleteVocabulary()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Delete the Vocabulary'");

			AdminTaxonomyPage adminTaxonomyPage = new AdminTaxonomyPage(_driver);
			adminTaxonomyPage.OpenUsingButtons(_baseUrl);

			//adminTaxonomyPage.WaitForElement(By.XPath(AdminTaxonomyPage.VocabularyTable));
			int itemNumber = adminTaxonomyPage.FindElements(By.XPath(AdminTaxonomyPage.VocabularyList)).Count;

			adminTaxonomyPage.DeleteVocabulary(_vocabularyName);

			adminTaxonomyPage.OpenUsingButtons(_baseUrl);
			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the number of elements in the list decreased by 1");
			Assert.That(adminTaxonomyPage.FindElements(By.XPath(AdminTaxonomyPage.VocabularyList)).Count,
						Is.EqualTo(itemNumber - 1),
						"The Vocabulary is not deleted correctly");

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the Vocabulary is not present in the list");
			Assert.IsFalse(adminTaxonomyPage.ElementPresent(By.XPath("//tr[td[text() = '" + _vocabularyName + "']]")),
						   "The Vocabulary is not deleted correctly");
		}
Example #4
0
		[Test] //Testcase trace: Test-672
        public void Test005_Host_VocabularyWithWebsiteScopeShouldNotBeAvailableOnChildSite()
        {
            Trace.WriteLine(BasePage.RunningTestKeyWord + "'Host: Add Vocabulary with Website scope - it should not be available on child site'");

            //Open 'Taxonomy' page
            AdminTaxonomyPage adminTaxonomyPage = new AdminTaxonomyPage(_driver);
            adminTaxonomyPage.OpenUsingButtons(_baseUrl);

            // Click on 'Create New Vocabulary' button and Add a Vocabulary Name and Scope=Application and Click on 'Create Vocabulary' button
            adminTaxonomyPage.AddNewVocabulary(_websiteScopeVocabularyName, "simple", "website");

            //Assert the Vocabulary's scope is Website
            Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the Vocabulary is present and its scope is Website");
            Assert.That(adminTaxonomyPage.WaitForElement(By.XPath("//tr[td[text() = '" + _websiteScopeVocabularyName + "']]/td[5]")).Text, Is.EqualTo("Website"),
                        "The Vocabulary scope is not 'Website'");

            //Navigate to Child site using its url and Open 'Taxonomy' page
			adminTaxonomyPage.OpenUsingButtons(_baseUrl + "/" + _childSiteName);

            //Assert the new vocabulary exists and Assert the new vocabulary's scope is Application
            Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the Vocabulary is NOT present");
            Assert.IsFalse(adminTaxonomyPage.ElementPresent(By.XPath("//tr[td[text() = '" + _websiteScopeVocabularyName + "']]")), 
                "The Vocabulary with Webiste scope is present on child site");
        }