features/step_definitions/select.rb in cello-0.0.17 vs features/step_definitions/select.rb in cello-0.0.19
- old
+ new
@@ -1,39 +1,33 @@
-Given /^I am on a page that has a select$/ do
- @page = StaticPages::Site::Firefox.new
- @page.context StaticPages::Site::InputPage
- @page.visit
-end
-
Then /^I should be able to get the options available of it$/ do
- @page.select_get_options.should == ["...","Cello","Cucumber","Ruby","Rspec","QA Rocks!"]
- @page.close
+ @browser.select_get_options.should == ["...","Cello","Cucumber","Ruby","Rspec","QA Rocks!"]
+ @browser.close
end
Then /^I should be able to select an option on it$/ do
- @page.select_select("Cucumber")
+ @browser.select_select("Cucumber")
end
Then /^be sure that the option setted is the option selected$/ do
- @page.select_is("Cucumber").should be_true
- @page.close
+ @browser.select_is("Cucumber").should be_true
+ @browser.close
end
Given /^the option "(.*?)" is selected$/ do |option|
- @page.select_select option
+ @browser.select_select option
end
Then /^I should be able to know the option "(.*?)" is selected$/ do |option|
- @page.select_selected.should == option
- @page.close
+ @browser.select_selected.should == option
+ @browser.close
end
Then /^I should fail when ask if the option "(.*?)" is selected$/ do |option|
- @page.select_selected.should_not == option
- @page.close
+ @browser.select_selected.should_not == option
+ @browser.close
end
Then /^I should be able to go to the default option of it$/ do
- @page.select_clear
- @page.select_selected.should == "..."
+ @browser.select_clear
+ @browser.select_selected.should == "..."
end