casecumber-rails 1.0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. data/.gitignore +6 -0
  2. data/.rspec +1 -0
  3. data/.rvmrc +1 -0
  4. data/Gemfile +2 -0
  5. data/Gemfile.lock +205 -0
  6. data/History.md +219 -0
  7. data/LICENSE +22 -0
  8. data/README.md +77 -0
  9. data/Rakefile +9 -0
  10. data/config/.gitignore +1 -0
  11. data/config/cucumber.yml +1 -0
  12. data/cucumber-rails.gemspec +46 -0
  13. data/dev_tasks/cucumber.rake +5 -0
  14. data/dev_tasks/rspec.rake +8 -0
  15. data/dev_tasks/yard.rake +0 -0
  16. data/dev_tasks/yard/default/layout/html/bubble_32x32.png +0 -0
  17. data/dev_tasks/yard/default/layout/html/footer.erb +5 -0
  18. data/dev_tasks/yard/default/layout/html/index.erb +1 -0
  19. data/dev_tasks/yard/default/layout/html/layout.erb +25 -0
  20. data/dev_tasks/yard/default/layout/html/logo.erb +1 -0
  21. data/dev_tasks/yard/default/layout/html/setup.rb +4 -0
  22. data/features/allow_rescue.feature +63 -0
  23. data/features/capybara_javascript_drivers.feature +87 -0
  24. data/features/database_cleaner.feature +44 -0
  25. data/features/emulate_javascript.feature +34 -0
  26. data/features/inspect_query_string.feature +37 -0
  27. data/features/install_cucumber_rails.feature +16 -0
  28. data/features/mongoid.feature +53 -0
  29. data/features/multiple_databases.feature +74 -0
  30. data/features/named_selectors.feature +33 -0
  31. data/features/no_database.feature +70 -0
  32. data/features/pseduo_class_selectors.feature +24 -0
  33. data/features/rerun_profile.feature +38 -0
  34. data/features/rest_api.feature +47 -0
  35. data/features/routing.feature +18 -0
  36. data/features/select_dates.feature +99 -0
  37. data/features/step_definitions/cucumber_rails_steps.rb +89 -0
  38. data/features/support/env.rb +37 -0
  39. data/features/test_unit.feature +43 -0
  40. data/lib/cucumber/rails.rb +23 -0
  41. data/lib/cucumber/rails/action_controller.rb +12 -0
  42. data/lib/cucumber/rails/application.rb +17 -0
  43. data/lib/cucumber/rails/capybara.rb +6 -0
  44. data/lib/cucumber/rails/capybara/javascript_emulation.rb +83 -0
  45. data/lib/cucumber/rails/capybara/select_dates_and_times.rb +50 -0
  46. data/lib/cucumber/rails/hooks.rb +4 -0
  47. data/lib/cucumber/rails/hooks/active_record.rb +21 -0
  48. data/lib/cucumber/rails/hooks/allow_rescue.rb +8 -0
  49. data/lib/cucumber/rails/hooks/database_cleaner.rb +13 -0
  50. data/lib/cucumber/rails/hooks/mail.rb +5 -0
  51. data/lib/cucumber/rails/rspec.rb +21 -0
  52. data/lib/cucumber/rails/world.rb +26 -0
  53. data/lib/cucumber/web/tableish.rb +118 -0
  54. data/lib/generators/cucumber/feature/USAGE +16 -0
  55. data/lib/generators/cucumber/feature/feature_generator.rb +28 -0
  56. data/lib/generators/cucumber/feature/named_arg.rb +19 -0
  57. data/lib/generators/cucumber/feature/templates/feature.erb +63 -0
  58. data/lib/generators/cucumber/feature/templates/steps.erb +14 -0
  59. data/lib/generators/cucumber/install/USAGE +15 -0
  60. data/lib/generators/cucumber/install/install_generator.rb +88 -0
  61. data/lib/generators/cucumber/install/templates/config/cucumber.yml.erb +8 -0
  62. data/lib/generators/cucumber/install/templates/script/cucumber +10 -0
  63. data/lib/generators/cucumber/install/templates/step_definitions/web_steps.rb.erb +192 -0
  64. data/lib/generators/cucumber/install/templates/step_definitions/web_steps_cs.rb.erb +127 -0
  65. data/lib/generators/cucumber/install/templates/step_definitions/web_steps_da.rb.erb +105 -0
  66. data/lib/generators/cucumber/install/templates/step_definitions/web_steps_de.rb.erb +127 -0
  67. data/lib/generators/cucumber/install/templates/step_definitions/web_steps_es.rb.erb +127 -0
  68. data/lib/generators/cucumber/install/templates/step_definitions/web_steps_ja.rb.erb +140 -0
  69. data/lib/generators/cucumber/install/templates/step_definitions/web_steps_ko.rb.erb +142 -0
  70. data/lib/generators/cucumber/install/templates/step_definitions/web_steps_no.rb.erb +105 -0
  71. data/lib/generators/cucumber/install/templates/step_definitions/web_steps_pt-BR.rb.erb +132 -0
  72. data/lib/generators/cucumber/install/templates/support/_rails_each_run.rb.erb +36 -0
  73. data/lib/generators/cucumber/install/templates/support/_rails_prefork.rb.erb +1 -0
  74. data/lib/generators/cucumber/install/templates/support/capybara.rb +5 -0
  75. data/lib/generators/cucumber/install/templates/support/edit_warning.txt +5 -0
  76. data/lib/generators/cucumber/install/templates/support/paths.rb +33 -0
  77. data/lib/generators/cucumber/install/templates/support/rails.rb.erb +4 -0
  78. data/lib/generators/cucumber/install/templates/support/rails_spork.rb.erb +13 -0
  79. data/lib/generators/cucumber/install/templates/support/selectors.rb +39 -0
  80. data/lib/generators/cucumber/install/templates/support/web_steps_warning.txt +19 -0
  81. data/lib/generators/cucumber/install/templates/tasks/cucumber.rake.erb +60 -0
  82. data/spec/cucumber/web/tableish_spec.rb +239 -0
  83. data/spec/spec_helper.rb +3 -0
  84. metadata +514 -0
@@ -0,0 +1,140 @@
1
+ # encoding: utf-8
2
+ <%= embed_file('support/web_steps_warning.txt') %>
3
+
4
+ require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths"))
5
+ require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "selectors"))
6
+
7
+ 前提 /^"([^"]*)"ページを表示している$/ do |page_name|
8
+ Given %{I am on #{page_name}}
9
+ end
10
+
11
+ もし /^"([^"]*)"ページを表示する$/ do |page_name|
12
+ When %{I go to #{page_name}}
13
+ end
14
+
15
+ もし /^"([^"]*)"ボタンをクリックする$/ do |button|
16
+ When %{I press "#{button}"}
17
+ end
18
+
19
+ もし /^"([^"]*)"リンクをクリックする$/ do |link|
20
+ When %{I follow "#{link}"}
21
+ end
22
+
23
+ もし /^"([^"]*)"の"([^"]*)"リンクをクリックする$/ do |parent, link|
24
+ When %{I follow "#{link}" within "#{parent}"}
25
+ end
26
+
27
+ もし /^"([^"]*)"に"([^"]*)"と入力する$/ do |field, value|
28
+ When %{I fill in "#{field}" with "#{value}"}
29
+ end
30
+
31
+ # less difference to %{I fill in "#{value}" for "#{field}"} with above in Japanese.
32
+
33
+ もし /^以下の項目を入力する:$/ do |fields|
34
+ When %{I fill in the following:}, fields
35
+ end
36
+
37
+ もし /^"([^"]*)"から"([^"]*)"を選択する$/ do |field, value|
38
+ When %{I select "#{value}" from "#{field}"}
39
+ end
40
+
41
+ もし /^日時として"([^"]*)"を選択する$/ do |time|
42
+ When %{I select "#{time}" as the date and time}
43
+ end
44
+
45
+ もし /^"([^"]*)"の日時として"([^"]*)"を選択する$/ do |datetime_label, datetime|
46
+ When %{I select "#{datetime}" as the "#{datetime_label}" date and time}
47
+ end
48
+
49
+ もし /^時間として"([^"]*)"を選択する$/ do |time|
50
+ When %{I select "#{time}" as the time}
51
+ end
52
+
53
+ もし /^"([^"]*)"の時間として"([^"]*)"を選択する$/ do |time_label, time|
54
+ When %{I select "#{time}" as the "#{time_label}" time}
55
+ end
56
+
57
+ もし /^日付として"([^"]*)"を選択する$/ do |date|
58
+ When %{I select "#{date}" as the date}
59
+ end
60
+
61
+ もし /^"([^"]*)"の日付として"([^"]*)"を選択する$/ do |date_label, date|
62
+ When %{I select "#{date}" as the "#{date_label}" date}
63
+ end
64
+
65
+ もし /^"([^"]*)"をチェックする$/ do |field|
66
+ When %{I check "#{field}"}
67
+ end
68
+
69
+ もし /^"([^"]*)"のチェックを外す$/ do |field|
70
+ When %{I uncheck "#{field}"}
71
+ end
72
+
73
+ もし /^"([^"]*)"を選択する$/ do |field|
74
+ When %{I choose "#{field}"}
75
+ end
76
+
77
+ もし /^"([^"]*)"としてファイル"([^"]*)"を選択する$/ do |field, path|
78
+ When %{I attach the file "#{path}" to "#{field}"}
79
+ end
80
+
81
+ ならば /^"([^"]*)"と表示されていること$/ do |text|
82
+ Then %{I should see "#{text}"}
83
+ end
84
+
85
+ ならば /^"([^"]*)"に"([^"]*)"と表示されていること$/ do |selector, text|
86
+ Then %{I should see "#{text}" within "#{selector}"}
87
+ end
88
+
89
+ ならば /^\/([^\/]*)\/と表示されていること$/ do |regexp|
90
+ Then %{I should see /#{regexp}/}
91
+ end
92
+
93
+ ならば /^"([^"]*)"に\/([^\/]*)\/と表示されていること$/ do |selector, regexp|
94
+ Then %{I should see \/#{regexp}\/ within "#{selector}"}
95
+ end
96
+
97
+ ならば /^"([^"]*)"と表示されていないこと$/ do |text|
98
+ Then %{I should not see "#{text}"}
99
+ end
100
+
101
+ ならば /^"([^"]*)"に"([^"]*)"と表示されていないこと$/ do |selector, text|
102
+ Then %{I should not see "#{text}" within "#{selector}"}
103
+ end
104
+
105
+ ならば /^\/([^\/]*)\/と表示されていないこと$/ do |regexp|
106
+ Then %{I should not see /#{regexp}/}
107
+ end
108
+
109
+ ならば /^"([^"]*)"に\/([^\/]*)\/と表示されていないこと$/ do |selector, regexp|
110
+ Then %{I should not see \/#{regexp}\/ within "#{selector}"}
111
+ end
112
+
113
+ ならば /^入力項目"([^"]*)"に"([^"]*)"と表示されていること$/ do |field, value|
114
+ Then %{the "#{field}" field should contain "#{value}"}
115
+ end
116
+
117
+ ならば /^入力項目"([^"]*)"に"([^"]*)"と表示されていないこと$/ do |field, value|
118
+ Then %{the "#{field}" field should not contain "#{value}"}
119
+ end
120
+
121
+ ならば /^"([^"]*)"がチェックされていること$/ do |label|
122
+ Then %{the "#{label}" checkbox should be checked}
123
+ end
124
+
125
+ ならば /^"([^"]*)"がチェックされていないこと$/ do |label|
126
+ Then %{the "#{label}" checkbox should not be checked}
127
+ end
128
+
129
+ ならば /^"([^"]*)"ページを表示していること$/ do |page_name|
130
+ Then %{I should be on #{page_name}}
131
+ end
132
+
133
+ show_me_the_page = lambda { Then %{show me the page} }
134
+
135
+ ならば /^ページを表示する$/, &show_me_the_page
136
+ ならば /^画面を目視$/, &show_me_the_page
137
+
138
+ # backword-compat for old japanese translation.
139
+ ならば /^デバッグ(?:のため)?$/, &show_me_the_page
140
+
@@ -0,0 +1,142 @@
1
+ # encoding: utf-8
2
+ <%= embed_file('support/web_steps_warning.txt') %>
3
+
4
+ require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths"))
5
+ require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "selectors"))
6
+
7
+ 조건 /^(.+)페이지에 있습니다$/ do |page_name|
8
+ Given %{I am on #{page_name}}
9
+ end
10
+
11
+ 만일 /^(.+)페이지로 갑니다$/ do |page_name|
12
+ When %{I go to #{page_name}}
13
+ end
14
+
15
+ 만일 /^"([^"]*)"버튼을 누릅니다$/ do |button|
16
+ When %{I press "#{button}"}
17
+ end
18
+
19
+ 만일 /^"([^"]*)"링크를 클릭합니다$/ do |link|
20
+ When %{I follow "#{link}"}
21
+ end
22
+
23
+ 만일 /^"([^"]*)"안에 있는 "([^"]*)"링크를 클릭합니다$/ do |parent, link|
24
+ When %{I follow "#{link}" within "#{parent}"}
25
+ end
26
+
27
+ 만일 /^"([^"]*)"에 "([^"]*)"라고 적습니다$/ do |field, value|
28
+ When %{I fill in "#{field}" with "#{value}"}
29
+ end
30
+
31
+ 만일 /^"([^"]*)"라고 "([^"]*)"에 적습니다$/ do |value, field|
32
+ When %{I fill in "#{value}" for "#{field}"}
33
+ end
34
+
35
+ 만일 /^아레의 목록을 입력합니다$/ do |fields|
36
+ When %{I fill in the following:}, fields
37
+ end
38
+
39
+ 만일 /^"([^"]*)"를 "([^"]*)"으로 합니다$/ do |field, value|
40
+ When %{I select "#{value}" from "#{field}"}
41
+ end
42
+
43
+ 만일 /^날짜와 시간를 "([^"]*)"으로 합니다$/ do |time|
44
+ When %{I select "#{time}" as the date and time}
45
+ end
46
+
47
+ 만일 /^"([^"]*)"의 날짜와 시간을 "([^"]*)"으로 합니다$/ do |datetime_label, datetime|
48
+ When %{I select "#{datetime}" as the "#{datetime_label}" date and time}
49
+ end
50
+
51
+ 만일 /^시간을 "([^"]*)"으로 합니다$/ do |time|
52
+ When %{I select "#{time}" as the time}
53
+ end
54
+
55
+ 만일 /^"([^"]*)"의 시간을 "([^"]*)"으로 합니다$/ do |time_label, time|
56
+ When %{I select "#{time}" as the "#{time_label}" time}
57
+ end
58
+
59
+ 만일 /^날짜를 "([^"]*)"으로 합니다$/ do |date|
60
+ When %{I select "#{date}" as the date}
61
+ end
62
+
63
+ 만일 /^"([^"]*)"의 날짜를 "([^"]*)"으로 합니다$/ do |date_label, date|
64
+ When %{I select "#{date}" as the "#{date_label}" date}
65
+ end
66
+
67
+ 만일 /^"([^"]*)"를 체크합니다$/ do |field|
68
+ When %{I check "#{field}"}
69
+ end
70
+
71
+ 만일 /^"([^"]*)"의 체크를 해제합니다$/ do |field|
72
+ When %{I uncheck "#{field}"}
73
+ end
74
+
75
+ 만일 /^"([^"]*)"를 고릅니다$/ do |field|
76
+ When %{I choose "#{field}"}
77
+ end
78
+
79
+ 만일 /^"([^"]*)"에 "([^"]*)"파일을 첨부합니다$/ do |field, path|
80
+ When %{I attach the file "#{path}" to "#{field}"}
81
+ end
82
+
83
+ 그러면 /^"([^"]*)"가 보여야 합니다$/ do |text|
84
+ Then %{I should see "#{text}"}
85
+ end
86
+
87
+ 그러면 /^"([^"]*)"안에 "([^"]*)"가 보여야 합니다$/ do |selector, text|
88
+ Then %{I should see "#{text}" within "#{selector}"}
89
+ end
90
+
91
+ 그러면 /^\/([^\/]*)\/가 보여야 합니다$/ do |regexp|
92
+ Then %{I should see /#{regexp}/}
93
+ end
94
+
95
+ 그러면 /^"([^"]*)"안에 \/([^\/]*)\/가 보여야 합니다$/ do |selector, regexp|
96
+ Then %{I should see /#{regexp}/ within "#{selector}"}
97
+ end
98
+
99
+ 그러면 /^"([^"]*)"가 보이면 안됩니다$/ do |text|
100
+ Then %{I should not see "#{text}"}
101
+ end
102
+
103
+ 그러면 /^"([^"]*)"안에 "([^"]*)"가 보이면 안됩니다$/ do |selector, text|
104
+ Then %{I should not see "#{text}" within "#{selector}"}
105
+ end
106
+
107
+ 그러면 /^\/([^\/]*)\/가 보이면 안됩니다$/ do |regexp|
108
+ Then %{I should not see /#{regexp}/}
109
+ end
110
+
111
+ 그러면 /^"([^"]*)"안에 \/([^\/]*)\/가 보이면 안됩니다$/ do |selector, regexp|
112
+ Then %{I should not see /#{regexp}/ within "#{selector}"}
113
+ end
114
+
115
+ 그러면 /^"([^"]*)"는 "([^"]*)"이어야 합니다$/ do |field, value|
116
+ Then %{the "#{field}" field should contain "#{value}"}
117
+ end
118
+
119
+ 그러면 /^"([^"]*)"는 "([^"]*)"이면 안됩니다$/ do |field, value|
120
+ Then %{the "#{field}" field should not contain "#{value}"}
121
+ end
122
+
123
+ 그러면 /^"([^"]*)"는 체크되어 있어야 합니다$/ do |label|
124
+ Then %{the "#{label}" checkbox should be checked}
125
+ end
126
+
127
+ 그러면 /^"([^"]*)"는 체크되어 있으면 안됩니다$/ do |label|
128
+ Then %{the "#{label}" checkbox should not be checked}
129
+ end
130
+
131
+ 그러면 /^(.+)에 있어야 합니다$/ do |page_name|
132
+ Then %{I should be on #{page_name}}
133
+ end
134
+
135
+ 그러면 /^다음 쿼리들이 나와야합니다:$/ do |expected_pairs|
136
+ Then %{I should have the following query string:}
137
+ end
138
+
139
+ 그러면 /^페이지를 엽니다$/ do
140
+ Then %{show me the page}
141
+ end
142
+
@@ -0,0 +1,105 @@
1
+ # encoding: utf-8
2
+ <%= embed_file('support/web_steps_warning.txt') %>
3
+
4
+ require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths"))
5
+ require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "selectors"))
6
+
7
+ # Single-line step scoper
8
+ Når /^(.*) under ([^:]+)$/ do |step, parent|
9
+ with_scope(parent) { Når step }
10
+ end
11
+
12
+ # Multi-line step scoper
13
+ Når /^(.*) under ([^:]+):$/ do |step, parent, table_or_string|
14
+ with_scope(parent) { Når "#{step}:", table_or_string }
15
+ end
16
+
17
+ Gitt /^(?:|at )jeg står på (.*)$/ do |page_name|
18
+ Given %{I am on #{page_name}}
19
+ end
20
+
21
+ Når /^jeg går til (.*)$/ do |page_name|
22
+ When %{I go to #{page_name}}
23
+ end
24
+
25
+ Når /^jeg trykker "([^"]*)"$/ do |button|
26
+ When %{I press "#{button}"}
27
+ end
28
+
29
+ Når /^jeg klikker "([^"]*)"$/ do |link|
30
+ When %{I follow "#{link}"}
31
+ end
32
+
33
+ Når /^jeg fyller inn "([^"]*)" med "([^"]*)"$/ do |field, value|
34
+ When %{I fill in "#{field}" with "#{value}"}
35
+ end
36
+
37
+ Når /^jeg fyller inn "([^"]*)" for "([^"]*)"$/ do |value, field|
38
+ When %{I fill in "#{value}" for "#{field}"}
39
+ end
40
+
41
+ Når /^jeg fyller inn følgende:$/ do |fields|
42
+ When %{I fill in the following:}, fields
43
+ end
44
+
45
+ Når /^jeg velger "([^"]*)" fra "([^"]*)"$/ do |value, field|
46
+ When %{I select "#{value}" from "#{field}"}
47
+ end
48
+
49
+ # Missing: date stuff
50
+
51
+ Når /^jeg krysser av "([^"]*)"$/ do |field|
52
+ When %{I check "#{field}"}
53
+ end
54
+
55
+ Når /^jeg fjerner avkrysning for "([^"]*)"$/ do |field|
56
+ When %{I uncheck "#{field}"}
57
+ end
58
+
59
+ Når /^jeg velger "([^"]*)"$/ do |field|
60
+ When %{I choose "#{field}"}
61
+ end
62
+
63
+ Når /^jeg legger ved filen "([^"]*)" til "([^"]*)"$/ do |path, field|
64
+ When %{I attach the file "#{path}" to "#{field}"}
65
+ end
66
+
67
+ Så /^(?:skal jeg|jeg skal) se "([^"]*)"$/ do |text|
68
+ Then %{I should see "#{text}"}
69
+ end
70
+
71
+ Så /^(?:skal jeg|jeg skal) se \/([^\/]*)\/$/ do |regexp|
72
+ Then %{I should see /#{regexp}/}
73
+ end
74
+
75
+ Så /^(?:skal jeg|jeg skal) ikke se "([^"]*)"$/ do |text|
76
+ Then %{I should not see "#{text}"}
77
+ end
78
+
79
+ Så /^(?:skal jeg|jeg skal) ikke se \/([^\/]*)\/$/ do |regexp|
80
+ Then %{I should not see /#{regexp}/}
81
+ end
82
+
83
+ Så /^(?:skal )"([^"]*)" feltet (?:skal )inneholde "([^"]*)"$/ do |field, value|
84
+ Then %{the "#{field}" field should contain "#{value}"}
85
+ end
86
+
87
+ Så /^(?:skal ) "([^"]*)" feltet (?:skal )ikke inneholde "([^"]*)"$/ do |field, value|
88
+ Then %{the "#{field}" field should not contain "#{value}"}
89
+ end
90
+
91
+ Så /^(?:skal ) "([^"]*)" avkrysningsboksen (?:skal )være krysset av$/ do |label|
92
+ Then %{the "#{label}" checkbox should be checked}
93
+ end
94
+
95
+ Så /^(?:skal ) "([^"]*)" avkrysningsboksen (?:skal )ikke være krysset av$/ do |label|
96
+ Then %{the "#{label}" checkbox should not be checked}
97
+ end
98
+
99
+ Så /^(?:skal jeg|jeg skal) komme til (.+)$/ do |page_name|
100
+ Then %{I should be on #{page_name}}
101
+ end
102
+
103
+ Så /^vil jeg se siden$/ do |page_name|
104
+ Then %{show me the page}
105
+ end
@@ -0,0 +1,132 @@
1
+ # encoding: utf-8
2
+ <%= embed_file('support/web_steps_warning.txt') %>
3
+
4
+ require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths"))
5
+ require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "selectors"))
6
+
7
+ # Single-line step scoper
8
+ Quando /^(.*) dentro de ([^:]+)$/ do |step, parent|
9
+ with_scope(parent) { Quando step }
10
+ end
11
+
12
+ # Multi-line step scoper
13
+ Quando /^(.*) dentro de ([^:]+):$/ do |step, parent, table_or_string|
14
+ with_scope(parent) { Quando "#{step}:", table_or_string }
15
+ end
16
+
17
+ Dado /^que eu estou na (.+)$/ do |page_name|
18
+ Given %{I am on #{page_name}}
19
+ end
20
+
21
+ Quando /^eu vou para (.+)$/ do |page_name|
22
+ When %{I go to #{page_name}}
23
+ end
24
+
25
+ Quando /^eu aperto "([^"]*)"$/ do |button|
26
+ When %{I press "#{button}"}
27
+ end
28
+
29
+ Quando /^eu clico "([^"]*)"$/ do |link|
30
+ When %{I follow "#{link}"}
31
+ end
32
+
33
+ Quando /^eu preencho "([^"]*)" com "([^"]*)"$/ do |field, value|
34
+ When %{I fill in "#{field}" with "#{value}"}
35
+ end
36
+
37
+ Quando /^eu preencho "([^"]*)" para "([^"]*)"$/ do |value, field|
38
+ When %{I fill in "#{value}" for "#{field}"}
39
+ end
40
+
41
+ Quando /^eu preencho o seguinte:$/ do |fields|
42
+ When %{I fill in the following:}, fields
43
+ end
44
+
45
+ Quando /^eu seleciono "([^"]*)" de "([^"]*)"$/ do |value, field|
46
+ When %{I select "#{value}" from "#{field}"}
47
+ end
48
+
49
+ Quando /^eu seleciono "([^"]*)" como a data e a hora$/ do |time|
50
+ When %{I select "#{time}" as the date and time}
51
+ end
52
+
53
+ Quando /^eu seleciono "([^"]*)" como a data e a hora "([^"]*)"$/ do |datetime, datetime_label|
54
+ When %{I select "#{datetime}" as the "#{datetime_label}" date and time}
55
+ end
56
+
57
+ Quando /^eu seleciono "([^"]*)" como a hora$/ do |time|
58
+ When %{I select "#{time}" as the time}
59
+ end
60
+
61
+ Quando /^eu seleciono "([^"]*)" como a hora "([^"]*)"$/ do |time, time_label|
62
+ When %{I select "#{time}" as the "#{time_label}" time}
63
+ end
64
+
65
+ Quando /^eu seleciono "([^"]*)" como a data$/ do |date|
66
+ When %{I select "#{date}" as the date}
67
+ end
68
+
69
+ Quando /^eu seleciono "([^"]*)" como a data "([^"]*)"$/ do |date, date_label|
70
+ When %{I select "#{date}" as the "#{date_label}" date}
71
+ end
72
+
73
+ Quando /^eu seleciono "([^"]*)" como "([^"]*)"$/ do |date, date_label|
74
+ When %{I select "#{date}" as the "#{date_label}" date}
75
+ end
76
+
77
+ Quando /^eu marco "([^"]*)"$/ do |field|
78
+ When %{I check "#{field}"}
79
+ end
80
+
81
+ Quando /^eu desmarco "([^"]*)"$/ do |field|
82
+ When %{I uncheck "#{field}"}
83
+ end
84
+
85
+ Quando /^eu escolho "([^"]*)"$/ do |field|
86
+ When %{I choose "#{field}"}
87
+ end
88
+
89
+ Quando /^eu anexo o arquivo em "([^"]*)" a "([^"]*)"$/ do |path, field|
90
+ When %{I attach the file "#{path}" to "#{field}"}
91
+ end
92
+
93
+ Então /^eu devo ver "([^"]*)"$/ do |text|
94
+ Then %{I should see "#{text}"}
95
+ end
96
+
97
+ Então /^eu devo ver \/([^\/]*)\/$/ do |regexp|
98
+ Then %{I should see /#{regexp}/}
99
+ end
100
+
101
+ Então /^eu não devo ver "([^"]*)"$/ do |text|
102
+ Then %{I should not see "#{text}"}
103
+ end
104
+
105
+ Então /^eu não devo ver \/([^\/]*)\/$/ do |regexp|
106
+ Then %{I should not see /#{regexp}/}
107
+ end
108
+
109
+ Então /^o campo "([^"]*)" deve conter "([^"]*)"$/ do |field, value|
110
+ Then %{the "#{field}" field should contain "#{value}"}
111
+ end
112
+
113
+ Então /^o campo "([^"]*)" não deve conter "([^"]*)"$/ do |field, value|
114
+ Then %{the "#{field}" field should not contain "#{value}"}
115
+ end
116
+
117
+ Então /^o checkbox "([^"]*)" deve estar marcado$/ do |label|
118
+ Then %{the "#{label}" checkbox should be checked}
119
+ end
120
+
121
+ Então /^o checkbox "([^"]*)" não deve estar marcado$/ do |label|
122
+ Then %{the "#{label}" checkbox should not be checked}
123
+ end
124
+
125
+ Então /^eu devo estar na (.+)$/ do |page_name|
126
+ Then %{I should be on #{page_name}}
127
+ end
128
+
129
+ Então /^mostre-me a página$/ do
130
+ Then %{show me the page}
131
+ end
132
+