-
Notifications
You must be signed in to change notification settings - Fork 5
/
test1-user.feature
187 lines (151 loc) · 10.1 KB
/
test1-user.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
@fast @user-steps @test1
Feature: Running Cucumber with TestCafe - test "user ..." steps feature 1
As a user of TestCafe
I should be able to use Cucumber
to run my e2e tests
Scenario: 'user goes to URL' should open corresponding page, 'title should contain' should verify the title
Given user goes to URL "http://localhost:8001/test1.html"
Then the title should be "Test1 Page"
And the title should contain "st1 Pa"
Scenario: 'user goes to page' should open corresponding page
Given user goes to "test1-page"."pageTest1"
Then the title should be "Test1 Page"
Scenario: 'user goes to page' should open corresponding page (text style step)
Given user goes to pageTest1 from test1-page
Then the title should be "Test1 Page"
Scenario: 'user reloads the page' should refresh the page, 'should be present' should verify the element
Given user goes to "test1-page"."pageTest1"
And user reloads the page
Then "test1-page"."linkTest2Page" should be present
Scenario: 'user reloads the page' should refresh the page, 'should be present' should verify the element (text style step)
Given user goes to "test1-page"."pageTest1"
And user reloads the page
Then linkTest2Page from test1-page should be present
Scenario: 'number should be present' should verify the number of elements
Given user goes to "test2-page"."pageTest2"
Then 4 "test2-page"."input" should be present
Scenario: 'number should be present' should verify the number of elements (text style step)
Given user goes to "test2-page"."pageTest2"
Then 4 input from test2-page should be present
Scenario: 'should not be present': link on Page1 test page should not be present, 'user waits for' should wait for 200 ms
Given user goes to "test1-page"."pageTest1"
And user waits for 200 ms
Then "test1-page"."linkInvisibleTest2Page" should not be present
Scenario: 'should not be present': text error on Page1 test page should not be present, 'user waits for' should wait for 200 ms (text style step, XPath)
Given user goes to "test1-page"."pageTest1"
And user waits for 200 ms
Then textErrorXPath from test1-page should not be present
Scenario: 'user clicks' Page1 test page link should lead to Page2 test page
Given user goes to URL "http://localhost:8001/test1.html"
When user clicks "test1-page"."linkTest2Page"
Then the title should be "Test2 Page"
Scenario: 'user clicks' Page1 test page link should lead to Page2 test page (text style step, XPath)
Given user goes to URL "http://localhost:8001/test1.html"
When user clicks linkTest2PageXPath from test1-page
Then the title should be "Test2 Page"
Scenario: 'user right clicks' on Right click menu button should open a menu
Given user goes to URL "http://localhost:8001/test1.html"
When user right clicks "test1-page"."buttonMenuRightClick"
Then "test1-page"."blockMenu" should be present
Scenario: 'user right clicks' on Right click menu button should open a menu (text style step, XPath)
Given user goes to URL "http://localhost:8001/test1.html"
When user right clicks buttonMenuRightClickXPath from test1-page
Then blockMenu from test1-page should be present
Scenario: 'user waits and clicks' on Page1 test page link should lead to Page2 test page
Given user goes to "test1-page"."pageTest1"
When user waits and clicks "test1-page"."linkTest2Page"
Then the title should be "Test2 Page"
Scenario: 'user waits and clicks' on Page1 test page link should lead to Page2 test page (text style step)
Given user goes to "test1-page"."pageTest1"
When user waits and clicks linkTest2Page from test1-page
Then the title should be "Test2 Page"
Scenario: 'user waits to appear' should wait for the content to appear up to provided number of ms
Given user goes to "test1-page"."pageLoader"
When user waits up to 10000 ms for "test1-page"."blockTestContent" to appear
Scenario: 'user waits to appear' should wait for the content to appear up to provided number of ms (text style step)
Given user goes to pageLoader from test1-page
When user waits up to 10000 ms for blockTestContentXPath from test1-page to appear
Scenario: 'user clicks if present': link on Page1 test page should be clicked if it is visible and lead to Page2 test page
Given user goes to "test1-page"."pageTest1"
And user waits for 200 ms
When user clicks "test1-page"."linkTest2Page" if present
And user waits for 200 ms
Then the title should be "Test2 Page"
Scenario: 'user clicks if present': link on Page1 test page should not be clicked if it is not present
Given user goes to "test1-page"."pageTest1"
And user waits for 200 ms
When user clicks "test1-page"."linkInvisibleTest2Page" if present
And user waits for 200 ms
Then the title should be "Test1 Page"
Scenario: 'user clicks if present': link on Page1 test page should be clicked if it is visible and lead to Page2 test page (text style step, XPath)
Given user goes to pageTest1 from test1-page
And user waits for 200 ms
When user clicks linkTest2PageXPath from test1-page if present
And user waits for 200 ms
Then the title should be "Test2 Page"
Scenario: 'user clicks if present': link on Page1 test page should not be clicked if it is not present (text style step, XPath)
Given user goes to pageTest1 from test1-page
And user waits for 200 ms
When user clicks linkInvisibleTest2PageXPath from test1-page if present
And user waits for 200 ms
Then the title should be "Test1 Page"
Scenario: 'user double clicks' on Page1 test page link should lead to Page2 test page
Given user goes to URL "http://localhost:8001/test1.html"
When user double clicks "test1-page"."linkTest2Page"
Then the title should be "Test2 Page"
Scenario: 'user double clicks' on Page1 test page link should lead to Page2 test page (text style step)
Given user goes to URL "http://localhost:8001/test1.html"
When user double clicks linkTest2Page from test1-page
Then the title should be "Test2 Page"
Scenario: 'user types' "Green" (string) text inside input should get this text typed in, 'text should be' should verify the text
Given user goes to "test2-page"."pageTest2"
When user types "Green" in "test2-page"."inputColors"
Then "test2-page"."blockInputColor" text should be "Green"
Scenario: 'user types' "Green" (string) text inside input should get this text typed in, 'text should be' should verify the text (text style step)
Given user goes to "test2-page"."pageTest2"
When user types "Green" in inputColors from test2-page
Then blockInputColor from test2-page text should be "Green"
Scenario: 'user types' "Gold" (page object) text inside input should get this text typed in, 'text should be' should verify the text
Given user goes to "test2-page"."pageTest2"
When user types "test2-page"."textGold" in "test2-page"."inputColors"
Then "test2-page"."blockInputColor" text should be "test2-page"."textGold"
Scenario: 'user types' "Gold" (page object) text inside input should get this text typed in, 'text should be' should verify the text (text style step)
Given user goes to "test2-page"."pageTest2"
When user types textGold from test2-page in inputColors from test2-page
Then blockInputColor from test2-page text should be textGold from test2-page
Scenario: 'user clears and types' "Green" (string) text inside input should overwrite the text
Given user goes to "test2-page"."pageTest2"
And user types "Yellow" in "test2-page"."inputColors"
When user clears "test2-page"."inputColors" and types "Green"
Then "test2-page"."blockInputColor" text should be "Green"
Scenario: 'user clears and types' "Green" (string) text inside input should overwrite the text (text style step)
Given user goes to "test2-page"."pageTest2"
And user types "Yellow" in inputColors from test2-page
When user clears inputColors from test2-page and types "Green"
Then blockInputColor from test2-page text should be "Green"
Scenario: 'user clears and types' "Gold" (page object) text inside input should overwrite the text
Given user goes to "test2-page"."pageTest2"
And user types "test2-page"."textIndigo" in "test2-page"."inputColors"
When user clears "test2-page"."inputColors" and types "test2-page"."textGold"
Then "test2-page"."blockInputColor" text should be "test2-page"."textGold"
Scenario: 'user clears and types' "Gold" (page object) text inside input should overwrite the text (text style step)
Given user goes to "test2-page"."pageTest2"
And user types textIndigo from test2-page in inputColors from test2-page
When user clears inputColors from test2-page and types textGold from test2-page
Then blockInputColor from test2-page text should be textGold from test2-page
Scenario: 'user selects' "Green" (string) option text inside select dropdown should get this option selected, 'text should be' should verify the text
Given user goes to "test2-page"."pageTest2"
When user selects "Green" in "test2-page"."dropdownColors"
Then "test2-page"."blockDropdownColor" text should be "green"
Scenario: 'user selects' "Green" (string) option text inside select dropdown should get this option selected, 'text should be' should verify the text (text style step)
Given user goes to "test2-page"."pageTest2"
When user selects "Green" in dropdownColors from test2-page
Then blockDropdownColor from test2-page text should be "green"
Scenario: 'user selects' "Gold" (page object) option text inside select dropdown should get this option selected, 'text should be' should verify the text
Given user goes to "test2-page"."pageTest2"
When user selects "test2-page"."textGold" in "test2-page"."dropdownColors"
Then "test2-page"."blockDropdownColor" text should be "test2-page"."textGold"
Scenario: 'user selects' "Gold" (page object) option text inside select dropdown should get this option selected, 'text should be' should verify the text (text style step)
Given user goes to "test2-page"."pageTest2"
When user selects textGold from test2-page in dropdownColors from test2-page
Then blockDropdownColor from test2-page text should be textGold from test2-page