jenkins-bot has submitted this change and it was merged. Change subject: [BrowserTest] hygiene changes ......................................................................
[BrowserTest] hygiene changes * alphabetize headings steps * move diff view check to shared_steps.rb Change-Id: I68ac8de2f67a61bdd50f4892f58368e1bbd71271 --- M modules/ve-mw/tests/browser/features/step_definitions/headings_steps.rb M modules/ve-mw/tests/browser/features/step_definitions/shared_steps.rb 2 files changed, 23 insertions(+), 23 deletions(-) Approvals: Cmcmahon: Looks good to me, approved Zfilipin: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/tests/browser/features/step_definitions/headings_steps.rb b/modules/ve-mw/tests/browser/features/step_definitions/headings_steps.rb index 0083891..127470d 100644 --- a/modules/ve-mw/tests/browser/features/step_definitions/headings_steps.rb +++ b/modules/ve-mw/tests/browser/features/step_definitions/headings_steps.rb @@ -1,26 +1,17 @@ -When(/^I click the down arrow on Headings interface$/) do - on(VisualEditorPage).downarrow_element.when_present.click +When(/^I click Heading$/) do + on(VisualEditorPage).heading_element.when_present.click +end + +When(/^I click Page title$/) do + on(VisualEditorPage).page_title_element.when_present.click end When(/^I click Paragraph$/) do on(VisualEditorPage).paragraph_element.when_present.click end -Then(/^(.+) should appear in the diff view$/) do |headings_string| - on(VisualEditorPage) do |page| - # Contents pulled from the Cucumber tables in the .feature are escaped regexes. - # In this case we want unescaped regexes (and in one case a leading space) - # So we put single quotes around the entries in the .feature file and strip them here to get unescaped regexes. - headings_string = headings_string.gsub(/"/, "") - page.wait_until(10) do - page.diff_view.include? "Your text" - end - page.diff_view.should match Regexp.new(headings_string) - end -end - -When(/^I click Heading$/) do - on(VisualEditorPage).heading_element.when_present.click +When(/^I click Preformatted$/) do + on(VisualEditorPage).preformatted_element.when_present.click end When(/^I click Subheading1$/) do @@ -39,10 +30,6 @@ on(VisualEditorPage).subheading4_element.when_present.click end -When(/^I click Preformatted$/) do - on(VisualEditorPage).preformatted_element.when_present.click -end - - When(/^I click Page title$/) do - on(VisualEditorPage).page_title_element.when_present.click +When(/^I click the down arrow on Headings interface$/) do + on(VisualEditorPage).downarrow_element.when_present.click end diff --git a/modules/ve-mw/tests/browser/features/step_definitions/shared_steps.rb b/modules/ve-mw/tests/browser/features/step_definitions/shared_steps.rb index 7e619d7..dbb03a2 100644 --- a/modules/ve-mw/tests/browser/features/step_definitions/shared_steps.rb +++ b/modules/ve-mw/tests/browser/features/step_definitions/shared_steps.rb @@ -103,3 +103,16 @@ Then(/^I can click Cancel save$/) do on(VisualEditorPage).confirm_switch_cancel_element.when_present.click end + +Then(/^(.+) should appear in the diff view$/) do |headings_string| + on(VisualEditorPage) do |page| + # Contents pulled from the Cucumber tables in the .feature are escaped regexes. + # In this case we want unescaped regexes (and in one case a leading space) + # So we put single quotes around the entries in the .feature file and strip them here to get unescaped regexes. + headings_string = headings_string.gsub(/"/, "") + page.wait_until(10) do + page.diff_view.include? "Your text" + end + page.diff_view.should match Regexp.new(headings_string) + end +end -- To view, visit https://gerrit.wikimedia.org/r/173023 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I68ac8de2f67a61bdd50f4892f58368e1bbd71271 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Cmcmahon <[email protected]> Gerrit-Reviewer: Cmcmahon <[email protected]> Gerrit-Reviewer: Zfilipin <[email protected]> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
