def test_addContentFragment(self): lmSite = "PBS Learning Media: www" bodyText = "body text" placeholder = "Right Rail" contFragmPage = ContentFragmentsPageCMS(self.driver, self.wait) addContFragmPage = contFragmPage.clickAddContentFragment() addContFragmPage.selectLmSite(lmSite) addContFragmPage.typeTitle(self.fragmentTitle) addContFragmPage.typeBody(bodyText) addContFragmPage.selectStartOnTomorrow() addContFragmPage.selectPlaceholder(placeholder) editContFragmPage = addContFragmPage.clickSaveAndContinueEditingButton() self.assertEquals(editContFragmPage.getTitle(), self.fragmentTitle, "Title not saved correctly") self.assertEquals(editContFragmPage.getSelectedLmSite(), lmSite, "LM Site not selected correctly") self.assertEquals(editContFragmPage.getBody(), bodyText, "Body text not saved correctly") self.assertEquals(editContFragmPage.getSelectedPlaceholder(), placeholder, "Placeholder not saved correctly")
def test_removeContentFragment(self): contFragmPage = ContentFragmentsPageCMS(self.driver, self.wait) contFragmPage.clickCheckboxForItem(self.fragmentTitle) deletePage = contFragmPage.selectDeleteAction() newPage = deletePage.clickConfirmationButton() self.assertFalse(newPage.elementExistsByLinkText(self.fragmentTitle), "Content Fragment not deleted")