sambal-cle 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +4 -0
- data/lib/sambal-cle/base_page.rb +20 -0
- data/lib/sambal-cle/core-ext.rb +90 -0
- data/lib/sambal-cle/data_objects/announcement.rb +82 -0
- data/lib/sambal-cle/data_objects/assessment.rb +32 -0
- data/lib/sambal-cle/data_objects/assignment.rb +205 -0
- data/lib/sambal-cle/data_objects/blog.rb +46 -0
- data/lib/sambal-cle/data_objects/blogger.rb +49 -0
- data/lib/sambal-cle/data_objects/chat_room.rb +54 -0
- data/lib/sambal-cle/data_objects/event.rb +89 -0
- data/lib/sambal-cle/data_objects/forum.rb +212 -0
- data/lib/sambal-cle/data_objects/lesson.rb +185 -0
- data/lib/sambal-cle/data_objects/message.rb +57 -0
- data/lib/sambal-cle/data_objects/poll.rb +74 -0
- data/lib/sambal-cle/data_objects/resource.rb +209 -0
- data/lib/sambal-cle/data_objects/site.rb +295 -0
- data/lib/sambal-cle/data_objects/syllabus.rb +73 -0
- data/lib/sambal-cle/data_objects/web_content_tool.rb +51 -0
- data/lib/sambal-cle/data_objects/wiki.rb +63 -0
- data/lib/sambal-cle/date_makers.rb +118 -0
- data/lib/sambal-cle/gem_ext.rb +23 -0
- data/lib/sambal-cle/page_helper.rb +22 -0
- data/lib/sambal-cle/page_maker.rb +48 -0
- data/lib/sambal-cle/page_objects/account.rb +111 -0
- data/lib/sambal-cle/page_objects/aliases.rb +43 -0
- data/lib/sambal-cle/page_objects/announcements.rb +190 -0
- data/lib/sambal-cle/page_objects/assessments.rb +874 -0
- data/lib/sambal-cle/page_objects/assignments.rb +770 -0
- data/lib/sambal-cle/page_objects/basic_lti.rb +6 -0
- data/lib/sambal-cle/page_objects/blogger.rb +205 -0
- data/lib/sambal-cle/page_objects/blogs.rb +60 -0
- data/lib/sambal-cle/page_objects/calendar.rb +330 -0
- data/lib/sambal-cle/page_objects/calendar_summary.rb +1 -0
- data/lib/sambal-cle/page_objects/chat_room.rb +22 -0
- data/lib/sambal-cle/page_objects/drop_box.rb +9 -0
- data/lib/sambal-cle/page_objects/email_archive.rb +22 -0
- data/lib/sambal-cle/page_objects/entity_picker.rb +62 -0
- data/lib/sambal-cle/page_objects/evaluations.rb +158 -0
- data/lib/sambal-cle/page_objects/feedback.rb +36 -0
- data/lib/sambal-cle/page_objects/forms.rb +120 -0
- data/lib/sambal-cle/page_objects/forums.rb +254 -0
- data/lib/sambal-cle/page_objects/glossary.rb +117 -0
- data/lib/sambal-cle/page_objects/gradebook.rb +29 -0
- data/lib/sambal-cle/page_objects/gradebook2.rb +17 -0
- data/lib/sambal-cle/page_objects/home.rb +36 -0
- data/lib/sambal-cle/page_objects/jforums.rb +444 -0
- data/lib/sambal-cle/page_objects/job_scheduler.rb +121 -0
- data/lib/sambal-cle/page_objects/lessons.rb +361 -0
- data/lib/sambal-cle/page_objects/login.rb +28 -0
- data/lib/sambal-cle/page_objects/matrix.rb +241 -0
- data/lib/sambal-cle/page_objects/media_gallery.rb +13 -0
- data/lib/sambal-cle/page_objects/messages.rb +622 -0
- data/lib/sambal-cle/page_objects/my_workspace.rb +44 -0
- data/lib/sambal-cle/page_objects/news.rb +8 -0
- data/lib/sambal-cle/page_objects/podcasts.rb +27 -0
- data/lib/sambal-cle/page_objects/polls.rb +69 -0
- data/lib/sambal-cle/page_objects/portfolio_templates.rb +161 -0
- data/lib/sambal-cle/page_objects/portfolios.rb +162 -0
- data/lib/sambal-cle/page_objects/post_em.rb +1 -0
- data/lib/sambal-cle/page_objects/profile.rb +51 -0
- data/lib/sambal-cle/page_objects/profile2.rb +344 -0
- data/lib/sambal-cle/page_objects/public_search.rb +61 -0
- data/lib/sambal-cle/page_objects/realms.rb +19 -0
- data/lib/sambal-cle/page_objects/resources.rb +326 -0
- data/lib/sambal-cle/page_objects/resources_roster.rb +0 -0
- data/lib/sambal-cle/page_objects/rosters.rb +70 -0
- data/lib/sambal-cle/page_objects/rwiki.rb +34 -0
- data/lib/sambal-cle/page_objects/search.rb +34 -0
- data/lib/sambal-cle/page_objects/sections.rb +295 -0
- data/lib/sambal-cle/page_objects/single_user.rb +1 -0
- data/lib/sambal-cle/page_objects/site_setup.rb +621 -0
- data/lib/sambal-cle/page_objects/site_statistics.rb +1 -0
- data/lib/sambal-cle/page_objects/sites.rb +255 -0
- data/lib/sambal-cle/page_objects/styles.rb +74 -0
- data/lib/sambal-cle/page_objects/syllabus.rb +166 -0
- data/lib/sambal-cle/page_objects/user_membership.rb +57 -0
- data/lib/sambal-cle/page_objects/users.rb +88 -0
- data/lib/sambal-cle/randomizers.rb +117 -0
- data/lib/sambal-cle/rich_text.rb +38 -0
- data/lib/sambal-cle/utilities.rb +31 -0
- data/lib/sambal-cle/workflows.rb +223 -0
- data/lib/sambal-cle.rb +31 -0
- data/sambal-cle.gemspec +14 -0
- data/test/add_assignment_to_calendar_spec.rb +86 -0
- data/test/assignment_announcements_spec.rb +71 -0
- data/test/assignment_gradebook_spec.rb +98 -0
- data/test/config.yml.template +4 -0
- data/test/directory.yml.template +123 -0
- data/test/duplicate_site_spec.rb +244 -0
- metadata +167 -0
@@ -0,0 +1,621 @@
|
|
1
|
+
#================
|
2
|
+
# Site Setup/Site Editor Pages
|
3
|
+
#================
|
4
|
+
|
5
|
+
# This module contains the methods referring to the menu items
|
6
|
+
# across the top of all the Site Editor pages.
|
7
|
+
class SiteSetupBase < BasePage
|
8
|
+
|
9
|
+
frame_element
|
10
|
+
basic_page_elements
|
11
|
+
|
12
|
+
class << self
|
13
|
+
def menu_elements
|
14
|
+
# Clicks the Edit Tools link, then
|
15
|
+
# instantiates the EditSiteTools class.
|
16
|
+
action(:edit_tools) {|b| b.frm.link(:text=>"Edit Tools").click }
|
17
|
+
|
18
|
+
# Clicks the Manage Groups link and
|
19
|
+
# instantiates the Groups Class.
|
20
|
+
action(:manage_groups) {|b| b.frm.link(:text=>"Manage Groups").click }
|
21
|
+
|
22
|
+
# Clicks the Duplicate Site link and instantiates
|
23
|
+
# the DuplicateSite class.
|
24
|
+
action(:duplicate_site) {|b| b.frm.link(:text=>"Duplicate Site").click }
|
25
|
+
|
26
|
+
action(:add_participants) {|b| b.frm.link(:text=>"Add Participants").click }
|
27
|
+
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
# The Site Setup page - a.k.a., link class=>"icon-sakai-sitesetup"
|
33
|
+
class SiteSetup < SiteSetupBase
|
34
|
+
|
35
|
+
menu_elements
|
36
|
+
|
37
|
+
expected_element :search_field
|
38
|
+
|
39
|
+
element(:search_field) { |b| b.frm.text_field(:id, "search") }
|
40
|
+
|
41
|
+
# Clicks the "New" link on the Site Setup page.
|
42
|
+
# next is the SiteType class.
|
43
|
+
action(:new) { |b| b.frm.div(:class=>"portletBody").link(:text=>"New").click }
|
44
|
+
|
45
|
+
# Searches for the specified site, then
|
46
|
+
# selects the specified Site's checkbox.
|
47
|
+
# Then clicks the Edit button
|
48
|
+
def edit(site_name)
|
49
|
+
search_field.value=Regexp.escape(site_name)
|
50
|
+
frm.button(:value=>"Search").click
|
51
|
+
frm.div(:class=>"portletBody").checkbox(:name=>"selectedMembers").set
|
52
|
+
frm.div(:class=>"portletBody").link(:text, "Edit").click
|
53
|
+
end
|
54
|
+
|
55
|
+
# Enters the specified site name string in the search
|
56
|
+
# field, clicks the Search button, then reinstantiates
|
57
|
+
# the Class due to the page refresh.
|
58
|
+
def search(site_name)
|
59
|
+
search_field.set site_name
|
60
|
+
frm.button(:value, "Search").click
|
61
|
+
end
|
62
|
+
|
63
|
+
# Searches for the specified site, then
|
64
|
+
# checks the site, clicks the delete button,
|
65
|
+
# and instantiates the DeleteSite class.
|
66
|
+
def delete(site_name)
|
67
|
+
search_field.value=site_name
|
68
|
+
frm.button(:value=>"Search").click
|
69
|
+
frm.checkbox(:name=>"selectedMembers").set
|
70
|
+
frm.div(:class=>"portletBody").link(:text, "Delete").click
|
71
|
+
end
|
72
|
+
|
73
|
+
# Returns an Array object containing strings of
|
74
|
+
# all Site titles displayed on the web page.
|
75
|
+
def site_titles
|
76
|
+
titles = []
|
77
|
+
sites_table = frm.table(:id=>"siteList")
|
78
|
+
1.upto(sites_table.rows.size-1) do |x|
|
79
|
+
titles << sites_table[x][1].text
|
80
|
+
end
|
81
|
+
return titles
|
82
|
+
end
|
83
|
+
|
84
|
+
element(:view) { |b| b.frm.select(:id=>"view").click }
|
85
|
+
action(:clear_search) { |b| b.frm.button(:value=>"Clear Search").click }
|
86
|
+
element(:select_page_size) { |b| b.frm.select(:id=>"selectPageSize").click }
|
87
|
+
action(:sort_by_title) { |b| b.frm.link(:text=>"Worksite Title").click }
|
88
|
+
action(:sort_by_type) { |b| b.frm.link(:text=>"Type").click }
|
89
|
+
action(:sort_by_creator) { |b| b.frm.link(:text=>"Creator").click }
|
90
|
+
action(:sort_by_status) { |b| b.frm.link(:text=>"Status").click }
|
91
|
+
action(:sort_by_creation_date) { |b| b.frm.link(:text=>"Creation Date").click }
|
92
|
+
|
93
|
+
end
|
94
|
+
|
95
|
+
|
96
|
+
# The topmost "Site Editor" page,
|
97
|
+
# found in SITE MANAGEMENT
|
98
|
+
# or else Site Setup after you have
|
99
|
+
# selected to Edit a particular site.
|
100
|
+
class SiteEditor < SiteSetupBase
|
101
|
+
|
102
|
+
menu_elements
|
103
|
+
|
104
|
+
# Sets the specified role for the specified participant.
|
105
|
+
#
|
106
|
+
# Because the participant is selected using a regular expression,
|
107
|
+
# the "participant" string can be anything that will suffice as a
|
108
|
+
# unique match--i.e., last name, first name, or user id, or any combination,
|
109
|
+
# as long as it will match a part of the string that appears in the
|
110
|
+
# desired row.
|
111
|
+
def set_role(participant, role)
|
112
|
+
frm.table(:class=>/listHier lines/).row(:text=>/#{Regexp.escape(participant)}/).select(:id=>/role/).select(role)
|
113
|
+
end
|
114
|
+
|
115
|
+
action(:update_participants) { |b| b.frm.button(:value=>"Update Participants").click }
|
116
|
+
|
117
|
+
element(:return_button) { |b| b.frm.button(:name=>"back") }
|
118
|
+
|
119
|
+
action(:return_to_sites_list) { |p| p.return_button.click }
|
120
|
+
|
121
|
+
action(:previous) { |b| b.frm.button(:name=>"previous").click }
|
122
|
+
action(:printable_version) { |b| b.frm.link(:text=>"Printable Version").click }
|
123
|
+
|
124
|
+
end
|
125
|
+
|
126
|
+
|
127
|
+
# Groups page inside the Site Editor
|
128
|
+
class Groups < SiteSetupBase
|
129
|
+
|
130
|
+
menu_elements
|
131
|
+
|
132
|
+
expected_element :create_new_group_link
|
133
|
+
|
134
|
+
element(:create_new_group_link) { |b| b.frm.link(:text=>"Create New Group") }
|
135
|
+
|
136
|
+
action(:create_new_group) { |p| p.create_new_group_link.click }
|
137
|
+
action(:auto_groups) { |b| b.frm.link(:text=>"Auto Groups").click }
|
138
|
+
action(:remove_checked) { |b| b.frm.button(:id=>"delete-groups").click }
|
139
|
+
action(:cancel) { |b| b.frm.button(:id=>"cancel").click }
|
140
|
+
|
141
|
+
end
|
142
|
+
|
143
|
+
# The Create New Group page inside the Site Editor
|
144
|
+
class CreateNewGroup < SiteSetupBase
|
145
|
+
|
146
|
+
menu_elements
|
147
|
+
|
148
|
+
# Clicks the Add button and instantiates the Groups Class.
|
149
|
+
action(:add) { |b| b.frm.button(:id=>"save").click }
|
150
|
+
|
151
|
+
element(:title) { |b| b.frm.text_field(:id=>"group_title") }
|
152
|
+
element(:description) { |b| b.frm.text_field(:id=>"group_description") }
|
153
|
+
element(:site_member_list) { |b| b.frm.select(:name=>"siteMembers-selection").click }
|
154
|
+
element(:group_member_list) { |b| b.frm.select(:name=>"groupMembers-selection").click }
|
155
|
+
action(:right) { |b| b.frm.button(:name=>"right", :index=>0,).click }
|
156
|
+
action(:left) { |b| b.frm.button(:name=>"left", :index=>0).click }
|
157
|
+
action(:all_right) { |b| b.frm.button(:name=>"right", :index=>1).click }
|
158
|
+
action(:all_left) { |b| b.frm.button(:name=>"left",:index=>1).click }
|
159
|
+
action(:cancel) { |b| b.frm.button(:id=>"cancel").click }
|
160
|
+
|
161
|
+
end
|
162
|
+
|
163
|
+
# The first page of the Duplicate Site pages in the Site Editor.
|
164
|
+
class DuplicateSite < SiteSetupBase
|
165
|
+
|
166
|
+
menu_elements
|
167
|
+
|
168
|
+
def duplicate
|
169
|
+
frm.button(:value=>"Duplicate").click
|
170
|
+
frm.span(:class=>"submitnotif").wait_while_present(300)
|
171
|
+
end
|
172
|
+
|
173
|
+
# Returns the site name in the header, for verification.
|
174
|
+
def site_name
|
175
|
+
frm.div(:class=>"portletBody").h3.span(:class=>"highlight").text
|
176
|
+
end
|
177
|
+
|
178
|
+
element(:site_title) { |b| b.frm.text_field(:id=>"title") }
|
179
|
+
element(:academic_term) { |b| b.frm.select(:id=>"selectTerm") }
|
180
|
+
end
|
181
|
+
|
182
|
+
# Page for Adding Participants to a Site in Site Setup
|
183
|
+
class SiteSetupAddParticipants < SiteSetupBase
|
184
|
+
|
185
|
+
menu_elements
|
186
|
+
|
187
|
+
action(:continue) { |b| b.frm.button(:value=>"Continue").click }
|
188
|
+
|
189
|
+
element(:official_participants) { |b| b.frm.text_field(:id=>"content::officialAccountParticipant") }
|
190
|
+
element(:non_official_participants) { |b| b.frm.text_field(:id=>"content::nonOfficialAccountParticipant") }
|
191
|
+
element(:assign_all_to_same_role) { |b| b.frm.radio(:id=>"content::role-row:0:role-select") }
|
192
|
+
element(:assign_each_individually) { |b| b.frm.radio(:id=>"content::role-row:1:role-select") }
|
193
|
+
element(:active_status) { |b| b.frm.radio(:id=>"content::status-row:0:status-select") }
|
194
|
+
element(:inactive_status) { |b| b.frm.radio(:id=>"content::status-row:1:status-select") }
|
195
|
+
action(:cancel) { |b| b.frm.button(:id=>"content::cancel").click }
|
196
|
+
|
197
|
+
end
|
198
|
+
|
199
|
+
|
200
|
+
# Page for selecting Participant roles individually
|
201
|
+
class SiteSetupChooseRolesIndiv < SiteSetupBase
|
202
|
+
|
203
|
+
menu_elements
|
204
|
+
|
205
|
+
action(:continue) { |b| b.frm.button(:value=>"Continue").click }
|
206
|
+
|
207
|
+
action(:back) { |b| b.frm.button(:name=>"command link parameters&Submitting%20control=content%3A%3Aback&Fast%20track%20action=siteAddParticipantHandler.processDifferentRoleBack").click }
|
208
|
+
action(:cancel) { |b| b.frm.button(:name=>"command link parameters&Submitting%20control=content%3A%3Acancel&Fast%20track%20action=siteAddParticipantHandler.processCancel").click }
|
209
|
+
element(:user_role) { |b| b.frm.select(:id=>"content::user-row:0:role-select-selection") }
|
210
|
+
|
211
|
+
end
|
212
|
+
|
213
|
+
|
214
|
+
# Page for selecting the same role for All. This class is used for
|
215
|
+
# both Course and Portfolio sites.
|
216
|
+
class SiteSetupChooseRole < BasePage
|
217
|
+
|
218
|
+
frame_element
|
219
|
+
|
220
|
+
action(:continue) { |b| b.frm.button(:value=>"Continue").click }
|
221
|
+
|
222
|
+
# Use this method for radio buttons that aren't
|
223
|
+
# included in the default list below. Enter the
|
224
|
+
# radio button's label in the UI.
|
225
|
+
def radio_button(label)
|
226
|
+
frm.radio(:value=>label)
|
227
|
+
end
|
228
|
+
|
229
|
+
action(:back) { |b| b.frm.button(:name=>"command link parameters&Submitting%20control=content%3A%3Aback&Fast%20track%20action=siteAddParticipantHandler.processSameRoleBack").click }
|
230
|
+
action(:cancel) { |b| b.frm.button(:name=>"command link parameters&Submitting%20control=content%3A%3Acancel&Fast%20track%20action=siteAddParticipantHandler.processCancel").click }
|
231
|
+
element(:guest) { |b| b.frm.radio(:value=>"Guest") }
|
232
|
+
element(:instructor) { |b| b.frm.radio(:value=>"Instructor") }
|
233
|
+
element(:student) { |b| b.frm.radio(:value=>"Student") }
|
234
|
+
element(:evaluator) { |b| b.frm.radio(:value=>"Evaluator") }
|
235
|
+
element(:organizer) { |b| b.frm.radio(:value=>"Organizer") }
|
236
|
+
element(:participant) { |b| b.frm.radio(:value=>"Participant") }
|
237
|
+
element(:reviewer) { |b| b.frm.radio(:value=>"Reviewer") }
|
238
|
+
element(:teaching_assistant) { |b| b.frm.radio(:id=>"content::role-row:3:role-select") }
|
239
|
+
|
240
|
+
end
|
241
|
+
|
242
|
+
|
243
|
+
# Page for specifying whether to send an email
|
244
|
+
# notification to the newly added Site participants
|
245
|
+
class SiteSetupParticipantEmail < SiteSetupBase
|
246
|
+
|
247
|
+
menu_elements
|
248
|
+
|
249
|
+
action(:continue) { |b| b.frm.button(:value=>"Continue").click }
|
250
|
+
action(:back) { |b| b.frm.button(:name=>"command link parameters&Submitting%20control=content%3A%3Acontinue&Fast%20track%20action=siteAddParticipantHandler.processEmailNotiBack").click }
|
251
|
+
action(:cancel) { |b| b.frm.button(:name=>"command link parameters&Submitting%20control=content%3A%3Acontinue&Fast%20track%20action=siteAddParticipantHandler.processEmailNotiCancel").click }
|
252
|
+
element(:send_now) { |b| b.frm.radio(:id=>"content::noti-row:0:noti-select") }
|
253
|
+
element(:dont_send) { |b| b.frm.radio(:id=>"content::noti-row:1:noti-select") }
|
254
|
+
|
255
|
+
end
|
256
|
+
|
257
|
+
|
258
|
+
# The confirmation page showing site participants and their set roles
|
259
|
+
class SiteSetupParticipantConfirm < SiteSetupBase
|
260
|
+
|
261
|
+
menu_elements
|
262
|
+
|
263
|
+
action(:finish) { |b| b.frm.button(:value=>"Finish").click }
|
264
|
+
|
265
|
+
# Returns the value of the id field for the specified name.
|
266
|
+
def id(name)
|
267
|
+
frm.table(:class=>"listHier").row(:text=>/#{Regexp.escape(name)}/)[1].text
|
268
|
+
end
|
269
|
+
|
270
|
+
# Returns the value of the Role field for the specified name.
|
271
|
+
def role(name)
|
272
|
+
frm.table(:class=>"listHier").row(:text=>/#{Regexp.escape(name)}/)[2].text
|
273
|
+
end
|
274
|
+
|
275
|
+
action(:back) { |b| b.frm.button(:name=>"command link parameters&Submitting%20control=content%3A%3Aback&Fast%20track%20action=siteAddParticipantHandler.processConfirmBack").click }
|
276
|
+
action(:cancel) { |b| b.frm.button(:name=>"command link parameters&Submitting%20control=content%3A%3Aback&Fast%20track%20action=siteAddParticipantHandler.processConfirmCancel").click }
|
277
|
+
|
278
|
+
end
|
279
|
+
|
280
|
+
# The Edit Tools page (click on "Edit Tools" when editing a site
|
281
|
+
# in Site Setup in the Admin Workspace)
|
282
|
+
class EditSiteTools < SiteSetupBase
|
283
|
+
|
284
|
+
menu_elements
|
285
|
+
|
286
|
+
expected_element :all_tools
|
287
|
+
|
288
|
+
# Clicks the Continue button.
|
289
|
+
action(:continue) { |b| b.frm.button(:value=>"Continue").click }
|
290
|
+
|
291
|
+
# This is a comprehensive list of all checkboxes and
|
292
|
+
# radio buttons for this page,
|
293
|
+
# though not all will appear at one time.
|
294
|
+
# The list will depend on the type of site being
|
295
|
+
# created/edited.
|
296
|
+
element(:all_tools) { |b| b.frm.checkbox(:id=>"all") }
|
297
|
+
element(:home) { |b| b.frm.checkbox(:id=>"home") }
|
298
|
+
element(:announcements) { |b| b.frm.checkbox(:id=>"sakai.announcements") }
|
299
|
+
element(:assignments,) { |b| b.frm.checkbox(:id=>"sakai.assignment.grades") }
|
300
|
+
element(:basic_lti) { |b| b.frm.checkbox(:id=>"sakai.basiclti") }
|
301
|
+
element(:calendar) { |b| b.frm.checkbox(:id=>"sakai.schedule") }
|
302
|
+
element(:email_archive) { |b| b.frm.checkbox(:id=>"sakai.mailbox") }
|
303
|
+
element(:evaluations) { |b| b.frm.checkbox(:id=>"osp.evaluation") }
|
304
|
+
element(:forms) { |b| b.frm.checkbox(:id=>"sakai.metaobj") }
|
305
|
+
element(:glossary) { |b| b.frm.checkbox(:id=>"osp.glossary") }
|
306
|
+
element(:matrices) { |b| b.frm.checkbox(:id=>"osp.matrix") }
|
307
|
+
element(:news) { |b| b.frm.checkbox(:id=>"sakai.news") }
|
308
|
+
element(:portfolio_layouts) { |b| b.frm.checkbox(:id=>"osp.presLayout") }
|
309
|
+
element(:portfolio_showcase) { |b| b.frm.checkbox(:id=>"sakai.rsn.osp.iframe") }
|
310
|
+
element(:portfolio_templates) { |b| b.frm.checkbox(:id=>"osp.presTemplate") }
|
311
|
+
element(:portfolios) { |b| b.frm.checkbox(:id=>"osp.presentation") }
|
312
|
+
element(:resources) { |b| b.frm.checkbox(:id=>"sakai.resources") }
|
313
|
+
element(:roster) { |b| b.frm.checkbox(:id=>"sakai.site.roster") }
|
314
|
+
element(:search) { |b| b.frm.checkbox(:id=>"sakai.search") }
|
315
|
+
element(:styles) { |b| b.frm.checkbox(:id=>"osp.style") }
|
316
|
+
element(:web_content) { |b| b.frm.checkbox(:id=>"sakai.iframe") }
|
317
|
+
element(:wizards) { |b| b.frm.checkbox(:id=>"osp.wizard") }
|
318
|
+
element(:blogger) { |b| b.frm.checkbox(:id=>"blogger") }
|
319
|
+
element(:blogs) { |b| b.frm.checkbox(:id=>"sakai.blogwow") }
|
320
|
+
element(:chat_room) { |b| b.frm.checkbox(:id=>"sakai.chat") }
|
321
|
+
element(:discussion_forums) { |b| b.frm.checkbox(:id=>"sakai.jforum.tool") }
|
322
|
+
element(:drop_box) { |b| b.frm.checkbox(:id=>"sakai.dropbox") }
|
323
|
+
element(:email) { |b| b.frm.checkbox(:id=>"sakai.mailtool") }
|
324
|
+
element(:forums) { |b| b.frm.checkbox(:id=>"sakai.forums") }
|
325
|
+
element(:certification) { |b| b.frm.checkbox(:id=>"com.rsmart.certification") }
|
326
|
+
element(:feedback) { |b| b.frm.checkbox(:id=>"sakai.postem") }
|
327
|
+
element(:gradebook) { |b| b.frm.checkbox(:id=>"sakai.gradebook.tool") }
|
328
|
+
element(:gradebook2) { |b| b.frm.checkbox(:id=>"sakai.gradebook.gwt.rpc") }
|
329
|
+
element(:lesson_builder) { |b| b.frm.checkbox(:id=>"sakai.lessonbuildertool") }
|
330
|
+
element(:lessons) { |b| b.frm.checkbox(:id=>"sakai.melete") }
|
331
|
+
element(:live_virtual_classroom) { |b| b.frm.checkbox(:id=>"rsmart.virtual_classroom.tool") }
|
332
|
+
element(:media_gallery) { |b| b.frm.checkbox(:id=>"sakai.kaltura") }
|
333
|
+
element(:messages) { |b| b.frm.checkbox(:id=>"sakai.messages") }
|
334
|
+
element(:opensyllabus) { |b| b.frm.checkbox(:id=>"sakai.opensyllabus.tool") }
|
335
|
+
element(:podcasts) { |b| b.frm.checkbox(:id=>"sakai.podcasts") }
|
336
|
+
element(:polls) { |b| b.frm.checkbox(:id=>"sakai.poll") }
|
337
|
+
element(:sections) { |b| b.frm.checkbox(:id=>"sakai.sections") }
|
338
|
+
element(:site_editor) { |b| b.frm.checkbox(:id=>"sakai.siteinfo") }
|
339
|
+
element(:site_statistics) { |b| b.frm.checkbox(:id=>"sakai.sitestats") }
|
340
|
+
element(:syllabus) { |b| b.frm.checkbox(:id=>"sakai.syllabus") }
|
341
|
+
element(:tests_and_quizzes_cb) { |b| b.frm.checkbox(:id=>"sakai.samigo") }
|
342
|
+
element(:wiki) { |b| b.frm.checkbox(:id=>"sakai.rwiki") }
|
343
|
+
element(:no_thanks) { |b| b.frm.radio(:id=>"import_no") }
|
344
|
+
element(:yes) { |b| b.frm.radio(:id=>"import_yes") }
|
345
|
+
element(:import_sites) { |b| b.frm.select(:id=>"importSites") }
|
346
|
+
action(:back) { |b| b.frm.button(:name=>"Back").click }
|
347
|
+
action(:cancel) { |b| b.frm.button(:name=>"Cancel").click }
|
348
|
+
|
349
|
+
end
|
350
|
+
|
351
|
+
class ReUseMaterial < SiteSetupBase
|
352
|
+
|
353
|
+
menu_elements
|
354
|
+
|
355
|
+
thing(:announcements_checkbox) { |b| b.frm.checkbox(name: "sakai.announcements") }
|
356
|
+
thing(:calendar_checkbox) { |b| b.frm.checkbox(name: "sakai.schedule") }
|
357
|
+
thing(:discussion_forums_checkbox) { |b| b.frm.checkbox(name: "sakai.jforum.tool") }
|
358
|
+
thing(:forums_checkbox) { |b| b.frm.checkbox(name: "sakai.forums") }
|
359
|
+
thing(:chat_room_checkbox) { |b| b.frm.checkbox(name: "sakai.chat") }
|
360
|
+
thing(:polls_checkbox) { |b| b.frm.checkbox(name: "sakai.poll") }
|
361
|
+
thing(:syllabus_checkbox) { |b| b.frm.checkbox(name: "sakai.syllabus") }
|
362
|
+
thing(:lessons_checkbox) { |b| b.frm.checkbox(name: "sakai.melete") }
|
363
|
+
thing(:resources_checkbox) { |b| b.frm.checkbox(name: "sakai.resources") }
|
364
|
+
thing(:assignments_checkbox) { |b| b.frm.checkbox(name: "sakai.assignment.grades") }
|
365
|
+
thing(:tests_and_quizzes_checkbox) { |b| b.frm.checkbox(name: "sakai.samigo") }
|
366
|
+
thing(:gradebook_checkbox) { |b| b.frm.checkbox(name: "sakai.gradebook.tool") }
|
367
|
+
thing(:gradebook2_checkbox) { |b| b.frm.checkbox(name: "sakai.gradebook.gwt.rpc") }
|
368
|
+
thing(:wiki_checkbox) { |b| b.frm.checkbox(name: "sakai.rwiki") }
|
369
|
+
thing(:news_checkbox) { |b| b.frm.checkbox(name: "sakai.news") }
|
370
|
+
thing(:web_content_checkbox) { |b| b.frm.checkbox(name: "sakai.iframe") }
|
371
|
+
thing(:site_statistics_checkbox) { |b| b.frm.checkbox(name: "sakai.sitestats") }
|
372
|
+
action(:continue) { |b| b.frm.button(name: "eventSubmit_doContinue").click }
|
373
|
+
|
374
|
+
end
|
375
|
+
|
376
|
+
# Confirmation page when editing site tools in Site Setup
|
377
|
+
class ConfirmSiteToolsEdits < SiteSetupBase
|
378
|
+
|
379
|
+
menu_elements
|
380
|
+
|
381
|
+
expected_element :finish_button
|
382
|
+
|
383
|
+
element(:finish_button) { |b| b.frm.button(value: "Finish") }
|
384
|
+
|
385
|
+
# Clicks the Finish button, next is
|
386
|
+
# the SiteSetupEdit class.
|
387
|
+
action(:finish) { |b| b.finish_button.click }
|
388
|
+
|
389
|
+
end
|
390
|
+
|
391
|
+
|
392
|
+
# The Delete Confirmation Page for deleting a Site
|
393
|
+
class DeleteSite < SiteSetupBase
|
394
|
+
|
395
|
+
menu_elements
|
396
|
+
|
397
|
+
# Clicks the Remove button, then instantiates
|
398
|
+
# the SiteSetup class.
|
399
|
+
action(:remove) { |b| b.frm.button(:value=>"Remove").click }
|
400
|
+
|
401
|
+
# Clicks the Cancel button, then instantiates
|
402
|
+
# the SiteSetup class.
|
403
|
+
action(:cancel) { |b| b.frm.button(:value=>"Cancel").click }
|
404
|
+
|
405
|
+
end
|
406
|
+
|
407
|
+
#The Site Type page that appears when creating a new site
|
408
|
+
class SiteType < SiteSetupBase
|
409
|
+
|
410
|
+
menu_elements
|
411
|
+
|
412
|
+
def continue #FIXME
|
413
|
+
if frm.button(:id, "submitBuildOwn").enabled?
|
414
|
+
frm.button(:id, "submitBuildOwn").click
|
415
|
+
elsif frm.button(:id, "submitFromTemplateCourse").enabled?
|
416
|
+
frm.button(:id, "submitFromTemplateCourse").click
|
417
|
+
elsif frm.button(:id, "submitFromTemplate").enabled?
|
418
|
+
frm.button(:id, "submitFromTemplate").click
|
419
|
+
end
|
420
|
+
|
421
|
+
end
|
422
|
+
|
423
|
+
element(:course_site) { |b| b.frm.radio(:id=>"course") }
|
424
|
+
element(:project_site) { |b| b.frm.radio(:id=>"project") }
|
425
|
+
element(:portfolio_site) { |b| b.frm.radio(:id=>"portfolio") }
|
426
|
+
element(:create_site_from_template) { |b| b.frm.radio(:id=>"copy") }
|
427
|
+
element(:academic_term) { |b| b.frm.select(:id=>"selectTerm") }
|
428
|
+
element(:select_template) { |b| b.frm.select(:id=>"templateSiteId") }
|
429
|
+
element(:select_term) { |b| b.frm.select(:id=>"selectTermTemplate") }
|
430
|
+
action(:cancel) { |b| b.frm.button(:id=>"cancelCreate").click }
|
431
|
+
element(:copy_users) { |b| b.frm.checkbox(:id=>"copyUsers") }
|
432
|
+
element(:copy_content) { |b| b.frm.checkbox(:id=>"copyContent") }
|
433
|
+
end
|
434
|
+
|
435
|
+
|
436
|
+
# The Add Multiple Tool Instances page that appears during Site creation
|
437
|
+
# after the Course Site Tools page
|
438
|
+
class AddMultipleTools < SiteSetupBase
|
439
|
+
|
440
|
+
menu_elements
|
441
|
+
|
442
|
+
# Clicks the Continue button.
|
443
|
+
action(:continue) { |b| b.frm.button(:value=>"Continue").click }
|
444
|
+
|
445
|
+
# Note that the text field definitions included here
|
446
|
+
# for the Tools definitions are ONLY for the first
|
447
|
+
# instances of each. Since the UI allows for
|
448
|
+
# an arbitrary number, if you are writing tests
|
449
|
+
# that add more then you're going to have to explicitly
|
450
|
+
# reference them or define them in the test case script
|
451
|
+
# itself--for now, anyway.
|
452
|
+
element(:site_email_address) { |b| b.frm.text_field(:id=>"emailId") }
|
453
|
+
element(:basic_lti_title) { |b| b.frm.text_field(:id=>"title_sakai.basiclti") }
|
454
|
+
element(:more_basic_lti_tools) { |b| b.frm.select(:id=>"num_sakai.basiclti") }
|
455
|
+
element(:lesson_builder_title) { |b| b.frm.text_field(:id=>"title_sakai.lessonbuildertool") }
|
456
|
+
element(:more_lesson_builder_tools) { |b| b.frm.select(:id=>"num_sakai.lessonbuildertool") }
|
457
|
+
element(:news_title) { |b| b.frm.text_field(:id=>"title_sakai.news") }
|
458
|
+
element(:news_url_channel) { |b| b.frm.text_field(:name=>"channel-url_sakai.news") }
|
459
|
+
element(:more_news_tools) { |b| b.frm.select(:id=>"num_sakai.news") }
|
460
|
+
element(:web_content_title) { |b| b.frm.text_field(:id=>"title_sakai.iframe") }
|
461
|
+
element(:web_content_source) { |b| b.frm.text_field(:id=>"source_sakai.iframe") }
|
462
|
+
element(:more_web_content_tools) { |b| b.frm.select(:id=>"num_sakai.iframe") }
|
463
|
+
action(:back) { |b| b.frm.button(:name=>"Back").click }
|
464
|
+
action(:cancel) { |b| b.frm.button(:name=>"Cancel").click }
|
465
|
+
|
466
|
+
end
|
467
|
+
|
468
|
+
|
469
|
+
# The Course/Section Information page that appears when creating a new Site
|
470
|
+
class CourseSectionInfo < SiteSetupBase
|
471
|
+
|
472
|
+
menu_elements
|
473
|
+
|
474
|
+
# Clicks the Continue button, then instantiates
|
475
|
+
# the CourseSiteInfo Class.
|
476
|
+
action(:continue) { |b| b.frm.button(:value=>"Continue").click }
|
477
|
+
|
478
|
+
# Clicks the Done button (or the
|
479
|
+
# "Done - go to Site" button if it
|
480
|
+
# happens to be there), then instantiates
|
481
|
+
# the SiteSetup Class.
|
482
|
+
action(:done) { |b| b. frm.button(:value=>/Done/).click }
|
483
|
+
|
484
|
+
# Note that ONLY THE FIRST instances of the
|
485
|
+
# subject, course, and section fields
|
486
|
+
# are included in the page elements definitions here,
|
487
|
+
# because their identifiers are dependent on how
|
488
|
+
# many instances exist on the page.
|
489
|
+
# This means that if you need to access the second
|
490
|
+
# or subsequent of these elements, you'll need to
|
491
|
+
# explicitly identify/define them in the test case
|
492
|
+
# itself.
|
493
|
+
element(:subject) { |b| b.frm.text_field(:name=>/Subject:/) }
|
494
|
+
element(:course) { |b| b.frm.text_field(:name=>/Course:/) }
|
495
|
+
element(:section) { |b| b.frm.text_field(:name=>/Section:/) }
|
496
|
+
element(:authorizers_username) { |b| b.frm.text_field(:id=>"uniqname") }
|
497
|
+
element(:special_instructions) { |b| b.frm.text_field(:id=>"additional") }
|
498
|
+
element(:add_more_rosters) { |b| b.frm.select(:id=>"number") }
|
499
|
+
action(:back) { |b| b.frm.button(:name=>"Back").click }
|
500
|
+
action(:cancel) { |b| b.frm.button(:name=>"Cancel").click }
|
501
|
+
|
502
|
+
end
|
503
|
+
|
504
|
+
|
505
|
+
# The Site Access Page that appears during Site creation
|
506
|
+
# immediately following the Add Multiple Tools Options page.
|
507
|
+
class SiteAccess < SiteSetupBase
|
508
|
+
|
509
|
+
menu_elements
|
510
|
+
|
511
|
+
# The page element that displays the joiner role
|
512
|
+
# select list. Use this method to validate whether the
|
513
|
+
# select list is visible or not.
|
514
|
+
#
|
515
|
+
# Example: page.joiner_role_div.visible?
|
516
|
+
element(:joiner_role_div) { |b| b.frm.div(:id=>"joinerrole") }
|
517
|
+
|
518
|
+
# Clicks the Continue button, then
|
519
|
+
# instantiates the ConfirmCourseSiteSetup class.
|
520
|
+
action(:continue) { |b| b.frm.button(:value=>"Continue").click }
|
521
|
+
|
522
|
+
element(:publish_site) { |b| b.frm.radio(:id=>"publish") }
|
523
|
+
element(:leave_as_draft) { |b| b.frm.radio(:id=>"unpublish") }
|
524
|
+
element(:limited) { |b| b.frm.radio(:id=>"unjoinable") }
|
525
|
+
element(:allow) { |b| b.frm.radio(:id=>"joinable") }
|
526
|
+
action(:back) { |b| b.frm.button(:name=>"eventSubmit_doBack").click }
|
527
|
+
action(:cancel) { |b| b.frm.button(:name=>"eventSubmit_doCancel_create").click }
|
528
|
+
element(:joiner_role) { |b| b.frm.select(:id=>"joinerRole") }
|
529
|
+
|
530
|
+
end
|
531
|
+
|
532
|
+
|
533
|
+
# The Confirmation page at the end of a Course Site Setup
|
534
|
+
class ConfirmSiteSetup < BasePage
|
535
|
+
|
536
|
+
frame_element
|
537
|
+
|
538
|
+
# Clicks the Request Site button, then
|
539
|
+
# instantiates the SiteSetup Class.
|
540
|
+
action(:request_site){ |b| b.frm.button(:value=>"Request Site").click }
|
541
|
+
|
542
|
+
# For portfolio sites...
|
543
|
+
# Clicks the "Create Site" button and
|
544
|
+
# instantiates the SiteSetup class.
|
545
|
+
action(:create_site) { |b| b.frm.button(:value=>"Create Site").click }
|
546
|
+
|
547
|
+
end
|
548
|
+
|
549
|
+
# The Course Site Information page that appears when creating a new Site
|
550
|
+
# immediately after the Course/Section Information page
|
551
|
+
class CourseSiteInfo < BasePage
|
552
|
+
|
553
|
+
frame_element
|
554
|
+
basic_page_elements
|
555
|
+
include FCKEditor
|
556
|
+
|
557
|
+
expected_element :editor
|
558
|
+
|
559
|
+
element(:editor) { |b| b.frm.frame(:id=>"description___Frame") }
|
560
|
+
|
561
|
+
def description=(text)
|
562
|
+
editor.td(:id, "xEditingArea").frame(:index=>0).send_keys text
|
563
|
+
end
|
564
|
+
|
565
|
+
# Clicks the Continue button, next is the
|
566
|
+
# EditSiteTools Class.
|
567
|
+
action(:continue) { |b| b.frm.button(:value=>"Continue").click }
|
568
|
+
|
569
|
+
element(:short_description) { |b| b.frm.text_field(:id=>"short_description") }
|
570
|
+
element(:special_instructions) { |b| b.frm.text_field(:id=>"additional") }
|
571
|
+
element(:site_contact_name) { |b| b.frm.text_field(:id=>"siteContactName") }
|
572
|
+
element(:site_contact_email) { |b| b.frm.text_field(:id=>"siteContactEmail") }
|
573
|
+
action(:back) { |b| b.frm.button(:name=>"Back").click }
|
574
|
+
action(:cancel) { |b| b.frm.button(:name=>"Cancel").click }
|
575
|
+
|
576
|
+
end
|
577
|
+
|
578
|
+
|
579
|
+
#
|
580
|
+
class PortfolioSiteInfo < BasePage
|
581
|
+
|
582
|
+
frame_element
|
583
|
+
|
584
|
+
def description=(text)
|
585
|
+
frm.frame(:id, "description___Frame").td(:id, "xEditingArea").frame(:index=>0).send_keys(text)
|
586
|
+
end
|
587
|
+
|
588
|
+
action(:continue) { |b| b.frm.button(:value=>"Continue").click }
|
589
|
+
|
590
|
+
element(:title) { |b| b.frm.text_field(:id=>"title") }
|
591
|
+
element(:url_alias) { |b| b.frm.text_field(:id=>"alias_0") }
|
592
|
+
element(:short_description) { |b| b.frm.text_area(:id=>"short_description") }
|
593
|
+
element(:icon_url) { |b| b.frm.text_field(:id=>"iconUrl") }
|
594
|
+
element(:site_contact_name) { |b| b.frm.text_field(:id=>"siteContactName") }
|
595
|
+
element(:site_contact_email) { |b| b.frm.text_field(:id=>"siteContactEmail") }
|
596
|
+
|
597
|
+
end
|
598
|
+
|
599
|
+
#
|
600
|
+
class PortfolioSiteTools < BasePage
|
601
|
+
|
602
|
+
frame_element
|
603
|
+
|
604
|
+
action(:continue) { |b| b.frm.button(:value=>"Continue").click }
|
605
|
+
|
606
|
+
element(:all_tools) { |b| b.frm.checkbox(:id=>"all") }
|
607
|
+
|
608
|
+
end
|
609
|
+
|
610
|
+
#
|
611
|
+
class PortfolioConfigureToolOptions < BasePage
|
612
|
+
|
613
|
+
frame_element
|
614
|
+
|
615
|
+
action(:continue) { |b| b.frm.button(:value=>"Continue").click }
|
616
|
+
|
617
|
+
element(:email) { |b| b.frm.text_field(:id=>"emailId") }
|
618
|
+
|
619
|
+
end
|
620
|
+
|
621
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
# Uh oh. We have work to do. :-)
|