Change-Id: I19a7f708825d5f11859d8ea70db4cdde752df26c
| Special:CreateAccount |
| Special:UserLogin/signup |
| Special:UserLogin?type=signup |
+
+ Scenario: If no username is entered then an error is displayed
+ Given I go to Create account page at Special:CreateAccount
+ When I submit the form
+ Then an error message is displayed
Then(/^form has Create account button$/) do
expect(on(CreateAccountPage).create_account_element).to exist
end
+
+When(/^I submit the form$/) do
+ on(CreateAccountPage).create_account
+end
+
+Then(/^an error message is displayed$/) do
+ expect(on(CreateAccountPage).error_message_element.class_name).to eq "errorbox"
+end
page_url '<%=params[:page_title]%>'
button(:create_account, id: 'wpCreateaccount')
+ div(:error_message, id: 'mw-createacct-status-area')
end