mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-26 19:56:49 +00:00
[BrowserTest] [WIP]Fixing the test media_general_settings.feature
Change-Id: Ic83477f12db08ed25452f19ca3dc410940a8ebf5
This commit is contained in:
parent
d3206394da
commit
cefb9b265a
|
@ -84,6 +84,7 @@ Feature: VisualEditor Cite
|
|||
Then I should see the VisualEditor interface
|
||||
And I should see the Options use this group text
|
||||
And I should see the General references
|
||||
#And I fill in General references
|
||||
|
||||
Scenario: Error message for required field not present
|
||||
When I click Journal
|
||||
|
|
|
@ -5,9 +5,9 @@ Feature: VisualEditor Media Interface
|
|||
Given I go to the "Media Interface VisualEditor Test" page with content "Media Interface VisualEditor Test"
|
||||
And I click in the editable part
|
||||
|
||||
Scenario Outline: VisualEditor insert new media
|
||||
Scenario: VisualEditor insert new media
|
||||
Given I click Media
|
||||
And I enter <search_term> into media Search box
|
||||
And I enter bug into media Search box
|
||||
And I select an Image
|
||||
And I click Use this image
|
||||
And I fill up the Caption field with "caption"
|
||||
|
@ -15,8 +15,4 @@ Feature: VisualEditor Media Interface
|
|||
And I click Insert
|
||||
And I click Save page
|
||||
And I click Review your changes
|
||||
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 |
|
||||
| duck | [[File:Ducks take off 444 720p25.ogg\|alt=alt text\|thumb\|caption]] |
|
||||
Then diff view should show media file with caption and alt text
|
||||
|
|
|
@ -17,4 +17,4 @@ Feature: VisualEditor Media Interface
|
|||
And I can click the X on the media save box
|
||||
Examples:
|
||||
| search_term | expected_markup_text |
|
||||
| bug | [[File:Folgers.ogv\|thumb]] |
|
||||
| bug | [[File:Folgers.ogv\|thughmb]] |
|
||||
|
|
|
@ -1,7 +1,16 @@
|
|||
Given(/^I fill up the Caption field with "(.*?)"$/) do |first_string|
|
||||
on(VisualEditorPage).caption_element.when_present.send_keys (first_string)
|
||||
Given(/^I fill up the Caption field with "(.*?)"$/) do |caption_text|
|
||||
on(VisualEditorPage).caption_element.when_present.send_keys caption_text
|
||||
end
|
||||
|
||||
Given(/^I fill up the Alternative text with "(.*?)"$/) do |second_string|
|
||||
on(VisualEditorPage).alternative_text_element.when_present.send_keys (second_string)
|
||||
Given(/^I fill up the Alternative text with "(.*?)"$/) do |alt_text|
|
||||
on(VisualEditorPage).alternative_text_element.when_present.send_keys alt_text
|
||||
end
|
||||
|
||||
Then(/^diff view should show media file with caption and alt text$/) do
|
||||
on(VisualEditorPage) do |page|
|
||||
page.wait_until(15) do
|
||||
page.diff_view_element.exists?
|
||||
end
|
||||
expect(page.diff_view).to match /\[\[File:A Bug.JPG\|alt=alt text\|thumb\|caption\]\]/
|
||||
end
|
||||
end
|
||||
|
|
|
@ -24,7 +24,7 @@ class VisualEditorPage
|
|||
a(:cite_book, css: '.oo-ui-tool-name-cite-book > a:nth-child(1)')
|
||||
span(:cite_button, css: '.ve-test-toolbar-cite .oo-ui-labelElement-label')
|
||||
text_field(:cite_custom_field_name, css: '.oo-ui-searchWidget-query > div:nth-child(1) > input:nth-child(1)')
|
||||
div(:cite_group_name_textarea, class: 'oo-ui-widget oo-ui-widget-enabled oo-ui-inputWidget oo-ui-indicatorElement oo-ui-textInputWidget')
|
||||
div(:cite_group_name_textarea, css: '.ve-ui-mwReferenceGroupInputWidget .oo-ui-indicatorElement:nth-child(1) > input')
|
||||
a(:cite_journal, css: '.oo-ui-tool-name-cite-journal > a:nth-child(1)')
|
||||
span(:cite_indicator_down, css: '.ve-test-toolbar-cite .oo-ui-indicator-down')
|
||||
div(:cite_new_field_label, css: '.oo-ui-optionWidget')
|
||||
|
@ -44,7 +44,7 @@ class VisualEditorPage
|
|||
div(:content, class: 've-ce-branchNode')
|
||||
span(:decrease_indentation, class: 'oo-ui-iconElement-icon oo-ui-icon-outdent-list')
|
||||
text_area(:describe_change, index: 0)
|
||||
div(:diff_view, class: 've-ui-mwSaveDialog-viewer')
|
||||
table(:diff_view, css: '.ve-ui-mwSaveDialog-viewer table.diff')
|
||||
div(:disabled_save_button, css: 'div.ve-init-mw-viewPageTarget-toolbar-actions > div.oo-ui-flaggedElement-progressive.oo-ui-widget-disabled')
|
||||
text_field(:display_title_textbox, css: 'div.oo-ui-fieldLayout-align-inline:nth-child(4) > label:nth-child(1) > div:nth-child(1) > div:nth-child(1) > input:nth-child(1)')
|
||||
div(:enable_redirect, class: 've-test-page-settings-enable-redirect')
|
||||
|
@ -92,8 +92,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)')
|
||||
div(:caption, css: 'div.ve-ui-surface:nth-child(2) > div:nth-child(1) > div.ve-ce-documentNode.ve-ce-branchNode')
|
||||
text_field(:alternative_text, css: '.oo-ui-textInputWidget.ve-ui-mwMediaDialog-altText > input')
|
||||
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