summaryrefslogtreecommitdiff
path: root/extensions/PdfHandler/tests/browser/features
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2015-04-01 06:11:44 +0200
committerPierre Schmitz <pierre@archlinux.de>2015-04-01 06:11:44 +0200
commit14f74d141ab5580688bfd46d2f74c026e43ed967 (patch)
tree081b7cbfc4d246ecc42831978d080331267cf57c /extensions/PdfHandler/tests/browser/features
parent4a953b6bfda28604979feb9cfbb58974d13b84bb (diff)
Update to MediaWiki 1.24.2
Diffstat (limited to 'extensions/PdfHandler/tests/browser/features')
-rw-r--r--extensions/PdfHandler/tests/browser/features/pdf.feature22
-rw-r--r--extensions/PdfHandler/tests/browser/features/step_definitions/pdf_steps.rb20
-rw-r--r--extensions/PdfHandler/tests/browser/features/support/env.rb12
-rw-r--r--extensions/PdfHandler/tests/browser/features/support/pages/random_page.rb17
4 files changed, 71 insertions, 0 deletions
diff --git a/extensions/PdfHandler/tests/browser/features/pdf.feature b/extensions/PdfHandler/tests/browser/features/pdf.feature
new file mode 100644
index 00000000..f78dd1ca
--- /dev/null
+++ b/extensions/PdfHandler/tests/browser/features/pdf.feature
@@ -0,0 +1,22 @@
+#
+# This file is subject to the license terms in the LICENSE file found in the
+# qa-browsertests top-level directory and at
+# https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/LICENSE. No part of
+# qa-browsertests, including this file, may be copied, modified, propagated, or
+# distributed except according to the terms contained in the LICENSE file.
+#
+# Copyright 2012-2014 by the Mediawiki developers. See the CREDITS file in the
+# qa-browsertests top-level directory and at
+# https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/CREDITS
+#
+@chrome @firefox @internet_explorer_8 @internet_explorer_9 @internet_explorer_10 @phantomjs @test2.wikipedia.org
+Feature: PDF
+
+ Scenario: Check for Download as PDF link
+ Given I am at a random page
+ Then Download as PDF should be present
+
+ Scenario: Click on Download as PDF link
+ Given I am at a random page
+ When I click on Download as PDF
+ Then Download the file link should be present
diff --git a/extensions/PdfHandler/tests/browser/features/step_definitions/pdf_steps.rb b/extensions/PdfHandler/tests/browser/features/step_definitions/pdf_steps.rb
new file mode 100644
index 00000000..25cf8ef4
--- /dev/null
+++ b/extensions/PdfHandler/tests/browser/features/step_definitions/pdf_steps.rb
@@ -0,0 +1,20 @@
+#
+# This file is subject to the license terms in the LICENSE file found in the
+# qa-browsertests top-level directory and at
+# https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/LICENSE. No part of
+# qa-browsertests, including this file, may be copied, modified, propagated, or
+# distributed except according to the terms contained in the LICENSE file.
+#
+# Copyright 2012-2014 by the Mediawiki developers. See the CREDITS file in the
+# qa-browsertests top-level directory and at
+# https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/CREDITS
+#
+Then(/^Download as PDF should be present$/) do
+ on(PdfPage).download_as_pdf_element.should exist
+end
+When(/^I click on Download as PDF$/) do
+ on(PdfPage).download_as_pdf_element.when_present.click
+end
+Then(/^Download the file link should be present$/) do
+ on(PdfPage).download_the_file_element.when_present(30).should exist
+end
diff --git a/extensions/PdfHandler/tests/browser/features/support/env.rb b/extensions/PdfHandler/tests/browser/features/support/env.rb
new file mode 100644
index 00000000..515ff78a
--- /dev/null
+++ b/extensions/PdfHandler/tests/browser/features/support/env.rb
@@ -0,0 +1,12 @@
+#
+# This file is subject to the license terms in the LICENSE file found in the
+# qa-browsertests top-level directory and at
+# https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/LICENSE. No part of
+# qa-browsertests, including this file, may be copied, modified, propagated, or
+# distributed except according to the terms contained in the LICENSE file.
+#
+# Copyright 2012-2014 by the Mediawiki developers. See the CREDITS file in the
+# qa-browsertests top-level directory and at
+# https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/CREDITS
+#
+require "mediawiki_selenium"
diff --git a/extensions/PdfHandler/tests/browser/features/support/pages/random_page.rb b/extensions/PdfHandler/tests/browser/features/support/pages/random_page.rb
new file mode 100644
index 00000000..8d77e976
--- /dev/null
+++ b/extensions/PdfHandler/tests/browser/features/support/pages/random_page.rb
@@ -0,0 +1,17 @@
+#
+# This file is subject to the license terms in the LICENSE file found in the
+# qa-browsertests top-level directory and at
+# https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/LICENSE. No part of
+# qa-browsertests, including this file, may be copied, modified, propagated, or
+# distributed except according to the terms contained in the LICENSE file.
+#
+# Copyright 2012-2014 by the Mediawiki developers. See the CREDITS file in the
+# qa-browsertests top-level directory and at
+# https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/CREDITS
+#
+class PdfPage
+ include PageObject
+
+ a(:download_as_pdf, text: "Download as PDF")
+ a(:download_the_file, text: "Download the file")
+end