Sha256: 513543e0c4c966797e83674330a97920be2a238ee197b5bda260970b7fcdd8d8
Contents?: true
Size: 1.53 KB
Versions: 1
Compression:
Stored size: 1.53 KB
Contents
#!/usr/bin/env ruby # Selenium::TestInit -- de.oddb.org -- 20.02.2007 -- hwyss@ywesee.com $: << File.expand_path('..', File.dirname(__FILE__)) require 'selenium/unit' require 'stub/model' require 'oddb/util' module ODDB module Selenium class TestInit < Test::Unit::TestCase include Selenium::TestCase def setup f1 = Util::Feedback.new i1 = flexmock('package') p1 = flexmock('part') p1.should_receive(:size).and_return(10) u1 = Drugs::Unit.new u1.name.de = 'Tabletten' p1.should_receive(:unit).and_return(u1) p1.should_ignore_missing p1.should_receive(:multi).and_return nil p1.should_receive(:quantity).and_return nil i1.should_receive(:name).and_return('Product') i1.should_receive(:parts).and_return [p1] i1.should_ignore_missing f1.item = i1 f1.save super end def teardown Util::Feedback.instances.clear super end def test_init open "/" assert_equal "CH - ODDB.org | Medikamente | Home | Open Drug Database", get_title assert is_element_present("query") assert is_element_present("reset") assert is_element_present("//input[@name='search']") assert_match Regexp.new(ODDB.config.http_server), get_attribute("//form[@name='search']@action") assert is_element_present("link=Home") assert is_element_present("link=Kontakt") assert is_element_present("link=Arzneimittel A-Z") assert is_element_present("//a[@name='feedback_feed_title']") assert is_text_present("Product in der Handelsform: 10 Tabletten") end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ramaze.ch.oddb.org-1.0.0 | test/selenium/test_init.rb |