Beispiel #1
0
    def test_486(self):
        """Revisions - edit subtitles timing and verify in history table.

        http://litmus.pculture.org/show_test.cgi?id=486
        """
        sel = self.selenium
        sel.set_timeout(testvars.MSTestVariables["TimeOut"])
        sel.open("/")
        subtextfile = os.path.join(testvars.MSTestVariables["DataDirectory"],
                                   "OctopusGarden.txt")
        print "submitting a youtube video, format: "
        vid_url = offsite.get_youtube_video_url(self)
        # Submit Video
        print "logging in and submitting video"
        website.SiteLogIn(self, sel, testvars.siteuser, testvars.passw)
        website.submit_video(self, sel, vid_url)
        # Verify embed and player
        print "verifying embed"
        unisubs_url = website.verify_submitted_video(self,
                                                     sel,
                                                     vid_url,
                                                     embed_type="youtube")
        # Start sub widget
        print "starting sub widget"
        website.start_sub_widget(self, sel)
        # Transcribe
        print "transcribing video"
        widget.transcribe_video(self, sel, subtextfile)
        # Sync
        print "syncing video"
        widget.sync_video(self, sel, subtextfile)
        # Review
        print "review step - just submitting video"
        widget.submit_sub_edits(self, sel)
        mslib.wait_for_element_present(self, sel, testvars.video_video_info)
        sel.select_frame("relative=top")
        sel.click(testvars.video_original)
        sel.wait_for_page_to_load(testvars.MSTestVariables["TimeOut"])
        # Verify subtitles
        website.verify_subs(self, sel, subtextfile)
        sel.click(testvars.video_add_translation)
        widget.starter_dialog_edit_orig(self, sel)
        widget.goto_step(self, sel, "2")
        widget.resync_video(self, sel, subtextfile)
        widget.submit_sub_edits(self, sel)
        time.sleep(2)
        sel.select_frame("relative=top")
        # Click History tab
        sel.click(testvars.video_original)
        sel.wait_for_page_to_load(testvars.MSTestVariables["TimeOut"])
        sel.click(testvars.history_tab)
        rev_num = website.get_current_rev(self, sel)
        website.verify_latest_history(self,
                                      sel,
                                      rev=str(rev_num),
                                      user="******",
                                      tm="100%",
                                      text="0%")
        website.admin_delete_video(self, sel, unisubs_url)
    def test_602(self):
        """Revisions - edit subtitles text and verify in history table.

        http://litmus.pculture.org/show_test.cgi?id=602
        """
        sel = self.selenium
        sel.set_timeout(testvars.MSTestVariables["TimeOut"])
        sel.open("/")
        subtextfile = os.path.join(testvars.MSTestVariables["DataDirectory"],"OctopusGarden.txt")
        print "submitting a youtube video, format: "
        vid_url = offsite.get_youtube_video_url(self)
        # Submit Video
        print "logging in and submitting video"
        website.SiteLogIn(self,sel,testvars.siteuser,testvars.passw)
        website.submit_video(self,sel,vid_url)
        
        # Verify embed and player
        print "verifying embed"
        website.verify_submitted_video(self,sel,vid_url,embed_type="youtube")
        # Start sub widget
        print "starting sub widget"
        time.sleep(5)
        website.start_sub_widget(self,sel)
        # Transcribe
        print "transcribing video"
        widget.transcribe_video(self,sel,subtextfile)
        # Sync
        print "syncing video"
        widget.sync_video(self,sel,subtextfile)
        # Review
        print "review step - just submitting video"
        widget.submit_sub_edits(self,sel)
        #Website verify subs        
        sel.select_frame("relative=top")
        sel.click(testvars.video_original)
        website.verify_subs(self,sel,subtextfile)
        sel.wait_for_page_to_load(testvars.MSTestVariables["TimeOut"])
        #Edit subtitles
        sel.click(testvars.video_add_translation)
        widget.starter_dialog_edit_orig(self,sel)
        widget.goto_step(self,sel,"3")
        widget.edit_text(self,sel,subtextfile)
        widget.submit_sub_edits(self,sel)
        time.sleep(2)
        sel.select_frame("relative=top")
        
        # Click Original language then History tab
        sel.click(testvars.video_original)
        sel.wait_for_page_to_load(testvars.timeout)
        sel.click(testvars.history_tab)
        rev_num = website.get_current_rev(self,sel)      
        website.verify_latest_history(self,sel,rev=str(rev_num),user="******",tm="0%",text="100%")
    def test_485(self):
        """Revisions - display history info for original subtitle language.

        http://litmus.pculture.org/show_test.cgi?id=485
        """
        
        sel = self.selenium
        sel.set_timeout(testvars.MSTestVariables["TimeOut"])
        sel.open("/")
        subtextfile = os.path.join(testvars.MSTestVariables["DataDirectory"],"OctopusGarden.txt")
        print "submitting a youtube video, format: "
        vid_url = offsite.get_youtube_video_url(self)
        # Submit Video
        print "logging in and submitting video"
        website.SiteLogIn(self,sel,testvars.siteuser,testvars.passw)
        website.front_page_submit(self,sel,vid_url)
        # Verify embed and player
        print "verifying embed"
        unisubs_url = website.verify_submitted_video(self,sel,vid_url,embed_type="youtube")
        # Start sub widget
        print "starting sub widget"
        website.start_sub_widget(self,sel)
        # Transcribe
        print "transcribing video"
        widget.transcribe_video(self,sel,subtextfile)
        # Sync
        print "syncing video"
        widget.sync_video(self,sel,subtextfile)
        # Review
        widget.submit_sub_edits(self,sel)
        time.sleep(5)
        sel.select_frame("relative=top")
        sel.click(testvars.video_original)
        sel.wait_for_page_to_load(testvars.MSTestVariables["TimeOut"])
        website.verify_subs(self,sel,subtextfile)
        # Click History tab
        sel.click(testvars.history_tab)
        time.sleep(2)
        rev_num = website.get_current_rev(self,sel)
        website.verify_latest_history(self,sel,rev=str(rev_num),user="******",tm="100%",text="100%")
        #cleanup
        website.admin_delete_video(self,sel,unisubs_url)