def test_editVideo(self): lang = "German" w_h = "11" aspectRatio = "4:3" embeddedCode = "new embedded code" transcriptTxt = "new text 1" videosPage = VideosPageCMS(self.driver, self.wait) editVideoPage = videosPage.clickOnVideo(self.video) editVideoPage.typeName("%s1" %self.video) editVideoPage.typeVideoFilePath(ServerRelated().getFilePathInProjectFolder(self.videoFilePathForEdit)) editVideoPage.selectLanguageByVisibleText(lang) editVideoPage.typeWidth(w_h) editVideoPage.typeHeight(w_h) editVideoPage.typeAspectRatio(aspectRatio) editVideoPage.typeEmbedCode(embeddedCode) editVideoPage.clickShowCaptionsLink() editVideoPage.clickShowTranscriptsLink() editVideoPage.typeCaptionFilePath(ServerRelated().getFilePathInProjectFolder(self.captionFilePathForEdit)) editVideoPage.typeTranscriptFilePath(ServerRelated().getFilePathInProjectFolder(self.transcriptFilePathForEdit)) editVideoPage.typeTranscriptText(transcriptTxt) editVideoPage = editVideoPage.clickSaveAndContinueEditingButton() editVideoPage.clickShowCaptionsLink() editVideoPage.clickShowTranscriptsLink() self.assertEqual(editVideoPage.getName(), "%s1" %self.video, "Name not updated") self.assertEqual(editVideoPage.getCurrentVideoFile(), "media_files/video_sample1.avi", "Video file missing") self.assertEqual(editVideoPage.getSelectedLanguage(), lang, "Language not updated") self.assertEqual(editVideoPage.getWidth(), w_h, "Width not updated") self.assertEqual(editVideoPage.getHeight(), w_h, "Height not updated") self.assertEqual(editVideoPage.getAspectRatio(), aspectRatio, "Aspect ratio not updated") self.assertEqual(editVideoPage.getEmbeddedCode(), embeddedCode, "Embedded code not updated") self.assertEqual(editVideoPage.getTranscriptText(), transcriptTxt, "Transcript file not uploaded correctly") self.assertEqual(editVideoPage.getCurrentTranscriptFile(), "transcripts/text_sample1.txt", "Transcript file not modified correctly") self.assertEqual(editVideoPage.getCurrentCaptionFile(), "captions/text_sample1.txt", "Caption file not modified correctly")
def test_removeVideo(self): videosPage = VideosPageCMS(self.driver, self.wait) videosPage.clickCheckboxForItem("%s1" %self.video) deletePage = videosPage.selectDeleteAction() newPage = deletePage.clickConfirmationButton() self.assertFalse(newPage.elementExistsByLinkText("%s1" %self.video), "Video not deleted") # def test_verifyIngestionStatusForVideo(self): # videosPage = VideosPageCMS(self.driver, self.wait) # editVideoPage = videosPage.openFirstVideoOlderThanYesterday() # self.assertTrue( ("Failed" in editVideoPage.getContentOfStatusBox()) or # ("Success" in editVideoPage.getContentOfStatusBox()) , "Status is not Failed or Success!")