Class: MessageObject
- Inherits:
-
Object
- Object
- MessageObject
- Includes:
- PageHelper, Utilities, Workflows
- Defined in:
- lib/sakai-cle-test-api/data_objects/message.rb
Instance Attribute Summary collapse
-
#label ⇒ Object
Returns the value of attribute label.
-
#message ⇒ Object
Returns the value of attribute message.
-
#recipients ⇒ Object
Returns the value of attribute recipients.
-
#send_cc ⇒ Object
Returns the value of attribute send_cc.
-
#site ⇒ Object
Returns the value of attribute site.
-
#subject ⇒ Object
Returns the value of attribute subject.
Instance Method Summary collapse
- #create ⇒ Object (also: #compose)
-
#initialize(browser, opts = {}) ⇒ MessageObject
constructor
A new instance of MessageObject.
Methods included from Workflows
menu_link, #open_my_site_by_name
Methods included from Utilities
#current_hour, #current_month, #current_year, #get_filename, #in_15_minutes, #last_hour, #last_month, #last_year, #make, #make_date, #next_hour, #next_month, #next_year, #on_page, #random_alphanums, #random_alphanums_plus, #random_email, #random_high_ascii, #random_letters, #random_multiline, #random_nicelink, #random_string, #random_xss_string, #tomorrow, #yesterday
Methods included from PageHelper
#make, #on, #visit, #wait_until
Constructor Details
#initialize(browser, opts = {}) ⇒ MessageObject
Returns a new instance of MessageObject.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/sakai-cle-test-api/data_objects/message.rb', line 9 def initialize(browser, opts={}) @browser = browser defaults = { :subject=>random_alphanums, :recipients=>["All Participants"] } = defaults.merge(opts) @subject=[:subject] @recipients=[:recipients] @site=[:site] @message=[:message] @label=[:label] raise "You need to specify a site for your web content" if @site==nil end |
Instance Attribute Details
#label ⇒ Object
Returns the value of attribute label.
7 8 9 |
# File 'lib/sakai-cle-test-api/data_objects/message.rb', line 7 def label @label end |
#message ⇒ Object
Returns the value of attribute message.
7 8 9 |
# File 'lib/sakai-cle-test-api/data_objects/message.rb', line 7 def @message end |
#recipients ⇒ Object
Returns the value of attribute recipients.
7 8 9 |
# File 'lib/sakai-cle-test-api/data_objects/message.rb', line 7 def recipients @recipients end |
#send_cc ⇒ Object
Returns the value of attribute send_cc.
7 8 9 |
# File 'lib/sakai-cle-test-api/data_objects/message.rb', line 7 def send_cc @send_cc end |
#site ⇒ Object
Returns the value of attribute site.
7 8 9 |
# File 'lib/sakai-cle-test-api/data_objects/message.rb', line 7 def site @site end |
#subject ⇒ Object
Returns the value of attribute subject.
7 8 9 |
# File 'lib/sakai-cle-test-api/data_objects/message.rb', line 7 def subject @subject end |
Instance Method Details
#create ⇒ Object Also known as: compose
26 27 28 29 |
# File 'lib/sakai-cle-test-api/data_objects/message.rb', line 26 def create open_my_site_by_name @site unless @browser.title=~/#{@site}/ unless @browser.title=~/Messages$/ end |