Merge "Drop beta feature step testing in browser tests"

This commit is contained in:
jenkins-bot 2017-10-17 18:36:52 +00:00 committed by Gerrit Code Review
commit 0a0fe3d98c
5 changed files with 1 additions and 35 deletions

View file

@ -1,4 +1,3 @@
<?php
$wgPopupsBetaFeature = true;
$wgUsejQueryThree = false;

View file

@ -1,9 +1,7 @@
@chrome @en.m.wikipedia.beta.wmflabs.org @firefox @test2.m.wikipedia.org @vagrant @integration
Feature: Previews
Background:
Given I am logged in
And I have enabled the beta feature
And I am on the test page
Given I am on the test page
Scenario: Dwelling on a valid link shows a preview
When I dwell on the first valid link

View file

@ -8,11 +8,4 @@ class ArticlePage
div(:page_header, css: '#mw-head')
a(:first_valid_link, css: 'ul a', index: 0)
div(:hovercard, css: '.mwe-popups')
a(:settings_icon, css: '.mwe-popups-settings-icon')
radio(:enable_previews_radio, id: 'mwe-popups-settings-simple')
radio(:disable_previews_radio, id: 'mwe-popups-settings-off')
div(:cancel_settings_button, css: '#mwe-popups-settings .close', index: 0)
button(:save_settings_button, css: '#mwe-popups-settings .save')
button(:settings_help_ok_button, css: '#mwe-popups-settings .okay', index: 0)
a(:last_link_in_the_footer, css: '#footer-places a', index: -1)
end

View file

@ -1,20 +0,0 @@
class SpecialPreferencesPage
include PageObject
page_url 'Special:Preferences'
a(:beta_features_tab, css: '#preftab-betafeatures')
text_field(:page_previews_checkbox, css: '[name=wppopups]')
button(:submit_button, css: '#prefcontrol')
div(:notification, css: ".mw-notification")
def enable_page_previews
beta_features_tab_element.when_present.click
return unless page_previews_checkbox_element.attribute('checked').nil?
page_previews_checkbox_element.click
submit_button_element.when_present.click
# Note well that Element#wait_until_present is more semantic but is
# deprecated. Fortunately, #when_present simply wraps #wait_until_present.
notification_element.when_present
end
end

View file

@ -1,9 +1,5 @@
TEST_PAGE_TITLE = 'Popups test page'
Given(/^I have enabled the beta feature$/) do
visit(SpecialPreferencesPage).enable_page_previews
end
Given(/^I am on the test page$/) do
api.create_page TEST_PAGE_TITLE, File.read('fixtures/test_page.wikitext')