diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2015-12-17 09:15:42 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2015-12-17 09:44:51 +0100 |
commit | a1789ddde42033f1b05cc4929491214ee6e79383 (patch) | |
tree | 63615735c4ddffaaabf2428946bb26f90899f7bf /tests/browser/features | |
parent | 9e06a62f265e3a2aaabecc598d4bc617e06fa32d (diff) |
Update to MediaWiki 1.26.0
Diffstat (limited to 'tests/browser/features')
6 files changed, 20 insertions, 6 deletions
diff --git a/tests/browser/features/create_account.feature b/tests/browser/features/create_account.feature index 0b4e83a5..35df8b4b 100644 --- a/tests/browser/features/create_account.feature +++ b/tests/browser/features/create_account.feature @@ -10,3 +10,8 @@ Feature: Create account | 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 diff --git a/tests/browser/features/step_definitions/create_account_steps.rb b/tests/browser/features/step_definitions/create_account_steps.rb index 03bff66f..98e0f2cb 100644 --- a/tests/browser/features/step_definitions/create_account_steps.rb +++ b/tests/browser/features/step_definitions/create_account_steps.rb @@ -16,3 +16,11 @@ end 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 diff --git a/tests/browser/features/support/pages/create_account_page.rb b/tests/browser/features/support/pages/create_account_page.rb index 98b893a6..9aa00cd2 100644 --- a/tests/browser/features/support/pages/create_account_page.rb +++ b/tests/browser/features/support/pages/create_account_page.rb @@ -15,4 +15,5 @@ class CreateAccountPage page_url '<%=params[:page_title]%>' button(:create_account, id: 'wpCreateaccount') + div(:error_message, id: 'mw-createacct-status-area') end diff --git a/tests/browser/features/support/pages/main_page.rb b/tests/browser/features/support/pages/main_page.rb index 6d76b01c..3092ab5c 100644 --- a/tests/browser/features/support/pages/main_page.rb +++ b/tests/browser/features/support/pages/main_page.rb @@ -3,16 +3,16 @@ class MainPage page_url '' - a(:edit_link, href: /action=edit/) + a(:edit_link, css: '#ca-edit a') li(:help_link, id: 'n-help') div(:page_content, id: 'content') li(:page_information_link, id: 't-info') li(:permanent_link_link, id: 't-permalink') - a(:printable_version_link, href: /printable=yes/) + a(:printable_version_link, css: '#t-print a') li(:random_page_link, id: 'n-randompage') li(:recent_changes_link, id: 'n-recentchanges') li(:related_changes_link, id: 't-recentchangeslinked') li(:special_pages_link, id: 't-specialpages') - a(:view_history_link, href: /action=history/) + a(:view_history_link, css: '#ca-history a') li(:what_links_here_link, id: 't-whatlinkshere') end diff --git a/tests/browser/features/support/pages/preferences_appearance_page.rb b/tests/browser/features/support/pages/preferences_appearance_page.rb index 83c3952f..1e5ffaa1 100644 --- a/tests/browser/features/support/pages/preferences_appearance_page.rb +++ b/tests/browser/features/support/pages/preferences_appearance_page.rb @@ -27,7 +27,7 @@ class PreferencesAppearancePage radio_button(:monobook, id: 'mw-input-wpskin-monobook') radio_button(:no_preference_radio, id: 'mw-input-wpdate-default') text_field(:other_offset, id: 'mw-input-wptimecorrection-other') - a(:restore_default_link, href: /reset/) + a(:restore_default_link, id: 'mw-prefs-restoreprefs') select_list(:size_select, id: 'mw-input-wpimagesize') select_list(:threshold_select, id: 'mw-input-wpstubthreshold') select_list(:time_offset_select, id: 'mw-input-wptimecorrection') diff --git a/tests/browser/features/support/pages/view_history_page.rb b/tests/browser/features/support/pages/view_history_page.rb index bb9c5862..ee4d757a 100644 --- a/tests/browser/features/support/pages/view_history_page.rb +++ b/tests/browser/features/support/pages/view_history_page.rb @@ -1,6 +1,6 @@ class ViewHistoryPage include PageObject - a(:view_history_link, href: /action=history/) - a(:old_version_link, href: /oldid=/) + a(:view_history_link, css: '#ca-history a') + a(:old_version_link, css: '#pagehistory a.mw-changeslist-date') end |