Cmcmahon has uploaded a new change for review.

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


Change subject: Do the PDF test without cookies
......................................................................

Do the PDF test without cookies

Change-Id: I27b862dcaa72e429434efa61cf073fcfa2cce384
---
M features/pdf_readonly.feature
M features/step_definitions/pdf_steps.rb
M features/support/pages/random_page.rb
3 files changed, 7 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests 
refs/changes/47/63247/1

diff --git a/features/pdf_readonly.feature b/features/pdf_readonly.feature
index 1469252..4f44277 100644
--- a/features/pdf_readonly.feature
+++ b/features/pdf_readonly.feature
@@ -4,9 +4,11 @@
 
   Scenario: Check for Download as PDF link
     Given I am at random page
+    When I click Print/export
     Then Download as PDF should be present
 
   Scenario: Click on Download as PDF link
     Given I am at random page
-    When I click on Download as PDF
+    When I click Print/export
+      And I click on Download as PDF
     Then Download the file link should be present
diff --git a/features/step_definitions/pdf_steps.rb 
b/features/step_definitions/pdf_steps.rb
index 0d78d42..b7cacd3 100644
--- a/features/step_definitions/pdf_steps.rb
+++ b/features/step_definitions/pdf_steps.rb
@@ -1,18 +1,15 @@
 Then(/^Download as PDF should be present$/) do
-  @browser.driver.manage.add_cookie(:name => 'vector-nav-p-coll-print_export', 
:value => 'true')
-  @browser.driver.navigate.refresh
   on(RandomPage).download_as_pdf_element.should exist
 end
-
 When(/^I click on Download as PDF$/) do
-  @browser.driver.manage.add_cookie(:name => 'vector-nav-p-coll-print_export', 
:value => 'true')
-  @browser.driver.navigate.refresh
   on(RandomPage).download_as_pdf
 end
-
 Then(/^Download the file link should be present$/) do
   on(RandomPage) do |page|
     page.download_the_file_element.when_present(15).should exist
   end
 end
+When(/^I click Print\/export$/) do
+  on(RandomPage).print_export
+end
 
diff --git a/features/support/pages/random_page.rb 
b/features/support/pages/random_page.rb
index 375a2f3..928a982 100644
--- a/features/support/pages/random_page.rb
+++ b/features/support/pages/random_page.rb
@@ -7,6 +7,7 @@
   li(:main_page, id: 'n-mainpage-description')
   a(:download_as_pdf, text: 'Download as PDF')
   a(:download_the_file, text: 'Download the file')
+  a(:print_export, text: 'Print/export')
   a(:uls_trigger, class: 'uls-trigger')
   div(:search, id: 'search')
   text_field(:search_input, id: 'searchInput')

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I27b862dcaa72e429434efa61cf073fcfa2cce384
Gerrit-PatchSet: 1
Gerrit-Project: qa/browsertests
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon <[email protected]>

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

Reply via email to