def test_resourceAccessingViaPerssistentUrl(self):
     resourcesPage = ResourcesPagesCMS(self.driver, self.wait)
     resourcesPage.search_in_searchbar("The Israeli Palestinian Conflict")
     resourcesPage.clickOnLink("The Israeli Palestinian Conflict")
     res = EditAddResourcePageCMS(self.driver, self.wait)
     code = res.getResourceCode()
     slug = res.getResourceSlug()
     title = res.getTitle()
     resView = ResourceViewPageSS(self.driver, self.wait, "%s/%s" %(code, slug))
     self.assertEquals(resView.getTitle(), title, "Perssistent url didn't open the correct resource in audience facing site")
 def openResource(self):
     resourcesPage = ResourcesPagesCMS(self.driver, self.wait)
     editResourcePage = resourcesPage.clickOnResource(self.resource)
     return editResourcePage
 def test_removeResource(self):
     resourcesPage = ResourcesPagesCMS(self.driver, self.wait)
     resourcesPage.clickCheckboxForItem(self.resource)
     deletePage = resourcesPage.selectDeleteAction()
     newPage = deletePage.clickConfirmationButton()
     self.assertFalse(newPage.elementExistsByLinkText(self.resource), "Resource not deleted")