Module: AddEditTopicMethods
- Includes:
- PageObject
- Defined in:
- lib/kuali-sakai-common-lib/forums.rb
Constant Summary collapse
- @@table_index =
0
Instance Method Summary collapse
- #add_attachments ⇒ Object
- #description=(text) ⇒ Object
- #editor ⇒ Object
- #roles ⇒ Object
- #save ⇒ Object
- #site_role=(role) ⇒ Object
Instance Method Details
#add_attachments ⇒ Object
277 278 279 280 |
# File 'lib/kuali-sakai-common-lib/forums.rb', line 277 def frm.(:value=>/Add.+ttachment/).click ForumsAddAttachments.new(@browser) end |
#description=(text) ⇒ Object
268 269 270 |
# File 'lib/kuali-sakai-common-lib/forums.rb', line 268 def description=(text) editor.send_keys(text) end |
#editor ⇒ Object
264 265 266 |
# File 'lib/kuali-sakai-common-lib/forums.rb', line 264 def editor frm.div(:class=>"portletBody").frame(:id, "revise:topic_description_inputRichText___Frame").td(:id, "xEditingArea").frame(:index=>0) end |
#roles ⇒ Object
282 283 284 285 286 287 |
# File 'lib/kuali-sakai-common-lib/forums.rb', line 282 def roles roles=[] = frm.select(:id=>"revise:role")..to_a .each { |option| roles << option.text } return roles end |
#save ⇒ Object
272 273 274 275 |
# File 'lib/kuali-sakai-common-lib/forums.rb', line 272 def save frm.(:value=>"Save").click Forums.new(@browser) end |
#site_role=(role) ⇒ Object
289 290 291 292 293 294 295 296 297 298 299 300 301 |
# File 'lib/kuali-sakai-common-lib/forums.rb', line 289 def site_role=(role) frm.select(:id=>"revise:role").select(role) 0.upto(frm.select(:id=>"revise:role").length - 1) do |x| if frm.div(:class=>"portletBody").table(:class=>"permissionPanel jsfFormTable lines nolines", :index=>x).visible? @@table_index = x def (value) frm.select(:id=>"revise:perm:#{@@table_index}:level").select(value) end end end end |