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 test_resourceViewDisplaysCorrectly(self):
        title = "The Israeli Palestinian Conflict"
        grades = "9-12"

        resPage = ResourceViewPageSS(self.driver, self.wait, resourceId)
        self.assertEqual(title, resPage.getTitle(), "Title not displayed")
        self.assertTrue(grades in resPage.getGrades(), "Grades not displayed")
        self.assertTrue(
            resPage.getSupportMaterialContent(0) != "", "First Support material text not displayed or is empty"
        )
        #        self.assertTrue(resPage.getNumberOfStandards() > 0, "Standards not displayed")
        self.assertTrue(resPage.getNumberOfRelatedResources() > 0, "Related resources not displayed")
        self.assertEqual(self.driver.title, title + " : PBS LearningMedia", "HTML title is incorrect")