예제 #1
0
 def test_398(self):
     """Widget Step 1, expert mode setting.
     
     http://litmus.pculture.org/show_test.cgi?id=398
     """
     print "starting testcase 398"
     sel = self.selenium
     sel.set_timeout(testvars.MSTestVariables["TimeOut"])
     subtextfile = os.path.join(testvars.MSTestVariables["DataDirectory"],
                                "switch-to-firefox.txt")
     # be sure logged out
     website.SiteLogout(self, sel)
     website.start_demo(self, sel)
     website.start_sub_widget(self, sel, login=False)
     #Type sub-text in the video, then wait stay on Step-1 screen
     widget.transcribe_video(self,
                             sel,
                             subtextfile,
                             step="Stop",
                             buffer="yes")
     #verify that playback continues to the end
     while int(sel.get_element_width("css=.unisubs-played")) != 250:
         self.failIf(
             sel.is_element_present(testvars.WidgetUI["Video_play_button"]))
         time.sleep(2)
예제 #2
0
 def test_691(self):
     """Pagedemo New York Times video 1 - forked the subs and create a fresh set of captions in hr lang.
     
     http://litmus.pculture.org/show_test.cgi?id=691
     """
     test_id = 691
     sel = self.selenium
     testpage = "/pagedemo/nytimes_youtube_embed"
     subtextfile = os.path.join(testvars.MSTestVariables["DataDirectory"],"OctopusGarden.txt")
     sel.open(testpage)
     sel.wait_for_page_to_load(testvars.timeout)
     sel.window_maximize()
     mslib.wait_for_element_present(self,sel,testvars.WebsiteUI["SubtitleMe_menu"])
     time.sleep(5)
     sel.get_eval('this.browserbot.getUserWindow().unisubs.widget.Widget.getAllWidgets()[0].openMenu()')
     widget.open_starter_dialog(self,sel)
     widget.starter_dialog_fork(self,sel,to_lang='hr')
     widget.transcribe_video(self, sel, subtextfile)
     widget.sync_video(self, sel, subtextfile)
     widget.site_login_from_widget_link(self,sel)
     #verify subs still present
     print "verifying subtitles are still present"
     sel.select_window("null")
     mslib.wait_for_element_present(self,sel,"css=.unisubs-titlesList")
     widget.verify_sub_text(self,sel,subtextfile)
     if sel.is_element_present("css=.unisubs-modal-login"): #Login
         sel.click("css=.unisubs-log")
         widget.site_login_auth(self,sel)
         sel.select_window("null")
     widget.submit_sub_edits(self,sel,offsite=True)
예제 #3
0
    def test_415(self):
        """Widget Step 3, edit subtitle text.

        Tests smalls, caps, spaces, and non-ascii chars
        http://litmus.pculture.org/show_test.cgi?id=415
        """
        print "starting testcase 415"
        sel = self.selenium
        sel.set_timeout(testvars.MSTestVariables["TimeOut"])
        subtextfile = os.path.join(testvars.MSTestVariables["DataDirectory"],
                                   "switch-to-firefox.txt")
        # be sure logged out
        website.SiteLogout(self, sel)
        website.start_demo(self, sel)
        website.start_sub_widget(self, sel, login=False)
        widget.transcribe_video(self, sel, subtextfile)
        widget.sync_video(self, sel, subtextfile)
        #edit subtitles
        print "editing subtitles"
        widget.edit_text(self, sel, subtextfile)
        # make it french
        print "french"
        widget.edit_text(self, sel, subtextfile, new_text=testvars.eels_fr)
        #make it japanese
        print "japanese"
        widget.edit_text(self, sel, subtextfile, new_text=testvars.eels_jp)
예제 #4
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)
예제 #5
0
    def test_693(self):
        """Launch widget from Teams page.

        Currently testing on al-jazeera teams page.

        """
        sel = self.selenium
        sel.set_timeout(testvars.timeout)
        
        #login
        website.SiteLogIn(self,sel,testvars.siteuser,testvars.passw)
        team = "al-jazeera"
        subtextfile = os.path.join(testvars.MSTestVariables["DataDirectory"],"OctopusGarden.txt")


        #Edit original language
        print "testing edit original lang"
        sel.open("/teams/"+team)
        sel.wait_for_page_to_load(testvars.timeout)
#        website.teampage_lang_select(self,sel)
        mslib.wait_for_element_present(self,sel,testvars.vid_add_subs_button)
        sel.click(testvars.vid_add_subs_button)
        time.sleep(5)
        widget.starter_dialog_edit_orig(self,sel)
        widget.transcribe_video(self,sel,subtextfile)
        widget.close_sub_widget(self,sel)        

        #Edit translation
        print "testing edit translation"
        sel.open("/teams/"+team)
        sel.wait_for_page_to_load(testvars.timeout)
#        website.teampage_lang_select(self,sel)
        mslib.wait_for_element_present(self,sel,testvars.vid_add_subs_button)
        sel.click(testvars.vid_add_subs_button)
        time.sleep(5)
        widget.starter_dialog_translate_from_orig(self,sel,to_lang='hr')
        widget.edit_translation(self,sel,subtextfile)
        widget.close_sub_widget(self,sel)

        #New fork
        print "testing new fork"
        sel.open("teams/"+team)
        sel.wait_for_page_to_load(testvars.timeout)
#        website.teampage_lang_select(self,sel)
        mslib.wait_for_element_present(self,sel,testvars.vid_add_subs_button)
        sel.click(testvars.vid_add_subs_button)
        time.sleep(5)
        widget.starter_dialog_fork(self,sel,to_lang='pl')
        print "transcribing video"
        widget.transcribe_video(self,sel,subtextfile)
        # Sync
        print "syncing video"
        widget.sync_video(self,sel,subtextfile,3,4)
        # Review
        print "review step - just submitting video"
        widget.submit_sub_edits(self,sel,offsite=True)
예제 #6
0
    def test_693(self):
        """Launch widget from Teams page.

        Currently testing on al-jazeera teams page.

        """
        sel = self.selenium
        sel.set_timeout(testvars.timeout)

        #login
        website.SiteLogIn(self, sel, testvars.siteuser, testvars.passw)
        team = "al-jazeera"
        subtextfile = os.path.join(testvars.MSTestVariables["DataDirectory"],
                                   "OctopusGarden.txt")

        #Edit original language
        print "testing edit original lang"
        sel.open("/teams/" + team)
        sel.wait_for_page_to_load(testvars.timeout)
        #        website.teampage_lang_select(self,sel)
        mslib.wait_for_element_present(self, sel, testvars.vid_add_subs_button)
        sel.click(testvars.vid_add_subs_button)
        time.sleep(5)
        widget.starter_dialog_edit_orig(self, sel)
        widget.transcribe_video(self, sel, subtextfile)
        widget.close_sub_widget(self, sel)

        #Edit translation
        print "testing edit translation"
        sel.open("/teams/" + team)
        sel.wait_for_page_to_load(testvars.timeout)
        #        website.teampage_lang_select(self,sel)
        mslib.wait_for_element_present(self, sel, testvars.vid_add_subs_button)
        sel.click(testvars.vid_add_subs_button)
        time.sleep(5)
        widget.starter_dialog_translate_from_orig(self, sel, to_lang='hr')
        widget.edit_translation(self, sel, subtextfile)
        widget.close_sub_widget(self, sel)

        #New fork
        print "testing new fork"
        sel.open("teams/" + team)
        sel.wait_for_page_to_load(testvars.timeout)
        #        website.teampage_lang_select(self,sel)
        mslib.wait_for_element_present(self, sel, testvars.vid_add_subs_button)
        sel.click(testvars.vid_add_subs_button)
        time.sleep(5)
        widget.starter_dialog_fork(self, sel, to_lang='pl')
        print "transcribing video"
        widget.transcribe_video(self, sel, subtextfile)
        # Sync
        print "syncing video"
        widget.sync_video(self, sel, subtextfile, 3, 4)
        # Review
        print "review step - just submitting video"
        widget.submit_sub_edits(self, sel, offsite=True)
예제 #7
0
    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%")
예제 #8
0
    def test_404(self):
        """Widget Step 3, play-pause functionality.
        
        http://litmus.pculture.org/show_test.cgi?id=404
        """
        print "starting testcase 404"
        sel = self.selenium
        sel.set_timeout(testvars.MSTestVariables["TimeOut"])
        subtextfile = os.path.join(testvars.MSTestVariables["DataDirectory"],
                                   "switch-to-firefox.txt")
        # be sure logged out
        website.SiteLogout(self, sel)
        website.start_demo(self, sel)
        website.start_sub_widget(self, sel, login=False)
        widget.transcribe_video(self, sel, subtextfile)
        widget.sync_video(self, sel, subtextfile)

        #on Step 3 test play-pause button
        mslib.wait_for_element_present(self, sel,
                                       testvars.WidgetUI["Video_play_button"])
        #play-pause with screen button
        print "play-pause with screen button"
        sel.click(testvars.WidgetUI["Play_pause"])
        mslib.wait_for_element_present(self, sel,
                                       testvars.WidgetUI["Video_pause_button"])
        time.sleep(3)
        sel.click(testvars.WidgetUI["Play_pause"])
        mslib.wait_for_element_present(self, sel,
                                       testvars.WidgetUI["Video_play_button"])
        time.sleep(3)
        #play-pause with unicode tab char
        print "play-pause with keyboard"
        sel.type_keys("css=.unisubs-play", u'\u0009')
        mslib.wait_for_element_present(self, sel,
                                       testvars.WidgetUI["Video_pause_button"])
        time.sleep(3)
        sel.type_keys("css=.unisubs-play", u'\u0009')
        mslib.wait_for_element_present(self, sel,
                                       testvars.WidgetUI["Video_play_button"])
        time.sleep(3)
        #play-pause with Video play-pause button
        print "play-pause with on-video button"
        sel.click(testvars.WidgetUI["Video_play_button"])
        mslib.wait_for_element_present(self, sel,
                                       testvars.WidgetUI["Video_pause_button"])
        time.sleep(3)
        sel.click(testvars.WidgetUI["Video_pause_button"])
        mslib.wait_for_element_present(self, sel,
                                       testvars.WidgetUI["Video_play_button"])
예제 #9
0
    def test_410(self):
        """Widget Step 3, skip-back functionality.

        http://litmus.pculture.org/show_test.cgi?id=410
        """
        print "starting testcase 410"
        sel = self.selenium
        sel.set_timeout(testvars.MSTestVariables["TimeOut"])
        subtextfile = os.path.join(testvars.MSTestVariables["DataDirectory"],
                                   "switch-to-firefox.txt")
        # be sure logged out
        website.SiteLogout(self, sel)
        website.start_demo(self, sel)
        #start sub widget
        website.start_sub_widget(self, sel, login=False)
        #complete step 1 typing
        widget.transcribe_video(self, sel, subtextfile, buffer="yes")
        #complete step 2 syncing
        widget.sync_video(self, sel, subtextfile)
        #on step 3 test ctrl to skip back
        mslib.wait_for_element_present(self, sel,
                                       testvars.WidgetUI["Play_pause"])
        time.sleep(3)
        sel.click(testvars.WidgetUI["Play_pause"])
        # wait for play to advance and test with screen button
        time.sleep(10)
        print "1. screen button skip back"
        for x in range(0, 3):
            # get the time, skip back and get the time again
            start_time = sel.get_text(testvars.WidgetUI["Video_elapsed_time"])
            sel.click_at(testvars.WidgetUI["Skip_back"], "")
            time.sleep(1)
            stop_time = sel.get_text(testvars.WidgetUI["Video_elapsed_time"])
            diff_time = float(start_time) - float(stop_time)
            self.assertTrue(diff_time > 5)
            #wait for playback to progress
            time.sleep(10)
        # wait for play to advance and test with keyboard key
        # get the time, skip back and get the time again
        start_time = sel.get_text(testvars.WidgetUI["Video_elapsed_time"])
        print "2. key button skip back"
        sel.shift_key_down()
        sel.type_keys("css=.unisubs-right", u'\u0009')
        sel.shift_key_up()
        time.sleep(1)
        stop_time = sel.get_text(testvars.WidgetUI["Video_elapsed_time"])
        diff_time = int(start_time) - int(stop_time)
        print diff_time
        self.assertTrue(diff_time > 5)
예제 #10
0
 def test_373(self):
     """Widget Step 1, typing the subtitles.
     
     http://litmus.pculture.org/show_test.cgi?id=373
     """
     print "starting testcase 373"
     sel = self.selenium
     sel.set_timeout(testvars.MSTestVariables["TimeOut"])
     subtextfile = os.path.join(testvars.MSTestVariables["DataDirectory"],
                                "switch-to-firefox.txt")
     # be sure logged out
     website.SiteLogout(self, sel)
     website.start_demo(self, sel)
     website.start_sub_widget(self, sel, login=False)
     widget.transcribe_video(self, sel, subtextfile)
 def test_369(self):
     """Subtitle Youtube video in offsite embed.
     
     http://litmus.pculture.org/show_test.cgi?id=369
     """
     print "starting 369 youtube widget test"
     sel = self.selenium
     subtextfile = os.path.join(testvars.MSTestVariables["DataDirectory"], "OctopusGarden.txt")
     sel.set_timeout(testvars.MSTestVariables["TimeOut"])
     sel.open(selvars.set_widget_null_page())
     mslib.wait_for_element_present(self, sel, "css=.left_column span.unisubs-tabTextchoose")
     website.start_sub_widget(self, sel, "css=.left_column span.unisubs-tabTextchoose")
     # Transcribe
     widget.transcribe_video(self, sel, subtextfile)
     # Sync
     widget.sync_video(self, sel, subtextfile, 6, 8)
 def test_369(self):
     """Subtitle Youtube video in offsite embed.
     
     http://litmus.pculture.org/show_test.cgi?id=369
     """
     print "starting 369 youtube widget test"
     sel = self.selenium
     subtextfile = os.path.join(testvars.MSTestVariables["DataDirectory"],"OctopusGarden.txt")
     sel.set_timeout(testvars.MSTestVariables["TimeOut"])
     sel.open(selvars.set_widget_null_page())
     mslib.wait_for_element_present(self,sel,"css=.left_column span.unisubs-tabTextchoose")
     website.start_sub_widget(self,sel,"css=.left_column span.unisubs-tabTextchoose")
     # Transcribe
     widget.transcribe_video(self,sel,subtextfile)
     # Sync
     widget.sync_video(self,sel,subtextfile,6,8)
예제 #13
0
 def test_412(self):
     """Widget Step 3, press and hold down arrow time-shift.
        http://litmus.pculture.org/show_test.cgi?id=412
     """
     print "starting testcase 412"
     sel = self.selenium
     sel.set_timeout(testvars.MSTestVariables["TimeOut"])
     subtextfile = os.path.join(testvars.MSTestVariables["DataDirectory"],
                                "switch-to-firefox.txt")
     # be sure logged out
     website.SiteLogout(self, sel)
     website.start_demo(self, sel)
     website.start_sub_widget(self, sel, login=False)
     widget.transcribe_video(self, sel, subtextfile, buffer="yes")
     widget.sync_video(self, sel, subtextfile, start_delay=5, sub_int=2)
     #on Step 3 resync video times
     widget.hold_down_delay_sub(self, sel, subtextfile)
예제 #14
0
 def test_406(self):
     """Widget Step 1, restart typing link.
     
     http://litmus.pculture.org/show_test.cgi?id=406
     """
     print "starting testcase 406"
     sel = self.selenium
     sel.set_timeout(testvars.MSTestVariables["TimeOut"])
     subtextfile = os.path.join(testvars.MSTestVariables["DataDirectory"],
                                "switch-to-firefox.txt")
     # be sure logged out
     website.SiteLogout(self, sel)
     website.start_demo(self, sel)
     website.start_sub_widget(self, sel, login=False)
     widget.transcribe_video(self, sel, subtextfile, step="Stop")
     widget.restart_step(self, sel)
     self.failIf(sel.is_element_present("css=.unisubs-title-notime"))
예제 #15
0
 def test_414(self):
     """Widget Step 3, click time arrows to modify time.
     
     http://litmus.pculture.org/show_test.cgi?id=414
     """
     print "starting testcase 414"
     sel = self.selenium
     sel.set_timeout(testvars.MSTestVariables["TimeOut"])
     subtextfile = os.path.join(testvars.MSTestVariables["DataDirectory"],
                                "switch-to-firefox.txt")
     # be sure logged out
     website.SiteLogout(self, sel)
     website.start_demo(self, sel)
     website.start_sub_widget(self, sel, login=False)
     widget.transcribe_video(self, sel, subtextfile)
     widget.sync_video(self, sel, subtextfile)
     #on Step 3 resync video times
     widget.click_time_shift_arrows(self, sel, subtextfile)
예제 #16
0
 def test_413(self):
     """Widget Step 3, drag time bubbles.
     
     http://litmus.pculture.org/show_test.cgi?id=413
     """
     print "starting testcase 413"
     sel = self.selenium
     sel.set_timeout(testvars.MSTestVariables["TimeOut"])
     subtextfile = os.path.join(testvars.MSTestVariables["DataDirectory"],
                                "switch-to-firefox.txt")
     # be sure logged out
     website.SiteLogout(self, sel)
     website.start_demo(self, sel)
     website.start_sub_widget(self, sel, login=False)
     widget.transcribe_video(self, sel, subtextfile)
     widget.sync_video(self, sel, subtextfile, start_delay=1, sub_int=1)
     #on Step 3 resync video times
     widget.drag_time_bubbles(self, sel, subtextfile)
예제 #17
0
 def test_409(self):
     """Widget Step 2, skip-back functionality.
     
     http://litmus.pculture.org/show_test.cgi?id=409
     """
     print "starting testcase 409 shift-tab to sktip back step 2"
     print "known bug: http://bugzilla.pculture.org/show_bug.cgi?id=14292"
     sel = self.selenium
     sel.set_timeout(testvars.MSTestVariables["TimeOut"])
     subtextfile = os.path.join(testvars.MSTestVariables["DataDirectory"],
                                "switch-to-firefox.txt")
     # be sure logged out
     website.SiteLogout(self, sel)
     website.start_demo(self, sel)
     website.start_sub_widget(self, sel, login=False)
     #step 1 type the subs
     widget.transcribe_video(self, sel, subtextfile, buffer="yes")
     # on step 2 test skip back
     mslib.wait_for_element_present(self, sel,
                                    testvars.WidgetUI["Play_pause"])
     sel.click(testvars.WidgetUI["Play_pause"])
     # wait for play to advance and test with screen button
     time.sleep(9)
     print "1. screen button skip back"
     for x in range(0, 3):
         # get the time, skip back and get the time again
         start_time = sel.get_text(testvars.WidgetUI["Video_elapsed_time"])
         sel.click_at(testvars.WidgetUI["Skip_back"], "")
         time.sleep(1)
         stop_time = sel.get_text(testvars.WidgetUI["Video_elapsed_time"])
         diff_time = int(start_time) - int(stop_time)
         self.failUnless(diff_time > 5)
         time.sleep(10)
     # wait for play to advance and test with keyboard key
     # get the time, skip back and get the time again
     print "2. key cmd skip back"
     start_time = sel.get_text(testvars.WidgetUI["Video_elapsed_time"])
     sel.shift_key_down()
     sel.type_keys("css=.unisubs-right", u'\u0009')
     sel.shift_key_up()
     time.sleep(1)
     stop_time = sel.get_text(testvars.WidgetUI["Video_elapsed_time"])
     diff_time = int(start_time) - int(stop_time)
     self.failUnless(diff_time > 5)
def make_new_subs(self,sel,subtextfile):
    print "make new subs"
    time.sleep(3)
    widget.starter_dialog_edit_orig(self,sel)
    # Transcribe
    widget.transcribe_video(self,sel,subtextfile)
    # Sync
    widget.sync_video(self,sel,subtextfile,2,3)
    #Login
    time.sleep(3)
    sel.click("css=div.unisubs-needLogin a")
    sel.click("css=.unisubs-log")
    widget.site_login_auth(self,sel)
    sel.select_window("null")
    # Review
    widget.submit_sub_edits(self,sel,offsite=True)
    mslib.wait_for_element_present(self,sel,testvars.offsite_goto_subs)
    sel.click(testvars.offsite_goto_site)
    sel.wait_for_page_to_load(testvars.timeout)
예제 #19
0
    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)
예제 #20
0
 def test_408(self):
     """Widget Step 2, back to typing link.
     
     http://litmus.pculture.org/show_test.cgi?id=408
     """
     print "starting testcase 408"
     sel = self.selenium
     sel.set_timeout(testvars.MSTestVariables["TimeOut"])
     subtextfile = os.path.join(testvars.MSTestVariables["DataDirectory"],
                                "switch-to-firefox.txt")
     # be sure logged out
     website.SiteLogout(self, sel)
     # start demo and proceed to step 2 and sync subs
     website.start_demo(self, sel)
     website.start_sub_widget(self, sel, login=False)
     widget.transcribe_video(self, sel, subtextfile)
     widget.sync_video(self, sel, subtextfile, step="Stop")
     # go back to typing step
     widget.back_step(self, sel)
     # verify step 1 display and subs
     widget.steps_display(self, sel, 1)
     widget.verify_sub_text(self, sel, subtextfile)
예제 #21
0
 def test_416(self):
     """Widget Step 3, login link functionality.
     
     http://litmus.pculture.org/show_test.cgi?id=416
     """
     print "starting testcase 416"
     sel = self.selenium
     sel.set_timeout(testvars.MSTestVariables["TimeOut"])
     subtextfile = os.path.join(testvars.MSTestVariables["DataDirectory"],
                                "switch-to-firefox.txt")
     # be sure logged out
     website.SiteLogout(self, sel)
     website.start_demo(self, sel)
     website.start_sub_widget(self, sel, login=False)
     widget.transcribe_video(self, sel, subtextfile)
     widget.sync_video(self, sel, subtextfile)
     widget.site_login_from_widget_link(self, sel)
     #verify subs still present
     print "verifying subtitles are still present"
     sel.select_window("null")
     mslib.wait_for_element_present(self, sel, "css=.unisubs-titlesList")
     widget.verify_sub_text(self, sel, subtextfile)
예제 #22
0
 def test_397(self):
     """Widget Step 1, beginner mode setting.
     
     http://litmus.pculture.org/show_test.cgi?id=397
     """
     print "starting testcase 397"
     sel = self.selenium
     sel.set_timeout(testvars.MSTestVariables["TimeOut"])
     subtextfile = os.path.join(testvars.MSTestVariables["DataDirectory"],
                                "switch-to-firefox.txt")
     # be sure logged out
     website.SiteLogout(self, sel)
     website.start_demo(self, sel)
     website.start_sub_widget(self, sel, login=False)
     #Type sub-text in the video, then wait stay on Step-1 screen
     widget.transcribe_video(self,
                             sel,
                             subtextfile,
                             mode="Beginner",
                             step="Stop",
                             buffer="yes")
     # wait for play button to indicate playback was paused, then start playback and see if it auto-stops
     for x in range(0, 2):
         mslib.wait_for_element_present(
             self, sel, testvars.WidgetUI["Video_play_button"])
         start_time = sel.get_text(testvars.WidgetUI["Video_elapsed_time"])
         sel.click(testvars.WidgetUI["Video_play_button"])
         mslib.wait_for_element_present(
             self, sel, testvars.WidgetUI["Video_play_button"])
         stop_time = sel.get_text(testvars.WidgetUI["Video_elapsed_time"])
         diff_time = int(stop_time) - int(start_time)
         if not 7 < diff_time < 10:
             mslib.AppendErrorMessage(self, sel,
                                      "didn't stop after 8 seconds")
             print "started at: " + start_time + "stopped at: " + stop_time
             print diff_time
     # verify subs present on next screen
     widget.verify_sub_text(self, sel, subtextfile)