# encoding: utf-8 <%= embed_file('support/web_steps_warning.txt') %> require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths")) require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "selectors")) # Single-line step scoper When /^(.*) uvnitř ([^:]+)$/ do |step, parent| with_scope(parent) { When step } end # Multi-line step scoper When /^(.*) uvnitř ([^:]+):$/ do |step, parent, table_or_string| with_scope(parent) { When "#{step}:", table_or_string } end Given /^jsem na (.+)$/ do |page_name| Given %{I am on #{page_name}} end When /^jdu na (.+)$/ do |page_name| When %{I go to #{page_name}} end When /^stisknu tlačítko "([^"]*)"$/ do |button| When %{I press "#{button}"} end When /^kliknu na "([^"]*)"$/ do |link| When %{I follow "#{link}"} end When /^vyplním pole "([^"]*)" hodnotou "([^"]*)"$/ do |field, value| When %{I fill in "#{field}" with "#{value}"} end When /^vyplním "([^"]*)" do pole "([^"]*)"$/ do |value, field| When %{I fill in "#{value}" for "#{field}"} end When /^vyplním následující:$/ do |fields| When %{I fill in the following:}, fields end When /^vyberu "([^"]*)" z "([^"]*)"$/ do |value, field| When %{I select "#{value}" from "#{field}"} end When /^vyberu "([^"]*)" jako datum a čas$/ do |time| When %{I select "#{time}" as the date and time} end When /^vyberu "([^"]*)" jako "([^"]*)" datum a čas$/ do |datetime, datetime_label| When %{I select "#{datetime}" as the "#{datetime_label}" date and time} end When /^vyberu "([^"]*)" jako čas$/ do |time| When %{I select "#{time}" as the time} end When /^vyberu "([^"]*)" jako "([^"]*)" čas$/ do |time, time_label| When %{I select "#{time}" as the "#{time_label}" time} end When /^vyberu cd jako datum$/ do |date| When %{I select "#{date}" as the date} end When /^vyberu "([^"]*)" jako "([^"]*)" datum$/ do |date, date_label| When %{I select "#{date}" as the "#{date_label}" date} end When /^zaškrtnu "([^"]*)"$/ do |field| When %{I check "#{field}"} end When /^vyškrtnu "([^"]*)"$/ do |field| When %{I uncheck "#{field}"} end When /^vyberu "([^"]*)"$/ do |field| When %{I choose "#{field}"} end When /^připojím soubor "([^"]*)" do pole "([^"]*)"$/ do |path, field| When %{I attach the file "#{path}" to "#{field}"} end Then /^(?:|také )bych měl vidět "([^"]*)"$/ do |text| Then %{I should see "#{text}"} end Then /^(?:|také )bych měl vidět \/([^\/]*)\/$/ do |regexp| Then %{I should see /#{regexp}/} end Then /^(?:|také )bych neměl vidět "([^"]*)"$/ do |text| Then %{I should not see "#{text}"} end Then /^(?:|také )bych neměl vidět \/([^\/]*)\/$/ do |regexp| Then %{I should not see /#{regexp}/} end Then /^pole "([^"]*)" by mělo obsahovat "([^"]*)"$/ do |field, value| Then %{the "#{field}" field should contain "#{value}"} end Then /^pole "([^"]*)" by nemělo obsahovat "([^"]*)"$/ do |field, value| Then %{the "#{field}" field should not contain "#{value}"} end Then /^pole "([^"]*)" by mělo být zaškrtnuté$/ do |label| Then %{the "#{label}" checkbox should be checked} end Then /^pole "([^"]*)" by nemělo být zaškrtnuté$/ do |label| Then %{the "#{label}" checkbox should not be checked} end Then /^(?:|také )bych měl být na (.+)$/ do |page_name| Then %{I should be on #{page_name}} end Then /^(?:|také )mi ukaž stránku$/ do Then %{show me the page} end