jenkins-bot has submitted this change and it was merged.
Change subject: QA: Fix "Cancelling reply preview" browser test
......................................................................
QA: Fix "Cancelling reply preview" browser test
Now that bug 69412 is fixed, the test can work.
The preview warning CSS changed, and there's a Keep editing step.
Should work in all browsers, so adjust the annotations.
Change-Id: I857989dc11e9dac4e2fec534989afc8807e57deb
---
M tests/browser/features/reply.feature
M tests/browser/features/step_definitions/reply_steps.rb
M tests/browser/features/support/pages/flow_page.rb
3 files changed, 17 insertions(+), 10 deletions(-)
Approvals:
Spage: Looks good to me, approved
Jdlrobson: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/browser/features/reply.feature
b/tests/browser/features/reply.feature
index 856b16b..9ba81d0 100644
--- a/tests/browser/features/reply.feature
+++ b/tests/browser/features/reply.feature
@@ -1,30 +1,28 @@
-@chrome @clean @firefox @internet_explorer_10 @login
+@chrome @clean @en.wikipedia.beta.wmflabs.org @firefox @internet_explorer_10
@login @test2.wikipedia.org
Feature: Replying
Background:
Given I am logged in
And I am on Flow page
- @en.wikipedia.beta.wmflabs.org @test2.wikipedia.org
Scenario: I can reply
Given I have created a Flow topic with title "Reply test"
And I reply with comment "Boom boom shake shake the room"
Then the top post's first reply contains the text "Boom boom shake shake
the room"
- @en.wikipedia.beta.wmflabs.org @test2.wikipedia.org
Scenario: Replying updates watched state
Given I have created a Flow topic with title "Reply watch test"
And I am not watching my new Flow topic
When I reply with comment "I want to watch this title"
Then I should see an unwatch link on the topic
- # Broken due to bug 69412
- @wip
- Scenario: Canceling reply leaves usable form
- Given I have created a Flow topic with title "Reply watch test"
+# TODO maybe should test simple Cancelling reply as well.
+
+ Scenario: Previewing reply, continue editing, then cancel leaves usable form
+ Given I have created a Flow topic with title "Reply preview test"
And I start a reply with comment "my form lies over the ocean"
And I click the Preview button
- # Create topic then click its Reply doesn't have a cancel button (bug
69412), so this fails.
+ And I click the Keep editing button
And I click the Cancel button and confirm the dialog
And I start a reply with comment "bring back my form to me"
Then I should see the topic reply form
diff --git a/tests/browser/features/step_definitions/reply_steps.rb
b/tests/browser/features/step_definitions/reply_steps.rb
index a8e77be..87d08ec 100644
--- a/tests/browser/features/step_definitions/reply_steps.rb
+++ b/tests/browser/features/step_definitions/reply_steps.rb
@@ -41,7 +41,15 @@
Then(/^I click the Preview button$/) do
on(FlowPage) do |page|
page.new_reply_preview_element.when_present.click
- page.wait_until { page.new_reply_preview_warning_element.visible? }
+ page.wait_until { page.preview_warning_element.visible? }
+ end
+end
+
+Then(/^I click the Keep editing button$/) do
+ on(FlowPage) do |page|
+ page.keep_editing_element.when_present.click
+ # Keep editing returns to the Preview button.
+ page.wait_until { page.new_reply_preview_element.visible? }
end
end
diff --git a/tests/browser/features/support/pages/flow_page.rb
b/tests/browser/features/support/pages/flow_page.rb
index ca8b362..ff832a2 100644
--- a/tests/browser/features/support/pages/flow_page.rb
+++ b/tests/browser/features/support/pages/flow_page.rb
@@ -193,7 +193,8 @@
button(:new_reply_cancel, css: ".flow-reply-form .mw-ui-destructive")
button(:new_reply_preview, css: ".flow-reply-form .mw-ui-progressive")
button(:new_reply_save, css: ".flow-reply-form .mw-ui-constructive")
- div(:new_reply_preview_warning, css: ".flow-reply-form
.flow-preview-warning")
+ button(:keep_editing, text: "Keep editing")
+ div(:preview_warning, css: ".flow-preview-warning")
# Editing post workflow
text_area(:post_edit, css: ".flow-edit-post-form textarea")
--
To view, visit https://gerrit.wikimedia.org/r/159009
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I857989dc11e9dac4e2fec534989afc8807e57deb
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Spage <[email protected]>
Gerrit-Reviewer: Bsitu <[email protected]>
Gerrit-Reviewer: Cmcmahon <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: SG <[email protected]>
Gerrit-Reviewer: Spage <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits