mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-27 17:01:07 +00:00
Fixed broken Selenium test
The problems was that visual editor is the default editor at en.wikipedia.beta.wmflabs.org, and the test was expecting source editor. The test now works also locally, using mediawiki-vagrant. Removed headers from some files. We no longer use those headers. Removed cucumber tags we no longer use, mostly internet explorer. Added missing dependency (rake) to gemfile. Bug: T126463 Change-Id: Ia5809f40719a2fe0c6c94338072a38765fa5c87b
This commit is contained in:
parent
cc5241530e
commit
11825b9c17
1
Gemfile
1
Gemfile
|
@ -1,4 +1,5 @@
|
|||
source 'https://rubygems.org'
|
||||
|
||||
gem 'mediawiki_selenium', '~> 1.6.5'
|
||||
gem 'rake', '~> 10.5'
|
||||
gem 'rubocop', '~> 0.33.0', require: false
|
||||
|
|
|
@ -63,6 +63,7 @@ GEM
|
|||
ast (>= 1.1, < 3.0)
|
||||
powerpack (0.1.1)
|
||||
rainbow (2.0.0)
|
||||
rake (10.5.0)
|
||||
rest-client (1.8.0)
|
||||
http-cookie (>= 1.0.2, < 2.0)
|
||||
mime-types (>= 1.16, < 3.0)
|
||||
|
@ -98,6 +99,7 @@ PLATFORMS
|
|||
|
||||
DEPENDENCIES
|
||||
mediawiki_selenium (~> 1.6.5)
|
||||
rake (~> 10.5)
|
||||
rubocop (~> 0.33.0)
|
||||
|
||||
BUNDLED WITH
|
||||
|
|
|
@ -1,23 +1,11 @@
|
|||
#
|
||||
# This file is subject to the license terms in the LICENSE file found in the
|
||||
# qa-browsertests top-level directory and at
|
||||
# https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/LICENSE. No part of
|
||||
# qa-browsertests, including this file, may be copied, modified, propagated, or
|
||||
# distributed except according to the terms contained in the LICENSE file.
|
||||
#
|
||||
# Copyright 2012-2014 by the Mediawiki developers. See the CREDITS file in the
|
||||
# qa-browsertests top-level directory and at
|
||||
# https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/CREDITS
|
||||
#
|
||||
@chrome @en.wikipedia.beta.wmflabs.org @firefox @internet_explorer_6 @internet_explorer_7 @internet_explorer_8 @internet_explorer_9 @internet_explorer_10 @login @phantomjs @test2.wikipedia.org
|
||||
@chrome @en.wikipedia.beta.wmflabs.org @firefox @login
|
||||
Feature: Math
|
||||
|
||||
Scenario: Display simple math
|
||||
Given I am logged in
|
||||
And I am at page that does not exist
|
||||
When I click link Create
|
||||
And I type <math>3 + 2</math>
|
||||
And I am creating a page with source editor
|
||||
When I type <math>3 + 2</math>
|
||||
And I click Preview
|
||||
Then the page should contain an img tag
|
||||
And alt for that img should be 3 + 2
|
||||
And src for that img should come from //upload
|
||||
And src for that img should contain /math/
|
||||
|
|
|
@ -1,16 +1,4 @@
|
|||
#
|
||||
# This file is subject to the license terms in the LICENSE file found in the
|
||||
# qa-browsertests top-level directory and at
|
||||
# https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/LICENSE. No part of
|
||||
# qa-browsertests, including this file, may be copied, modified, propagated, or
|
||||
# distributed except according to the terms contained in the LICENSE file.
|
||||
#
|
||||
# Copyright 2012-2014 by the Mediawiki developers. See the CREDITS file in the
|
||||
# qa-browsertests top-level directory and at
|
||||
# https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/CREDITS
|
||||
#
|
||||
|
||||
Given(/^I am at page that does not exist$/) do
|
||||
Given(/^I am creating a page with source editor$/) do
|
||||
visit(DoesNotExistPage, using_params: { page_name: @random_string })
|
||||
end
|
||||
|
||||
|
@ -30,11 +18,10 @@ Then(/^alt for that img should be (.+)$/) do |alt|
|
|||
expect(on(EditPage).math_image_element.element.alt).to eq(alt)
|
||||
end
|
||||
|
||||
Then(/^src for that img should come from (.+)$/) do |src|
|
||||
Then(/^src for that img should contain (.+)$/) do |src|
|
||||
expect(on(EditPage).math_image_element.element.src).to match Regexp.escape src
|
||||
end
|
||||
|
||||
|
||||
Then(/^the page should contain an img tag$/) do
|
||||
expect(on(EditPage).math_image_element.when_present).to be_visible
|
||||
end
|
||||
|
|
|
@ -1,18 +1,5 @@
|
|||
#
|
||||
# This file is subject to the license terms in the LICENSE file found in the
|
||||
# qa-browsertests top-level directory and at
|
||||
# https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/LICENSE. No part of
|
||||
# qa-browsertests, including this file, may be copied, modified, propagated, or
|
||||
# distributed except according to the terms contained in the LICENSE file.
|
||||
#
|
||||
# Copyright 2012-2014 by the Mediawiki developers. See the CREDITS file in the
|
||||
# qa-browsertests top-level directory and at
|
||||
# https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/CREDITS
|
||||
#
|
||||
class DoesNotExistPage
|
||||
include PageObject
|
||||
|
||||
page_url '<%=params[:page_name]%>'
|
||||
|
||||
a(:action_edit, css: 'li#ca-edit > span > a')
|
||||
page_url '<%=params[:page_name]%>?action=edit'
|
||||
end
|
||||
|
|
|
@ -1,14 +1,3 @@
|
|||
#
|
||||
# This file is subject to the license terms in the LICENSE file found in the
|
||||
# qa-browsertests top-level directory and at
|
||||
# https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/LICENSE. No part of
|
||||
# qa-browsertests, including this file, may be copied, modified, propagated, or
|
||||
# distributed except according to the terms contained in the LICENSE file.
|
||||
#
|
||||
# Copyright 2012-2014 by the Mediawiki developers. See the CREDITS file in the
|
||||
# qa-browsertests top-level directory and at
|
||||
# https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/CREDITS
|
||||
#
|
||||
class EditPage
|
||||
include PageObject
|
||||
|
||||
|
|
Loading…
Reference in a new issue