Sbisson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/236013

Change subject: Browser tests: Special:EnableFlow without header
......................................................................

Browser tests: Special:EnableFlow without header

* Don't set custom header by default since it is
  not required anymore.

* Test explicitely that a custom header can be
  provided and that it ends up in the Flow
  board description.

Change-Id: Ib2b5a26cd82fd9aaec79ffaba2954f0eb60b7550
---
M tests/browser/features/special_enableflow.feature
M tests/browser/features/step_definitions/special_enable_flow_steps.rb
2 files changed, 23 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/13/236013/1

diff --git a/tests/browser/features/special_enableflow.feature 
b/tests/browser/features/special_enableflow.feature
index d291475..d842512 100644
--- a/tests/browser/features/special_enableflow.feature
+++ b/tests/browser/features/special_enableflow.feature
@@ -16,6 +16,13 @@
     And I click on the new Flow board link
     And The page I am on is a Flow board
 
+  Scenario: Enabling a new Flow page with a custom header
+    When I enable a new Flow board with a custom header
+    Then I get confirmation for enabling a new Flow board
+    And I click on the new Flow board link
+    And The page I am on is a Flow board
+    And I see the custom header
+
   Scenario: Enabling a Flow page on existing page
     Given I have an existing talk page
     When I enable a new Flow board on the talk page
diff --git 
a/tests/browser/features/step_definitions/special_enable_flow_steps.rb 
b/tests/browser/features/step_definitions/special_enable_flow_steps.rb
index fedffcb..a3addbe 100644
--- a/tests/browser/features/step_definitions/special_enable_flow_steps.rb
+++ b/tests/browser/features/step_definitions/special_enable_flow_steps.rb
@@ -19,7 +19,16 @@
 When(/^I enable a new Flow board on article (.*?)$/) do |article|
   on(EnableFlowPage) do |page|
     page.page_name_element.when_present.send_keys article
-    page.page_header_element.when_present.send_keys 'header'
+    page.submit
+  end
+end
+
+When(/^I enable a new Flow board with a custom header$/) do
+  @new_board_page = @data_manager.get_talk 'Test_Random_Board'
+  @custom_header = @data_manager.get 'custom header'
+  on(EnableFlowPage) do |page|
+    page.page_name_element.when_present.send_keys @new_board_page
+    page.page_header_element.when_present.send_keys @custom_header
     page.submit
   end
 end
@@ -50,3 +59,9 @@
 Then(/^The archive contains the original text$/) do
   
expect(on(SpecialConversionFlowArchivePage).content_element.when_present.text).to
 match('Some wikitext here.')
 end
+
+Then(/^I see the custom header$/) do
+  on(AbstractFlowPage) do |page|
+    page.description.content_element.when_present.text.should match 
@custom_header
+  end
+end

-- 
To view, visit https://gerrit.wikimedia.org/r/236013
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib2b5a26cd82fd9aaec79ffaba2954f0eb60b7550
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Sbisson <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to