Пример #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_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)
Пример #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)
Пример #4
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%")
Пример #5
0
 def test_400(self):
     """Widget Step 1, Skip-back functionality
     
     http://litmus.pculture.org/show_test.cgi?id=400
     """
     print "starting testcase 400 - shift-tab to skip back on step 1"
     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)
     #set mode to expert and wait for video to load
     mode_label = sel.get_text(
         "css=.unisubs-speedmode option:contains('Expert')")
     sel.select("//select", "label=" + mode_label)
     mslib.wait_for_video_to_buffer(self, sel)
     # start playback
     sel.click(testvars.WidgetUI["Play_pause"])
     mslib.wait_for_element_present(self, sel,
                                    testvars.WidgetUI["Video_pause_button"])
     # wait for play to advance and test with screen button
     time.sleep(7)
     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(testvars.WidgetUI["Skip_back"])
         time.sleep(1)
         sel.click(testvars.WidgetUI["Play_pause"])
         time.sleep(.50)
         stop_time = sel.get_text(testvars.WidgetUI["Video_elapsed_time"])
         diff_time = int(start_time) - int(stop_time)
         self.failUnless(diff_time > 5)
         sel.click(testvars.WidgetUI["Play_pause"])
         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"])
     sel.shift_key_down()
     sel.type_keys("css=.unisubs-play", u'\u0009')
     sel.shift_key_up()
     sel.click(testvars.WidgetUI["Play_pause"])
     time.sleep(.50)
     stop_time = sel.get_text(testvars.WidgetUI["Video_elapsed_time"])
     diff_time = int(start_time) - int(stop_time)
     self.failUnless(diff_time > 5)
     sel.click(testvars.WidgetUI["Play_pause"])
     time.sleep(10)
Пример #6
0
 def test_399(self):
     """Widget Step 1, play-pause functionality.
     
     http://litmus.pculture.org/show_test.cgi?id=399
     """
     print "starting testcase 399"
     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)
     # wait for video to load
     mslib.wait_for_element_present(self, sel,
                                    testvars.WidgetUI["Video_play_button"])
     # set expert mode
     mode_label = sel.get_text(
         "css=.unisubs-speedmode option:contains('Expert')")
     sel.select("//select", "label=" + mode_label)
     #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"])
Пример #7
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"])
Пример #8
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)
Пример #9
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)
Пример #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)
Пример #13
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"))
Пример #14
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)
Пример #15
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)
Пример #16
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)
Пример #17
0
 def test_470(self):
     """Widget Step 1, advanced (recommended) mode setting.
     
     http://litmus.pculture.org/show_test.cgi?id=470
     """
     print "starting testcase 470"
     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
     mslib.wait_for_element_present(self, sel,
                                    testvars.WidgetUI["Play_pause"])
     mode_label = sel.get_text(
         "css=.unisubs-speedmode option:contains('Recommended')")
     sel.select("//select", "label=" + mode_label)
     mslib.wait_for_video_to_buffer(self, sel)
     sel.click(testvars.WidgetUI["Play_pause"])
     # keep typing while in playback mode until button changes to play button (indicating paused)
     sel.click("//div/input")
     for x in range(0, 4):
         while sel.is_element_present(
                 testvars.WidgetUI["Video_pause_button"]):
             time.sleep(.2)
             sel.type_keys("//div/input", "Hi ")
         # stop typing and wait for playback to resume (pause button present)
         stop_time = sel.get_text(testvars.WidgetUI['Video_elapsed_time'])
         sel.type_keys("//div/input", "I'm Asa Dotzler")
         if "firefox" in selvars.set_browser():
             sel.key_press("css=.trans", "13")
         else:
             sel.focus("css=input[class*=trans]")
             sel.key_press_native('10')
         mslib.wait_for_element_present(
             self, sel, testvars.WidgetUI["Video_pause_button"])
         time.sleep(.5)
         resume_time = sel.get_text(testvars.WidgetUI['Video_elapsed_time'])
         self.failUnless(int(stop_time) > int(resume_time))
Пример #18
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)
Пример #19
0
    def test_389(self):
        """How-to video display, and continue button.

        http://litmus.pculture.org/show_test.cgi?id=395
        """
        print "starting testcase 389"
        sel = self.selenium
        sel.set_timeout(testvars.MSTestVariables["TimeOut"])
        # be sure logged out
        website.SiteLogout(self, sel)
        website.start_demo(self, sel)
        website.start_sub_widget(self, sel, skip=False)
        mslib.wait_for_element_present(self, sel,
                                       testvars.WidgetUI["Next_step"])
        sel.click(testvars.WidgetUI["Next_step"])
        widget.close_howto_video(self, sel, skip=False)
        mslib.wait_for_element_present(self, sel,
                                       testvars.WidgetUI["Next_step"])
        sel.click(testvars.WidgetUI["Next_step"])
        widget.close_howto_video(self, sel, skip=False)
Пример #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)
Пример #23
0
    def test_395(self):
        """How-to video display and skip setting.
        
        http://litmus.pculture.org/show_test.cgi?id=395
        """
        print "starting testcase 395"
        sel = self.selenium
        sel.set_timeout(testvars.MSTestVariables["TimeOut"])
        # be sure logged out
        website.SiteLogout(self, sel)
        website.start_demo(self, sel)
        # start sub widget and click the skip checkbox
        website.start_sub_widget(self, sel, skip=True)
        # pass through the edit steps 1-3 and verify no more video

        mslib.wait_for_element_present(self, sel,
                                       testvars.WidgetUI["Next_step"])
        sel.click(testvars.WidgetUI["Next_step"])
        mslib.wait_for_element_present(self, sel,
                                       testvars.WidgetUI["Next_step"])
        sel.click(testvars.WidgetUI["Next_step"])
        mslib.wait_for_element_present(self, sel,
                                       testvars.WidgetUI["Next_step"])