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,127 @@
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
+ When /^(.*) uvnitř ([^:]+)$/ do |step, parent|
9
+ with_scope(parent) { When step }
10
+ end
11
+
12
+ # Multi-line step scoper
13
+ When /^(.*) uvnitř ([^:]+):$/ do |step, parent, table_or_string|
14
+ with_scope(parent) { When "#{step}:", table_or_string }
15
+ end
16
+
17
+ Given /^jsem na (.+)$/ do |page_name|
18
+ Given %{I am on #{page_name}}
19
+ end
20
+
21
+ When /^jdu na (.+)$/ do |page_name|
22
+ When %{I go to #{page_name}}
23
+ end
24
+
25
+ When /^stisknu tlačítko "([^"]*)"$/ do |button|
26
+ When %{I press "#{button}"}
27
+ end
28
+
29
+ When /^kliknu na "([^"]*)"$/ do |link|
30
+ When %{I follow "#{link}"}
31
+ end
32
+
33
+ When /^vyplním pole "([^"]*)" hodnotou "([^"]*)"$/ do |field, value|
34
+ When %{I fill in "#{field}" with "#{value}"}
35
+ end
36
+
37
+ When /^vyplním "([^"]*)" do pole "([^"]*)"$/ do |value, field|
38
+ When %{I fill in "#{value}" for "#{field}"}
39
+ end
40
+
41
+ When /^vyplním následující:$/ do |fields|
42
+ When %{I fill in the following:}, fields
43
+ end
44
+
45
+ When /^vyberu "([^"]*)" z "([^"]*)"$/ do |value, field|
46
+ When %{I select "#{value}" from "#{field}"}
47
+ end
48
+
49
+ When /^vyberu "([^"]*)" jako datum a čas$/ do |time|
50
+ When %{I select "#{time}" as the date and time}
51
+ end
52
+
53
+ When /^vyberu "([^"]*)" jako "([^"]*)" datum a čas$/ do |datetime, datetime_label|
54
+ When %{I select "#{datetime}" as the "#{datetime_label}" date and time}
55
+ end
56
+
57
+ When /^vyberu "([^"]*)" jako čas$/ do |time|
58
+ When %{I select "#{time}" as the time}
59
+ end
60
+
61
+ When /^vyberu "([^"]*)" jako "([^"]*)" čas$/ do |time, time_label|
62
+ When %{I select "#{time}" as the "#{time_label}" time}
63
+ end
64
+
65
+ When /^vyberu cd jako datum$/ do |date|
66
+ When %{I select "#{date}" as the date}
67
+ end
68
+
69
+ When /^vyberu "([^"]*)" jako "([^"]*)" datum$/ do |date, date_label|
70
+ When %{I select "#{date}" as the "#{date_label}" date}
71
+ end
72
+
73
+ When /^zaškrtnu "([^"]*)"$/ do |field|
74
+ When %{I check "#{field}"}
75
+ end
76
+
77
+ When /^vyškrtnu "([^"]*)"$/ do |field|
78
+ When %{I uncheck "#{field}"}
79
+ end
80
+
81
+ When /^vyberu "([^"]*)"$/ do |field|
82
+ When %{I choose "#{field}"}
83
+ end
84
+
85
+ When /^připojím soubor "([^"]*)" do pole "([^"]*)"$/ do |path, field|
86
+ When %{I attach the file "#{path}" to "#{field}"}
87
+ end
88
+
89
+ Then /^(?:|také )bych měl vidět "([^"]*)"$/ do |text|
90
+ Then %{I should see "#{text}"}
91
+ end
92
+
93
+ Then /^(?:|také )bych měl vidět \/([^\/]*)\/$/ do |regexp|
94
+ Then %{I should see /#{regexp}/}
95
+ end
96
+
97
+ Then /^(?:|také )bych neměl vidět "([^"]*)"$/ do |text|
98
+ Then %{I should not see "#{text}"}
99
+ end
100
+
101
+ Then /^(?:|také )bych neměl vidět \/([^\/]*)\/$/ do |regexp|
102
+ Then %{I should not see /#{regexp}/}
103
+ end
104
+
105
+ Then /^pole "([^"]*)" by mělo obsahovat "([^"]*)"$/ do |field, value|
106
+ Then %{the "#{field}" field should contain "#{value}"}
107
+ end
108
+
109
+ Then /^pole "([^"]*)" by nemělo obsahovat "([^"]*)"$/ do |field, value|
110
+ Then %{the "#{field}" field should not contain "#{value}"}
111
+ end
112
+
113
+ Then /^pole "([^"]*)" by mělo být zaškrtnuté$/ do |label|
114
+ Then %{the "#{label}" checkbox should be checked}
115
+ end
116
+
117
+ Then /^pole "([^"]*)" by nemělo být zaškrtnuté$/ do |label|
118
+ Then %{the "#{label}" checkbox should not be checked}
119
+ end
120
+
121
+ Then /^(?:|také )bych měl být na (.+)$/ do |page_name|
122
+ Then %{I should be on #{page_name}}
123
+ end
124
+
125
+ Then /^(?:|také )mi ukaž stránku$/ do
126
+ Then %{show me the page}
127
+ end
@@ -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
+ Givet /^(?:|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 fylder ud "([^"]*)" med "([^"]*)"$/ do |field, value|
34
+ When %{I fill in "#{field}" with "#{value}"}
35
+ end
36
+
37
+ Når /^jeg fylder ud "([^"]*)" for "([^"]*)"$/ do |value, field|
38
+ When %{I fill in "#{value}" for "#{field}"}
39
+ end
40
+
41
+ Når /^jeg fylder følgende ud:$/ do |fields|
42
+ When %{I fill in the following:}, fields
43
+ end
44
+
45
+ Når /^jeg vælger "([^"]*)" fra "([^"]*)"$/ do |value, field|
46
+ When %{I select "#{value}" from "#{field}"}
47
+ end
48
+
49
+ # Missing: date stuff
50
+
51
+ Når /^jeg afkrydser "([^"]*)"$/ do |field|
52
+ When %{I check "#{field}"}
53
+ end
54
+
55
+ Når /^jeg fjerner afkrydsning for "([^"]*)"$/ do |field|
56
+ When %{I uncheck "#{field}"}
57
+ end
58
+
59
+ Når /^jeg vælger "([^"]*)"$/ do |field|
60
+ When %{I choose "#{field}"}
61
+ end
62
+
63
+ Når /^jeg tilsætter 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 )indeholde "([^"]*)"$/ do |field, value|
84
+ Then %{the "#{field}" field should contain "#{value}"}
85
+ end
86
+
87
+ Så /^(?:skal ) "([^"]*)" feltet (?:skal )ikke indeholde "([^"]*)"$/ do |field, value|
88
+ Then %{the "#{field}" field should not contain "#{value}"}
89
+ end
90
+
91
+ Så /^(?:skal ) "([^"]*)" afkrydsningsboksen (?:skal )være krydset af$/ do |label|
92
+ Then %{the "#{label}" checkbox should be checked}
93
+ end
94
+
95
+ Så /^(?:skal ) "([^"]*)" afkrydsningsboksen (?:skal )ikke være krydset af$/ 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,127 @@
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
+ Wenn /^(.*) innerhalb ([^:]+)$/ do |step, parent|
9
+ with_scope(parent) { Wenn step }
10
+ end
11
+
12
+ # Multi-line step scoper
13
+ Wenn /^(.*) innerhalb ([^:]+):$/ do |step, parent, table_or_string|
14
+ with_scope(parent) { Wenn "#{step}:", table_or_string }
15
+ end
16
+
17
+ Angenommen /^(?:|ich )bin auf (.+)$/ do |page_name|
18
+ Given %{I am on #{page_name}}
19
+ end
20
+
21
+ Wenn /^(?:|ich )auf (.+) gehe$/ do |page_name|
22
+ When %{I go to #{page_name}}
23
+ end
24
+
25
+ Wenn /^(?:|ich )auf "([^"]*)" drücke$/ do |button|
26
+ When %{I press "#{button}"}
27
+ end
28
+
29
+ Wenn /^(?:|ich )auf "([^"]*)" klicke$/ do |link|
30
+ When %{I follow "#{link}"}
31
+ end
32
+
33
+ Wenn /^(?:|ich )"([^"]*)" mit "([^"]*)" ausfülle$/ do |field, value|
34
+ When %{I fill in "#{field}" with "#{value}"}
35
+ end
36
+
37
+ Wenn /^(?:|ich )"([^"]*)" in "([^"]*)" eingebe$/ do |value, field|
38
+ When %{I fill in "#{value}" for "#{field}"}
39
+ end
40
+
41
+ Wenn /^(?:|ich )folgendes eingebe:$/ do |fields|
42
+ When %{I fill in the following:}, fields
43
+ end
44
+
45
+ Wenn /^(?:|ich )"([^"]*)" in "([^"]*)" auswähle$/ do |value, field|
46
+ When %{I select "#{value}" from "#{field}"}
47
+ end
48
+
49
+ Wenn /^(?:|ich )"([^"]*)" als Datum und Uhrzeit auswähle$/ do |time|
50
+ When %{I select "#{time}" as the date and time}
51
+ end
52
+
53
+ Wenn /^(?:|ich )"([^"]*)" als "([^"]*)" Datum und Uhrzeit auswähle$/ do |datetime, datetime_label|
54
+ When %{I select "#{datetime}" as the "#{datetime_label}" date and time}
55
+ end
56
+
57
+ Wenn /^(?:|ich )"([^"]*)" als Uhrzeit auswähle$/ do |time|
58
+ When %{I select "#{time}" as the time}
59
+ end
60
+
61
+ Wenn /^(?:|ich )"([^"]*)" als "([^"]*)" Uhrzeit auswähle$/ do |time, time_label|
62
+ When %{I select "#{time}" as the "#{time_label}" time}
63
+ end
64
+
65
+ Wenn /^(?:|ich )"([^"]*)" als Datum auswähle$/ do |date|
66
+ When %{I select "#{date}" as the date}
67
+ end
68
+
69
+ Wenn /^(?:|ich )"([^"]*)" als "([^"]*)" Datum auswähle$/ do |date, date_label|
70
+ When %{I select "#{date}" as the "#{date_label}" date}
71
+ end
72
+
73
+ Wenn /^(?:|ich )"([^"]*)" anhake$/ do |field|
74
+ When %{I check "#{field}"}
75
+ end
76
+
77
+ Wenn /^(?:|ich )"([^"]*)" abhake$/ do |field|
78
+ When %{I uncheck "#{field}"}
79
+ end
80
+
81
+ Wenn /^(?:|ich )"([^"]*)" auswähle$/ do |field|
82
+ When %{I choose "#{field}"}
83
+ end
84
+
85
+ Wenn /^(?:|ich )die Datei "([^"]*)" als "([^"]*)" anhänge$/ do |path, field|
86
+ When %{I attach the file "#{path}" to "#{field}"}
87
+ end
88
+
89
+ Dann /^(?:|ich sollte |sollte (?:|ich )?)"([^"]*)" sehen$/ do |text|
90
+ Then %{I should see "#{text}"}
91
+ end
92
+
93
+ Dann /^(?:|ich sollte |sollte (?:|ich )?)\/([^\/]*)\/ sehen$/ do |regexp|
94
+ Then %{I should see /#{regexp}/}
95
+ end
96
+
97
+ Dann /^(?:|ich sollte |sollte (?:|ich )?)nicht "([^"]*)" sehen$/ do |text|
98
+ Then %{I should not see "#{text}"}
99
+ end
100
+
101
+ Dann /^(?:|ich sollte |sollte (?:|ich )?)nicht \/([^\/]*)\/ sehen$/ do |regexp|
102
+ Then %{I should not see /#{regexp}/}
103
+ end
104
+
105
+ Dann /^(?:|sollte )das "([^"]*)" Feld (?:|sollte )"([^"]*)" enthalten$/ do |field, value|
106
+ Then %{the "#{field}" field should contain "#{value}"}
107
+ end
108
+
109
+ Dann /^(?:|sollte )das "([^"]*)" Feld (?:|sollte )nicht "([^"]*)" enthalten$/ do |field, value|
110
+ Then %{the "#{field}" field should not contain "#{value}"}
111
+ end
112
+
113
+ Dann /^(?:|sollte )die "([^"]*)" Checkbox (?:|sollte )angehakt sein$/ do |label|
114
+ Then %{the "#{label}" checkbox should be checked}
115
+ end
116
+
117
+ Dann /^(?:|sollte )die "([^"]*)" Checkbox (?:|sollte )nicht angehakt sein$/ do |label|
118
+ Then %{the "#{label}" checkbox should not be checked}
119
+ end
120
+
121
+ Dann /^(?:|ich sollte |sollte (?:|ich )?)auf (.+) sein$/ do |page_name|
122
+ Then %{I should be on #{page_name}}
123
+ end
124
+
125
+ Dann /^zeig mir die Seite$/ do
126
+ Then %{show me the page}
127
+ end
@@ -0,0 +1,127 @@
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
+ Cuando /^(.*) dentro de ([^:]+)$/ do |step, parent|
9
+ with_scope(parent) { Cuando step }
10
+ end
11
+
12
+ # Multi-line step scoper
13
+ Cuando /^(.*) dentro de ([^:]+):$/ do |step, parent, table_or_string|
14
+ with_scope(parent) { Cuando "#{step}:", table_or_string }
15
+ end
16
+
17
+ Dado /^que estoy en (.+)$/ do |page_name|
18
+ Given %{I am on #{page_name}}
19
+ end
20
+
21
+ Cuando /^voy a (.+)$/ do |page_name|
22
+ When %{I go to #{page_name}}
23
+ end
24
+
25
+ Cuando /^apreto "([^"]*)"$/ do |button|
26
+ When %{I press "#{button}"}
27
+ end
28
+
29
+ Cuando /^clickeo "([^"]*)"$/ do |link|
30
+ When %{I follow "#{link}"}
31
+ end
32
+
33
+ Cuando /^completo "([^"]*)" con "([^"]*)"$/ do |field, value|
34
+ When %{I fill in "#{field}" with "#{value}"}
35
+ end
36
+
37
+ Cuando /^completo "([^"]*)" para "([^"]*)"$/ do |value, field|
38
+ When %{I fill in "#{value}" for "#{field}"}
39
+ end
40
+
41
+ Cuando /^completo lo siguiente:$/ do |fields|
42
+ When %{I fill in the following:}, fields
43
+ end
44
+
45
+ Cuando /^selecciono "([^"]*)" de "([^"]*)"$/ do |value, field|
46
+ When %{I select "#{value}" from "#{field}"}
47
+ end
48
+
49
+ Cuando /^selecciono "([^"]*)" como la fecha y la hora$/ do |time|
50
+ When %{I select "#{time}" as the date and time}
51
+ end
52
+
53
+ Cuando /^selecciono "([^"]*)" como la fecha y la hora "([^"]*)"$/ do |datetime, datetime_label|
54
+ When %{I select "#{datetime}" as the "#{datetime_label}" date and time}
55
+ end
56
+
57
+ Cuando /^selecciono "([^"]*)" como la hora$/ do |time|
58
+ When %{I select "#{time}" as the time}
59
+ end
60
+
61
+ Cuando /^selecciono "([^"]*)" como la hora "([^"]*)"$/ do |time, time_label|
62
+ When %{I select "#{time}" as the "#{time_label}" time}
63
+ end
64
+
65
+ Cuando /^selecciono "([^"]*)" como la fecha$/ do |date|
66
+ When %{I select "#{date}" as the date}
67
+ end
68
+
69
+ Cuando /^selecciono "([^"]*)" como la fecha "([^"]*)"$/ do |date, date_label|
70
+ When %{I select "#{date}" as the "#{date_label}" date}
71
+ end
72
+
73
+ Cuando /^marco "([^"]*)"$/ do |field|
74
+ When %{I check "#{field}"}
75
+ end
76
+
77
+ Cuando /^desmarco "([^"]*)"$/ do |field|
78
+ When %{I uncheck "#{field}"}
79
+ end
80
+
81
+ Cuando /^elijo "([^"]*)"$/ do |field|
82
+ When %{I choose "#{field}"}
83
+ end
84
+
85
+ Cuando /^adjunto el archivo "([^"]*)" a "([^"]*)"$/ do |path, field|
86
+ When %{I attach the file "#{path}" to "#{field}"}
87
+ end
88
+
89
+ Entonces /^debería ver "([^"]*)"$/ do |text|
90
+ Then %{I should see "#{text}"}
91
+ end
92
+
93
+ Entonces /^debería ver \/([^\/]*)\/$/ do |regexp|
94
+ Then %{I should see /#{regexp}/}
95
+ end
96
+
97
+ Entonces /^no debería ver "([^"]*)"$/ do |text|
98
+ Then %{I should not see "#{text}"}
99
+ end
100
+
101
+ Entonces /^no debería ver \/([^\/]*)\/$/ do |regexp|
102
+ Then %{I should not see /#{regexp}/}
103
+ end
104
+
105
+ Entonces /^el campo "([^"]*)" debería contener "([^"]*)"$/ do |field, value|
106
+ Then %{the "#{field}" field should contain "#{value}"}
107
+ end
108
+
109
+ Entonces /^el campo "([^"]*)" no debería contener "([^"]*)"$/ do |field, value|
110
+ Then %{the "#{field}" field should not contain "#{value}"}
111
+ end
112
+
113
+ Entonces /^la checkbox "([^"]*)" debería estar marcada$/ do |label|
114
+ Then %{the "#{label}" checkbox should be checked}
115
+ end
116
+
117
+ Entonces /^la checkbox "([^"]*)" no debería estar marcada$/ do |label|
118
+ Then %{the "#{label}" checkbox should not be checked}
119
+ end
120
+
121
+ Entonces /^debería estar en (.+)$/ do |page_name|
122
+ Then %{I should be on #{page_name}}
123
+ end
124
+
125
+ Entonces /^mostrame la página$/ do
126
+ Then %{show me the page}
127
+ end