def test_loggedinAsOrganizationAdminValidateUserReportForm(self):
     self.login_to_cms_via_uua(orgAdminEmail, orgPass)
     userReport = UsersReportCMS(self.driver, self.wait)
     leftSidePanel = HomePageCMS(self.driver, self.wait)
     self.assertFalse(userReport.elementExistsById(userReport.organization_dropdown_id), 
                      "Organization dropdown is displayed, although it should not be.")
     self.assertEquals(userReport.getContentProjectOptions(), leftSidePanel.getContentProjectsListedInLeftSideBar(), 
                       "Content projects selectable from dropdown are not exactly the ones displayed in the left-side-bar.")
Esempio n. 2
0
 def test_setCustomHeaderImageToStationSite(self):
     homePage = HomePageCMS(self.driver, self.wait)
     lmSitesPage = homePage.clickLmSitesLink()
     editLmSitePage = lmSitesPage.openLmSiteByName("AETN Learning Media")
     editLmSitePage.typeHeaderFilePath(ServerRelated().getFilePathInProjectFolder(self.headerFilePath))
     editLmSitePage = editLmSitePage.clickSaveAndContinueEditingButton()
     self.assertEquals(editLmSitePage.getCurrentHeaderImage(), "station_site/lmsite_headers/desert.png", "Station site header not added correctly")
         
Esempio n. 3
0
 def test_previewLmSite(self):
     homePage = HomePageCMS(self.driver, self.wait)
     lmSitesPage = homePage.clickLmSitesLink()
     sitePage = lmSitesPage.openLmSiteByIndex(2)
     sitePage.clickPreviewButton()
     sitePage.switchToNewestWindow()
     title = self.wait.until(lambda driver : driver.find_element_by_xpath("//title"))
     self.assertTrue("PBS LearningMedia" in title.text, "Preview window not opened!")
Esempio n. 4
0
 def test_setMainSiteAsDefaultLmSiteAndTypeWellcomeText(self):
     homePage = HomePageCMS(self.driver, self.wait)
     lmSitesPage = homePage.clickLmSitesLink()
     editLmSitePage = lmSitesPage.openLmSiteByName("PBS Learning Media")
     editLmSitePage.clickDefaultLmSiteCheckbox()
     wellcomeText = "Welcome to PBS Learning Media home site!"
     editLmSitePage.typeWellcomeText(wellcomeText)
     editLmSitePage = editLmSitePage.clickSaveAndContinueEditingButton()
     self.assertTrue(editLmSitePage.isDefaultLmSiteChecked(), "Default lm site checkbox not checked.")
     self.assertEquals(editLmSitePage.getWellcomeText(), wellcomeText, "Wellcome text not saved.")
 def test_addOrganizationContentProject(self):
     contributorsPage = ContributorsPageCMS(self.driver, self.wait)
     contributorsPage.openDashboardForOrganization(org)
     contentProjPage = HomePageCMS(self.driver, self.wait).clickContentProjectLink()
     addContProj = contentProjPage.clickAddContentProject()
     addContProj.typeTitle("%s content project" %org)
     addContProj.selectOrganizationByValue(org)
     addContProj.clickSaveAndContinueEditingButton()
     contributorsPage = ContributorsPageCMS(self.driver, self.wait)
     dashboard = contributorsPage.openDashboardForOrganization(org)
     self.assertTrue(dashboard.elementExistsByLinkText("%s content project" %org), "Content project not asigned to Organization")