Module: MessagesSentListMethods

Includes:
PageObject
Defined in:
lib/kuali-sakai-common-lib/messages.rb

Overview

The page showing the user’s Sent Messages.

Instance Method Summary collapse

Instance Method Details

#alert_message_textObject

Grabs the text from the message box that appears after doing some action.

Use this method to simplify writing Test::Unit asserts



127
128
129
# File 'lib/kuali-sakai-common-lib/messages.rb', line 127

def alert_message_text
  frm.span(:class=>"success").text
end

#compose_messageObject

Clicks the Compose Message button, then instantiates the ComposeMessage class.



116
117
118
119
# File 'lib/kuali-sakai-common-lib/messages.rb', line 116

def compose_message
  frm.link(:text=>"Compose Message").click
  ComposeMessage.new(@browser)
end

#headerObject

Returns a string consisting of the content of the page header–or “breadcrumb”, as it’s called.



109
110
111
# File 'lib/kuali-sakai-common-lib/messages.rb', line 109

def header
  frm.div(:class=>"breadCrumb specialLink").text
end

#messagesObject

Clicks the “Messages” breadcrumb link to return to the top level of Messages. Then instantiates the Messages class.



91
92
93
94
# File 'lib/kuali-sakai-common-lib/messages.rb', line 91

def messages
  frm.link(:text=>"Messages").click
  Messages.new(@browser)
end

#subjectsObject

Creates an array consisting of the message subject lines.



98
99
100
101
102
103
104
105
# File 'lib/kuali-sakai-common-lib/messages.rb', line 98

def subjects
  titles = []
  messages = frm.table(:id=>"prefs_pvt_form:pvtmsgs")
  1.upto(messages.rows.size-1) do |x|
    titles << messages.row(:index=>x).a.title
  end
  return titles
end