Module: AddEditFieldsMethods

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

Instance Method Summary collapse

Instance Method Details

#alert_boxObject

Returns a string of the contents of the Alert box.



367
368
369
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 367

def alert_box
  frm.div(:class=>"alertMessage").text
end

#check_remove(field_name) ⇒ Object

Checks the checkbox for the specified field



377
378
379
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 377

def check_remove(field_name)
  frm.table(:class=>/listHier lines/).row(:text=>/#{Regexp.escape(field_name)}/).checkbox.set
end

#create_fieldObject



371
372
373
374
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 371

def create_field
  frm.button(:value=>"Create Field").click
  AddEditFields.new(@browser)
end

#save_field_changesObject

Clicks the Save Field Changes buton and instantiates The Calendar or EventDetail class–unless the Alert Message box appears, in which case it re-instantiates the class.



355
356
357
358
359
360
361
362
363
364
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 355

def save_field_changes
  frm.button(:value=>"Save Field Changes").click
  if frm.div(:class=>"alertMessage").exist?
    AddEditFields.new(@browser)
  elsif frm.button(:value=>"Back to Calendar").exist?
    EventDetail.new(@browser)
  else
    Calendar.new(@browser)
  end
end