mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-27 04:06:51 +00:00
Merge "[BrowserTest] Test for checking General Settings for media"
This commit is contained in:
commit
82784d2217
|
@ -10,18 +10,13 @@ Feature: VisualEditor Media Interface
|
|||
And I enter <search_term> into media Search box
|
||||
And I select an Image
|
||||
And I click Use this image
|
||||
|
||||
When I fill in the text area for caption with "caption"
|
||||
And I fill in the test area for alternative text with "alt text"
|
||||
And I click "Insert"
|
||||
And I fill up the Caption field with "caption"
|
||||
And I fill up the Alternative text with "alt text"
|
||||
And I click Insert
|
||||
And I click Save page
|
||||
And I click Review your changes
|
||||
Then diff view should show proper caption and alt text
|
||||
|
||||
|
||||
|
||||
Then <expected_markup_text> should appear in the media diff view
|
||||
And I can click the X on the media save box
|
||||
Examples:
|
||||
| search_term | expected_markup_text |
|
||||
| San Francisco | [[File:California county map (San Francisco County highlighted).svg\|thumb\|150x150px]] |
|
||||
| Flash video | [[File:Flash video file icon.png\|thumb\|32x32px]] |
|
||||
| cunfrunti | [[File:Cunfrunti.mpg.OGG\|thumb\|183x183px]] |
|
||||
| search_term | expected_markup_text |
|
||||
| duck | [[File:Ducks take off 444 720p25.ogg\|alt=alt text\|thumb\|caption]] |
|
|
@ -0,0 +1,7 @@
|
|||
Given(/^I fill up the Caption field with "(.*?)"$/) do |first_string|
|
||||
on(VisualEditorPage).caption_element.when_present.send_keys (first_string)
|
||||
end
|
||||
|
||||
Given(/^I fill up the Alternative text with "(.*?)"$/) do |second_string|
|
||||
on(VisualEditorPage).alternative_text_element.when_present.send_keys (second_string)
|
||||
end
|
|
@ -90,6 +90,8 @@ class VisualEditorPage
|
|||
div(:medium_dialog, class: 'oo-ui-window oo-ui-dialog oo-ui-dialog-open oo-ui-dialog-medium')
|
||||
span(:use_image_button, css: '.oo-ui-processDialog-actions-primary > div:nth-child(1) > a:nth-child(1) > span:nth-child(2)')
|
||||
span(:media_insert_button, css: '.oo-ui-flaggedElement-constructive > a:nth-child(1) > span:nth-child(2)')
|
||||
div(:caption, css: 'div.ve-ui-surface:nth-child(2)')
|
||||
div(:alternative_text, css: 'div.oo-ui-inputWidget:nth-child(4)')
|
||||
checkbox(:minor_edit, id: 'wpMinoredit')
|
||||
div(:no_unused_fields, text: 'No unused fields')
|
||||
a(:new_link, class: 've-ce-linkAnnotation ve-ce-mwInternalLinkAnnotation new')
|
||||
|
|
Loading…
Reference in a new issue