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,344 @@
|
|
1
|
+
module Profile2Nav
|
2
|
+
|
3
|
+
def preferences
|
4
|
+
frm.link(:class=>"icon preferences").click
|
5
|
+
Profile2Preferences.new @browser
|
6
|
+
end
|
7
|
+
|
8
|
+
def privacy
|
9
|
+
frm.link(:text=>"Privacy").click
|
10
|
+
Profile2Privacy.new @browser
|
11
|
+
end
|
12
|
+
|
13
|
+
def my_profile
|
14
|
+
frm.link(:text=>"My profile").click
|
15
|
+
Profile2.new(@browser)
|
16
|
+
end
|
17
|
+
|
18
|
+
def connections
|
19
|
+
frm.link(:class=>"icon connections").click
|
20
|
+
Profile2Connections.new @browser
|
21
|
+
end
|
22
|
+
|
23
|
+
def pictures
|
24
|
+
frm.link(:text=>"Pictures").click
|
25
|
+
Profile2Pictures.new @browser
|
26
|
+
end
|
27
|
+
|
28
|
+
def messages
|
29
|
+
frm.link(:text=>"Messages").click
|
30
|
+
Profile2Messages.new @browser
|
31
|
+
end
|
32
|
+
|
33
|
+
def search_for_connections
|
34
|
+
frm.link(:class=>"icon search").click
|
35
|
+
Profile2Search.new @browser
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
39
|
+
#
|
40
|
+
class Profile2 < BasePage
|
41
|
+
|
42
|
+
frame_element
|
43
|
+
include Profile2Nav
|
44
|
+
def edit_basic_info
|
45
|
+
frm.div(:id=>"mainPanel").span(:text=>"Basic Information").fire_event("onmouseover")
|
46
|
+
frm.div(:id=>"mainPanel").link(:href=>/myInfo:editButton/).click
|
47
|
+
sleep 0.5
|
48
|
+
Profile2.new @browser
|
49
|
+
end
|
50
|
+
|
51
|
+
def edit_contact_info
|
52
|
+
frm.div(:id=>"mainPanel").span(:text=>"Contact Information").fire_event("onmouseover")
|
53
|
+
frm.div(:id=>"mainPanel").link(:href=>/myContact:editButton/).click
|
54
|
+
sleep 0.5
|
55
|
+
Profile2.new @browser
|
56
|
+
end
|
57
|
+
|
58
|
+
def edit_staff_info
|
59
|
+
frm.div(:id=>"mainPanel").span(:text=>"Staff Information").fire_event("onmouseover")
|
60
|
+
frm.div(:id=>"mainPanel").link(:href=>/myStaff:editButton/).click
|
61
|
+
sleep 0.5
|
62
|
+
Profile2.new @browser
|
63
|
+
end
|
64
|
+
|
65
|
+
def edit_student_info
|
66
|
+
frm.div(:id=>"mainPanel").span(:text=>"Student Information").fire_event("onmouseover")
|
67
|
+
frm.div(:id=>"mainPanel").link(:href=>/myStudent:editButton/).click
|
68
|
+
sleep 0.5
|
69
|
+
Profile2.new @browser
|
70
|
+
end
|
71
|
+
|
72
|
+
def edit_social_networking
|
73
|
+
frm.div(:id=>"mainPanel").span(:text=>"Social Networking").fire_event("onmouseover")
|
74
|
+
frm.div(:id=>"mainPanel").link(:href=>/mySocialNetworking:editButton/).click
|
75
|
+
sleep 0.5
|
76
|
+
Profile2.new @browser
|
77
|
+
end
|
78
|
+
|
79
|
+
def edit_personal_info
|
80
|
+
frm.div(:id=>"mainPanel").span(:text=>"Personal Information").fire_event("onmouseover")
|
81
|
+
frm.div(:id=>"mainPanel").link(:href=>/myInterests:editButton/).click
|
82
|
+
sleep 0.5
|
83
|
+
Profile2.new @browser
|
84
|
+
end
|
85
|
+
|
86
|
+
def change_picture
|
87
|
+
frm.div(:id=>"myPhoto").fire_event("onmouseover")
|
88
|
+
frm.div(:id=>"myPhoto").link(:class=>"edit-image-button").click
|
89
|
+
sleep 0.5
|
90
|
+
Profile2.new @browser
|
91
|
+
end
|
92
|
+
|
93
|
+
# Enters the specified filename in the file field.
|
94
|
+
#
|
95
|
+
# Note that the file should be inside the data/sakai-cle-test-api folder.
|
96
|
+
# The file or folder name used for the filename variable
|
97
|
+
# should not include a preceding slash ("/") character.
|
98
|
+
def image_file=(filename)
|
99
|
+
frm.file_field(:name=>"picture").set(File.expand_path(File.dirname(__FILE__)) + "/../../data/sakai-cle-test-api/" + filename)
|
100
|
+
end
|
101
|
+
|
102
|
+
def upload
|
103
|
+
frm.button(:value=>"Upload").click
|
104
|
+
sleep 0.5
|
105
|
+
Profile2.new @browser
|
106
|
+
end
|
107
|
+
|
108
|
+
def personal_summary=(text)
|
109
|
+
frm.frame(:id=>"id1a_ifr").send_keys([:command, 'a'], :backspace)
|
110
|
+
frm.frame(:id=>"id1a_ifr").send_keys(text)
|
111
|
+
end
|
112
|
+
|
113
|
+
def birthday(day, month, year)
|
114
|
+
frm.text_field(:name=>"birthdayContainer:birthday").click
|
115
|
+
frm.select(:class=>"ui-datepicker-new-year").wait_until_present
|
116
|
+
frm.select(:class=>"ui-datepicker-new-year").select(year.to_i)
|
117
|
+
frm.select(:class=>"ui-datepicker-new-month").select(month)
|
118
|
+
frm.link(:text=>day.to_s).click
|
119
|
+
end
|
120
|
+
|
121
|
+
def save_changes
|
122
|
+
frm.button(:value=>"Save changes").click
|
123
|
+
Profile2.new @browser
|
124
|
+
end
|
125
|
+
|
126
|
+
# Returns the number (as a string) displayed next to
|
127
|
+
# the "Connections" link in the menu. If there are no
|
128
|
+
# connections then returns zero as a string object.
|
129
|
+
def connection_requests
|
130
|
+
begin
|
131
|
+
frm.link(:class=>/icon connections/).span(:class=>"new-items-count").text
|
132
|
+
rescue
|
133
|
+
return "0"
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
element(:say_something) { |b| b.frm.text_field(:id=>"id1") }
|
138
|
+
action(:say_it) { |b| b.frm.button(:value=>"Say it").click }
|
139
|
+
# Basic Information
|
140
|
+
element(:nickname) { |b| b.frm.text_field(:name=>"nicknameContainer:nickname") }
|
141
|
+
# Contact Information
|
142
|
+
element(:email) { |b| b.frm.text_field(:name=>"emailContainer:email") }
|
143
|
+
element(:home_page) { |b| b.frm.text_field(:name=>"homepageContainer:homepage") }
|
144
|
+
element(:work_phone) { |b| b.frm.text_field(:name=>"workphoneContainer:workphone") }
|
145
|
+
element(:home_phone) { |b| b.frm.text_field(:name=>"homephoneContainer:homephone") }
|
146
|
+
element(:mobile_phone) { |b| b.frm.text_field(:name=>"mobilephoneContainer:mobilephone") }
|
147
|
+
element(:facsimile) { |b| b.frm.text_field(:name=>"facsimileContainer:facsimile") }
|
148
|
+
# Someday Staff Info fields should go here...
|
149
|
+
|
150
|
+
# Student Information
|
151
|
+
element(:degree_course) { |b| b.frm.text_field(:name=>"courseContainer:course") }
|
152
|
+
element(:subjects) { |b| b.frm.text_field(:name=>"subjectsContainer:subjects") }
|
153
|
+
# Social Networking
|
154
|
+
|
155
|
+
# Personal Information
|
156
|
+
element(:favorite_books) { |b| b.frm.text_field(:name=>"booksContainer:favouriteBooks") }
|
157
|
+
element(:favorite_tv_shows) { |b| b.frm.text_field(:name=>"tvContainer:favouriteTvShows") }
|
158
|
+
element(:favorite_movies) { |b| b.frm.text_field(:name=>"moviesContainer:favouriteMovies") }
|
159
|
+
element(:favorite_quotes) { |b| b.frm.text_field(:name=>"quotesContainer:favouriteQuotes") }
|
160
|
+
|
161
|
+
end
|
162
|
+
|
163
|
+
#
|
164
|
+
class Profile2Preferences < BasePage
|
165
|
+
|
166
|
+
frame_element
|
167
|
+
include Profile2Nav
|
168
|
+
|
169
|
+
end
|
170
|
+
|
171
|
+
class Profile2Privacy < BasePage
|
172
|
+
|
173
|
+
frame_element
|
174
|
+
include Profile2Nav
|
175
|
+
|
176
|
+
element(:profile_image) { |b| b.frm.select(:name=>"profileImageContainer:profileImage") }
|
177
|
+
element(:basic_info) { |b| b.frm.select(:name=>"basicInfoContainer:basicInfo") }
|
178
|
+
element(:contact_info) { |b| b.frm.select(:name=>"contactInfoContainer:contactInfo") }
|
179
|
+
element(:staff_info) { |b| b.frm.select(:name=>"staffInfoContainer:staffInfo") }
|
180
|
+
element(:student_info) { |b| b.frm.select(:name=>"studentInfoContainer:studentInfo") }
|
181
|
+
element(:social_info) { |b| b.frm.select(:name=>"socialNetworkingInfoContainer:socialNetworkingInfo") }
|
182
|
+
element(:personal_info) { |b| b.frm.select(:name=>"personalInfoContainer:personalInfo") }
|
183
|
+
element(:view_connections) { |b| b.frm.select(:name=>"myFriendsContainer:myFriends") }
|
184
|
+
element(:see_status) { |b| b.frm.select(:name=>"myStatusContainer:myStatus") }
|
185
|
+
element(:view_pictures) { |b| b.frm.select(:name=>"myPicturesContainer:myPictures") }
|
186
|
+
element(:send_messages) { |b| b.frm.select(:name=>"messagesContainer:messages") }
|
187
|
+
element(:see_kudos_rating) { |b| b.frm.select(:name=>"myKudosContainer:myKudos") }
|
188
|
+
element(:show_birth_year) { |b| b.frm.checkbox(:name=>"birthYearContainer:birthYear") }
|
189
|
+
action(:save_settings) { |b| b.frm.button(:value=>"Save settings").click }
|
190
|
+
|
191
|
+
end
|
192
|
+
|
193
|
+
class Profile2Search < BasePage
|
194
|
+
|
195
|
+
frame_element
|
196
|
+
include Profile2Nav
|
197
|
+
def search_by_name_or_email
|
198
|
+
frm.button(:value=>"Search by name or email").click
|
199
|
+
sleep 0.5
|
200
|
+
Profile2Search.new(@browser)
|
201
|
+
end
|
202
|
+
|
203
|
+
def search_by_common_interest
|
204
|
+
frm.button(:value=>"Search by common interest").click
|
205
|
+
sleep 0.5
|
206
|
+
Profile2Search.new(@browser)
|
207
|
+
end
|
208
|
+
|
209
|
+
def add_as_connection(name)
|
210
|
+
frm.div(:class=>"search-result", :text=>/#{Regexp.escape(name)}/).link(:class=>"icon connection-add").click
|
211
|
+
frm.div(:class=>"modalWindowButtons").wait_until_present
|
212
|
+
frm.div(:class=>"modalWindowButtons").button(:value=>"Add connection").click
|
213
|
+
frm.div(:class=>"modalWindowButtons").wait_while_present
|
214
|
+
sleep 0.5
|
215
|
+
Profile2Search.new @browser
|
216
|
+
end
|
217
|
+
|
218
|
+
def view(name)
|
219
|
+
frm.link(:text=>name).click
|
220
|
+
Profile2View.new(@browser)
|
221
|
+
end
|
222
|
+
|
223
|
+
# Returns an array containing strings of the names of the users returned
|
224
|
+
# in the search.
|
225
|
+
def results
|
226
|
+
results = []
|
227
|
+
frm.div(:class=>"portletBody").spans.each do |span|
|
228
|
+
if span.class_name == "search-result-info-name"
|
229
|
+
results << span.text
|
230
|
+
end
|
231
|
+
end
|
232
|
+
return results
|
233
|
+
end
|
234
|
+
|
235
|
+
def clear_results
|
236
|
+
frm.button(:value=>"Clear results").click
|
237
|
+
Profile2Search.new(@browser)
|
238
|
+
end
|
239
|
+
|
240
|
+
element(:persons_name_or_email) { |b| b.frm.text_field(:name=>"searchName") }
|
241
|
+
element(:common_interest) { |b| b.frm.text_field(:name=>"searchInterest") }
|
242
|
+
|
243
|
+
end
|
244
|
+
|
245
|
+
class Profile2Connections < BasePage
|
246
|
+
|
247
|
+
frame_element
|
248
|
+
include Profile2Nav
|
249
|
+
def confirm_request(name)
|
250
|
+
frm.div(:class=>"connection", :text=>name).link(:title=>"Confirm connection request").click
|
251
|
+
frm.div(:class=>"modalWindowButtons").wait_until_present
|
252
|
+
frm.div(:class=>"modalWindowButtons").button(:value=>"Confirm connection request").click
|
253
|
+
frm.div(:class=>"modalWindowButtons").wait_while_present
|
254
|
+
sleep 0.5
|
255
|
+
Profile2Connections.new @browser
|
256
|
+
end
|
257
|
+
|
258
|
+
# Returns an array containing the names of the connected users.
|
259
|
+
def connections
|
260
|
+
results = []
|
261
|
+
frm.div(:class=>"portletBody").spans.each do |span|
|
262
|
+
if span.class_name == "connection-info-name"
|
263
|
+
results << span.text
|
264
|
+
end
|
265
|
+
end
|
266
|
+
return results
|
267
|
+
end
|
268
|
+
|
269
|
+
end
|
270
|
+
|
271
|
+
class Profile2View < BasePage
|
272
|
+
|
273
|
+
frame_element
|
274
|
+
include Profile2Nav
|
275
|
+
#
|
276
|
+
def connection
|
277
|
+
frm.div(:class=>"leftPanel").span(:class=>/instruction icon/).text
|
278
|
+
end
|
279
|
+
|
280
|
+
#
|
281
|
+
def basic_information
|
282
|
+
hash = {}
|
283
|
+
begin
|
284
|
+
frm.div(:class=>"mainSection", :text=>/Basic Information/).table(:class=>"profileContent").rows.each do |row|
|
285
|
+
hash.store(row[0].text, row[1].text)
|
286
|
+
end
|
287
|
+
rescue Watir::Exception::UnknownObjectException
|
288
|
+
|
289
|
+
end
|
290
|
+
return hash
|
291
|
+
end
|
292
|
+
|
293
|
+
#
|
294
|
+
def contact_information
|
295
|
+
hash = {}
|
296
|
+
begin
|
297
|
+
frm.div(:class=>"mainSection", :text=>/Contact Information/).table(:class=>"profileContent").rows.each do |row|
|
298
|
+
hash.store(row[0].text, row[1].text)
|
299
|
+
end
|
300
|
+
rescue Watir::Exception::UnknownObjectException
|
301
|
+
|
302
|
+
end
|
303
|
+
return hash
|
304
|
+
end
|
305
|
+
|
306
|
+
#
|
307
|
+
def staff_information
|
308
|
+
hash = {}
|
309
|
+
begin
|
310
|
+
frm.div(:class=>"mainSection", :text=>/Staff Information/).table(:class=>"profileContent").rows.each do |row|
|
311
|
+
hash.store(row[0].text, row[1].text)
|
312
|
+
end
|
313
|
+
rescue Watir::Exception::UnknownObjectException
|
314
|
+
|
315
|
+
end
|
316
|
+
return hash
|
317
|
+
end
|
318
|
+
|
319
|
+
#
|
320
|
+
def student_information
|
321
|
+
hash = {}
|
322
|
+
begin
|
323
|
+
frm.div(:class=>"mainSection", :text=>/Student Information/).table(:class=>"profileContent").rows.each do |row|
|
324
|
+
hash.store(row[0].text, row[1].text)
|
325
|
+
end
|
326
|
+
rescue Watir::Exception::UnknownObjectException
|
327
|
+
|
328
|
+
end
|
329
|
+
return hash
|
330
|
+
end
|
331
|
+
|
332
|
+
#
|
333
|
+
def personal_information
|
334
|
+
hash = {}
|
335
|
+
begin
|
336
|
+
frm.div(:class=>"mainSection", :text=>/Personal Information/).table(:class=>"profileContent").rows.each do |row|
|
337
|
+
hash.store(row[0].text, row[1].text)
|
338
|
+
end
|
339
|
+
rescue Watir::Exception::UnknownObjectException
|
340
|
+
|
341
|
+
end
|
342
|
+
return hash
|
343
|
+
end
|
344
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
|
2
|
+
# The page where you search for public courses and projects.
|
3
|
+
class SearchPublic < BasePage
|
4
|
+
|
5
|
+
frame_element
|
6
|
+
|
7
|
+
def home
|
8
|
+
@browser.frame(:index=>0).link(:text=>"Home").click
|
9
|
+
Login.new(@browser)
|
10
|
+
end
|
11
|
+
|
12
|
+
def search_for=(string)
|
13
|
+
@browser.frame(:index=>0).text_field(:id=>"searchbox").set(Regexp.escape(string))
|
14
|
+
end
|
15
|
+
|
16
|
+
def search_for_sites
|
17
|
+
@browser.frame(:index=>0).button(:value=>"Search for Sites").click
|
18
|
+
SearchPublicResults.new(@browser)
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
|
23
|
+
# The page showing the results list of Site matches to a search of public sites/projects.
|
24
|
+
class SearchPublicResults < BasePage
|
25
|
+
|
26
|
+
frame_element
|
27
|
+
|
28
|
+
def click_site(site_name)
|
29
|
+
@browser.frame(:index=>0).link(:text=>site_name).click
|
30
|
+
SiteSummaryPage.new(@browser)
|
31
|
+
end
|
32
|
+
|
33
|
+
def home
|
34
|
+
@browser.frame(:id=>"ifrm").link(:text=>"Home").click
|
35
|
+
Login.new(@browser)
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
39
|
+
|
40
|
+
# The page that appears when you click a Site in the Site Search Results page, when not logged
|
41
|
+
# in to Sakai.
|
42
|
+
class SiteSummaryPage < BasePage
|
43
|
+
|
44
|
+
frame_element
|
45
|
+
|
46
|
+
def return_to_list
|
47
|
+
@browser.frame(:index=>0).button(:value=>"Return to List").click
|
48
|
+
SearchPublicResults.new(@browser)
|
49
|
+
end
|
50
|
+
|
51
|
+
def syllabus_attachments
|
52
|
+
links = []
|
53
|
+
@browser.frame(:id=>"ifrm").links.each do |link|
|
54
|
+
if link.href=~/Syllabus/
|
55
|
+
links << link.text
|
56
|
+
end
|
57
|
+
end
|
58
|
+
return links
|
59
|
+
end
|
60
|
+
|
61
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
#================
|
2
|
+
# Realms Pages
|
3
|
+
#================
|
4
|
+
|
5
|
+
# Realms page
|
6
|
+
class Realms < BasePage
|
7
|
+
|
8
|
+
frame_element
|
9
|
+
|
10
|
+
action(:new_realm) { |b| b.frm.link(:text=>"New Realm").click }
|
11
|
+
action(:search) { |b| b.frm.link(:text=>"Search").click }
|
12
|
+
element(:select_page_size) { |b| b.frm.select_list(:name=>"selectPageSize") }
|
13
|
+
action(:next) { |b| b.frm.button(:name=>"eventSubmit_doList_next").click }
|
14
|
+
action(:last) { |b| b.frm.button(:name=>"eventSubmit_doList_last").click }
|
15
|
+
action(:previous) { |b| b.frm.button(:name=>"eventSubmit_doList_prev").click }
|
16
|
+
action(:first) { |b| b.frm.button(:name=>"eventSubmit_doList_first").click }
|
17
|
+
|
18
|
+
|
19
|
+
end
|