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"); }
[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"); }