Esempio n. 1
0
    def test_613(self):
        """Submit a video and add to team.

        http://litmus.pculture.org/show_test.cgi?id=613.      
        """
        sel = self.selenium
        sel.set_timeout(testvars.timeout)
        #login
        website.SiteLogIn(self,sel,testvars.siteuser,testvars.passw)
        #create team
        team = "miro"+time.strftime("%m%d%H%M%S", time.gmtime())
        team_logo_path = os.path.join(testvars.MSTestVariables["DataDirectory"],"sheep.png")
        website.open_teams_page(self,sel)
        sel.click(testvars.start_team)
        sel.wait_for_page_to_load(testvars.timeout)
        website.create_team(self,sel,team,team_logo_path)
        
        #submit video
        sel.window_maximize()
        test_video_url = website.submit_random_youtube(self,sel)
        print test_video_url
        mslib.wait_for_element_present(self,sel,"css=span.sort_label strong:contains('Add video')")
        vid_title = sel.get_text(testvars.vid_title)
        #add video to team and verify values
        teamli = "add/video/"+team



                  
        sel.click(testvars.video_add_to_team)
##        sel.click_at("css=span.sort_label strong:contains('Add video')","")
        sel.click_at("css=a[href*='"+teamli+"']","")
        
        sel.wait_for_page_to_load(testvars.timeout)
        print "verifying the inital add page"

        if sel.is_element_present("css=.errorlist")== True:
            print "error adding video to team"
            self.fail()
        else:
            mslib.wait_for_text_present(self,sel,"Video language")
            sel.select("id_language", "value=en")
            sel.click(testvars.teams_save)
            sel.wait_for_page_to_load(testvars.timeout)
        self.assertTrue(sel.is_element_present("css=li.active a:contains('"+team+"')"))
        sel.click(testvars.teams_video_tab)
        sel.wait_for_page_to_load(testvars.timeout)
        print "verifying team videos list"
        self.assertTrue(sel.is_element_present("css=tr.video-container td a[href*='"+test_video_url+"info/']"),"test_video_url error")
#        self.assertTrue(sel.is_element_present("css=tr.video-container td:contains('"+vid_title[0:10]+"')"),"vid_title error")
        # delete the video from the team
        sel.click("css=td a:contains('"+vid_title[0:10]+"') +div +div +div.small.grey a.remove-video")
        self.failUnless(re.search(r"^Remove this video[\s\S]$", sel.get_confirmation()))

        # logout
        sel.click(testvars.WebsiteUI["Logout_Button"])
Esempio n. 2
0
    def test_604(self):
        """Create a new team - required fields.

        http://litmus.pculture.org/show_test.cgi?id=604.      
        """
        sel = self.selenium
        sel.set_timeout(testvars.timeout)
        #test data
        team = ""
        url = "http://blip.tv/file/get/Miropcf-Miro20Introduction771.ogv"
        team_logo_path = os.path.join(testvars.MSTestVariables["DataDirectory"],"sheep.png")
        
        #login
        website.SiteLogIn(self,sel,testvars.siteuser,testvars.passw)
        #create team
        website.open_teams_page(self,sel)
        sel.click(testvars.start_team)
        sel.wait_for_page_to_load(testvars.timeout)
        website.create_team(self,sel,team,team_logo_path)
Esempio n. 3
0
    def test_604(self):
        """Create a new team - required fields.

        http://litmus.pculture.org/show_test.cgi?id=604.      
        """
        sel = self.selenium
        sel.set_timeout(testvars.timeout)
        #test data
        team = ""
        url = "http://blip.tv/file/get/Miropcf-Miro20Introduction771.ogv"
        team_logo_path = os.path.join(
            testvars.MSTestVariables["DataDirectory"], "sheep.png")

        #login
        website.SiteLogIn(self, sel, testvars.siteuser, testvars.passw)
        #create team
        website.open_teams_page(self, sel)
        sel.click(testvars.start_team)
        sel.wait_for_page_to_load(testvars.timeout)
        website.create_team(self, sel, team, team_logo_path)
Esempio n. 4
0
    def test_603(self):
        """Create a new team - open membership.

        http://litmus.pculture.org/show_test.cgi?id=603.      
        """
        sel = self.selenium
        sel.set_timeout(testvars.timeout)
        #test data
        team = "miro"+time.strftime("%m%d%H%M%S", time.gmtime())
        team_logo_path = os.path.join(testvars.MSTestVariables["DataDirectory"],"sheep.png")
        
        #login
        website.SiteLogIn(self,sel,testvars.siteuser,testvars.passw)
        #create team
        website.open_teams_page(self,sel)
        sel.click(testvars.start_team)
        sel.wait_for_page_to_load(testvars.timeout)
        website.create_team(self,sel,team,team_logo_path)
        sel.open("teams/"+team)
        # logout
        sel.click(testvars.WebsiteUI["Logout_Button"])
Esempio n. 5
0
    def test_603(self):
        """Create a new team - open membership.

        http://litmus.pculture.org/show_test.cgi?id=603.      
        """
        sel = self.selenium
        sel.set_timeout(testvars.timeout)
        #test data
        team = "miro" + time.strftime("%m%d%H%M%S", time.gmtime())
        team_logo_path = os.path.join(
            testvars.MSTestVariables["DataDirectory"], "sheep.png")

        #login
        website.SiteLogIn(self, sel, testvars.siteuser, testvars.passw)
        #create team
        website.open_teams_page(self, sel)
        sel.click(testvars.start_team)
        sel.wait_for_page_to_load(testvars.timeout)
        website.create_team(self, sel, team, team_logo_path)
        sel.open("teams/" + team)
        # logout
        sel.click(testvars.WebsiteUI["Logout_Button"])
Esempio n. 6
0
    def test_613(self):
        """Submit a video and add to team.

        http://litmus.pculture.org/show_test.cgi?id=613.      
        """
        sel = self.selenium
        sel.set_timeout(testvars.timeout)
        #login
        website.SiteLogIn(self, sel, testvars.siteuser, testvars.passw)
        #create team
        team = "miro" + time.strftime("%m%d%H%M%S", time.gmtime())
        team_logo_path = os.path.join(
            testvars.MSTestVariables["DataDirectory"], "sheep.png")
        website.open_teams_page(self, sel)
        sel.click(testvars.start_team)
        sel.wait_for_page_to_load(testvars.timeout)
        website.create_team(self, sel, team, team_logo_path)

        #submit video
        sel.window_maximize()
        test_video_url = website.submit_random_youtube(self, sel)
        print test_video_url
        mslib.wait_for_element_present(
            self, sel, "css=span.sort_label strong:contains('Add video')")
        vid_title = sel.get_text(testvars.vid_title)
        #add video to team and verify values
        teamli = "add/video/" + team

        sel.click(testvars.video_add_to_team)
        ##        sel.click_at("css=span.sort_label strong:contains('Add video')","")
        sel.click_at("css=a[href*='" + teamli + "']", "")

        sel.wait_for_page_to_load(testvars.timeout)
        print "verifying the inital add page"

        if sel.is_element_present("css=.errorlist") == True:
            print "error adding video to team"
            self.fail()
        else:
            mslib.wait_for_text_present(self, sel, "Video language")
            sel.select("id_language", "value=en")
            sel.click(testvars.teams_save)
            sel.wait_for_page_to_load(testvars.timeout)
        self.assertTrue(
            sel.is_element_present("css=li.active a:contains('" + team + "')"))
        sel.click(testvars.teams_video_tab)
        sel.wait_for_page_to_load(testvars.timeout)
        print "verifying team videos list"
        self.assertTrue(
            sel.is_element_present("css=tr.video-container td a[href*='" +
                                   test_video_url + "info/']"),
            "test_video_url error")
        #        self.assertTrue(sel.is_element_present("css=tr.video-container td:contains('"+vid_title[0:10]+"')"),"vid_title error")
        # delete the video from the team
        sel.click("css=td a:contains('" + vid_title[0:10] +
                  "') +div +div +div.small.grey a.remove-video")
        self.failUnless(
            re.search(r"^Remove this video[\s\S]$", sel.get_confirmation()))

        # logout
        sel.click(testvars.WebsiteUI["Logout_Button"])