jenkins-bot has submitted this change and it was merged.

Change subject: QA: update thank test
......................................................................


QA: update thank test

* run in the builds
* simplify steps without changing function
* clarify object being used in FlowPage page object

Change-Id: Ia5ea726f8a9e8175d22b89c498f1a39903d0679a
---
M tests/browser/features/step_definitions/thank_steps.rb
M tests/browser/features/thank.feature
2 files changed, 8 insertions(+), 12 deletions(-)

Approvals:
  Zfilipin: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/browser/features/step_definitions/thank_steps.rb 
b/tests/browser/features/step_definitions/thank_steps.rb
index 6676e86..08bbe79 100644
--- a/tests/browser/features/step_definitions/thank_steps.rb
+++ b/tests/browser/features/step_definitions/thank_steps.rb
@@ -22,19 +22,16 @@
 end
 
 When(/^I see a Thank button$/) do
-  # Carry on with the test per normal if the element is present.
-  on(FlowPage).thank_button_element.should be_visible
-  @target_container = on(FlowPage).thank_button_element.parent
+  on(FlowPage).thank_button_element.when_present
 end
 
 Then(/^I should not see a Thank button$/) do
-  on(FlowPage).thank_button_element.should_not exist
-end
-
-Then(/^I should not see the Thank button for that post$/) do
-  on(FlowPage).thank_button_element.should_not exist
+  expect(on(FlowPage).thank_button_element).not_to be_visible
 end
 
 Then(/^I should see the Thank button be replaced with Thanked button$/) do
-  @target_container.span_element(class: 'mw-thanks-flow-thanked').when_visible
+  on(FlowPage) do |page|
+    expect(page.thanked_button_element.when_present).to be_visible
+    expect(page.thank_button_element).not_to be_visible
+  end
 end
diff --git a/tests/browser/features/thank.feature 
b/tests/browser/features/thank.feature
index f194a9e..4dc0149 100644
--- a/tests/browser/features/thank.feature
+++ b/tests/browser/features/thank.feature
@@ -1,5 +1,4 @@
[email protected] @en.wikipedia.beta.wmflabs.org @ee-prototype.wmflabs.org
-
+@chrome @clean @en.wikipedia.beta.wmflabs.org @firefox @internet_explorer_10 
@login @test2.wikipedia.org
 Feature: Thank author of a Flow post
 
   Scenario: Anon does not see Thank button
@@ -21,4 +20,4 @@
     Given I am logged in
       And the "Talk:Flow QA" page has a new unmoderated topic created by me
       And I am on Flow page
-    Then I should not see the Thank button for that post
+    Then I should not see the Thank button

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia5ea726f8a9e8175d22b89c498f1a39903d0679a
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon <[email protected]>
Gerrit-Reviewer: Cmcmahon <[email protected]>
Gerrit-Reviewer: Dduvall <[email protected]>
Gerrit-Reviewer: SG <[email protected]>
Gerrit-Reviewer: Spage <[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

Reply via email to