mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-25 19:26:46 +00:00
Merge "[browser test] Refactor markup test to use API"
This commit is contained in:
commit
74faf0d2de
|
@ -1,6 +1,10 @@
|
|||
@en.wikipedia.beta.wmflabs.org @firefox @login @make_selectable_line @test2.wikipedia.org
|
||||
@en.wikipedia.beta.wmflabs.org @firefox @login @test2.wikipedia.org
|
||||
Feature: VisualEditor general text markup features
|
||||
|
||||
Background:
|
||||
Given I go to the "General Markup VisualEditor Test" page with content "General Markup VisualEditor Test"
|
||||
And I make the text "General Markup VisualEditor Test" be selected
|
||||
|
||||
Scenario Outline: VisualEditor general markup
|
||||
When I click the text style menu
|
||||
And I click the <type_of_markup> menu option
|
||||
|
@ -10,10 +14,10 @@ Feature: VisualEditor general text markup features
|
|||
And I can click the X on the save box
|
||||
Examples:
|
||||
| type_of_markup | expected_markup_text |
|
||||
| Bold | '''This is a new line''' |
|
||||
| Computer Code | <code>This is a new line</code> |
|
||||
| Italics | ''This is a new line'' |
|
||||
| Strikethrough | <s>This is a new line</s> |
|
||||
| Subscript | <sub>This is a new line</sub> |
|
||||
| Superscript | <sup>This is a new line</sup> |
|
||||
| Underline | <u>This is a new line</u> |
|
||||
| Bold | '''General Markup VisualEditor Test''' |
|
||||
| Computer Code | <code>General Markup VisualEditor Test</code> |
|
||||
| Italics | ''General Markup VisualEditor Test'' |
|
||||
| Strikethrough | <s>General Markup VisualEditor Test</s> |
|
||||
| Subscript | <sub>General Markup VisualEditor Test</sub> |
|
||||
| Superscript | <sup>General Markup VisualEditor Test</sup> |
|
||||
| Underline | <u>General Markup VisualEditor Test</u> |
|
|
@ -1,8 +1,3 @@
|
|||
Given(/^I go to the "(.+)" page with content "(.+)"$/) do |page_title, page_content|
|
||||
@wikitext = page_content
|
||||
on(APIPage).create page_title, page_content
|
||||
step "I am on the #{page_title} page"
|
||||
end
|
||||
|
||||
Given(/^I close the VE information window$/) do
|
||||
pending # express the regexp above with the code you wish you had
|
||||
|
|
|
@ -7,6 +7,12 @@ Given(/^I am on the (.+) page$/) do |article|
|
|||
visit(ZtargetPage, :using_params => {:article_name => article})
|
||||
end
|
||||
|
||||
Given(/^I go to the "(.+)" page with content "(.+)"$/) do |page_title, page_content|
|
||||
@wikitext = page_content
|
||||
on(APIPage).create page_title, page_content
|
||||
step "I am on the #{page_title} page"
|
||||
end
|
||||
|
||||
Given(/^I make the text "(.*?)" be selected$/) do |select_text|
|
||||
on(VisualEditorPage).content_element.when_present.click
|
||||
require "watir-webdriver/extensions/select_text"
|
||||
|
|
Loading…
Reference in a new issue