cucumber-rails 0.3.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. data/.gitignore +1 -0
  2. data/.rspec +1 -0
  3. data/.rvmrc +1 -0
  4. data/Gemfile +2 -0
  5. data/Gemfile.lock +194 -0
  6. data/History.txt +101 -1
  7. data/LICENSE +22 -0
  8. data/README.md +77 -0
  9. data/Rakefile +3 -19
  10. data/config/cucumber.yml +1 -0
  11. data/cucumber-rails.gemspec +37 -101
  12. data/dev_tasks/cucumber.rake +1 -1
  13. data/dev_tasks/rspec.rake +6 -11
  14. data/features/allow_rescue.feature +63 -0
  15. data/features/capybara_javascript_drivers.feature +87 -0
  16. data/features/database_cleaner.feature +44 -0
  17. data/features/emulate_javascript.feature +34 -0
  18. data/features/inspect_query_string.feature +37 -0
  19. data/features/install_cucumber_rails.feature +16 -0
  20. data/features/mongoid.feature +53 -0
  21. data/features/multiple_databases.feature +74 -0
  22. data/features/named_selectors.feature +33 -0
  23. data/features/no_database.feature +70 -0
  24. data/features/pseduo_class_selectors.feature +24 -0
  25. data/features/rerun_profile.feature +38 -0
  26. data/features/rest_api.feature +47 -0
  27. data/features/routing.feature +18 -0
  28. data/features/select_dates.feature +99 -0
  29. data/features/step_definitions/cucumber_rails_steps.rb +80 -6
  30. data/features/support/env.rb +8 -2
  31. data/features/test_unit.feature +43 -0
  32. data/lib/cucumber/rails/capybara/javascript_emulation.rb +83 -0
  33. data/lib/cucumber/rails/capybara/select_dates_and_times.rb +50 -0
  34. data/lib/cucumber/rails/capybara.rb +6 -0
  35. data/lib/cucumber/rails/hooks/active_record.rb +14 -0
  36. data/lib/cucumber/rails/hooks/allow_rescue.rb +8 -0
  37. data/lib/cucumber/rails/hooks/database_cleaner.rb +13 -0
  38. data/lib/cucumber/rails/hooks/mail.rb +5 -0
  39. data/lib/cucumber/rails/hooks.rb +4 -0
  40. data/lib/cucumber/rails/rspec.rb +4 -6
  41. data/lib/cucumber/rails/world.rb +13 -35
  42. data/lib/cucumber/rails.rb +8 -0
  43. data/lib/cucumber/rails3/action_controller.rb +12 -0
  44. data/lib/cucumber/rails3/active_record.rb +8 -0
  45. data/lib/cucumber/rails3/application.rb +17 -0
  46. data/lib/cucumber/rails3.rb +16 -0
  47. data/lib/cucumber/web/tableish.rb +50 -9
  48. data/lib/generators/cucumber/feature/feature_generator.rb +8 -17
  49. data/lib/generators/cucumber/feature/named_arg.rb +2 -0
  50. data/{templates/feature → lib/generators/cucumber/feature/templates}/feature.erb +10 -12
  51. data/{templates/feature → lib/generators/cucumber/feature/templates}/steps.erb +1 -1
  52. data/lib/generators/cucumber/install/USAGE +15 -0
  53. data/lib/generators/cucumber/install/install_generator.rb +88 -0
  54. data/lib/generators/cucumber/install/templates/config/cucumber.yml.erb +8 -0
  55. data/lib/generators/cucumber/install/templates/step_definitions/web_steps.rb.erb +192 -0
  56. data/lib/generators/cucumber/install/templates/step_definitions/web_steps_cs.rb.erb +127 -0
  57. data/lib/generators/cucumber/install/templates/step_definitions/web_steps_da.rb.erb +105 -0
  58. data/lib/generators/cucumber/install/templates/step_definitions/web_steps_de.rb.erb +127 -0
  59. data/lib/generators/cucumber/install/templates/step_definitions/web_steps_es.rb.erb +127 -0
  60. data/lib/generators/cucumber/install/templates/step_definitions/web_steps_ja.rb.erb +140 -0
  61. data/lib/generators/cucumber/install/templates/step_definitions/web_steps_ko.rb.erb +142 -0
  62. data/lib/generators/cucumber/install/templates/step_definitions/web_steps_no.rb.erb +105 -0
  63. data/lib/generators/cucumber/install/templates/step_definitions/web_steps_pt-BR.rb.erb +132 -0
  64. data/lib/generators/cucumber/install/templates/support/_rails_each_run.rb.erb +36 -0
  65. data/lib/generators/cucumber/install/templates/support/_rails_prefork.rb.erb +1 -0
  66. data/{templates/skeleton → lib/generators/cucumber/install/templates}/support/capybara.rb +0 -4
  67. data/{templates/skeleton → lib/generators/cucumber/install/templates}/support/paths.rb +11 -5
  68. data/{templates/skeleton → lib/generators/cucumber/install/templates}/support/rails.rb.erb +2 -2
  69. data/{templates/skeleton → lib/generators/cucumber/install/templates}/support/rails_spork.rb.erb +2 -2
  70. data/lib/generators/cucumber/install/templates/support/selectors.rb +39 -0
  71. data/lib/generators/cucumber/install/templates/support/web_steps_warning.txt +19 -0
  72. data/{templates/skeleton → lib/generators/cucumber/install/templates}/tasks/cucumber.rake.erb +18 -0
  73. data/spec/cucumber/web/tableish_spec.rb +83 -6
  74. data/spec/spec_helper.rb +1 -4
  75. metadata +299 -73
  76. data/HACKING.rdoc +0 -34
  77. data/README.rdoc +0 -64
  78. data/VERSION +0 -1
  79. data/features/rails2.feature +0 -56
  80. data/features/rails3.feature +0 -52
  81. data/features/support/matchers/files.rb +0 -17
  82. data/generators/cucumber/USAGE +0 -14
  83. data/generators/cucumber/cucumber_generator.rb +0 -89
  84. data/generators/cucumber/templates/step_definitions/web_steps_ja.rb.erb +0 -136
  85. data/generators/feature/USAGE +0 -12
  86. data/generators/feature/feature_generator.rb +0 -47
  87. data/lib/cucumber/rails/action_controller.rb +0 -65
  88. data/lib/cucumber/rails/active_record.rb +0 -34
  89. data/lib/cucumber/rails/capybara_javascript_emulation.rb +0 -72
  90. data/lib/cucumber/rails/test_unit.rb +0 -9
  91. data/lib/generators/cucumber/feature/feature_base.rb +0 -29
  92. data/lib/generators/cucumber/skeleton/USAGE +0 -21
  93. data/lib/generators/cucumber/skeleton/skeleton_base.rb +0 -202
  94. data/lib/generators/cucumber/skeleton/skeleton_generator.rb +0 -64
  95. data/rvm.yml +0 -22
  96. data/spec/generators/cucumber/skeleton/skeleton_base_spec.rb +0 -84
  97. data/spec/spec.opts +0 -2
  98. data/templates/skeleton/config/cucumber.yml.erb +0 -7
  99. data/templates/skeleton/environments/cucumber.rb.erb +0 -37
  100. data/templates/skeleton/step_definitions/capybara_steps.rb.erb +0 -197
  101. data/templates/skeleton/step_definitions/web_steps_cs.rb.erb +0 -136
  102. data/templates/skeleton/step_definitions/web_steps_da.rb.erb +0 -114
  103. data/templates/skeleton/step_definitions/web_steps_de.rb.erb +0 -136
  104. data/templates/skeleton/step_definitions/web_steps_es.rb.erb +0 -136
  105. data/templates/skeleton/step_definitions/web_steps_no.rb.erb +0 -114
  106. data/templates/skeleton/step_definitions/web_steps_pt-BR.rb.erb +0 -140
  107. data/templates/skeleton/step_definitions/webrat_steps.rb.erb +0 -268
  108. data/templates/skeleton/support/_rails_each_run.rb +0 -34
  109. data/templates/skeleton/support/_rails_prefork.rb.erb +0 -10
  110. data/templates/skeleton/support/webrat.rb +0 -8
  111. /data/{templates/skeleton → lib/generators/cucumber/install/templates}/script/cucumber +0 -0
  112. /data/{templates/skeleton → lib/generators/cucumber/install/templates}/support/edit_warning.txt +0 -0
@@ -1,136 +0,0 @@
1
- # encoding: utf-8
2
- <%= embed_file('support/edit_warning.txt') %>
3
-
4
- require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths"))
5
-
6
- Given /^jsem na (.+)$/ do |page_name|
7
- Given %{I am on #{page_name}}
8
- end
9
-
10
- When /^jdu na (.+)$/ do |page_name|
11
- When %{I go to #{page_name}}
12
- end
13
-
14
- When /^stisknu tlačítko "([^\"]*)"$/ do |button|
15
- When %{I press "#{button}"}
16
- end
17
-
18
- When /^kliknu na "([^\"]*)"$/ do |link|
19
- When %{I follow "#{link}"}
20
- end
21
-
22
- When /^kliknu na "([^\"]*)" uvnitř "([^\"]*)"$/ do |link, parent|
23
- When %{I follow "#{link}" within "#{parent}"}
24
- end
25
-
26
- When /^vyplním pole "([^\"]*)" hodnotou "([^\"]*)"$/ do |field, value|
27
- When %{I fill in "#{field}" with "#{value}"}
28
- end
29
-
30
- When /^vyplním "([^\"]*)" do pole "([^\"]*)"$/ do |value, field|
31
- When %{I fill in "#{value}" for "#{field}"}
32
- end
33
-
34
- When /^vyplním následující:$/ do |fields|
35
- When %{I fill in the following:}, fields
36
- end
37
-
38
- When /^vyberu "([^\"]*)" z "([^\"]*)"$/ do |value, field|
39
- When %{I select "#{value}" from "#{field}"}
40
- end
41
-
42
- When /^vyberu "([^\"]*)" jako datum a čas$/ do |time|
43
- When %{I select "#{time}" as the date and time}
44
- end
45
-
46
- When /^vyberu "([^\"]*)" jako "([^\"]*)" datum a čas$/ do |datetime, datetime_label|
47
- When %{I select "#{datetime}" as the "#{datetime_label}" date and time}
48
- end
49
-
50
- When /^vyberu "([^\"]*)" jako čas$/ do |time|
51
- When %{I select "#{time}" as the time}
52
- end
53
-
54
- When /^vyberu "([^\"]*)" jako "([^\"]*)" čas$/ do |time, time_label|
55
- When %{I select "#{time}" as the "#{time_label}" time}
56
- end
57
-
58
- When /^vyberu cd jako datum$/ do |date|
59
- When %{I select "#{date}" as the date}
60
- end
61
-
62
- When /^vyberu "([^\"]*)" jako "([^\"]*)" datum$/ do |date, date_label|
63
- When %{I select "#{date}" as the "#{date_label}" date}
64
- end
65
-
66
- When /^zaškrtnu "([^\"]*)"$/ do |field|
67
- When %{I check "#{field}"}
68
- end
69
-
70
- When /^vyškrtnu "([^\"]*)"$/ do |field|
71
- When %{I uncheck "#{field}"}
72
- end
73
-
74
- When /^vyberu "([^\"]*)"$/ do |field|
75
- When %{I choose "#{field}"}
76
- end
77
-
78
- When /^připojím soubor "([^\"]*)" do pole "([^\"]*)"$/ do |path, field|
79
- When %{I attach the file "#{path}" to "#{field}"}
80
- end
81
-
82
- Then /^(?:|také )bych měl vidět "([^\"]*)"$/ do |text|
83
- Then %{I should see "#{text}"}
84
- end
85
-
86
- Then /^(?:|také )bych měl vidět "([^\"]*)" uvnitř "([^\"]*)"$/ do |text, selector|
87
- Then %{I should see "#{text}" within "#{selector}"}
88
- end
89
-
90
- Then /^(?:|také )bych měl vidět \/([^\/]*)\/$/ do |regexp|
91
- Then %{I should see /#{regexp}/}
92
- end
93
-
94
- Then /^(?:|také )bych měl vidět \/([^\/]*)\/ uvnitř "([^\"]*)"$/ do |regexp, selector|
95
- Then %{I should see /#{regexp}/ within "#{selector}"}
96
- end
97
-
98
- Then /^(?:|také )bych neměl vidět "([^\"]*)"$/ do |text|
99
- Then %{I should not see "#{text}"}
100
- end
101
-
102
- Then /^(?:|také )bych neměl vidět "([^\"]*)" uvnitř "([^\"]*)"$/ do |text, selector|
103
- Then %{I should not see "#{text}" within "#{selector}"}
104
- end
105
-
106
- Then /^(?:|také )bych neměl vidět \/([^\/]*)\/$/ do |regexp|
107
- Then %{I should not see /#{regexp}/}
108
- end
109
-
110
- Then /^(?:|také )bych neměl vidět \/([^\/]*)\/ uvnitř "([^\"]*)"$/ do |regexp, selector|
111
- Then %{I should not see /#{regexp}/ within "#{selector}"}
112
- end
113
-
114
- Then /^pole "([^\"]*)" by mělo obsahovat "([^\"]*)"$/ do |field, value|
115
- Then %{the "#{field}" field should contain "#{value}"}
116
- end
117
-
118
- Then /^pole "([^\"]*)" by nemělo obsahovat "([^\"]*)"$/ do |field, value|
119
- Then %{the "#{field}" field should not contain "#{value}"}
120
- end
121
-
122
- Then /^pole "([^\"]*)" by mělo být zaškrtnuté$/ do |label|
123
- Then %{the "#{label}" checkbox should be checked}
124
- end
125
-
126
- Then /^pole "([^\"]*)" by nemělo být zaškrtnuté$/ do |label|
127
- Then %{the "#{label}" checkbox should not be checked}
128
- end
129
-
130
- Then /^(?:|také )bych měl být na (.+)$/ do |page_name|
131
- Then %{I should be on #{page_name}}
132
- end
133
-
134
- Then /^(?:|také )mi ukaž stránku$/ do
135
- Then %{show me the page}
136
- end
@@ -1,114 +0,0 @@
1
- # encoding: utf-8
2
- <%= embed_file('support/edit_warning.txt') %>
3
-
4
- require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths"))
5
-
6
- Givet /^(?:at )jeg står på (.*)$/ do |page_name|
7
- Given %{I am on #{page_name}}
8
- end
9
-
10
- Når /^jeg går til (.*)$/ do |page_name|
11
- When %{I go to #{page_name}}
12
- end
13
-
14
- Når /^jeg trykker "([^\"]*)"$/ do |button|
15
- When %{I press "#{button}"}
16
- end
17
-
18
- Når /^jeg klikker "([^\"]*)"$/ do |link|
19
- When %{I follow "#{link}"}
20
- end
21
-
22
- Når /^jeg klikker "([^\"]*)" under "([^\"]*)"$/ do |link, parent|
23
- When %{I follow "#{link}" within "#{parent}"}
24
- end
25
-
26
- Når /^jeg fylder ud "([^\"]*)" med "([^\"]*)"$/ do |field, value|
27
- When %{I fill in "#{field}" with "#{value}"}
28
- end
29
-
30
- Når /^jeg fylder ud "([^\"]*)" for "([^\"]*)"$/ do |value, field|
31
- When %{I fill in "#{value}" for "#{field}"}
32
- end
33
-
34
- Når /^jeg fylder følgende ud:$/ do |fields|
35
- When %{I fill in the following:}, fields
36
- end
37
-
38
- Når /^jeg vælger "([^\"]*)" fra "([^\"]*)"$/ do |value, field|
39
- When %{I select "#{value}" from "#{field}"}
40
- end
41
-
42
- # Missing: date stuff
43
-
44
- Når /^jeg afkrydser "([^\"]*)"$/ do |field|
45
- When %{I check "#{field}"}
46
- end
47
-
48
- Når /^jeg fjerner afkrydsning for "([^\"]*)"$/ do |field|
49
- When %{I uncheck "#{field}"}
50
- end
51
-
52
- Når /^jeg vælger "([^\"]*)"$/ do |field|
53
- When %{I choose "#{field}"}
54
- end
55
-
56
- Når /^jeg tilsætter filen "([^\"]*)" til "([^\"]*)"$/ do |path, field|
57
- When %{I attach the file "#{path}" to "#{field}"}
58
- end
59
-
60
- Så /^(?:skal jeg|jeg skal) se "([^\"]*)"$/ do |text|
61
- Then %{I should see "#{text}"}
62
- end
63
-
64
- Så /^(?:skal jeg|jeg skal) se "([^\"]*)" under "([^\"]*)"$/ do |text, selector|
65
- Then %{I should see "#{text}" within "#{selector}"}
66
- end
67
-
68
- Så /^(?:skal jeg|jeg skal) se \/([^\/]*)\/$/ do |regexp|
69
- Then %{I should see /#{regexp}/}
70
- end
71
-
72
- Så /^(?:skal jeg|jeg skal) se \/([^\/]*)\/ under "([^\"]*)"$/ do |regexp, selector|
73
- Then %{I should see /#{regexp}/ within "#{selector}"}
74
- end
75
-
76
- Så /^(?:skal jeg|jeg skal) ikke se "([^\"]*)"$/ do |text|
77
- Then %{I should not see "#{text}"}
78
- end
79
-
80
- Så /^(?:skal jeg|jeg skal) ikke se "([^\"]*)" under "([^\"]*)"$/ do |text, selector|
81
- Then %{I should not see "#{text}" within "#{selector}"}
82
- end
83
-
84
- Så /^(?:skal jeg|jeg skal) ikke se \/([^\/]*)\/$/ do |regexp|
85
- Then %{I should not see /#{regexp}/}
86
- end
87
-
88
- Så /^(?:skal jeg|jeg skal) ikke se \/([^\/]*)\/ under "([^\"]*)"$/ do |regexp, selector|
89
- Then %{I should not see /#{regexp}/ within "#{selector}"}
90
- end
91
-
92
- Så /^(?:skal )"([^\"]*)" feltet (?:skal )indeholde "([^\"]*)"$/ do |field, value|
93
- Then %{the "#{field}" field should contain "#{value}"}
94
- end
95
-
96
- Så /^(?:skal ) "([^\"]*)" feltet (?:skal )ikke indeholde "([^\"]*)"$/ do |field, value|
97
- Then %{the "#{field}" field should not contain "#{value}"}
98
- end
99
-
100
- Så /^(?:skal ) "([^\"]*)" afkrydsningsboksen (?:skal )være krydset af$/ do |label|
101
- Then %{the "#{label}" checkbox should be checked}
102
- end
103
-
104
- Så /^(?:skal ) "([^\"]*)" afkrydsningsboksen (?:skal )ikke være krydset af$/ do |label|
105
- Then %{the "#{label}" checkbox should not be checked}
106
- end
107
-
108
- Så /^(?:skal jeg|jeg skal) komme til (.+)$/ do |page_name|
109
- Then %{I should be on #{page_name}}
110
- end
111
-
112
- Så /^vil jeg se siden$/ do |page_name|
113
- Then %{show me the page}
114
- end
@@ -1,136 +0,0 @@
1
- # encoding: utf-8
2
- <%= embed_file('support/edit_warning.txt') %>
3
-
4
- require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths"))
5
-
6
- Given /^(?:|ich )bin auf (.+)$/ do |page_name|
7
- Given %{I am on #{page_name}}
8
- end
9
-
10
- When /^(?:|ich )auf (.+) gehe$/ do |page_name|
11
- When %{I go to #{page_name}}
12
- end
13
-
14
- When /^(?:|ich )auf "([^\"]*)" drücke$/ do |button|
15
- When %{I press "#{button}"}
16
- end
17
-
18
- When /^(?:|ich )auf "([^\"]*)" klicke$/ do |link|
19
- When %{I follow "#{link}"}
20
- end
21
-
22
- When /^(?:|ich )auf "([^\"]*)" innerhalb "([^\"]*)" klicke$/ do |link, parent|
23
- When %{I follow "#{link}" within "#{parent}"}
24
- end
25
-
26
- When /^(?:|ich )"([^\"]*)" mit "([^\"]*)" ausfülle$/ do |field, value|
27
- When %{I fill in "#{field}" with "#{value}"}
28
- end
29
-
30
- When /^(?:|ich )"([^\"]*)" in "([^\"]*)" eingebe$/ do |value, field|
31
- When %{I fill in "#{value}" for "#{field}"}
32
- end
33
-
34
- When /^(?:|ich )folgendes eingebe:$/ do |fields|
35
- When %{I fill in the following:}, fields
36
- end
37
-
38
- When /^(?:|ich )"([^\"]*)" in "([^\"]*)" auswähle$/ do |value, field|
39
- When %{I select "#{value}" from "#{field}"}
40
- end
41
-
42
- When /^(?:|ich )"([^\"]*)" als Datum und Uhrzeit auswähle$/ do |time|
43
- When %{I select "#{time}" as the date and time}
44
- end
45
-
46
- When /^(?:|ich )"([^\"]*)" als "([^\"]*)" Datum und Uhrzeit auswähle$/ do |datetime, datetime_label|
47
- When %{I select "#{datetime}" as the "#{datetime_label}" date and time}
48
- end
49
-
50
- When /^(?:|ich )"([^\"]*)" als Uhrzeit auswähle$/ do |time|
51
- When %{I select "#{time}" as the time}
52
- end
53
-
54
- When /^(?:|ich )"([^\"]*)" als "([^\"]*)" Uhrzeit auswähle$/ do |time, time_label|
55
- When %{I select "#{time}" as the "#{time_label}" time}
56
- end
57
-
58
- When /^(?:|ich )"([^\"]*)" als Datum auswähle$/ do |date|
59
- When %{I select "#{date}" as the date}
60
- end
61
-
62
- When /^(?:|ich )"([^\"]*)" als "([^\"]*)" Datum auswähle$/ do |date, date_label|
63
- When %{I select "#{date}" as the "#{date_label}" date}
64
- end
65
-
66
- When /^(?:|ich )"([^\"]*)" anhake$/ do |field|
67
- When %{I check "#{field}"}
68
- end
69
-
70
- When /^(?:|ich )"([^\"]*)" abhake$/ do |field|
71
- When %{I uncheck "#{field}"}
72
- end
73
-
74
- When /^(?:|ich )"([^\"]*)" auswähle$/ do |field|
75
- When %{I choose "#{field}"}
76
- end
77
-
78
- When /^(?:|ich )die Datei "([^\"]*)" als "([^\"]*)" anhänge$/ do |path, field|
79
- When %{I attach the file "#{path}" to "#{field}"}
80
- end
81
-
82
- Then /^(?:|ich sollte |sollte (?:|ich )?)"([^\"]*)" sehen$/ do |text|
83
- Then %{I should see "#{text}"}
84
- end
85
-
86
- Then /^(?:|ich sollte |sollte (?:|ich )?)"([^\"]*)" innerhalb "([^\"]*)" sehen$/ do |text, selector|
87
- Then %{I should see "#{text}" within "#{selector}"}
88
- end
89
-
90
- Then /^(?:|ich sollte |sollte (?:|ich )?)\/([^\/]*)\/ sehen$/ do |regexp|
91
- Then %{I should see /#{regexp}/}
92
- end
93
-
94
- Then /^(?:|ich sollte |sollte (?:|ich )?)\/([^\/]*)\/ innerhalb "([^\"]*)" sehen$/ do |regexp, selector|
95
- Then %{I should see /#{regexp}/ within "#{selector}"}
96
- end
97
-
98
- Then /^(?:|ich sollte |sollte (?:|ich )?)nicht "([^\"]*)" sehen$/ do |text|
99
- Then %{I should not see "#{text}"}
100
- end
101
-
102
- Then /^(?:|ich sollte |sollte (?:|ich )?)nicht "([^\"]*)" innerhalb "([^\"]*)" sehen$/ do |text, selector|
103
- Then %{I should not see "#{text}" within "#{selector}"}
104
- end
105
-
106
- Then /^(?:|ich sollte |sollte (?:|ich )?)nicht \/([^\/]*)\/ sehen$/ do |regexp|
107
- Then %{I should not see /#{regexp}/}
108
- end
109
-
110
- Then /^(?:|ich sollte |sollte (?:|ich )?)nicht \/([^\/]*)\/ innerhalb "([^\"]*)" sehen$/ do |regexp, selector|
111
- Then %{I should not see /#{regexp}/ within "#{selector}"}
112
- end
113
-
114
- Then /^sollte das "([^\"]*)" Feld "([^\"]*)" enthalten$/ do |field, value|
115
- Then %{the "#{field}" field should contain "#{value}"}
116
- end
117
-
118
- Then /^sollte das "([^\"]*)" Feld nicht "([^\"]*)" enthalten$/ do |field, value|
119
- Then %{the "#{field}" field should not contain "#{value}"}
120
- end
121
-
122
- Then /^sollte die "([^\"]*)" Checkbox angehakt sein$/ do |label|
123
- Then %{the "#{label}" checkbox should be checked}
124
- end
125
-
126
- Then /^sollte die "([^\"]*)" Checkbox nicht angehakt sein$/ do |label|
127
- Then %{the "#{label}" checkbox should not be checked}
128
- end
129
-
130
- Then /^(?:|ich sollte |sollte (?:|ich )?)auf (.+) sein$/ do |page_name|
131
- Then %{I should be on #{page_name}}
132
- end
133
-
134
- Then /^zeig mir die Seite$/ do
135
- Then %{show me the page}
136
- end
@@ -1,136 +0,0 @@
1
- # encoding: utf-8
2
- <%= embed_file('support/edit_warning.txt') %>
3
-
4
- require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths"))
5
-
6
- Dado /^que estoy en (.+)$/ do |page_name|
7
- Given %{I am on #{page_name}}
8
- end
9
-
10
- Cuando /^voy a (.+)$/ do |page_name|
11
- When %{I go to #{page_name}}
12
- end
13
-
14
- Cuando /^apreto "([^\"]*)"$/ do |button|
15
- When %{I press "#{button}"}
16
- end
17
-
18
- Cuando /^clickeo "([^\"]*)"$/ do |link|
19
- When %{I follow "#{link}"}
20
- end
21
-
22
- Cuando /^clickeo "([^\"]*)" dentro de "([^\"]*)"$/ do |link, parent|
23
- When %{I follow "#{link}" within "#{parent}"}
24
- end
25
-
26
- Cuando /^completo "([^\"]*)" con "([^\"]*)"$/ do |field, value|
27
- When %{I fill in "#{field}" with "#{value}"}
28
- end
29
-
30
- Cuando /^completo "([^\"]*)" para "([^\"]*)"$/ do |value, field|
31
- When %{I fill in "#{value}" for "#{field}"}
32
- end
33
-
34
- Cuando /^completo lo siguiente:$/ do |fields|
35
- When %{I fill in the following:}, fields
36
- end
37
-
38
- Cuando /^selecciono "([^\"]*)" de "([^\"]*)"$/ do |value, field|
39
- When %{I select "#{value}" from "#{field}"}
40
- end
41
-
42
- Cuando /^selecciono "([^\"]*)" como la fecha y la hora$/ do |time|
43
- When %{I select "#{time}" as the date and time}
44
- end
45
-
46
- Cuando /^selecciono "([^\"]*)" como la fecha y la hora "([^\"]*)"$/ do |datetime, datetime_label|
47
- When %{I select "#{datetime}" as the "#{datetime_label}" date and time}
48
- end
49
-
50
- Cuando /^selecciono "([^\"]*)" como la hora$/ do |time|
51
- When %{I select "#{time}" as the time}
52
- end
53
-
54
- Cuando /^selecciono "([^\"]*)" como la hora "([^\"]*)"$/ do |time, time_label|
55
- When %{I select "#{time}" as the "#{time_label}" time}
56
- end
57
-
58
- Cuando /^selecciono "([^\"]*)" como la fecha$/ do |date|
59
- When %{I select "#{date}" as the date}
60
- end
61
-
62
- Cuando /^selecciono "([^\"]*)" como la fecha "([^\"]*)"$/ do |date, date_label|
63
- When %{I select "#{date}" as the "#{date_label}" date}
64
- end
65
-
66
- Cuando /^marco "([^\"]*)"$/ do |field|
67
- When %{I check "#{field}"}
68
- end
69
-
70
- Cuando /^desmarco "([^\"]*)"$/ do |field|
71
- When %{I uncheck "#{field}"}
72
- end
73
-
74
- Cuando /^elijo "([^\"]*)"$/ do |field|
75
- When %{I choose "#{field}"}
76
- end
77
-
78
- Cuando /^adjunto el archivo "([^\"]*)" a "([^\"]*)"$/ do |path, field|
79
- When %{I attach the file "#{path}" to "#{field}"}
80
- end
81
-
82
- Entonces /^debería ver "([^\"]*)"$/ do |text|
83
- Then %{I should see "#{text}"}
84
- end
85
-
86
- Entonces /^debería ver "([^\"]*)" dentro de "([^\"]*)"$/ do |text, selector|
87
- Then %{I should see "#{text}" within "#{selector}"}
88
- end
89
-
90
- Entonces /^debería ver \/([^\/]*)\/$/ do |regexp|
91
- Then %{I should see /#{regexp}/}
92
- end
93
-
94
- Entonces /^debería ver \/([^\/]*)\/ dentro de "([^\"]*)"$/ do |regexp, selector|
95
- Then %{I should see /#{regexp}/ within "#{selector}"}
96
- end
97
-
98
- Entonces /^no debería ver "([^\"]*)"$/ do |text|
99
- Then %{I should not see "#{text}"}
100
- end
101
-
102
- Entonces /^no debería ver "([^\"]*)" dentro de "([^\"]*)"$/ do |text, selector|
103
- Then %{I should not see "#{text}" within "#{selector}"}
104
- end
105
-
106
- Entonces /^no debería ver \/([^\/]*)\/$/ do |regexp|
107
- Then %{I should not see /#{regexp}/}
108
- end
109
-
110
- Entonces /^no debería ver \/([^\/]*)\/ dentro de "([^\"]*)"$/ do |regexp, selector|
111
- Then %{I should not see /#{regexp}/ within "#{selector}"}
112
- end
113
-
114
- Entonces /^el campo "([^\"]*)" debería contener "([^\"]*)"$/ do |field, value|
115
- Then %{the "#{field}" field should contain "#{value}"}
116
- end
117
-
118
- Entonces /^el campo "([^\"]*)" no debería contener "([^\"]*)"$/ do |field, value|
119
- Then %{the "#{field}" field should not contain "#{value}"}
120
- end
121
-
122
- Entonces /^la checkbox "([^\"]*)" debería estar marcada$/ do |label|
123
- Then %{the "#{label}" checkbox should be checked}
124
- end
125
-
126
- Entonces /^la checkbox "([^\"]*)" no debería estar marcada$/ do |label|
127
- Then %{the "#{label}" checkbox should not be checked}
128
- end
129
-
130
- Entonces /^debería estar en (.+)$/ do |page_name|
131
- Then %{I should be on #{page_name}}
132
- end
133
-
134
- Entonces /^mostrame la página$/ do
135
- Then %{show me the page}
136
- end
@@ -1,114 +0,0 @@
1
- # encoding: utf-8
2
- <%= embed_file('support/edit_warning.txt') %>
3
-
4
- require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths"))
5
-
6
- Gitt /^(?:at )jeg står på (.*)$/ do |page_name|
7
- Given %{I am on #{page_name}}
8
- end
9
-
10
- Når /^jeg går til (.*)$/ do |page_name|
11
- When %{I go to #{page_name}}
12
- end
13
-
14
- Når /^jeg trykker "([^\"]*)"$/ do |button|
15
- When %{I press "#{button}"}
16
- end
17
-
18
- Når /^jeg klikker "([^\"]*)"$/ do |link|
19
- When %{I follow "#{link}"}
20
- end
21
-
22
- Når /^jeg klikker "([^\"]*)" under "([^\"]*)"$/ do |link, parent|
23
- When %{I follow "#{link}" within "#{parent}"}
24
- end
25
-
26
- Når /^jeg fyller inn "([^\"]*)" med "([^\"]*)"$/ do |field, value|
27
- When %{I fill in "#{field}" with "#{value}"}
28
- end
29
-
30
- Når /^jeg fyller inn "([^\"]*)" for "([^\"]*)"$/ do |value, field|
31
- When %{I fill in "#{value}" for "#{field}"}
32
- end
33
-
34
- Når /^jeg fyller inn følgende:$/ do |fields|
35
- When %{I fill in the following:}, fields
36
- end
37
-
38
- Når /^jeg velger "([^\"]*)" fra "([^\"]*)"$/ do |value, field|
39
- When %{I select "#{value}" from "#{field}"}
40
- end
41
-
42
- # Missing: date stuff
43
-
44
- Når /^jeg krysser av "([^\"]*)"$/ do |field|
45
- When %{I check "#{field}"}
46
- end
47
-
48
- Når /^jeg fjerner avkrysning for "([^\"]*)"$/ do |field|
49
- When %{I uncheck "#{field}"}
50
- end
51
-
52
- Når /^jeg velger "([^\"]*)"$/ do |field|
53
- When %{I choose "#{field}"}
54
- end
55
-
56
- Når /^jeg legger ved filen "([^\"]*)" til "([^\"]*)"$/ do |path, field|
57
- When %{I attach the file "#{path}" to "#{field}"}
58
- end
59
-
60
- Så /^(?:skal jeg|jeg skal) se "([^\"]*)"$/ do |text|
61
- Then %{I should see "#{text}"}
62
- end
63
-
64
- Så /^(?:skal jeg|jeg skal) se "([^\"]*)" under "([^\"]*)"$/ do |text, selector|
65
- Then %{I should see "#{text}" within "#{selector}"}
66
- end
67
-
68
- Så /^(?:skal jeg|jeg skal) se \/([^\/]*)\/$/ do |regexp|
69
- Then %{I should see /#{regexp}/}
70
- end
71
-
72
- Så /^(?:skal jeg|jeg skal) se \/([^\/]*)\/ under "([^\"]*)"$/ do |regexp, selector|
73
- Then %{I should see /#{regexp}/ within "#{selector}"}
74
- end
75
-
76
- Så /^(?:skal jeg|jeg skal) ikke se "([^\"]*)"$/ do |text|
77
- Then %{I should not see "#{text}"}
78
- end
79
-
80
- Så /^(?:skal jeg|jeg skal) ikke se "([^\"]*)" under "([^\"]*)"$/ do |text, selector|
81
- Then %{I should not see "#{text}" within "#{selector}"}
82
- end
83
-
84
- Så /^(?:skal jeg|jeg skal) ikke se \/([^\/]*)\/$/ do |regexp|
85
- Then %{I should not see /#{regexp}/}
86
- end
87
-
88
- Så /^(?:skal jeg|jeg skal) ikke se \/([^\/]*)\/ under "([^\"]*)"$/ do |regexp, selector|
89
- Then %{I should not see /#{regexp}/ within "#{selector}"}
90
- end
91
-
92
- Så /^(?:skal )"([^\"]*)" feltet (?:skal )inneholde "([^\"]*)"$/ do |field, value|
93
- Then %{the "#{field}" field should contain "#{value}"}
94
- end
95
-
96
- Så /^(?:skal ) "([^\"]*)" feltet (?:skal )ikke inneholde "([^\"]*)"$/ do |field, value|
97
- Then %{the "#{field}" field should not contain "#{value}"}
98
- end
99
-
100
- Så /^(?:skal ) "([^\"]*)" avkrysningsboksen (?:skal )være krysset av$/ do |label|
101
- Then %{the "#{label}" checkbox should be checked}
102
- end
103
-
104
- Så /^(?:skal ) "([^\"]*)" avkrysningsboksen (?:skal )ikke være krysset av$/ do |label|
105
- Then %{the "#{label}" checkbox should not be checked}
106
- end
107
-
108
- Så /^(?:skal jeg|jeg skal) komme til (.+)$/ do |page_name|
109
- Then %{I should be on #{page_name}}
110
- end
111
-
112
- Så /^vil jeg se siden$/ do |page_name|
113
- Then %{show me the page}
114
- end