Cmcmahon has uploaded a new change for review. https://gerrit.wikimedia.org/r/84772
Change subject: POC for flow browser test ...................................................................... POC for flow browser test Change-Id: I63f593c4b3e694dd97d7273a85dbbb77e972404c --- A features/flow_anon.feature A features/step_definitions/flow_steps.rb A features/support/pages/flow_page.rb 3 files changed, 51 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests refs/changes/72/84772/1 diff --git a/features/flow_anon.feature b/features/flow_anon.feature new file mode 100644 index 0000000..2a2af68 --- /dev/null +++ b/features/flow_anon.feature @@ -0,0 +1,11 @@ +@en.wikipedia.beta.wmflabs.org + +Feature: Math + + Scenario: Add new Flow message + Given I am on Flow page + When I create a Title of Flow Message in Flow new message + And I create a Body of Flow Message into Flow body + And I click New topic save + Then the page should contain Title of Flow Message + And the page should contain Body of Flow Message diff --git a/features/step_definitions/flow_steps.rb b/features/step_definitions/flow_steps.rb new file mode 100644 index 0000000..3b010df --- /dev/null +++ b/features/step_definitions/flow_steps.rb @@ -0,0 +1,27 @@ +Given(/^I am on Flow page$/) do + visit FlowPage +end + +When(/^I create a (.+) in Flow new message$/) do |flow_title| + on(FlowPage) do |page| + page.new_message_title_element.when_present.click + page.new_message_title_element.when_present.send_keys(flow_title + @does_not_exist_page_name) + end +end + +When(/^I create a (.+) into Flow body$/) do |flow_body| + on(FlowPage).new_message_body_element.when_present.send_keys(flow_body + @does_not_exist_page_name) +end + +When(/^I click New topic save$/) do + on(FlowPage).new_topic_save_element.when_present.click +end + +Then(/^the page should contain (.+)$/) do |flow_message| + on(FlowPage) do |page| + page.wait_until(10) do + page.text.include? 'just now' + end + page.flow_body.should match(flow_message+ @does_not_exist_page_name) + end +end diff --git a/features/support/pages/flow_page.rb b/features/support/pages/flow_page.rb new file mode 100644 index 0000000..dc1388d --- /dev/null +++ b/features/support/pages/flow_page.rb @@ -0,0 +1,13 @@ +require 'page-object' + +class FlowPage + include PageObject + + include URL + page_url URL.url('Special:Flow/Sandbox') + + text_area(:new_message_title, name: 'topic_list[topic]') + div(:new_message_body, class: 've-ce-documentNode ve-ce-branchNode') + button(:new_topic_save, class: 'mw-ui-button mw-ui-primary flow-newtopic-submit') + div(:flow_body, class: 'flow-container') +end -- To view, visit https://gerrit.wikimedia.org/r/84772 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I63f593c4b3e694dd97d7273a85dbbb77e972404c Gerrit-PatchSet: 1 Gerrit-Project: qa/browsertests Gerrit-Branch: master Gerrit-Owner: Cmcmahon <cmcma...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits