Page MenuHomePhabricator

mediawiki/core selenium tests targeting mediawiki-vagrant are failing with `The token parameter must be set (createnotoken) (MediawikiApi::ApiError)`
Closed, ResolvedPublic

Description

1$ bundle exec rake selenium
2[DEPRECATION] `last_comment` is deprecated. Please use `last_description` instead.
3/usr/local/Cellar/ruby/2.2.4/bin/ruby -S bundle exec cucumber tests/browser --tags @firefox
4@chrome @firefox @vagrant
5Feature: Create account
6
7 Scenario Outline: Go to Create account page # tests/browser/features/create_account.feature:4
8 Given I go to Create account page at <path> # tests/browser/features/step_definitions/create_account_steps.rb:1
9 Then form has Create account button # tests/browser/features/step_definitions/create_account_steps.rb:5
10
11 Examples:
12 | path |
13 | Special:CreateAccount |
14 | Special:UserLogin/signup |
15 | Special:UserLogin?type=signup |
16
17 Scenario: If no username is entered then an error is displayed # tests/browser/features/create_account.feature:14
18 Given I go to Create account page at Special:CreateAccount # tests/browser/features/step_definitions/create_account_steps.rb:1
19 When I submit the form # tests/browser/features/step_definitions/create_account_steps.rb:9
20 Then an error message is displayed # tests/browser/features/step_definitions/create_account_steps.rb:13
21
22@chrome @firefox @vagrant
23Feature: Create Page With Wiki Link
24
25 Scenario: Create Page With Wiki Link # tests/browser/features/create_and_follow_wiki_link.feature:4
26 Given I create page "Link Target Test Page" with content "Link Target Test Page" # tests/browser/features/step_definitions/create_and_follow_wiki_link_steps.rb:12
27 The token parameter must be set (createnotoken) (MediawikiApi::ApiError)
28 ./tests/browser/features/step_definitions/create_and_follow_wiki_link_steps.rb:13:in `/^I create page "(.*?)" with content "(.*?)"$/'
29 tests/browser/features/create_and_follow_wiki_link.feature:5:in `Given I create page "Link Target Test Page" with content "Link Target Test Page"'
30 And I go to the "Link Source Test Page" page with content "This is a [[Link Target Test Page|link to the test target page]] right here." # tests/browser/features/step_definitions/create_and_follow_wiki_link_steps.rb:1
31 When I click the Link Target link # tests/browser/features/step_definitions/create_and_follow_wiki_link_steps.rb:16
32 Then I should be on the Link Target Test Page # tests/browser/features/step_definitions/create_and_follow_wiki_link_steps.rb:20
33 And the page content should contain "Link Target Test Page" # tests/browser/features/step_definitions/create_and_follow_wiki_link_steps.rb:24
34
35@chrome @firefox @skip @vagrant
36Feature: Edit Page
37
38 Scenario: Create and edit page # tests/browser/features/edit_page.feature:4
39 Given I go to the "Editing Test Page" page with content "This is a page to test editing" # tests/browser/features/step_definitions/create_and_follow_wiki_link_steps.rb:1
40 The token parameter must be set (createnotoken) (MediawikiApi::ApiError)
41 ./tests/browser/features/step_definitions/create_and_follow_wiki_link_steps.rb:3:in `/^I go to the "(.+)" page with content "(.+)"$/'
42 tests/browser/features/edit_page.feature:5:in `Given I go to the "Editing Test Page" page with content "This is a page to test editing"'
43 When I click Edit # tests/browser/features/step_definitions/edit_page_steps.rb:1
44 And I edit the page with "Edited and a random string" # tests/browser/features/step_definitions/edit_page_steps.rb:13
45 And I click Preview # tests/browser/features/step_definitions/edit_page_steps.rb:5
46 And I click Show Changes # tests/browser/features/step_definitions/edit_page_steps.rb:9
47 And I save the edit # tests/browser/features/step_definitions/edit_page_steps.rb:17
48 Then the edited page content should contain "Edited and a random string" # tests/browser/features/step_definitions/edit_page_steps.rb:21
49
50@chrome @firefox @vagrant
51Feature: File
52
53 Scenario: Anonymous goes to file that does not exist # tests/browser/features/file.feature:4
54 Given I am at file that does not exist # tests/browser/features/step_definitions/file_steps.rb:1
55 Then page should show that no such file exists # tests/browser/features/step_definitions/file_steps.rb:5
56
57 Scenario: Logged-in user goes to file that does not exist # tests/browser/features/file.feature:8
58 Given I am logged in # mediawiki_selenium-1.7.0/lib/mediawiki_selenium/step_definitions/login_steps.rb:1
59 The token parameter must be set (createnotoken) (MediawikiApi::ApiError)
60 tests/browser/features/file.feature:9:in `Given I am logged in'
61 And I am at file that does not exist # tests/browser/features/step_definitions/file_steps.rb:1
62 Then page should show that no such file exists # tests/browser/features/step_definitions/file_steps.rb:5
63
64@chrome @firefox @vagrant
65Feature: Log in
66
67 Background: # tests/browser/features/login.feature:4
68 Given I am at Log in page # tests/browser/features/step_definitions/login_steps.rb:1
69
70 Scenario: Go to Log in page # tests/browser/features/login.feature:7
71 Then Username element should be there # tests/browser/features/step_definitions/login_steps.rb:56
72 And Password element should be there # tests/browser/features/step_definitions/login_steps.rb:48
73 And Log in element should be there # tests/browser/features/step_definitions/login_steps.rb:40
74
75 Scenario: Log in without entering credentials # tests/browser/features/login.feature:12
76 When I log in without entering credentials # tests/browser/features/step_definitions/login_steps.rb:17
77 Then error box should be visible # tests/browser/features/step_definitions/login_steps.rb:25
78
79 Scenario: Log in without entering password # tests/browser/features/login.feature:16
80 When I log in without entering password # tests/browser/features/step_definitions/login_steps.rb:21
81 The token parameter must be set (createnotoken) (MediawikiApi::ApiError)
82 ./tests/browser/features/step_definitions/login_steps.rb:22:in `/^I log in without entering password$/'
83 tests/browser/features/login.feature:17:in `When I log in without entering password'
84 Then error box should be visible # tests/browser/features/step_definitions/login_steps.rb:25
85
86 Scenario: Log in with incorrect username # tests/browser/features/login.feature:20
87 When I log in with incorrect username # tests/browser/features/step_definitions/login_steps.rb:13
88 The token parameter must be set (createnotoken) (MediawikiApi::ApiError)
89 ./tests/browser/features/step_definitions/login_steps.rb:14:in `/^I log in with incorrect username$/'
90 tests/browser/features/login.feature:21:in `When I log in with incorrect username'
91 Then error box should be visible # tests/browser/features/step_definitions/login_steps.rb:25
92
93 Scenario: Log in with incorrect password # tests/browser/features/login.feature:24
94 When I log in with incorrect password # tests/browser/features/step_definitions/login_steps.rb:9
95 The token parameter must be set (createnotoken) (MediawikiApi::ApiError)
96 ./tests/browser/features/step_definitions/login_steps.rb:10:in `/^I log in with incorrect password$/'
97 tests/browser/features/login.feature:25:in `When I log in with incorrect password'
98 Then error box should be visible # tests/browser/features/step_definitions/login_steps.rb:25
99
100 Scenario: Log in with valid credentials # tests/browser/features/login.feature:28
101 When I log in # tests/browser/features/step_definitions/login_steps.rb:5
102 The token parameter must be set (createnotoken) (MediawikiApi::ApiError)
103 ./tests/browser/features/step_definitions/login_steps.rb:6:in `/^I log in$/'
104 tests/browser/features/login.feature:29:in `When I log in'
105 Then error box should not be visible # tests/browser/features/step_definitions/login_steps.rb:29
106
107@chrome @firefox @vagrant
108Feature: Main Page View History Links
109
110 Background: # tests/browser/features/main_page_links.feature:4
111 Given I open the main wiki URL # tests/browser/features/step_definitions/main_page_links_steps.rb:1
112
113 Scenario: Main Page View History links exist # tests/browser/features/main_page_links.feature:7
114 Then I should see a link for View History # tests/browser/features/step_definitions/main_page_links_steps.rb:5
115
116 Scenario: Main Page Sidebar Links # tests/browser/features/main_page_links.feature:10
117 Then I should see a link for Recent changes # tests/browser/features/step_definitions/main_page_links_steps.rb:13
118 And I should see a link for Random page # tests/browser/features/step_definitions/main_page_links_steps.rb:17
119 And I should see a link for Help # tests/browser/features/step_definitions/main_page_links_steps.rb:21
120 And I should see a link for What links here # tests/browser/features/step_definitions/main_page_links_steps.rb:25
121 And I should see a link for Related changes # tests/browser/features/step_definitions/main_page_links_steps.rb:29
122 And I should see a link for Special pages # tests/browser/features/step_definitions/main_page_links_steps.rb:33
123 And I should see a link for Printable version # tests/browser/features/step_definitions/main_page_links_steps.rb:37
124 And I should see a link for Permanent link # tests/browser/features/step_definitions/main_page_links_steps.rb:41
125 And I should see a link for Page information # tests/browser/features/step_definitions/main_page_links_steps.rb:45
126
127@chrome @firefox @vagrant
128Feature: Preferences
129
130 Scenario: Preferences Appearance # tests/browser/features/preferences.feature:4
131 Given I am logged in # mediawiki_selenium-1.7.0/lib/mediawiki_selenium/step_definitions/login_steps.rb:1
132 The token parameter must be set (createnotoken) (MediawikiApi::ApiError)
133 tests/browser/features/preferences.feature:5:in `Given I am logged in'
134 When I navigate to Preferences # tests/browser/features/step_definitions/preferences_appearance_steps.rb:5
135 And I click Appearance # tests/browser/features/step_definitions/preferences_appearance_steps.rb:1
136 Then I can select skin Vector # tests/browser/features/step_definitions/preferences_appearance_steps.rb:46
137 And I can select image size # tests/browser/features/step_definitions/preferences_appearance_steps.rb:35
138 And I can select thumbnail size # tests/browser/features/step_definitions/preferences_appearance_steps.rb:56
139 And I can select Threshold for stub link # tests/browser/features/step_definitions/preferences_appearance_steps.rb:52
140 And I can select underline preferences # tests/browser/features/step_definitions/preferences_appearance_steps.rb:60
141 And I have advanced options checkboxes # tests/browser/features/step_definitions/preferences_appearance_steps.rb:64
142 And I can click Save # tests/browser/features/step_definitions/preferences_appearance_steps.rb:9
143 And I can restore default settings # tests/browser/features/step_definitions/preferences_appearance_steps.rb:13
144 And I can select date format # tests/browser/features/step_definitions/preferences_appearance_steps.rb:25
145 And I can see time offset section # tests/browser/features/step_definitions/preferences_appearance_steps.rb:21
146 And I can see local time # tests/browser/features/step_definitions/preferences_appearance_steps.rb:17
147 And I can select my time zone # tests/browser/features/step_definitions/preferences_appearance_steps.rb:39
148
149 Scenario: Preferences Editing # tests/browser/features/preferences.feature:21
150 Given I am logged in # mediawiki_selenium-1.7.0/lib/mediawiki_selenium/step_definitions/login_steps.rb:1
151 The token parameter must be set (createnotoken) (MediawikiApi::ApiError)
152 tests/browser/features/preferences.feature:22:in `Given I am logged in'
153 When I navigate to Preferences # tests/browser/features/step_definitions/preferences_appearance_steps.rb:5
154 And I click Editing # tests/browser/features/step_definitions/preferences_editing_steps.rb:1
155 Then I can select edit area font style # tests/browser/features/step_definitions/preferences_editing_steps.rb:5
156 And I can select section editing via edit links # tests/browser/features/step_definitions/preferences_editing_steps.rb:21
157 And I can select section editing by right clicking # tests/browser/features/step_definitions/preferences_editing_steps.rb:17
158 And I can select section editing by double clicking # tests/browser/features/step_definitions/preferences_editing_steps.rb:13
159 And I can select to prompt me when entering a blank edit summary # tests/browser/features/step_definitions/preferences_editing_steps.rb:37
160 And I can select to warn me when I leave an edit page with unsaved changes # tests/browser/features/step_definitions/preferences_editing_steps.rb:41
161 And I can select show edit toolbar # tests/browser/features/step_definitions/preferences_editing_steps.rb:25
162 And I can select show preview on first edit # tests/browser/features/step_definitions/preferences_editing_steps.rb:33
163 And I can select show preview before edit box # tests/browser/features/step_definitions/preferences_editing_steps.rb:29
164 And I can select live preview # tests/browser/features/step_definitions/preferences_editing_steps.rb:9
165
166 Scenario: Preferences User profile # tests/browser/features/preferences.feature:36
167 Given I am logged in # mediawiki_selenium-1.7.0/lib/mediawiki_selenium/step_definitions/login_steps.rb:1
168 The token parameter must be set (createnotoken) (MediawikiApi::ApiError)
169 tests/browser/features/preferences.feature:37:in `Given I am logged in'
170 When I navigate to Preferences # tests/browser/features/step_definitions/preferences_appearance_steps.rb:5
171 And I click User profile # tests/browser/features/step_definitions/preferences_user_profile_steps.rb:1
172 Then I can see my Basic informations # tests/browser/features/step_definitions/preferences_user_profile_steps.rb:21
173 And I can change my language # tests/browser/features/step_definitions/preferences_user_profile_steps.rb:13
174 And I can change my gender # tests/browser/features/step_definitions/preferences_user_profile_steps.rb:5
175 And I can see my signature # tests/browser/features/step_definitions/preferences_user_profile_steps.rb:29
176 And I can change my signature # tests/browser/features/step_definitions/preferences_user_profile_steps.rb:17
177 And I can see my email # tests/browser/features/step_definitions/preferences_user_profile_steps.rb:25
178 And I can click Save # tests/browser/features/step_definitions/preferences_appearance_steps.rb:9
179 And I can restore default settings # tests/browser/features/step_definitions/preferences_appearance_steps.rb:13
180
181@chrome @firefox @skip @vagrant
182Feature: View History
183
184 Scenario: Edit page and view history # tests/browser/features/view_history.feature:4
185 Given I go to the "History Test Page" page with content "This is a page that will have history" # tests/browser/features/step_definitions/create_and_follow_wiki_link_steps.rb:1
186 The token parameter must be set (createnotoken) (MediawikiApi::ApiError)
187 ./tests/browser/features/step_definitions/create_and_follow_wiki_link_steps.rb:3:in `/^I go to the "(.+)" page with content "(.+)"$/'
188 tests/browser/features/view_history.feature:5:in `Given I go to the "History Test Page" page with content "This is a page that will have history"'
189 When I click Edit # tests/browser/features/step_definitions/edit_page_steps.rb:1
190 And I edit the page with "Edited and a random string" # tests/browser/features/step_definitions/edit_page_steps.rb:13
191 And I save the edit # tests/browser/features/step_definitions/edit_page_steps.rb:17
192 And the edited page content should contain "Edited and a random string" # tests/browser/features/step_definitions/edit_page_steps.rb:21
193 And I click View History # tests/browser/features/step_definitions/view_history_steps.rb:1
194 Then I should see a link to a previous version of the page # tests/browser/features/step_definitions/view_history_steps.rb:5
195
196Failing Scenarios:
197cucumber tests/browser/features/create_and_follow_wiki_link.feature:4 # Scenario: Create Page With Wiki Link
198cucumber tests/browser/features/edit_page.feature:4 # Scenario: Create and edit page
199cucumber tests/browser/features/file.feature:8 # Scenario: Logged-in user goes to file that does not exist
200cucumber tests/browser/features/login.feature:16 # Scenario: Log in without entering password
201cucumber tests/browser/features/login.feature:20 # Scenario: Log in with incorrect username
202cucumber tests/browser/features/login.feature:24 # Scenario: Log in with incorrect password
203cucumber tests/browser/features/login.feature:28 # Scenario: Log in with valid credentials
204cucumber tests/browser/features/preferences.feature:4 # Scenario: Preferences Appearance
205cucumber tests/browser/features/preferences.feature:21 # Scenario: Preferences Editing
206cucumber tests/browser/features/preferences.feature:36 # Scenario: Preferences User profile
207cucumber tests/browser/features/view_history.feature:4 # Scenario: Edit page and view history
208
20920 scenarios (11 failed, 9 passed)
210103 steps (11 failed, 58 skipped, 34 passed)
2111m7.558s

Event Timeline

Sanity check: This sounds exactly like T135884: Make Selenium tests work with AuthManager which is already fixed, do you need to update whatever you're using here?

@Anomie Thanks, I knew I saw that error message before, but I could not find it in phabricator. Now that you have linked to it, I was able to find it via phab search. Probably my search-fu has failed me earlier.

Change 294493 had a related patch set uploaded (by Zfilipin):
Make Selenium tests work with AuthManager

https://gerrit.wikimedia.org/r/294493

Change 294493 merged by jenkins-bot:
Make Selenium tests work with AuthManager

https://gerrit.wikimedia.org/r/294493