Karim.rayani has uploaded a new change for review.

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


Change subject: Feature: Print/export section expand and collapse
......................................................................

Feature: Print/export section expand and collapse

Added the scenario to check that the Print/export section is hidden after 
clicking on it for the second time.

Bug: 48225
Change-Id: Iebb017c7245bb4bc4067a0f6cdb9a1ca832899bd
---
M features/print_export_menu_readonly.feature
M features/step_definitions/print_export_menu_steps.rb
2 files changed, 13 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests 
refs/changes/25/63825/1

diff --git a/features/print_export_menu_readonly.feature 
b/features/print_export_menu_readonly.feature
index a564734..07ef242 100644
--- a/features/print_export_menu_readonly.feature
+++ b/features/print_export_menu_readonly.feature
@@ -10,3 +10,9 @@
     Given I am at random page
     When I click Print/export
     Then Print/export section should be expanded
+
+  Scenario: Print/export section collapses after it is expanded
+    Given I am at random page
+    When I click Print/export
+      And I click Print/export again
+    Then Print/export section should be collapsed
diff --git a/features/step_definitions/print_export_menu_steps.rb 
b/features/step_definitions/print_export_menu_steps.rb
index 863f4af..73ea5d6 100644
--- a/features/step_definitions/print_export_menu_steps.rb
+++ b/features/step_definitions/print_export_menu_steps.rb
@@ -1,8 +1,8 @@
 Then(/^Print\/export section should be collapsed$/) do
   on(RandomPage) do |page|
-    page.create_a_book_element.should_not be_visible
-    page.download_as_pdf_element.should_not be_visible
-    page.printable_version_element.should_not be_visible
+    page.create_a_book_element.when_not_visible(10).should_not be_visible
+    page.download_as_pdf_element.when_not_visible(10).should_not be_visible
+    page.printable_version_element.when_not_visible(10).should_not be_visible
   end
 end
 
@@ -17,3 +17,7 @@
 When(/^I click Print\/export$/) do
   on(RandomPage).print_export
 end
+
+When(/^I click Print\/export again$/) do
+  step 'I click Print/export'
+end

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iebb017c7245bb4bc4067a0f6cdb9a1ca832899bd
Gerrit-PatchSet: 1
Gerrit-Project: qa/browsertests
Gerrit-Branch: master
Gerrit-Owner: Karim.rayani <[email protected]>

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

Reply via email to