Exemple #1
0
 def test_AddNewUser_270(self):
     sel = self.selenium
     # Log in as Admin
     loginlogout.LogInAsAdmin(self, sel)
     # This is information for add user edit fields
     username = "******"
     password = "******"
     email = "*****@*****.**"
     # To select User role type "0"
     # To select Admin role type "1"
     role = "0"
     # This function returns the row number for the desired username
     # on /users page.
     # Returns row number if the us username is found and 0 otherwise.
     if users.UserRow(self, sel, username) != 0:
         print "Duplicate user found. Deleting it..."
         # This function delete user
         users.DeleteUser(self, sel, username, 0)
     # This function add user
     users.AddUser(self, sel, username, email, role, password)
     print "Logging out..."
     # This function log out
     loginlogout.LogOut(self, sel)
     print "Logging in as user: "******"ViewAdmin"]) == True:
         print "Log in as User failed"
     else:
         print "Logged as User"
Exemple #2
0
 def test_EditUserProfile_539(self):
     sel = self.selenium
     # Log in as Admin
     loginlogout.LogInAsAdmin(self, sel)
     # Check that user newTestUser exists. If not, create a new user
     username = "******"
     password = "******"
     if users.UserRow(self, sel, username) == 0:
         users.AddUser(self, sel, username, "", "0", password)
     # New settings for the user profile
     name = "NewUser"
     newusername = ""
     password = "******"
     location = "North America"
     website = "http://www.google.ca/"
     description = "Miro Community QA"
     photo = "photo5.jpg"
     email = "*****@*****.**"
     print "Log in as " + username
     loginlogout.LogInBasic(self, sel, username, password)
     print "Editing the profile for " + username
     users.EditUserProfile(
         self, sel, name, newusername, email, location, website,
         os.path.join(testvars.MCTestVariables["GraphicFilesDirectory"],
                      photo), description)
     users.ViewUserCheck(self, sel, username, name, location, website,
                         description, photo)
Exemple #3
0
 def test_PostToTwitter(self):
     sel = self.selenium
     print "Logging in to Twitter..."
     loginlogout.LogInToTwitter(self, sel)
     #        sel.click("link=PCFQA")
     sel.open("https://twitter.com/#!/PCFQA")
     time.sleep(15)
     print "OK"
     buttonDelete = "css=div.js-stream-item:nth-child(1) div.stream-item-content div.tweet-content div.tweet-row span.tweet-actions a.delete-action"
     # Twitter forbids repetitive identical tweets, so older test tweets will be erased before the test starts to avoid duplication
     print "Searching for old test tweets..."
     while sel.is_text_present("TEST TWEET"):
         sel.click(buttonDelete)
         time.sleep(1)
         if sel.is_visible("css=div.twttr-prompt"):
             sel.click("css=div.js-prompt-ok")
             time.sleep(3)
             print "Deleted old test tweet"
             sel.refresh()
             time.sleep(5)
     print "Done"
     #       Log in as Admin
     loginlogout.LogInAsAdmin(self, sel)
     for theme in range(1, 2):
         print ""
         print "============================================"
         print ""
         print "Running Post to Twitter test with theme: " + str(theme)
         print "Changing theme..."
         sitesettings.ChangeTheme(self, sel, theme)
         TestCase_PostToTwitter_580.PostToTwitter(self, sel, theme)
 def test_EditSource_479(self):
     sel = self.selenium
     loginlogout.LogInAsAdmin(self, sel)
     #oldSourceName = "Al Jazeera Arts World - Video"
     oldSourceName = "Reel Science"
     oldSourceURL = "http://blip.tv/reelscience"
     # Does source to be edited exist? If not, add it
     if sources.SourceLocation(self, sel, oldSourceName) == [0, 0]:
         print oldSourceName + " feed not found - adding it..."
         sources.AddSource(self, sel, oldSourceURL, 0, "", "")
     newSourceName = "Best of Attenborough"
     # Does the target source exist? If yes, delete it
     if sources.SourceLocation(self, sel, newSourceName) != [0, 0]:
         print "Target feed " + newSourceName + " already exists - deleting it..."
         sources.DeleteSource(self, sel, newSourceName)
     # If the pre-defined category is missing in the system,
     # pick the first category from the list of existing categories
     newcat = testvars.newCategories[6]
     if categories.CategoryRow(self, sel, newcat) == 0:
         newcat = categories.GetCategoryList(self, sel)[0]
     print "New category: " + newcat
     sources.EditSource(self, sel, oldSourceName, newSourceName,
                        "http://www.youtube.com/user/BestofAttenborough",
                        "http://delicious.com/BestofAttenborough", newcat,
                        "selene test-user")
Exemple #5
0
 def test_SubmitVideoAsAdmin_471(self):
     sel = self.selenium
     # Log in as an Administrator
     loginlogout.LogInAsAdmin(self, sel)
     theme = 1
     sitesettings.ChangeTheme(self, sel, theme)
     # Display 'Submit a Video' button on front page
     sitesettings.DisplaySubmitVideo(self, sel, theme)
     # Set video parameters
     testVideoURL = "http://www.youtube.com/watch?v=43scrCjAVHc"
     testVideoTitle = "Mozilla Firefox"
     titleUnicode = unicode(testVideoTitle)
     # Check if the video is in the premoderation queue ("Unapproved")
     # If yes, reject it
     queue.RejectVideoFromQueue(self, sel, titleUnicode)
     # Navigate to the front page
     #        sel.click(testvars.MCTestVariables["ViewMainSiteLink"])
     sel.open(testvars.MCTestVariables["TestSite"])
     sel.wait_for_page_to_load(testvars.MCTestVariables["TimeOut"])
     for theme in range(1, 2):
         print ""
         print "The current theme is " + str(theme)
         # Check if the video is in the current ("Approved") set of videos
         # If yes, delete it
         submitvideos.RejectVideoFromApproved(self, sel, testVideoTitle)
         # Set the theme
         sitesettings.ChangeTheme(self, sel, theme)
         # Navigate to the front page
         #            sel.click(testvars.MCTestVariables["ViewMainSiteLink"])
         sel.open(testvars.MCTestVariables["TestSite"])
         sel.wait_for_page_to_load(testvars.MCTestVariables["TimeOut"])
         # Submit a video and check the results
         submitvideos.SubmitVideo(self, sel, testVideoURL, theme,
                                  "Admin")  # as Admin
Exemple #6
0
 def test_SubmitDuplicateVideo_475(self):
     sel = self.selenium
     # Log in as an Administrator
     loginlogout.LogInAsAdmin(self, sel)
     theme = 1  # List theme
     sitesettings.ChangeTheme(self, sel, theme)
     sitesettings.UncheckRequireLoginToSubmitVideo(self, sel)
     # Set video parameters
     testVideoURL = "http://www.youtube.com/watch?v=QIQwMwesb0w"
     testVideoTitle = "Miro Demo"
     titleUnicode = unicode(testVideoTitle)
     # Check if the video is in the premoderation queue ("Unapproved")
     print "Looking for the video " + testVideoTitle + " in the premoderation queue"
     if queue.FindVideoInQueue(self, sel, testVideoTitle) != [0, 0]:
         print "Found the video in the premoderation queue"
         for theme in range(1, 2):
             TestCase_SubmitDuplicateVideo_475.ChangeThemeAndSubmitDuplicateVideo(
                 self, sel, theme, testVideoURL)
     else:
         print "Could not find the video in the premoderation queue"
         # Check if the video is in the current ("Approved") set of videos
         if queue.CheckVideoStatus(self, sel, testVideoTitle,
                                   "Approved") == False:
             print "Could not find the video among the approved videos"
             self.fail(
                 "The test case demands that a copy of the video already existed in the system. Cannot continue now."
             )
         else:
             print "Found the video among the approved videos"
             for theme in range(1, 2):
                 TestCase_SubmitDuplicateVideo_475.ChangeThemeAndSubmitDuplicateVideo(
                     self, sel, theme, testVideoURL)
Exemple #7
0
 def test_AddNewAdmin_271(self):
     sel = self.selenium
     # Log in as Admin
     loginlogout.LogInAsAdmin(self, sel)
     # This is information for add user edit fields
     username = "******"
     password = "******"
     email = "*****@*****.**"
     role = "1"  # "1"-Admin, "0"-User
     # This function returns the row number for the desired username
     # on /users page.
     # Returns row number if the us username is found and 0 otherwise.
     if users.UserRow(self, sel, username) != 0:
         print "Duplicate user found. Deleting it..."
         # This function delete user
         users.DeleteUser(self, sel, username, 0)
     # This function add user
     users.AddUser(self, sel, username, email, role, password)
     print "Logging out..."
     # This function log out
     loginlogout.LogOut(self, sel)
     print "Logging in as user: "******"ViewAdmin"]
     ) == True or sel.is_element_present(
             testvars.MCTestVariables["ViewAdminBlueTheme"]) == True:
         print "Logged as Admin"
     else:
         mclib.AppendErrorMessage(
             self, sel,
             "User " + username + " does not have Administrator privileges")
Exemple #8
0
 def test_CreateNewUserUsernameAndPassword_280(self):
     sel = self.selenium
     # Log in as Admin
     loginlogout.LogInAsAdmin(self, sel)
     # This is information for add user edit fields
     username = "******"
     password = "******"
     email = ""
     # To select User role type "0"
     # To select Admin role type "1"
     role = ""
     # This function returns the row number for the desired username
     # on /users page.
     # Returns row number if the us username is found and 0 otherwise.
     if users.UserRow(self, sel, username) != 0:
         print "Duplicate user found. Deleting it..."
         # This function delete user
         users.DeleteUser(self, sel, username, 0)
         print "User deleted: " + username
     # This function add user
     users.AddUser(self, sel, username, email, role, password)
     print "Logging out..."
     # This function log out
     loginlogout.LogOut(self, sel)
     print "Logging in as user: " + username
     # This function login as just created user
     loginlogout.LogInBasic(self, sel, username, password)
Exemple #9
0
 def test_AddEditorsComment(self):
     sel = self.selenium
     #       Log in as Admin
     loginlogout.LogInAsAdmin(self, sel)
     theme = 4  # The feature is available for Blue theme only
     print "Changing theme..."
     sitesettings.ChangeTheme(self, sel, theme)
     # Selecting video No. <theme> from New Videos listing
     videoTitleLink = videopage.PickVideoFromNewVideosListingPage(
         self, sel, theme)
     videoTitle = sel.get_text(videoTitleLink)
     print "Opening video page for video " + videoTitle + "..."
     sel.click(videoTitleLink)
     sel.wait_for_page_to_load(testvars.MCTestVariables["TimeOut"])
     #        newEditorsComment = "<b>TEST</b>"
     newEditorsComment = r"<p><b>Why use MiroCommunity?</b></p>"
     newEditorsComment = newEditorsComment + "<p><b><i>Leverage Existing Video</i></b> Your community already has "
     newEditorsComment = newEditorsComment + "a LOT of relevant video floating around on the internet. "
     newEditorsComment = newEditorsComment + "<b>Miro Community</b> can aggregate it all in one central location. "
     newEditorsComment = newEditorsComment + "Videos can be created by you or your organization, but can also easily "
     newEditorsComment = newEditorsComment + "be brought in from a broader pool of creators. Videos can come from "
     newEditorsComment = newEditorsComment + "YouTube, blip.tv, Vimeo, or almost any video blog or site powered by "
     newEditorsComment = newEditorsComment + "drupal, plone, or other CMS that creates a media RSS feed.</p>"
     newEditorsComment = newEditorsComment + "<b><i>A Video-Centric Approach</i></b> Put video front and center. The most successful "
     newEditorsComment = newEditorsComment + "video sites are centered around the videos; for example, <a href='www.youtube."
     newEditorsComment = newEditorsComment + "com'>YouTube</a>, Hulu, and the TED conference. These sites have regular "
     newEditorsComment = newEditorsComment + "viewers/visitors who come expecting entertainment, enrichment, and engagement. "
     newEditorsComment = newEditorsComment + "Miro Community makes video easy to find, and lets you point people directly "
     newEditorsComment = newEditorsComment + "to the content they are looking for.</p>"
     print "Posting the Editor's comment: " + newEditorsComment
     videopage.PostEditorsComment(self, sel, newEditorsComment)
    def test_ClearQueue_511(self):
        sel = self.selenium
        loginlogout.LogInAsAdmin(self,sel)
        # Memorizing 
        videosRejected = queue.ClearQueue(self,sel)
        # Check that videos were rejected
        print "Checking that videos were successfully rejected..."
        # At present, it is technically impossible to check the status for
        # every video on the rejected page because of an issue with
        # Bulk Edit page (5 or 6 are the viable limit)
        # As a temporary solution until the issue is resolved,
        # just three videos will be checked - the first, the last, and one
        # from the middle
        print "Looking up the following videos:"
        last = len(videosRejected)-1
        videosToCheck = [videosRejected[0],videosRejected[last/2],videosRejected[last]]
        print videosToCheck
        # Searching each selected video in the list of Rejected videos 
        # on Bulk Edit page
        for item in videosToCheck:
            if item!="None":
                newResult=queue.CheckVideoStatus(self,sel,item,"Rejected")
                print item+"__________"+str(newResult)
                if newResult==False:
                    mclib.AppendErrorMessage(self,sel,"Could not find video "+item+" in the list of rejected videos.")
                sel.click(testvars.MCUI["AdminReviewQueue"])
#                sel.click(testvars.MCTestVariables["ViewMainSiteLink"])
                sel.open(testvars.MCTestVariables["TestSite"])
                sel.wait_for_page_to_load(testvars.MCTestVariables["TimeOut"])
                sel.click(testvars.MCTestVariables["ViewAdmin"])
                sel.wait_for_page_to_load(testvars.MCTestVariables["TimeOut"])
            else:
                print "None__________None"
Exemple #11
0
 def test_AddSubCategories_297(self):
     sel = self.selenium
     #       Log in as Admin
     loginlogout.LogInAsAdmin(self, sel)
     for item in testvars.newSubcategories:
         categories.AddCategory(self, sel, item, item, item + " films", 1,
                                "film")
Exemple #12
0
 def test_UploadBackground_244(self):
     sel = self.selenium
     #       Log in as Admin
     loginlogout.LogInAsAdmin(self, sel)
     #       Repeat for each theme from No.1 to No.4
     for theme in range(1, 2):
         sitesettings.ChangeTheme(self, sel, theme)
         TestCase_UploadBackground_244.UploadBackground(self, sel, theme)
Exemple #13
0
 def test_EditSiteTitle_303(self):
     sel = self.selenium
     #       Log in as Admin
     loginlogout.LogInAsAdmin(self, sel)
     #       Repeat for each theme from No.1 to No.4
     for theme in range(1, 2):
         sitesettings.ChangeTheme(self, sel, theme)
         TestCase_EditSiteTitle_303.EditSiteTitle_303(self, sel, theme)
Exemple #14
0
 def test_DisplaySubmitVideo_249(self):
     sel = self.selenium
     #       Log in as Admin
     loginlogout.LogInAsAdmin(self, sel)
     #       Repeat for each theme from No.1 to No.4
     for theme in range(1, 2):
         sitesettings.ChangeTheme(self, sel, theme)
         TestCase_DisplaySubmitVideo_249.DisplaySubmitVideo(
             self, sel, theme)
Exemple #15
0
 def test_SubmitVideoWithEmbedCode_476(self):
     sel = self.selenium
     # Log in as an Administrator
     loginlogout.LogInAsAdmin(self, sel)
     theme = 1  # List theme
     role = "Admin"
     sitesettings.ChangeTheme(self, sel, theme)
     # Display 'Submit a Video' button on front page
     sitesettings.DisplaySubmitVideo(self, sel, theme)
     #        sitesettings.UncheckRequireLoginToSubmitVideo(self,sel)
     # Set video parameters
     testVideoURL = "http://www.veoh.com/browse/videos/category/technology/watch/v6574185k5jF5K4E"
     testVideoTitle = "Veoh Video for Test"
     testVideoEmbedCode = r'<object width="410" height="341" id="veohFlashPlayer" name="veohFlashPlayer"><param name="movie" '
     testVideoEmbedCode = testVideoEmbedCode + r'value="http://www.veoh.com/static/swf/webplayer/WebPlayer.swf?version='
     testVideoEmbedCode = testVideoEmbedCode + r'AFrontend.5.5.2.1048&permalinkId=v6574185k5jF5K4E&player=videodetailsembedded&'
     testVideoEmbedCode = testVideoEmbedCode + r'videoAutoPlay=0&id=anonymous"></param><param name="allowFullScreen" value="true">'
     testVideoEmbedCode = testVideoEmbedCode + r'</param><param name="allowscriptaccess" value="always"></param><embed '
     testVideoEmbedCode = testVideoEmbedCode + r'src="http://www.veoh.com/static/swf/webplayer/WebPlayer.swf?version='
     testVideoEmbedCode = testVideoEmbedCode + r'AFrontend.5.5.2.1048&permalinkId=v6574185k5jF5K4E&player=videodetailsembedded&'
     testVideoEmbedCode = testVideoEmbedCode + r'videoAutoPlay=0&id=anonymous" type="application/x-shockwave-flash" allowscriptaccess="always"'
     testVideoEmbedCode = testVideoEmbedCode + r'allowfullscreen="true" width="410" height="341" id="veohFlashPlayerEmbed"'
     testVideoEmbedCode = testVideoEmbedCode + r' name="veohFlashPlayerEmbed"></embed></object><br /><font size="1">Watch '
     testVideoEmbedCode = testVideoEmbedCode + r'<a href="http://www.veoh.com/browse/videos/category/technology/watch/v6574185k5jF5K4E">'
     testVideoEmbedCode = testVideoEmbedCode + r'Online Video Distribution Miro Co-Branded Player Offer</a> in '
     testVideoEmbedCode = testVideoEmbedCode + r'<a href="http://www.veoh.com/browse/videos/category/technology">Technology'
     testVideoEmbedCode = testVideoEmbedCode + r'</a>&nbsp;&nbsp;|&nbsp;&nbsp;View More <a href="http://www.veoh.com">Free Videos Online at Veoh.com'
     testVideoEmbedCode = testVideoEmbedCode + r'</a></font>'
     testVideoThumbfile = ''  #r'D:\TestInput\background1.jpg'
     testVideoThumbURL = 'http://ll-appserver.veoh.com/images/veoh.gif?version=AFrontend.5.5.2.1055'
     testVideoDescription = 'test description for a Veoh video with embed code'
     testVideoTags = 'test veoh'
     titleUnicode = unicode(testVideoTitle)
     # Check if the video is in the premoderation queue ("Unapproved")
     # If yes, reject it
     queue.RejectVideoFromQueue(self, sel, titleUnicode)
     # Navigate to the front page
     #        sel.click(testvars.MCTestVariables["ViewMainSiteLink"])
     sel.open(testvars.MCTestVariables["TestSite"])
     sel.wait_for_page_to_load(testvars.MCTestVariables["TimeOut"])
     for theme in range(1, 2):
         print ""
         print "The current theme is " + str(theme)
         # Check if the video is in the current ("Approved") set of videos
         # If yes, delete it
         submitvideos.RejectVideoFromApproved(self, sel, testVideoTitle)
         # Set the theme
         sitesettings.ChangeTheme(self, sel, theme)
         # Navigate to the front page
         #            sel.click(testvars.MCTestVariables["ViewMainSiteLink"])
         sel.open(testvars.MCTestVariables["TestSite"])
         sel.wait_for_page_to_load(testvars.MCTestVariables["TimeOut"])
         # Submit a video and check the results
         submitvideos.SubmitVideoWithEmbed(
             self, sel, testVideoURL, testVideoTitle, testVideoEmbedCode,
             testVideoThumbfile, testVideoThumbURL, testVideoDescription,
             testVideoTags, theme, role)
Exemple #16
0
 def ChangeThemeAndSubmitDuplicateVideo(self, sel, theme, testVideoURL):
     print "Changing theme " + str(theme)
     sitesettings.ChangeTheme(self, sel, theme)
     #        sel.click(testvars.MCTestVariables["ViewMainSiteLink"])
     sel.open(testvars.MCTestVariables["TestSite"])
     sel.wait_for_page_to_load(testvars.MCTestVariables["TimeOut"])
     loginlogout.LogOut(self, sel)
     # Submit a video and check the results
     submitvideos.SubmitDuplicateVideo(self, sel, testVideoURL, theme)
     loginlogout.LogInAsAdmin(self, sel)
 def test_BulkDeleteSources_265(self):
     sel = self.selenium
     loginlogout.LogInAsAdmin(self, sel)
     sourcelist = sources.GetSourceList(self, sel)
     print "Full list of available sources:"
     print sourcelist
     deleteList = sourcelist[4:6]
     print "The following sources will be deleted:"
     print deleteList
     sources.BulkDeleteSource(self, sel, deleteList)
 def test_RSSVideosAwaitingModeration_513(self):
     sel = self.selenium
     loginlogout.LogInAsAdmin(self,sel)
     currentLink="Unapproved RSS"
     print "Clicking "+currentLink+" link"
     queue.ViewRSSFeeds(self,sel,currentLink)
     print ""
     currentLink="Unapproved User RSS"
     print "Clicking "+currentLink+" link"
     queue.ViewRSSFeeds(self,sel,currentLink)
Exemple #19
0
 def test_ChangeOrganizationSettings_253(self):
     sel = self.selenium
     #       Log in as Admin
     loginlogout.LogInAsAdmin(self, sel)
     #       Repeat for each theme from No.1 to No.4
     for theme in range(1, 2):
         sitesettings.ChangeTheme(self, sel, theme)
         # Change site settings
         TestCase_ChangeOrganization_253.ChangeOrganizationSettings(
             self, sel, theme)
Exemple #20
0
 def test_DeleteAllCategories(self):
     sel = self.selenium
     #       Log in as Admin
     loginlogout.LogInAsAdmin(self, sel)
     # Make a full backup of all the categories existing on the page
     testvars.initialCategories = categories.GetFullCategoryData(self, sel)
     print "Memorized the existing list of categories:"
     print testvars.initialCategories
     categories.DeleteAllCategories(self, sel)
     print "Deleted all the categories"
Exemple #21
0
 def test_SubmitVideoAsUnloggedUser_473(self):
     sel = self.selenium
     # Log in as an Administrator
     loginlogout.LogInAsAdmin(self, sel)
     theme = 1
     sitesettings.ChangeTheme(self, sel, theme)
     # Check 'Require Login to Submit Video' on site settings page
     sitesettings.UncheckRequireLoginToSubmitVideo(self, sel)
     # Set video parameters
     testVideoURL = "http://www.youtube.com/watch?v=yjdUr1CATy8"
     testVideoTitle = "Go Open Source: Miro"
     titleUnicode = unicode(testVideoTitle)
     # Check if the video is in the premoderation queue ("Unapproved")
     # If yes, reject it
     queue.RejectVideoFromQueue(self, sel, titleUnicode)
     # Navigate to the front page
     #        sel.click(testvars.MCTestVariables["ViewMainSiteLink"])
     sel.open(testvars.MCTestVariables["TestSite"])
     sel.wait_for_page_to_load(testvars.MCTestVariables["TimeOut"])
     # Check if the video is in the current ("Approved") set of videos
     # If yes, delete it
     submitvideos.RejectVideoFromApproved(self, sel, testVideoTitle)
     for theme in range(1, 2):
         print ""
         print "The current theme is " + str(theme)
         # Set the theme
         sitesettings.ChangeTheme(self, sel, theme)
         # Navigate to the front page
         #            sel.click(testvars.MCTestVariables["ViewMainSiteLink"])
         sel.open(testvars.MCTestVariables["TestSite"])
         sel.wait_for_page_to_load(testvars.MCTestVariables["TimeOut"])
         # Log out
         loginlogout.LogOut(self, sel)
         # Submit a video and check the results
         submitvideos.SubmitVideo(self, sel, testVideoURL, theme,
                                  "UnloggedUser")  # as Admin
         # Log in as Administrator
         loginlogout.LogInAsAdmin(self, sel)
         # Check if the video is in the premoderation queue ("Unapproved")
         # If yes, reject it
         print titleUnicode
         queue.RejectVideoFromQueue(self, sel, titleUnicode)
Exemple #22
0
 def test_RestoreAllCategories(self):
     sel = self.selenium
     #       Log in as Admin
     loginlogout.LogInAsAdmin(self, sel)
     # Delete all the remaining test categories
     categories.DeleteAllCategories(self, sel)
     print "Deleted all the categories"
     # Restore all the initial categories from the backup
     categories.RestoreAllCategoriesFromBackup(self, sel,
                                               testvars.initialCategories)
     print "Restoring complete"
Exemple #23
0
 def test_BulkDeleteCategories_301(self):
     sel = self.selenium
     #       Log in as Admin
     loginlogout.LogInAsAdmin(self, sel)
     # Delete the three top categories from the list
     #        newList = categories.GetCategoryList(self,sel)
     newList = [testvars.newCategories[1], testvars.newCategories[6]]
     print "Deleting the following categories with the use of bulk action:"
     #        print newList[1:3]
     #        categories.BulkDeleteCategories(self,sel,newList[1:3])
     categories.BulkDeleteCategories(self, sel, newList)
Exemple #24
0
 def test_UpdateThumbnail(self):
     sel = self.selenium
     #       Log in as Admin
     loginlogout.LogInAsAdmin(self, sel)
     for theme in range(1, 3):
         print ""
         print "============================================"
         print ""
         print "Running Update Thumbnail test with theme: " + str(theme)
         print "Changing theme..."
         sitesettings.ChangeTheme(self, sel, theme)
         TestCase_UpdateThumbnail_570.UpdateThumbnail(self, sel, theme)
Exemple #25
0
 def test_EditWebsite(self):
     sel = self.selenium
     #       Log in as Admin
     loginlogout.LogInAsAdmin(self, sel)
     for theme in range(1, 2):
         print ""
         print "============================================"
         print ""
         print "Running Edit Website test with theme: " + str(theme)
         print "Changing theme..."
         sitesettings.ChangeTheme(self, sel, theme)
         TestCase_EditWebsite_577.EditWebsite(self, sel, theme)
Exemple #26
0
 def test_EmailToFriends(self):
     sel = self.selenium
     #       Log in as Admin
     loginlogout.LogInAsAdmin(self, sel)
     for theme in range(1, 2):
         print ""
         print "============================================"
         print ""
         print "Running Email To Friends test with theme: " + str(theme)
         print "Changing theme..."
         sitesettings.ChangeTheme(self, sel, theme)
         TestCase_EmailToFriends_581.EmailToFriends(self, sel, theme)
Exemple #27
0
 def test_ApproveVideo(self):
     sel = self.selenium
     #       Log in as Admin
     loginlogout.LogInAsAdmin(self, sel)
     for theme in range(1, 2):
         print ""
         print "============================================"
         print ""
         print "Running Approve Video test with theme: " + str(theme)
         print "Changing theme..."
         sitesettings.ChangeTheme(self, sel, theme)
         TestCase_ApproveVideo_569.ApproveVideo(self, sel, theme)
 def test_SignUpAndLogin(self):
     sel = self.selenium
     #       Log in as Admin
     loginlogout.LogInAsAdmin(self, sel)
     print "Starting tests..."
     for theme in range(1, 2):
         print ""
         print "============================================"
         print ""
         print "Running Sign Up and Login test with theme: " + str(theme)
         print "Changing theme..."
         sitesettings.ChangeTheme(self, sel, theme)
         loginlogout.LogOut(self, sel)
         newUsername = "******" + time.strftime(
             "%d_%m_%Y__%H_%M", time.localtime()) + "_theme" + str(theme)
         newPassword = "******"
         print "Signing up as user " + newUsername
         loginlogout.SignUp(self, sel, newUsername, newPassword,
                            testvars.MCTestVariables["TestEmail"])
         loginlogout.ActivateUserAccount(
             self, sel, testvars.MCTestVariables["TestEmail"],
             testvars.MCTestVariables["TestEmailPassword"])
         loginlogout.LogInBasic(self, sel, newUsername, newPassword)
         # Navigating to user profile to check the user's account parameters
         print "Checking the user's profile..."
         linkYourProfile = "link=Your Profile"
         if sel.is_element_present(linkYourProfile) == False:
             mclib.AppendErrorMessage(
                 self, sel, "'Your profile' link on Home page not found")
         else:
             sel.click("link=Your Profile")
             sel.wait_for_page_to_load(testvars.MCTestVariables["TimeOut"])
             if sel.get_value(
                     "id_email") != testvars.MCTestVariables["TestEmail"]:
                 mclib.AppendErrorMessage(
                     self, sel,
                     "Unexpected user email encountered in User Profile")
                 print "Expected email: " + testvars.MCTestVariables[
                     "TestEmail"]
                 print "- Actual email: " + sel.get_value("id_email")
                 print "Checking user's name on Profile page..."
             if sel.is_element_present("id_username") == False:
                 mclib.AppendErrorMessage(
                     self, sel, "User Name field on Profile page not found")
             else:
                 if sel.get_value("id_username") != newUsername:
                     mclib.AppendErrorMessage(self, sel,
                                              "Unexpected user name found")
                     print "Expected user name: " + newUsername
                     print "- Actual user name: " + sel.get_value(
                         "id_username")
                 else:
                     print "OK"
Exemple #29
0
 def test_DeleteComment(self):
     sel = self.selenium
     #       Log in as Admin
     loginlogout.LogInAsAdmin(self, sel)
     for theme in range(1, 2):
         print ""
         print "============================================"
         print ""
         print "Running Delete Comment test with theme: " + str(theme)
         print "Changing theme..."
         sitesettings.ChangeTheme(self, sel, theme)
         TestCase_DeleteComment_583.DeleteComment(self, sel, theme)
 def test_AddSearchFeed_262(self):
     sel = self.selenium
     loginlogout.LogInAsAdmin(self, sel)
     # Add search feed with sorting by date
     searchterm = "Croatia"
     if sources.SourceLocation(self, sel, searchterm) != [0, 0]:
         sources.DeleteSource(self, sel, searchterm)
     sources.AddSearchFeed(self, sel, searchterm, 0)
     # Add search feed with sorting by relevance
     searchterm = "Dalmatia"
     if sources.SourceLocation(self, sel, searchterm) != [0, 0]:
         sources.DeleteSource(self, sel, searchterm)
     sources.AddSearchFeed(self, sel, searchterm, 1)