sambal-cle 0.1.5 → 0.1.6
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/Gemfile +3 -5
- data/Gemfile.lock +6 -9
- data/lib/sambal-cle/base_page.rb +21 -3
- data/lib/sambal-cle/data_objects/announcement.rb +1 -1
- data/lib/sambal-cle/data_objects/assignment.rb +3 -2
- data/lib/sambal-cle/data_objects/course.rb +5 -4
- data/lib/sambal-cle/data_objects/event.rb +7 -7
- data/lib/sambal-cle/data_objects/forum.rb +3 -2
- data/lib/sambal-cle/data_objects/lesson.rb +3 -1
- data/lib/sambal-cle/data_objects/resource.rb +3 -1
- data/lib/sambal-cle/page_objects/account.rb +15 -66
- data/lib/sambal-cle/page_objects/aliases.rb +3 -2
- data/lib/sambal-cle/page_objects/announcements.rb +16 -31
- data/lib/sambal-cle/page_objects/assessments.rb +22 -55
- data/lib/sambal-cle/page_objects/assignments.rb +1 -1
- data/lib/sambal-cle/page_objects/blogger.rb +21 -77
- data/lib/sambal-cle/page_objects/blogs.rb +3 -5
- data/lib/sambal-cle/page_objects/calendar.rb +22 -40
- data/lib/sambal-cle/page_objects/chat_room.rb +2 -2
- data/lib/sambal-cle/page_objects/email_archive.rb +1 -2
- data/lib/sambal-cle/page_objects/evaluations.rb +78 -50
- data/lib/sambal-cle/page_objects/feedback.rb +1 -5
- data/lib/sambal-cle/page_objects/forms.rb +14 -55
- data/lib/sambal-cle/page_objects/forums.rb +11 -24
- data/lib/sambal-cle/page_objects/glossary.rb +6 -12
- data/lib/sambal-cle/page_objects/home.rb +7 -18
- data/lib/sambal-cle/page_objects/jforums.rb +60 -197
- data/lib/sambal-cle/page_objects/job_scheduler.rb +16 -49
- data/lib/sambal-cle/page_objects/lessons.rb +11 -34
- data/lib/sambal-cle/page_objects/matrix.rb +12 -14
- data/lib/sambal-cle/page_objects/messages.rb +71 -466
- data/lib/sambal-cle/page_objects/my_workspace.rb +3 -3
- data/lib/sambal-cle/page_objects/podcasts.rb +1 -6
- data/lib/sambal-cle/page_objects/polls.rb +5 -5
- data/lib/sambal-cle/page_objects/portfolio_templates.rb +16 -66
- data/lib/sambal-cle/page_objects/portfolios.rb +17 -67
- data/lib/sambal-cle/page_objects/profile.rb +5 -16
- data/lib/sambal-cle/page_objects/profile2.rb +51 -119
- data/lib/sambal-cle/page_objects/public_search.rb +6 -27
- data/lib/sambal-cle/page_objects/realms.rb +2 -2
- data/lib/sambal-cle/page_objects/resources.rb +89 -116
- data/lib/sambal-cle/page_objects/resources_roster.rb +1 -0
- data/lib/sambal-cle/page_objects/rosters.rb +3 -13
- data/lib/sambal-cle/page_objects/rwiki.rb +2 -6
- data/lib/sambal-cle/page_objects/search.rb +10 -10
- data/lib/sambal-cle/page_objects/sections.rb +40 -81
- data/lib/sambal-cle/page_objects/site_setup.rb +46 -74
- data/lib/sambal-cle/page_objects/sites.rb +24 -110
- data/lib/sambal-cle/page_objects/styles.rb +6 -51
- data/lib/sambal-cle/page_objects/syllabus.rb +12 -26
- data/lib/sambal-cle/page_objects/user_membership.rb +3 -15
- data/lib/sambal-cle/page_objects/users.rb +9 -25
- data/sambal-cle.gemspec +1 -1
- data/test/add_assignment_to_calendar_spec.rb +55 -1
- data/test/config.yml +1 -1
- data/test/duplicate_site_spec.rb +11 -10
- data/test/import_site_content_spec.rb +6 -5
- metadata +2 -2
@@ -6,8 +6,8 @@ class Glossary < BasePage
|
|
6
6
|
|
7
7
|
frame_element
|
8
8
|
|
9
|
-
|
10
|
-
|
9
|
+
link("Add")
|
10
|
+
link("Import")
|
11
11
|
|
12
12
|
action(:edit) { |term, b| b.frm.table(:class=>"listHier lines nolines").row(:text=>/#{Regexp.escape(term)}/).link(:text=>"Edit").click }
|
13
13
|
action(:delete) { |term, b| b.frm.table(:class=>"listHier lines nolines").row(:text=>/#{Regexp.escape(term)}/).link(:text=>"Delete").click }
|
@@ -37,13 +37,8 @@ class AddEditTerm < BasePage
|
|
37
37
|
|
38
38
|
expected_element :editor
|
39
39
|
|
40
|
-
|
41
|
-
|
42
|
-
end
|
43
|
-
|
44
|
-
def save_changes
|
45
|
-
frm.button(:value=>"Save Changes").click
|
46
|
-
end
|
40
|
+
button("Add Term")
|
41
|
+
button("Save Changes")
|
47
42
|
|
48
43
|
def long_description=(text)
|
49
44
|
editor.td(:id, "xEditingArea").frame(:index=>0).send_keys(text)
|
@@ -60,8 +55,7 @@ class GlossaryImport < BasePage
|
|
60
55
|
|
61
56
|
frame_element
|
62
57
|
|
63
|
-
|
64
|
-
|
65
|
-
action(:import) { |b| b.frm.button(:value=>"Import").click }
|
58
|
+
link("Select file...")
|
59
|
+
link("Import")
|
66
60
|
|
67
61
|
end
|
@@ -1,27 +1,16 @@
|
|
1
1
|
# Topmost page for a Site in Sakai
|
2
2
|
class Home < BasePage
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
# Because the links below are contained within iframes
|
7
|
-
# we need the in_frame method in place so that the
|
8
|
-
# links can be properly parsed in the PageObject
|
9
|
-
# methods for them.
|
10
|
-
# Note that the iframes are being identified by their
|
11
|
-
# index values on the page. This is a very brittle
|
12
|
-
# method for identifying them, but for now it's our
|
13
|
-
# only option because both the <id> and <name>
|
14
|
-
# tags are unique for every site.
|
15
|
-
# Site Information Display, Options button
|
16
|
-
action(:site_info_display_options) { |b| b.frm.link(:text=>"Options").click }
|
4
|
+
action(:site_info_display_options) { |b| b.frame(:index=>0).link(:text=>"Options").click }
|
17
5
|
|
18
6
|
# Recent Announcements Options button
|
19
|
-
action(:recent_announcements_options) { |b| b.
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
action(:update_announcements) { |b| b.frm.button(:name=>"eventSubmit_doUpdate").click }
|
7
|
+
action(:recent_announcements_options) { |b| b.frame(:index=>1).link(:text=>"Options").click }
|
8
|
+
|
9
|
+
# Link for New In Forums
|
10
|
+
action(:new_in_forums) { |b| b.frame(:index=>2).link(:text=>"New Messages").click }
|
24
11
|
|
12
|
+
element(:number_of_announcements) { |b| b.frame(:index=>1).text_field(:id=>"itemsEntryField") }
|
13
|
+
action(:update_announcements) { |b| b.frame(:index=>1).button(:name=>"eventSubmit_doUpdate").click }
|
25
14
|
|
26
15
|
# Gets the text of the displayed announcements, for
|
27
16
|
# test case verification
|
@@ -2,80 +2,35 @@
|
|
2
2
|
# Discussion Forums Pages
|
3
3
|
#================
|
4
4
|
|
5
|
-
|
6
|
-
# all pages in the JForums.
|
7
|
-
module JForumsResources
|
8
|
-
|
9
|
-
# Clicks the Discussion Home link, then
|
10
|
-
# instantiates the JForums page class.
|
11
|
-
def discussion_home
|
12
|
-
frm.link(:id=>"backtosite").click
|
13
|
-
JForums.new(@browser)
|
14
|
-
end
|
15
|
-
|
16
|
-
# Clicks the Search button in the Main Menu, then
|
17
|
-
# instantiates the DiscussionSearch page class.
|
18
|
-
def search
|
19
|
-
frm.link(:id=>"search", :class=>"mainmenu").click
|
20
|
-
DiscussionSearch.new(@browser)
|
21
|
-
end
|
22
|
-
|
23
|
-
# Clicks the My Bookmarks link in the Main Menu,
|
24
|
-
# then instantiates the MyBookmarks page class.
|
25
|
-
def my_bookmarks
|
26
|
-
frm.link(:class=>"mainmenu", :text=>"My Bookmarks").click
|
27
|
-
MyBookmarks.new(@browser)
|
28
|
-
end
|
29
|
-
|
30
|
-
# Clicks the My Profile link in the Main Menu, then
|
31
|
-
# instantiates the DiscussionsMyProfile page class.
|
32
|
-
def my_profile
|
33
|
-
frm.link(:id=>"myprofile").click
|
34
|
-
DiscussionsMyProfile.new(@browser)
|
35
|
-
end
|
36
|
-
|
37
|
-
# Clicks the Member Listing link in the Main Menu, then
|
38
|
-
# instantiates the DiscussionMemberListing page class.
|
39
|
-
def member_listing
|
40
|
-
frm.link(:text=>"Member Listing", :id=>"latest", :class=>"mainmenu").click
|
41
|
-
DiscussionMemberListing.new(@browser)
|
42
|
-
end
|
5
|
+
class JForumsBase < BasePage
|
43
6
|
|
44
|
-
|
45
|
-
# instantiates the PrivateMessages page class.
|
46
|
-
def private_messages
|
47
|
-
frm.link(:id=>"privatemessages", :class=>"mainmenu").click
|
48
|
-
PrivateMessages.new(@browser)
|
49
|
-
end
|
7
|
+
frame_element
|
50
8
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
9
|
+
class << self
|
10
|
+
def forums_page_elements
|
11
|
+
action(:discussion_home) { |b| b.frm.link(:id=>"backtosite").click }
|
12
|
+
action(:search) { |b| b.frm.link(:id=>"search", :class=>"mainmenu").click }
|
13
|
+
action(:my_bookmarks) { |b| b.frm.link(:class=>"mainmenu", :text=>"My Bookmarks").click }
|
14
|
+
action(:my_profile) { |b| b.frm.link(:id=>"myprofile").click }
|
15
|
+
action(:member_listing) { |b| b.frm.link(:text=>"Member Listing", :id=>"latest", :class=>"mainmenu").click }
|
16
|
+
action(:private_messages) { |b| b.frm.link(:id=>"privatemessages", :class=>"mainmenu").click }
|
17
|
+
action(:manage) { |b| b.frm.link(:id=>"adminpanel", :text=>"Manage").click }
|
18
|
+
action(:submit) { |b| b.frm.button(:value=>"Submit").click }
|
19
|
+
end
|
56
20
|
end
|
57
|
-
|
58
21
|
end
|
59
22
|
|
60
23
|
# The topmost page in Discussion Forums
|
61
|
-
class JForums <
|
24
|
+
class JForums < JForumsBase
|
62
25
|
|
63
|
-
|
64
|
-
include JForumsResources
|
26
|
+
forums_page_elements
|
65
27
|
|
66
28
|
# Clicks on the supplied forum name
|
67
|
-
|
68
|
-
def open_forum(forum_name)
|
69
|
-
frm.link(:text=>forum_name).click
|
70
|
-
DiscussionForum.new(@browser)
|
71
|
-
end
|
29
|
+
action(:open_forum) { |forum_name,b| b.frm.link(:text=>forum_name).click }
|
72
30
|
|
73
31
|
# Clicks the specified Topic and instantiates
|
74
32
|
# the ViewTopic Class.
|
75
|
-
|
76
|
-
frm.link(:text=>topic_title).click
|
77
|
-
ViewTopic.new(@browser)
|
78
|
-
end
|
33
|
+
action(:open_topic) { |topic_title,b| b.frm.link(:text=>topic_title).click }
|
79
34
|
|
80
35
|
# Returns an array containing the names of the Forums listed on the page.
|
81
36
|
def forum_list
|
@@ -98,59 +53,48 @@ end
|
|
98
53
|
|
99
54
|
# The page of a particular Discussion Forum, show the list
|
100
55
|
# of Topics in the forum.
|
101
|
-
class DiscussionForum <
|
56
|
+
class DiscussionForum < JForumsBase
|
102
57
|
|
103
|
-
|
104
|
-
include JForumsResources
|
58
|
+
forums_page_elements
|
105
59
|
|
106
60
|
# Clicks the New Topic button,
|
107
61
|
# then instantiates the NewTopic class
|
108
62
|
def new_topic
|
109
63
|
frm.image(:alt=>"New Topic").fire_event("onclick")
|
110
64
|
frm.frame(:id, "message___Frame").td(:id, "xEditingArea").wait_until_present
|
111
|
-
NewTopic.new(@browser)
|
112
65
|
end
|
113
|
-
|
114
66
|
# Clicks the specified Topic Title, then
|
115
67
|
# instantiates the ViewTopic Class.
|
116
68
|
def open_topic(topic_title)
|
117
69
|
frm.link(:href=>/posts.list/, :text=>topic_title).click
|
118
|
-
ViewTopic.new(@browser)
|
119
70
|
end
|
120
71
|
|
121
72
|
end
|
122
73
|
|
123
74
|
# The Discussion Forums Search page.
|
124
|
-
class DiscussionSearch <
|
75
|
+
class DiscussionSearch < JForumsBase
|
125
76
|
|
126
|
-
|
127
|
-
|
128
|
-
include JForumsResources
|
77
|
+
forums_page_elements
|
129
78
|
|
130
79
|
# Clicks the Search button on the page,
|
131
80
|
# then instantiates the JForums class.
|
132
81
|
def click_search
|
133
82
|
frm.button(:value=>"Search").click
|
134
|
-
JForums.new(@browser)
|
135
83
|
end
|
136
84
|
|
137
|
-
|
138
85
|
element(:keywords) { |b| b.frm.text_field(:name=>"search_keywords") }
|
139
86
|
|
140
87
|
end
|
141
88
|
|
142
89
|
# The Manage Discussions page in Discussion Forums.
|
143
|
-
class ManageDiscussions <
|
90
|
+
class ManageDiscussions < JForumsBase
|
144
91
|
|
145
|
-
|
146
|
-
|
147
|
-
include JForumsResources
|
92
|
+
forums_page_elements
|
148
93
|
|
149
94
|
# Clicks the Manage Forums link,
|
150
95
|
# then instantiates the ManageForums Class.
|
151
96
|
def manage_forums
|
152
97
|
frm.link(:text=>"Manage Forums").click
|
153
|
-
ManageForums.new(@browser)
|
154
98
|
end
|
155
99
|
|
156
100
|
# Creates and returns an array of forum titles
|
@@ -166,25 +110,15 @@ end
|
|
166
110
|
|
167
111
|
# The page for Managing Forums in the Discussion Forums
|
168
112
|
# feature.
|
169
|
-
class ManageForums <
|
113
|
+
class ManageForums < JForumsBase
|
170
114
|
|
171
|
-
|
172
|
-
include JForumsResources
|
115
|
+
forums_page_elements
|
173
116
|
|
174
|
-
# Clicks the Add button
|
175
|
-
|
176
|
-
def add
|
177
|
-
frm.button(:value=>"Add").click
|
178
|
-
ManageForums.new(@browser)
|
179
|
-
end
|
180
|
-
|
181
|
-
# Clicks the Update button, then
|
182
|
-
# instantiates the ManageDiscussions Class.
|
183
|
-
def update
|
184
|
-
frm.button(:value=>"Update").click
|
185
|
-
ManageDiscussions.new(@browser)
|
186
|
-
end
|
117
|
+
# Clicks the Add button
|
118
|
+
action(:add) { |b| b.frm.button(:value=>"Add").click }
|
187
119
|
|
120
|
+
# Clicks the Update button
|
121
|
+
action(:update){ |b| b.frm.button(:value=>"Update").click }
|
188
122
|
|
189
123
|
element(:forum_name) { |b| b.frm.text_field(:name=>"forum_name") }
|
190
124
|
element(:category) { |b| b.frm.select(:id=>"categories_id") }
|
@@ -193,19 +127,18 @@ class ManageForums < BasePage
|
|
193
127
|
end
|
194
128
|
|
195
129
|
# Page for editing/creating Bookmarks in Discussion Forums.
|
196
|
-
class MyBookmarks <
|
130
|
+
class MyBookmarks < JForumsBase
|
197
131
|
|
198
|
-
|
199
|
-
include JForumsResources
|
132
|
+
forums_page_elements
|
200
133
|
|
201
134
|
|
202
135
|
end
|
203
136
|
|
204
137
|
# The page for adding a new discussion topic.
|
205
|
-
class NewTopic <
|
138
|
+
class NewTopic < JForumsBase
|
206
139
|
|
207
|
-
|
208
|
-
|
140
|
+
include FCKEditor
|
141
|
+
forums_page_elements
|
209
142
|
|
210
143
|
# Enters the specified string into the FCKEditor for the Message.
|
211
144
|
def message_text=(text)
|
@@ -213,50 +146,25 @@ class NewTopic < BasePage
|
|
213
146
|
frm.frame(:id, "message___Frame").td(:id, "xEditingArea").frame(:index=>0).send_keys(text)
|
214
147
|
end
|
215
148
|
|
216
|
-
# Clicks the Submit button, then instantiates the ViewTopic Class.
|
217
|
-
def submit
|
218
|
-
frm.button(:value=>"Submit").click
|
219
|
-
ViewTopic.new(@browser)
|
220
|
-
end
|
221
|
-
|
222
149
|
# Clicks the Preview button and instantiates the PreviewDiscussionTopic Class.
|
223
|
-
|
224
|
-
frm.button(:value=>"Preview").click
|
225
|
-
PreviewDiscussionTopic.new(@browser)
|
226
|
-
end
|
227
|
-
|
228
|
-
# Enters the specified filename in the file field. The path to the file can be entered as an optional second parameter
|
229
|
-
def filename1(filename, filepath="")
|
230
|
-
frm.file_field(:name=>"file_0").set(filepath + filename)
|
231
|
-
end
|
232
|
-
|
233
|
-
# Enters the specified filename in the file field.
|
234
|
-
#
|
235
|
-
# Note that the file should be inside the data/sakai-cle-test-api folder.
|
236
|
-
# The file or folder name used for the filename variable
|
237
|
-
# should not include a preceding / character.
|
238
|
-
def filename2(filename)
|
239
|
-
frm.file_field(:name=>"file_1").set(File.expand_path(File.dirname(__FILE__)) + "/../../data/sakai-cle-test-api/" + filename)
|
240
|
-
end
|
150
|
+
button "Preview"
|
241
151
|
|
152
|
+
#TODO: redefine the file fields
|
242
153
|
|
243
154
|
element(:subject) { |b| b.frm.text_field(:id=>"subject") }
|
244
|
-
|
245
|
-
|
155
|
+
button "Attach Files"
|
156
|
+
button "Add another file"
|
246
157
|
|
247
158
|
end
|
248
159
|
|
249
160
|
# Viewing a Topic/Message
|
250
|
-
class ViewTopic <
|
161
|
+
class ViewTopic < JForumsBase
|
251
162
|
|
252
|
-
|
253
|
-
include JForumsResources
|
163
|
+
forums_page_elements
|
254
164
|
|
255
165
|
# Gets the text of the Topic title.
|
256
166
|
# Useful for verification.
|
257
|
-
|
258
|
-
frm.link(:id=>"top", :class=>"maintitle").text
|
259
|
-
end
|
167
|
+
value(:topic_name) { |b| b.frm.link(:id=>"top", :class=>"maintitle").text }
|
260
168
|
|
261
169
|
# Gets the message text for the specified message (not zero-based).
|
262
170
|
# Useful for verification.
|
@@ -266,46 +174,24 @@ class ViewTopic < BasePage
|
|
266
174
|
|
267
175
|
# Clicks the Post Reply button, then
|
268
176
|
# instantiates the NewTopic Class.
|
269
|
-
|
270
|
-
frm.image(:alt=>"Post Reply").fire_event("onclick")
|
271
|
-
NewTopic.new(@browser)
|
272
|
-
end
|
177
|
+
action(:post_reply) { |b| b.frm.image(:alt=>"Post Reply").fire_event("onclick") }
|
273
178
|
|
274
179
|
# Clicks the Quick Reply button
|
275
180
|
# and does not instantiate any page classes.
|
276
|
-
|
277
|
-
frm.image(:alt=>"Quick Reply").fire_event("onclick")
|
278
|
-
end
|
279
|
-
|
280
|
-
# Clicks the submit button underneath the Quick Reply box,
|
281
|
-
# then re-instantiates the class, due to the page update.
|
282
|
-
def submit
|
283
|
-
frm.button(:value=>"Submit").click
|
284
|
-
ViewTopic.new(@browser)
|
285
|
-
end
|
286
|
-
|
181
|
+
action(:quick_reply) { |b| b.frm.image(:alt=>"Quick Reply").fire_event("onclick") }
|
287
182
|
|
288
183
|
element(:reply_text) { |b| b.frm.text_field(:name=>"quickmessage") }
|
289
184
|
|
290
|
-
|
291
185
|
end
|
292
186
|
|
293
187
|
# The Profile page for Discussion Forums
|
294
|
-
class DiscussionsMyProfile <
|
188
|
+
class DiscussionsMyProfile < JForumsBase
|
295
189
|
|
296
|
-
|
297
|
-
include JForumsResources
|
298
|
-
|
299
|
-
def submit
|
300
|
-
frm.button(:value=>"Submit").click
|
301
|
-
DiscussionsMyProfile.new(@browser)
|
302
|
-
end
|
190
|
+
forums_page_elements
|
303
191
|
|
304
192
|
# Gets the text at the top of the table.
|
305
193
|
# Useful for verification.
|
306
|
-
|
307
|
-
frm.table(:class=>"forumline").span(:class=>"gens").text
|
308
|
-
end
|
194
|
+
value(:header_text) { |b| b.frm.table(:class=>"forumline").span(:class=>"gens").text }
|
309
195
|
|
310
196
|
# Enters the specified filename in the file field.
|
311
197
|
#
|
@@ -323,10 +209,9 @@ class DiscussionsMyProfile < BasePage
|
|
323
209
|
end
|
324
210
|
|
325
211
|
# The List of Members of a Site's Discussion Forums
|
326
|
-
class DiscussionMemberListing <
|
212
|
+
class DiscussionMemberListing < JForumsBase
|
327
213
|
|
328
|
-
|
329
|
-
include JForumsResources
|
214
|
+
forums_page_elements
|
330
215
|
|
331
216
|
# Checks if the specified Member name appears
|
332
217
|
# in the member listing.
|
@@ -341,24 +226,17 @@ end
|
|
341
226
|
|
342
227
|
# The page where users go to read their private messages in the Discussion
|
343
228
|
# Forums.
|
344
|
-
class PrivateMessages <
|
229
|
+
class PrivateMessages < JForumsBase
|
345
230
|
|
346
|
-
|
347
|
-
include JForumsResources
|
231
|
+
forums_page_elements
|
348
232
|
|
349
233
|
# Clicks the "New PM" button, then
|
350
234
|
# instantiates the NewPrivateMessage Class.
|
351
|
-
|
352
|
-
frm.image(:alt=>"New PM").fire_event("onclick")
|
353
|
-
NewPrivateMessage.new(@browser)
|
354
|
-
end
|
235
|
+
action(:new_pm) { |b| b.frm.image(:alt=>"New PM").fire_event("onclick") }
|
355
236
|
|
356
237
|
# Clicks to open the specified message,
|
357
238
|
# then instantiates the ViewPM Class.
|
358
|
-
|
359
|
-
frm.link(:class=>"topictitle", :text=>title).click
|
360
|
-
ViewPM.new(@browser)
|
361
|
-
end
|
239
|
+
action(:open_message) { |title, b| b.frm.link(:class=>"topictitle", :text=>title).click }
|
362
240
|
|
363
241
|
# Collects all subject text strings of the listed
|
364
242
|
# private messages and returns them in an Array.
|
@@ -378,18 +256,14 @@ class ViewPM < BasePage
|
|
378
256
|
|
379
257
|
# Clicks the Reply Quote button, then
|
380
258
|
# instantiates the NewPrivateMessage Class.
|
381
|
-
|
382
|
-
frm.image(:alt=>"Reply Quote").fire_event("onclick")
|
383
|
-
NewPrivateMessage.new(@browser)
|
384
|
-
end
|
259
|
+
action(:reply_quote) { |b| b.frm.image(:alt=>"Reply Quote").fire_event("onclick") }
|
385
260
|
|
386
261
|
end
|
387
262
|
|
388
263
|
# New Private Message page in Discussion Forums.
|
389
|
-
class NewPrivateMessage <
|
264
|
+
class NewPrivateMessage < JForumsBase
|
390
265
|
|
391
|
-
|
392
|
-
include JForumsResources
|
266
|
+
forums_page_elements
|
393
267
|
|
394
268
|
# Enters text into the FCKEditor text area, after
|
395
269
|
# going to the beginning of any existing text in the field.
|
@@ -398,15 +272,8 @@ class NewPrivateMessage < BasePage
|
|
398
272
|
frm.frame(:id, "message___Frame").td(:id, "xEditingArea").frame(:index=>0).send_keys(text)
|
399
273
|
end
|
400
274
|
|
401
|
-
# Clicks the Submit button, then
|
402
|
-
# instantiates the Information Class.
|
403
|
-
def submit
|
404
|
-
frm.button(:value=>"Submit").click
|
405
|
-
Information.new(@browser)
|
406
|
-
end
|
407
|
-
|
408
275
|
# Enters the specified filename in the file field.
|
409
|
-
def filename1(filename)
|
276
|
+
def filename1(filename) #FIXME!
|
410
277
|
frm.file_field(:name=>"file_0").set(File.expand_path(File.dirname(__FILE__)) + "/../../data/sakai-cle-test-api/" + filename)
|
411
278
|
end
|
412
279
|
|
@@ -415,11 +282,10 @@ class NewPrivateMessage < BasePage
|
|
415
282
|
# Note that the file should be inside the data/sakai-cle-test-api folder.
|
416
283
|
# The file or folder name used for the filename variable
|
417
284
|
# should not include a preceding / character.
|
418
|
-
def filename2(filename)
|
285
|
+
def filename2(filename) # FIXME!
|
419
286
|
frm.file_field(:name=>"file_1").set(File.expand_path(File.dirname(__FILE__)) + "/../../data/sakai-cle-test-api/" + filename)
|
420
287
|
end
|
421
288
|
|
422
|
-
|
423
289
|
element(:to_user) { |b| b.frm.select(:name=>"toUsername") }
|
424
290
|
element(:subject) { |b| b.frm.text_field(:id=>"subject") }
|
425
291
|
action(:attach_files) { |b| b.frm.button(:value=>"Attach Files").click }
|
@@ -430,15 +296,12 @@ end
|
|
430
296
|
|
431
297
|
# The page that appears when you've done something in discussions, like
|
432
298
|
# sent a Private Message.
|
433
|
-
class Information <
|
299
|
+
class Information < JForumsBase
|
434
300
|
|
435
|
-
|
436
|
-
include JForumsResources
|
301
|
+
forums_page_elements
|
437
302
|
|
438
303
|
# Gets the information message on the page.
|
439
304
|
# Useful for verification.
|
440
|
-
|
441
|
-
frm.table(:class=>"forumline").span(:class=>"gen").text
|
442
|
-
end
|
305
|
+
value(:information_text) { |b| b.frm.table(:class=>"forumline").span(:class=>"gen").text }
|
443
306
|
|
444
307
|
end
|