Class: Achoo::Achievo::HourAdministrationForm

Inherits:
Object
  • Object
show all
Defined in:
lib/achoo/achievo/hour_administration_form.rb

Instance Method Summary collapse

Constructor Details

#initializeHourAdministrationForm

Returns a new instance of HourAdministrationForm.



10
11
12
# File 'lib/achoo/achievo/hour_administration_form.rb', line 10

def initialize
  @page  = nil
end

Instance Method Details

#flexi_time(date) ⇒ Object



22
23
24
25
26
# File 'lib/achoo/achievo/hour_administration_form.rb', line 22

def flexi_time(date)
  set_page_to_view_for_date('dayview', date)
  
  @page.body.match(/Flexi time balance: (-?\d+:\d+)/)[1]
end

#show_registered_hours_for_day(date) ⇒ Object



14
15
16
# File 'lib/achoo/achievo/hour_administration_form.rb', line 14

def show_registered_hours_for_day(date)
  show_registered_hours(date, 'dayview', '#rl_1 tr')
end

#show_registered_hours_for_week(date) ⇒ Object



18
19
20
# File 'lib/achoo/achievo/hour_administration_form.rb', line 18

def show_registered_hours_for_week(date)
  show_registered_hours(date, 'weekview', '//form[@name="weekview"]/following::table/tr')
end