Example #1
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
Example #2
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)
Example #3
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)
Example #4
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)
Example #5
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)
Example #6
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)
Example #7
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)
Example #8
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)
Example #9
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)
Example #10
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)
Example #11
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)
Example #12
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)
Example #13
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)
Example #14
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)
Example #15
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)
Example #16
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)
 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"
Example #18
0
 def test_AboutUsHTML_309(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)
         # Create a title with a timestamp
         timestamp = time.strftime("%d-%m-%Y %H:%M:%S", time.localtime())
         newabouttext = timestamp + ' This is the testing site for Miro Community <b style="COLOR: red">Title in bold</b> <h5 >Title in h5</h5> <h8>Title in h8</h8>'
         # If necessary, extend the title to match the maximum permitted length
         TestCase_AboutUsHTML_309.AboutUsHTML_309(self, sel, theme,
                                                  newabouttext)
Example #19
0
 def test_CheckRequireLoginToSubmitVideo_250(self):
     sel = self.selenium
     #       Repeat for each theme from No.1 to No.4
     for theme in range(1, 2):
         print ""
         print ""
         # Log in as Admin
         loginlogout.LogInAsAdmin(self, sel)
         # Change theme
         sitesettings.ChangeTheme(self, sel, theme)
         # Change site settings
         TestCase_CheckRequireLoginToSubmitVideo_250.CheckRequireLoginToSubmitVideo(
             self, sel, theme)
Example #20
0
 def test_AddToPlaylist(self):
     sel = self.selenium
     #       Log in as Admin
     loginlogout.LogInAsAdmin(self, sel)
     # Ensure that playlists are enabled
     sitesettings.EnablePlaylists(self, sel, "Yes")
     for theme in range(1, 2):
         print ""
         print "============================================"
         print ""
         print "Running Add to Playlist test with theme: " + str(theme)
         print "Changing theme..."
         sitesettings.ChangeTheme(self, sel, theme)
         TestCase_AddToPlaylist_582.AddToPlaylist(self, sel, theme)
Example #21
0
 def test_PostToFacebook(self):
     sel = self.selenium
     #       Log in to Facebook
     loginlogout.LogInToFacebook(self, sel)
     #       Log in as Admin
     loginlogout.LogInAsAdmin(self, sel)
     for theme in range(1, 2):
         print ""
         print "============================================"
         print ""
         print "Running Post to Facebook test with theme: " + str(theme)
         print "Changing theme..."
         sitesettings.ChangeTheme(self, sel, theme)
         TestCase_PostToFacebook_579.PostToFacebook(self, sel, theme)
Example #22
0
 def test_FeatureVideo(self):
     sel = self.selenium
     #       Log in as Admin
     loginlogout.LogInAsAdmin(self, sel)
     print "Unfeaturing all the videos..."
     TestCase_FeatureVideo_566.UnfeatureAllVideos(self, sel)
     print "Starting tests..."
     for theme in range(1, 2):
         print ""
         print "============================================"
         print ""
         print "Running Feature Video test with theme: " + str(theme)
         print "Changing theme..."
         sitesettings.ChangeTheme(self, sel, theme)
         TestCase_FeatureVideo_566.FeatureVideo(self, sel, theme)
Example #23
0
 def test_EditPublicationDate(self):
     sel = self.selenium
     #       Log in as Admin
     loginlogout.LogInAsAdmin(self, sel)
     # Check Use Original Date check box on Settings page
     sitesettings.CheckUseOriginalDate(self, sel)
     for theme in range(1, 2):
         print ""
         print "============================================"
         print ""
         print "Running Edit Publication Date Inline test with theme: " + str(
             theme)
         print "Changing theme..."
         sitesettings.ChangeTheme(self, sel, theme)
         TestCase_EditPublicationDate_572.EditPublicationDate(
             self, sel, theme)
 def test_LoginWithGoogleAccount(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 Login with Google account test with theme: " + str(
             theme)
         print "Changing theme..."
         sitesettings.ChangeTheme(self, sel, theme)
         loginlogout.LogInAsGoogleUser(
             self, sel, testvars.MCTestVariables["TestEmail"],
             testvars.MCTestVariables["TestEmailPassword"])
         loginlogout.LogOut(self, sel)
Example #25
0
 def test_MaxLengthSiteTagline_306(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)
         # Create a title with a timestamp
         valid_tagline = 'MC Theme' + str(
             theme
         ) + ' 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 1234567890'
         # If necessary, extend the title to match the maximum permitted length
         while len(valid_tagline
                   ) < testvars.MCTestVariables["MaxSiteTagline"]:
             valid_tagline = valid_tagline + 'X'
         TestCase_MaxLengthSiteTagline_306.MaxLengthSiteTagline_306(
             self, sel, theme, valid_tagline)
     # Attempt to enter max+1 characters into Site Title field
     sitesettings.NavigateToSettingsPage(self, sel)
     invalid_tagline = valid_tagline + str(theme)
     if sel.is_element_present("id_tagline") == False:
         mclib.AppendErrorMessage(self, sel,
                                  "Site Tagline edit field not found")
     else:
         print ""
         print ""
         print "Attempting to type an invalid long string into Site Tagline field..."
         sel.click("id_tagline")
         sel.type("id_tagline", invalid_tagline)
         typed_value = sel.get_value("id_tagline")
         if typed_value == invalid_tagline:
             mclib.AppendErrorMessage(
                 self, sel,
                 "Site Tagline accepts strings exceeding the maximum length"
             )
         else:
             print "Cannot type overly long strings to Site Tagline field"
             print "Attempted to type: " + invalid_tagline
             print "-- Actually typed: " + typed_value
             print "OK"
 def test_LoginWithOpenIDAccount(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 Login with OpenID account test with theme: " + str(
             theme)
         print "Changing theme..."
         sitesettings.ChangeTheme(self, sel, theme)
         loginlogout.LogInAsOpenIDUser(
             self, sel, testvars.MCTestVariables["OpenIDLogin"],
             testvars.MCTestVariables["OpenIDPassword"])
         loginlogout.LogOut(self, sel)
         print "Logging out from myopenid.com..."
         sel.open("http://www.myopenid.com")
         sel.wait_for_page_to_load(testvars.MCTestVariables["TimeOut"])
         sel.click("link=Sign Out")
         sel.wait_for_page_to_load(testvars.MCTestVariables["TimeOut"])
 def test_LoginWithTwitterAccount(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 Login with Twitter account test with theme: " + str(
             theme)
         print "Changing theme..."
         sitesettings.ChangeTheme(self, sel, theme)
         loginlogout.LogInAsTwitterUser(
             self, sel, testvars.MCTestVariables["TwitterLogin"],
             testvars.MCTestVariables["TwitterPassword"])
         loginlogout.LogOut(self, sel)
         print "Logging out from Twitter..."
         sel.open("http://www.twitter.com")
         sel.wait_for_page_to_load(testvars.MCTestVariables["TimeOut"])
         sel.click("css=span.caret")
         sel.click("css=a#signout-button")
 def test_LoginWithFBAccount(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 Login with Facebook account test with theme: " + str(
             theme)
         print "Changing theme..."
         sitesettings.ChangeTheme(self, sel, theme)
         loginlogout.LogInAsFacebookUser(
             self, sel, testvars.MCTestVariables["FBUsername"],
             testvars.MCTestVariables["FBLogin"],
             testvars.MCTestVariables["FBPassword"])
         loginlogout.LogOut(self, sel)
         print "Logging out from Facebook..."
         sel.open("http://www.facebook.com")
         sel.wait_for_page_to_load(testvars.MCTestVariables["TimeOut"])
         sel.click("css=label.uiLinkButton input")
         sel.wait_for_page_to_load(testvars.MCTestVariables["TimeOut"])
Example #29
0
 def test_EditDescription(self):
     sel = self.selenium
     #       Log in as Admin
     loginlogout.LogInAsAdmin(self, sel)
     sitesettings.ChangeTheme(self, sel, theme=1)
     TestCase_EditDescription_574.EditDescription(self, sel, theme)
Example #30
0
 def test_EditCategory(self):
     sel = self.selenium
     #       Log in as Admin
     loginlogout.LogInAsAdmin(self, sel)
     sitesettings.ChangeTheme(self, sel, theme=1)
     TestCase_EditCategory_575.EditCategory(self, sel, theme=1)