-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtestvars.py
102 lines (94 loc) · 5.58 KB
/
testvars.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
import os
preE="********ERROR: "
global initialCategories
initialCategories = [""]
current_dir = os.getcwd()
MCTestVariables = {"Browser":"*chrome", \
"TestSite":"http://dalmatia.dev.mirocommunity.org/", \
"ResultOutputDirectory":os.path.join(os.getcwd(), "TestResults"), \
"GraphicFilesDirectory":os.path.join(current_dir, "TestInput"), \
"TimeOut":"150000", \
"AdminLink":"View Admin", \
"AdminLogin":"seleniumTestAdmin", \
"AdminPassword":"TestAdmin", \
"AdminName":"Selene Test-Admin ", \
"UserLogin":"seleniumTestUser", \
"UserPassword":"selenium", \
"UserName":"selene test-user", \
"LogoutFootlink":"css=a[href*='logout']", \
"FBUsername": "Pat Culture", \
"FBLogin":"pculture.qa@gmail.com", \
"FBPassword":"MiroCommunity", \
"TwitterLogin":"PCFQA", \
"TwitterPassword":"MiroCommunity", \
"OpenIDLogin":"PCFQA", \
"OpenIDPassword":"MiroCommunity", \
"TestEmail":"pculture.qa@gmail.com", \
"TestEmailPassword":"Amara@lSubtitles", \
"ListThemeLink":"/admin/themes/set_default/1", \
"ScrollingThemeLink":"/admin/themes/set_default/2", \
"CategoryThemeLink":"/admin/themes/set_default/3", \
"BlueThemeLink":"/admin/themes/set_default/4", \
"ViewMainSiteLink":"//div[@id='header']/ul[1]/li/a/span", \
"NewVideosListingPage":"/listing/new", \
"LoginPage":"/accounts/login/", \
"LogoutPage":"/accounts/logout/?next=/", \
"FacebookLoginPage":"/accounts/facebook_login/", \
"ReviewQueuePage":"/admin/approve_reject", \
"ManageSourcesPage":"admin/manage", \
"BulkEditPage":"/admin/bulk_edit", \
"CategoriesPage":"/admin/categories", \
"SettingsPage":"/admin/settings/", \
"UserPage":"/admin/users/", \
"ProfilePage":"/accounts/profile/", \
"PlaylistsPage":"/playlists/", \
"ViewAdmin":"//div[@id='header']/a[2]/span", \
"ViewAdminBlueTheme":"//div[@id='wrapper']/div[1]/div/ul[2]/li/a/span", \
"SaveChanges":"//div[@id='labels']/form/table/tbody/tr[2]/td[1]/div/button", \
"EditSaveChanges":"//button[@name='submit' and @value='Save']", \
"CategoriesLogoURL":"http://s3.mirocommunity.org.s3.amazonaws.com/dalmatia/localtv/category_logos", \
"SiteLogoURL":"http://s3.mirocommunity.org.s3.amazonaws.com/dalmatia/localtv/site_logos", \
"SiteBackgroundURL":"http://s3.mirocommunity.org.s3.amazonaws.com/dalmatia/localtv/site_backgrounds", \
"MaxSiteTitle":50, \
"MaxSiteTagline":250, \
"Port":4444,
}
# The following data dictionary contains the references to
# the major user interface controls
# These values can be updated via the following sources:
# Admin buttons (Videos, Settings, Users, Comments)
# https://git.participatoryculture.org/localtv/tree/localtv/templates/localtv/admin/header.html
# Admin|Videos buttons (Review Queue, Manage Sources, Bulk Edit, Categories)
# https://git.participatoryculture.org/localtv/tree/localtv/templates/localtv/admin/video_header.html
# Admin|Settings buttons (Settings, Themes, Pages)
# https://git.participatoryculture.org/localtv/tree/localtv/templates/localtv/admin/settings_header.html
MCUI = {"MainHome":"css=.nav_home", \
"MainNewVideos":"css=.nav_new", \
"MainCategories":"css=.nav_cat", \
"MainFeatured":"css=.nav_feat", \
"MainPopular":"css=.nav_pop", \
"MainAbout":"css=.nav_about", \
"AdminVideos":"css=.sub", \
"AdminSettings":"css=.design", \
"AdminUsers":"css=.users", \
"AdminComments":"css=.comments", \
"AdminReviewQueue":"css=.sub", \
"AdminManageSources":"css=.watched", \
"AdminBulkEdit":"css=.bulkedit", \
"AdminCategories":"css=.categories", \
"AdminSettingsSettings":"css=.settings", \
"AdminSettingsThemes":"css=.themes", \
"AdminSettingsPages":"css=.flatpages", \
}
#========================================================================================
#= =
#= TEST DATA =
#= =
#========================================================================================
# For Categories test suite
newCategories = ["a-feminist-view","travelling", "food", "art", "film", "books", "nature"]
newSubcategories = [r'drama', r'comedy', r'horror', r'action', r'family', r'children']
#newSubcategories = ["swimming", "diving", "fishing", "hiking", "biking"]
#newNonASCIICategories = [u'\u0161ipak', u'divlja ru\u017Ea', u'pasja dra\u010Da', u'pasja-ru\u017Ea', u'\u044F\u0431\u043B\u043E\u043A\u043E']
newNonASCIICategories = [[u'\u0161ipak','sipak'], [u'divlja ru\u017Ea','divlja-ruza'], [u'pasja dra\u010Da','pasja-draca'], \
[u'pasja-ru\u017Ea','pasja-ruza'], [u'\u044F\u0431\u043B\u043E\u043A\u043E','yabloko']]