def test_html_interractive_asset_plays_from_resource(self):
     resPage = ResourceViewPageSS(self.driver, self.wait, html_interactive_asset_resourceId)
     resPage.clickInterractiveAsset()
     firstPageTitle = self.driver.title
     resPage.clickLinkOnPageByIndex(2)
     secondPageTitle = self.driver.title
     self.assertNotEqual(firstPageTitle, secondPageTitle, "No interaction was performed with the asset")
 def test_free_resource_views_count_for_unregistered_user(self):
     resPage = ResourceViewPageSS(self.driver, self.wait, resourceId)
     initialCount = resPage.get_number_of_resource_views_left_before_neeting_to_login()
     self.driver.refresh()
     self.driver.refresh()
     uuaLoginPopup = UuaLoginPage(self.driver, self.wait)
     self.assertEqual(initialCount, 2, "Initial count not equal to 2.")
     self.assertTrue(uuaLoginPopup.uua_login_page_is_displayed(), "UUA Login popup not displayed after 3 views")
 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")
Ejemplo n.º 5
0
 def test_favoriteInResourcePage(self):
     resourceId = "wa10.socst.global.20cent.israpal"
     
     resource = ResourceViewPageSS(self.driver, self.wait, resourceId)
     resource.clickFavoriteStar()
     time.sleep(1)
     resource = ResourceViewPageSS(self.driver, self.wait)
     self.assertTrue(resource.isFavorited(), "Favorite status (fav-ed) not kept after refresh")
     resource.clickFavoriteStar()
     time.sleep(1)
     resource = ResourceViewPageSS(self.driver, self.wait, resourceId)
     self.assertFalse(resource.isFavorited(), "Favorite status (fav-ed) not kept after refresh")
 def test_flash_interractive_asset_plays_from_resource(self):
     resPage = ResourceViewPageSS(self.driver, self.wait, flash_interactive_asset_resourceId)
     new_page = resPage.clickInterractiveAsset()
     self.assertTrue(new_page.elementExistsById("flash"), "Pop-up contains no interactive flash")