From b62359f6f676199ec50f2b9df069c13d472e1d7d Mon Sep 17 00:00:00 2001 From: cmcmahon Date: Wed, 7 May 2014 13:26:56 -0700 Subject: [PATCH] [browser test] Refactor Headings test to use the API Re-enable this to run on Chrome also Change-Id: Ia73778be44629a27a0ee4e3cde94f7fe2c2bf46e --- .../test/browser/features/headings.feature | 23 +++++++++++-------- .../features/step_definitions/shared_steps.rb | 2 +- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/modules/ve-mw/test/browser/features/headings.feature b/modules/ve-mw/test/browser/features/headings.feature index b780ffbad1..73286e6859 100644 --- a/modules/ve-mw/test/browser/features/headings.feature +++ b/modules/ve-mw/test/browser/features/headings.feature @@ -1,6 +1,10 @@ -@edit_user_page @firefox @login +@chrome @firefox @login Feature: VisualEditor Headings + Background: + Given I go to the "Headings VisualEditor Test" page with content "Headings VisualEditor Test" + And I make the text "Headings VisualEditor Test" be selected + Scenario Outline: Cycle through headings values When I click the down arrow on Headings interface And I click @@ -9,12 +13,11 @@ Feature: VisualEditor Headings Then should appear in the diff view And I can click the X on the save box Examples: - | headings_interface_name | headings_string | - | Paragraph | "^Editing" | - | Heading | "^== Editing" | - | Subheading1 | "^=== Editing" | - | Subheading2 | "^==== Editing" | - | Subheading3 | "^===== Editing" | - | Subheading4 | "^====== Editing" | - | Preformatted | " Editing" | - | Page title | "^= Editing" | + | headings_interface_name | headings_string | + | Heading | "^== Headings VisualEditor Test" | + | Subheading1 | "^=== Headings VisualEditor Test" | + | Subheading2 | "^==== Headings VisualEditor Test" | + | Subheading3 | "^===== Headings VisualEditor Test" | + | Subheading4 | "^====== Headings VisualEditor Test" | + | Preformatted | " Headings VisualEditor Test" | + | Page title | "^= Headings VisualEditor Test" | diff --git a/modules/ve-mw/test/browser/features/step_definitions/shared_steps.rb b/modules/ve-mw/test/browser/features/step_definitions/shared_steps.rb index 82c4d8be59..96456dc687 100644 --- a/modules/ve-mw/test/browser/features/step_definitions/shared_steps.rb +++ b/modules/ve-mw/test/browser/features/step_definitions/shared_steps.rb @@ -68,7 +68,7 @@ When(/^I click Return to save form$/) do end When(/^I click Review your changes$/) do - on(VisualEditorPage).review_changes_element.when_present.click + on(VisualEditorPage).review_changes_element.when_present(10).click end When(/^I edit the description of the change$/) do