Changeset 584

Show
Ignore:
Timestamp:
03/21/07 21:31:05 (2 years ago)
Author:
jarmo
Message:
  • Removed stuff related to selenium
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/baseline/config/environment.rb

    r581 r584  
    9696require 'xml/libxml' 
    9797 
    98 SeleniumConfig.set do |c| 
    99   c.browser :firefox 
    100 end 
    101  
    10298CMMS_VERSION_INFORMATION=[] 
    10399require File.join(::RAILS_ROOT, 'config', 'version') 
  • branches/baseline/test/test_helper.rb

    r554 r584  
    223223  end 
    224224 
    225   # Opens the given page, and runs various common asserts for it.  
    226   #  
    227   # Should be used instead of regular open(). 
    228   def selenium_open(options) 
    229     open options 
    230      
    231     assert_text_not_present 'esman' 
    232     assert_text_not_present 'Esman' 
    233     assert_text_not_present 'ESMAN' 
    234  
    235     assert_text_present 'NorfelloCMMS Copyright © 2006 Norfello' 
    236   end 
    237  
    238   # Logs the user in. 
    239   # 
    240   # If no parameters are given, moves to the login page and logs in as admin. 
    241   def selenium_login(move_to_login_page = true, username = 'admin', password = 'god') 
    242     open :controller => 'main', :action => 'login' if move_to_login_page 
    243     pause 0.2 
    244  
    245     type 'user_login', username 
    246     type 'user_password', password 
    247     click_and_wait 'login' 
    248   end 
    249  
    250   # Checks that the given link points to the given controller/action 
    251   # Arguments: 
    252   #   +link+: The link element in Selenium's syntax. 
    253   def assert_link_reference(link_element, options) 
    254     assert_attribute "#{link_element}@href", url_for(options) 
    255   end 
    256  
    257225  # Imitates how CGI class handles file fields 
    258226  def uploaded_file(tmp_filename, content_type, filename) 

© 2004-2007 Norfello Oy All Rights Reserved