Class: CompanyInfoPage

Inherits:
Object
  • Object
show all
Includes:
Capybara::DSL, NavigationBar, UserMenu
Defined in:
pages/CompanyInfoPage.rb

Instance Method Summary collapse

Methods included from NavigationBar

#go_to_home, select_from_menuName_menu, select_menu

Methods included from UserMenu

#log_out, #select_revert_to_admin

Constructor Details

#initializeCompanyInfoPage

Returns a new instance of CompanyInfoPage.


6
7
8
# File 'pages/CompanyInfoPage.rb', line 6

def initialize

end

Instance Method Details

#save_company_infoObject


24
25
26
27
28
# File 'pages/CompanyInfoPage.rb', line 24

def save_company_info
  click_button("Save")
  find(:xpath, ".//*[@id='flashnotice']//*[@class='container']")
  find(:xpath, ".//*[@class='btn btn-primary disabled']")
end

#update_company_address(address) ⇒ Object


18
19
20
21
22
# File 'pages/CompanyInfoPage.rb', line 18

def update_company_address(address)
  address.each do |field|
    fill_in(field[0], :with => "#{field[1]}") 
  end
end

#verify_account_owner(owner) ⇒ Object


10
11
12
# File 'pages/CompanyInfoPage.rb', line 10

def (owner)
  find(:xpath, ".//*[@id='s2id_account_owner_user_id']//*[@class='select2-chosen']").text.should == owner
end

#verify_address(address) ⇒ Object


30
31
32
33
34
# File 'pages/CompanyInfoPage.rb', line 30

def verify_address(address)
  address.each do |field|
    find(:id, field[0]).value.should == field[1]
  end
end

#verify_company_name(company_name) ⇒ Object


14
15
16
# File 'pages/CompanyInfoPage.rb', line 14

def verify_company_name(company_name)
  find(:id, 'account_name').value.should == company_name
end