Zfilipin has submitted this change and it was merged.

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


Do the PDF test without cookies

Bug: 48214
Change-Id: I27b862dcaa72e429434efa61cf073fcfa2cce384
---
M features/pdf_readonly.feature
M features/step_definitions/pdf_steps.rb
2 files changed, 3 insertions(+), 8 deletions(-)

Approvals:
  Zfilipin: Verified; Looks good to me, approved



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..935062c 100644
--- a/features/step_definitions/pdf_steps.rb
+++ b/features/step_definitions/pdf_steps.rb
@@ -1,18 +1,11 @@
 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
-

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I27b862dcaa72e429434efa61cf073fcfa2cce384
Gerrit-PatchSet: 3
Gerrit-Project: qa/browsertests
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon <[email protected]>
Gerrit-Reviewer: Cmcmahon <[email protected]>
Gerrit-Reviewer: Karim.rayani <[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