Esempio n. 1
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)
Esempio n. 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)
Esempio n. 3
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)
Esempio n. 4
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)
Esempio n. 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)
    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%")
Esempio n. 7
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)
Esempio n. 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"])
 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)
Esempio n. 10
0
 def test_411(self):
     """Widget Step 2, subtitle syncing.
     
     http://litmus.pculture.org/show_test.cgi?id=411
     """
     print "starting testcase 411"
     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, step="Stop")
 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)
Esempio n. 12
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)
Esempio n. 13
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)
Esempio n. 14
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)
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)
Esempio n. 16
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)
Esempio n. 17
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)
Esempio n. 18
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)