Module: ImportStepThreeMethods
- Includes:
- PageObject
- Defined in:
- lib/kuali-sakai-common-lib/calendar.rb
Overview
The page for reviewing activities and confirming them for import.
Class Method Summary collapse
Instance Method Summary collapse
-
#event_date(event_name) ⇒ Object
Returns the date of the specified event.
-
#events ⇒ Object
Returns an array containing the list of Activity names on the page.
- #import_events ⇒ Object
-
#uncheck_event(event_name) ⇒ Object
Unchecks the checkbox for the specified event.
Class Method Details
.page_elements(identifier) ⇒ Object
460 461 462 463 464 465 |
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 460 def self.page_elements(identifier) in_frame(identifier) do |frame| (:import_events_for_site, :id=>"site", :frame=>frame) (:import_events_for_selected_groups, :id=>"groups", :frame=>frame) end end |
Instance Method Details
#event_date(event_name) ⇒ Object
Returns the date of the specified event
451 452 453 |
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 451 def event_date(event_name) frm.table(:class=>/listHier lines/).row(:text=>/#{Regexp.escape(event_name)}/)[0].text end |
#events ⇒ Object
Returns an array containing the list of Activity names on the page.
434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 |
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 434 def events list = [] frm.table(:class=>/listHier lines/).rows.each do |row| if row.label(:for=>/eventSelected/).exist? list << row.label.text end end names = [] list.uniq! list.each do | item | name = item[/(?<=\s).+(?=\s\s\()/] names << name end return names end |
#import_events ⇒ Object
428 429 430 431 |
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 428 def import_events frm.(:value=>"Import Events").click Calendar.new(@browser) end |
#uncheck_event(event_name) ⇒ Object
Unchecks the checkbox for the specified event
456 457 458 |
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 456 def uncheck_event(event_name) frm.table(:class=>/listHier lines/).row(:text=>/#{Regexp.escape(event_name)}/) end |