cucumber_rails3_gen 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +20 -0
- data/README +19 -0
- data/README.rdoc +19 -0
- data/USAGE +19 -0
- data/VERSION +1 -0
- data/bin/cucumber_skeleton +19 -0
- data/lib/generators/cucumber/skeleton/USAGE +19 -0
- data/lib/generators/cucumber/skeleton/skeleton_generator.rb +178 -0
- data/lib/generators/cucumber/skeleton/templates/config/cucumber.yml.erb +7 -0
- data/lib/generators/cucumber/skeleton/templates/environments/cucumber.rb.erb +37 -0
- data/lib/generators/cucumber/skeleton/templates/script/cucumber +10 -0
- data/lib/generators/cucumber/skeleton/templates/step_definitions/capybara_steps.rb.erb +187 -0
- data/lib/generators/cucumber/skeleton/templates/step_definitions/web_steps_cs.rb.erb +136 -0
- data/lib/generators/cucumber/skeleton/templates/step_definitions/web_steps_da.rb.erb +114 -0
- data/lib/generators/cucumber/skeleton/templates/step_definitions/web_steps_de.rb.erb +136 -0
- data/lib/generators/cucumber/skeleton/templates/step_definitions/web_steps_es.rb.erb +136 -0
- data/lib/generators/cucumber/skeleton/templates/step_definitions/web_steps_ja.rb.erb +136 -0
- data/lib/generators/cucumber/skeleton/templates/step_definitions/web_steps_no.rb.erb +114 -0
- data/lib/generators/cucumber/skeleton/templates/step_definitions/web_steps_pt-BR.rb.erb +140 -0
- data/lib/generators/cucumber/skeleton/templates/step_definitions/webrat_steps.rb.erb +258 -0
- data/lib/generators/cucumber/skeleton/templates/support/_rails_each_run.rb +29 -0
- data/lib/generators/cucumber/skeleton/templates/support/_rails_prefork.rb.erb +10 -0
- data/lib/generators/cucumber/skeleton/templates/support/capybara.rb +9 -0
- data/lib/generators/cucumber/skeleton/templates/support/edit_warning.txt +5 -0
- data/lib/generators/cucumber/skeleton/templates/support/paths.rb +27 -0
- data/lib/generators/cucumber/skeleton/templates/support/rails.rb.erb +5 -0
- data/lib/generators/cucumber/skeleton/templates/support/rails_spork.rb.erb +13 -0
- data/lib/generators/cucumber/skeleton/templates/support/webrat.rb +8 -0
- data/lib/generators/cucumber/skeleton/templates/tasks/cucumber.rake.erb +42 -0
- data/spec/cucumber_gen_spec.rb +7 -0
- data/spec/spec_helper.rb +9 -0
- metadata +95 -0
@@ -0,0 +1,136 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
<%= Cucumber::Helper.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
|
@@ -0,0 +1,114 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
<%= Cucumber::Helper.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 ind "([^\"]*)" med "([^\"]*)"$/ do |field, value|
|
27
|
+
When %{I fill in "#{field}" with "#{value}"}
|
28
|
+
end
|
29
|
+
|
30
|
+
Når /^jeg fylder ind "([^\"]*)" for "([^\"]*)"$/ do |value, field|
|
31
|
+
When %{I fill in "#{value}" for "#{field}"}
|
32
|
+
end
|
33
|
+
|
34
|
+
Når /^jeg fylder følgende ind:$/ 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 krydser af "([^\"]*)"$/ 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
|
@@ -0,0 +1,136 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
<%= Cucumber::Helper.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
|
@@ -0,0 +1,136 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
<%= Cucumber::Helper.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
|