Merge "[browser test] use ?veaction=edit to avoid login where feasible"

This commit is contained in:
jenkins-bot 2014-04-29 14:28:40 +00:00 committed by Gerrit Code Review
commit 92ab03535a
5 changed files with 14 additions and 10 deletions

View file

@ -2,8 +2,7 @@
Feature: VisualEditor cursor Feature: VisualEditor cursor
Background: Background:
Given I am logged in Given I am at the cursor test page
And I am at the cursor test page
And I click Edit for VisualEditor And I click Edit for VisualEditor
Scenario Outline: show hover icons Scenario Outline: show hover icons

View file

@ -1,5 +1,5 @@
# encoding: UTF-8 # encoding: UTF-8
@edit_user_page @en.wikipedia.beta.wmflabs.org @firefox @login @test2.wikipedia.org @edit_user_page_login @en.wikipedia.beta.wmflabs.org @firefox @login @test2.wikipedia.org
Feature: VisualEditor multi-edit workflow Feature: VisualEditor multi-edit workflow
Goal of the test is to make sure the "Save" and "Review Changes" Goal of the test is to make sure the "Save" and "Review Changes"

View file

@ -37,8 +37,6 @@ end
When(/^I edit the page with (.+)$/) do |input_string| When(/^I edit the page with (.+)$/) do |input_string|
on(VisualEditorPage) do |page| on(VisualEditorPage) do |page|
page.edit_ve_element.when_present.click
# no longer need to dismiss beta warning here https://gerrit.wikimedia.org/r/#/c/119217/
page.content_element.when_present(10).fire_event("onfocus") page.content_element.when_present(10).fire_event("onfocus")
page.content_element.when_present.send_keys(input_string + " #{@random_string} ") page.content_element.when_present.send_keys(input_string + " #{@random_string} ")
end end
@ -46,8 +44,8 @@ end
When(/^I click Return to save form$/) do When(/^I click Return to save form$/) do
on(VisualEditorPage) do |page| on(VisualEditorPage) do |page|
page.diff_view_element.when_present page.diff_view_element.when_present(10)
page.return_to_save_element.when_present.click page.return_to_save_element.when_present(10).click
end end
end end

View file

@ -4,6 +4,15 @@ end
#This is for the Headings test #This is for the Headings test
Before("@edit_user_page") do Before("@edit_user_page") do
if (!$edit_user_page or !(ENV["REUSE_BROWSER"] == "true")) and @browser
step "I am at my user page"
step "I edit the page with Editing with"
$edit_user_page=true
end
end
#This is for the multiedit test
Before("@edit_user_page_login") do
if (!$edit_user_page or !(ENV["REUSE_BROWSER"] == "true")) and @browser if (!$edit_user_page or !(ENV["REUSE_BROWSER"] == "true")) and @browser
step "I am logged in" step "I am logged in"
step "I am at my user page" step "I am at my user page"
@ -15,9 +24,7 @@ end
#This is for the bullets, indent-outdent, and the General Markup tests #This is for the bullets, indent-outdent, and the General Markup tests
Before("@make_selectable_line") do Before("@make_selectable_line") do
if (!$make_selectable_line or !(ENV["REUSE_BROWSER"] == "true")) and @browser if (!$make_selectable_line or !(ENV["REUSE_BROWSER"] == "true")) and @browser
step "I am logged in"
step "I am at my user page" step "I am at my user page"
step "I click Edit for VisualEditor"
step "I type in an input string" step "I type in an input string"
step "select the string" step "select the string"
$make_selectable_line=true $make_selectable_line=true

View file

@ -2,7 +2,7 @@ class VisualEditorPage
include PageObject include PageObject
include URL include URL
page_url URL.url("User:#{ENV['MEDIAWIKI_USER']}/#{ENV['BROWSER']}?vehidebetadialog=true") page_url URL.url("User:#{ENV['MEDIAWIKI_USER']}/#{ENV['BROWSER']}?vehidebetadialog=true&veaction=edit")
div(:container_disabled, class: "oo-ui-widget oo-ui-widget-disabled oo-ui-flaggableElement-constructive oo-ui-.oo-ui-buttonedElement-framed") div(:container_disabled, class: "oo-ui-widget oo-ui-widget-disabled oo-ui-flaggableElement-constructive oo-ui-.oo-ui-buttonedElement-framed")
div(:content, class: "ve-ce-documentNode ve-ce-branchNode") div(:content, class: "ve-ce-documentNode ve-ce-branchNode")