Permalink
Browse files

Fixing reg expressions for steps

  • Loading branch information...
Shashikant86 committed Feb 4, 2017
1 parent 56615d9 commit 88c6d82f46f4d04635aabe3bd9320d9402bbbc7a
Showing with 13 additions and 13 deletions.
  1. +1 −1 lib/bddfire/version.rb
  2. +11 −11 lib/bddfire/web/web_steps.rb
  3. +1 −1 pre-defined-steps/capybara_steps.md
View
@@ -1,3 +1,3 @@
module BDDfire
- VERSION = '2.0.7'.freeze
+ VERSION = '2.0.8'.freeze
end
@@ -3,50 +3,50 @@
visit(url)
end
-When(/^I fill in "(.*?)" with the text "(.*?)"$/) do |element, text|
+When(/^I fill in "([^"]*)" with the text "([^"]*)"$/) do |element, text|
fill_in element, with: text
end
Then(/^I should see "(.*?)"$/) do |text|
page.should have_content text
end
-When(/^I fill "(.*?)" into field with (.+) "(.*?)"$/) do |data, _type, locator|
+When(/^I fill "([^"]*)" into field with (.+) "(.*?)"$/) do |data, _type, locator|
fill_in locator, with: data
end
-When(/^I select the "(.*?)" link$/) do |link|
+When(/^I select the "([^"]*)" link$/) do |link|
click_link(link)
end
-When(/^I select the "(.*?)" button$/) do |button|
+When(/^I select the "([^"]*)" button$/) do |button|
click_button(button)
end
-When(/^I click on link having text "(.*?)"$/) do |text|
+When(/^I click on link having text "([^"]*)"$/) do |text|
click_link(text)
end
-When(/^I check checkbox "(.*?)"$/) do |box|
+When(/^I check checkbox "([^"]*)"$/) do |box|
check(box)
end
-When(/^I uncheck checkbox "(.*?)"$/) do |box|
+When(/^I uncheck checkbox "([^"]*)"$/) do |box|
uncheck(box)
end
-When(/^I choose radio button"(.*?)"$/) do |radiobutton|
+When(/^I choose radio button "([^"]*)"$/) do |radiobutton|
choose(radiobutton)
end
-When(/^I select option "(.*?)" from the dropdown "(.*?)"$/) do |option, dropdown|
+When(/^I select option "([^"]*)" from the dropdown "([^"]*)"$/) do |option, dropdown|
select(option, from: dropdown)
end
-When(/^I attach the file "(.*?)" to the field "(.*?)"$/) do |file, locator|
+When(/^I attach the file "([^"]*)" to the field "([^"]*)"$/) do |file, locator|
attach_file(locator, file)
end
-When(/^I hover over thr element"(.*?)"$/) do |element|
+When(/^I hover over the element "([^"]*)"$/) do |element|
page.find(element).hover
end
@@ -22,7 +22,7 @@
When I fill in “element” with the text “text”
When I select the “link” link
When I select the "button" button
- When I click on element having text “text"
+ When I click on link having text “text"
When I check “checkbox”
When I uncheck “checkbox”
When I choose “radio button”

0 comments on commit 88c6d82

Please sign in to comment.