Sha256: aace602a3719ceb744728c9d7c66238173c2164ada16352d814f7e05350d91ac

Contents?: true

Size: 1.47 KB

Versions: 11

Compression:

Stored size: 1.47 KB

Contents

require "cello"

Given /^I have a browser with no context \(blank page\)$/ do
  @browser = StaticPages::Site::Phantom.new
end

When /^I ask for the context inputs$/ do
  @browser.context StaticPages::Site::InputPage
end

When /^I ask for the context iframe$/ do
  @browser.context StaticPages::Site::IframePage
end

When /^and I ask to visit the page$/ do
  @browser.visit
end

Then /^I should see the page inputs$/ do
  @browser.title.should == "Inputs page"
  @browser.close
end

Then /^I should see the page iframe$/ do
  @browser.title.should == "Iframe page"
  @browser.close
end

Given /^I am in the inputs context$/ do
  steps %Q{
    Given I have a browser with no context (blank page)
    When I ask for the context inputs}
  @browser.visit
  @browser.title.should == "Inputs page"
end

When /^I ask for fill the textfield$/ do
  @browser.text_field_fill_with("It Works!")
end

Then /^I should see the filled textfield$/ do
  @browser.text_field_get_text.should == "It Works!"
end

Then /^I should be able to close the browser$/ do
  @browser.close
end

When /^I click on the simple page link$/ do
  @browser.link_click
end

When /^I ask to use the simple page context$/ do
  @browser.context StaticPages::Site::ResponsePage
end

Then /^I should fail when try access the old textfield$/ do
 expect { @browser.text_field_get_text}.should raise_error(NoMethodError)
end

Then /^I should be able to verify the text on the new textfield$/ do
  @browser.text_get_text.should == "Worked Again!"
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
cello-0.0.35 features/step_definitions/browser.rb
cello-0.0.34 features/step_definitions/browser.rb
cello-0.0.33 features/step_definitions/browser.rb
cello-0.0.32 features/step_definitions/browser.rb
cello-0.0.31 features/step_definitions/browser.rb
cello-0.0.30 features/step_definitions/browser.rb
cello-0.0.29 features/step_definitions/browser.rb
cello-0.0.28 features/step_definitions/browser.rb
cello-0.0.27 features/step_definitions/browser.rb
cello-0.0.26 features/step_definitions/browser.rb
cello-0.0.25 features/step_definitions/browser.rb