├── .gitignore ├── .travis.yml ├── config ├── cucumber.yml └── config.yml.sample ├── .rubocop_todo.yml ├── Gemfile ├── features ├── support │ ├── pages │ │ ├── wporg_frontpage.rb │ │ ├── frontend_contact_form_receipt_page.rb │ │ ├── frontend_debitpage.rb │ │ ├── frontend_debit_receiptpage.rb │ │ ├── frontend_commentpage.rb │ │ ├── frontend_creditpage.rb │ │ ├── frontend_paypalpage.rb │ │ ├── frontend_contact_form_page.rb │ │ ├── frontend_membershippage.rb │ │ ├── frontend_receiptpage.rb │ │ ├── wpde_frontpage.rb │ │ └── frontend_frontpage.rb │ ├── modules │ │ ├── frontend_address_form.rb │ │ ├── banner_form.rb │ │ └── frontend_radio_map.rb │ ├── env.rb │ └── utils │ │ └── utils.rb ├── frontend.cancel.feature ├── step_definitions │ ├── frontend_deposit_steps.rb │ ├── wporg_steps.rb │ ├── frontend_credit_steps.rb │ ├── login_steps.rb │ ├── frontend_comment_steps.rb │ ├── frontend_debit_steps.rb │ ├── frontend_paypal_steps.rb │ ├── frontend_receipt_steps.rb │ ├── wpde_frontpage_steps.rb │ ├── frontend_contactform_steps.rb │ ├── frontend_address_steps.rb │ ├── frontend_membership_steps.rb │ └── frontend_frontpage_steps.rb ├── frontend.comment.feature ├── frontend.confirmcookie.feature ├── frontend.newsletter.feature ├── frontend.contactform.feature ├── frontend.credit.feature ├── wpde.address.feature ├── frontend.address.feature ├── wpde.credit.feature ├── frontend.deposit.feature ├── wpde.deposit.feature ├── frontend.paypal.feature ├── wpde.paypal.feature ├── frontend.membership.feature ├── wpde.frontpage.feature ├── frontend.frontpage.feature ├── frontend.debit.feature ├── wpde.debit.feature └── frontend.memberform.feature ├── .rubocop.yml ├── environments.yml ├── README.md ├── Gemfile.lock └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | !.* 2 | .idea/ 3 | /config/config.yml 4 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: ruby 2 | 3 | rvm: 4 | - 2.2 5 | 6 | script: bash ./build/travis/script.sh 7 | -------------------------------------------------------------------------------- /config/cucumber.yml: -------------------------------------------------------------------------------- 1 | # do not run tests that depend on 3rd party configuration (active banner campaign) by default 2 | default: --tags ~@banner_campaign 3 | -------------------------------------------------------------------------------- /.rubocop_todo.yml: -------------------------------------------------------------------------------- 1 | # Configuration parameters: AllowURI, URISchemes. 2 | Metrics/LineLength: 3 | Max: 170 4 | 5 | Metrics/AbcSize: 6 | Max: 16 7 | 8 | Metrics/MethodLength: 9 | Max: 26 -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'activesupport' 4 | gem 'mediawiki_selenium', '~> 1.8.0' 5 | gem 'require_all' 6 | gem 'parallel_tests' 7 | gem 'rubocop', require: false 8 | -------------------------------------------------------------------------------- /features/support/pages/wporg_frontpage.rb: -------------------------------------------------------------------------------- 1 | # @licence GNU GPL v2+ 2 | # @author Christoph Fischer 3 | 4 | class WikipediaOrgFrontPage 5 | include PageObject 6 | 7 | page_url 'https://de.wikipedia.org' 8 | end 9 | -------------------------------------------------------------------------------- /features/support/pages/frontend_contact_form_receipt_page.rb: -------------------------------------------------------------------------------- 1 | # @licence GNU GPL v2+ 2 | # @author Leszek Manicki 3 | 4 | class FrontendContactFormReceiptPage 5 | include PageObject 6 | 7 | span(:header, css: '.box-header span') 8 | div(:contact_message_sent, css: '.sandboxedcontent.contact_confirmation') 9 | end 10 | -------------------------------------------------------------------------------- /features/frontend.cancel.feature: -------------------------------------------------------------------------------- 1 | # @licence GNU GPL v2+ 2 | # @author Christoph Fischer 3 | 4 | Feature: Check the cancel function on the frontend 5 | 6 | Background: 7 | Given I finished a private debit donation with iban 8 | 9 | Scenario: Checks the donation can be canceled 10 | When I click on the cancel donation button 11 | Then The donation canceled page shows -------------------------------------------------------------------------------- /.rubocop.yml: -------------------------------------------------------------------------------- 1 | inherit_from: .rubocop_todo.yml 2 | 3 | AllCops: 4 | StyleGuideCopsOnly: true 5 | 6 | Metrics/MethodLength: 7 | Enabled: false 8 | 9 | Style/Alias: 10 | Enabled: false 11 | 12 | Style/SignalException: 13 | Enabled: false 14 | 15 | Style/TrivialAccessors: 16 | ExactNameMatch: true 17 | 18 | Style/StringLiterals: 19 | EnforcedStyle: single_quotes 20 | 21 | Style/AsciiComments: 22 | Enabled: false 23 | -------------------------------------------------------------------------------- /features/support/pages/frontend_debitpage.rb: -------------------------------------------------------------------------------- 1 | # @licence GNU GPL v2+ 2 | # @author Christoph Fischer 3 | 4 | class FrontendDebitPage 5 | include PageObject 6 | 7 | def donation_amount_element 8 | element('span', css: '#donation-sepa-confirmation .amount-formatted') 9 | end 10 | 11 | def sepa_confirmation_element 12 | element('section', id: 'donation-sepa-confirmation') 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /features/step_definitions/frontend_deposit_steps.rb: -------------------------------------------------------------------------------- 1 | # @licence GNU GPL v2+ 2 | # @author Christoph Fischer 3 | 4 | And(/^The donation amount should show (.*) Euro$/) do |amount| 5 | expect(on(FrontendReceiptPage).donation_amount_element.text).to be == "#{amount} €" 6 | end 7 | 8 | Then(/^The deposit donation confirmation shows$/) do 9 | expect(on(FrontendReceiptPage).div_deposit_confirmation_element.wait_until_present) 10 | end 11 | -------------------------------------------------------------------------------- /features/support/pages/frontend_debit_receiptpage.rb: -------------------------------------------------------------------------------- 1 | # @licence GNU GPL v2+ 2 | # @author Christoph Fischer 3 | 4 | class FrontendDebitReceiptPage 5 | include PageObject 6 | 7 | checkbox(:checkbox_confirm_sepa, id: 'confirm_sepa') 8 | checkbox(:checkbox_confirm_shortterm, id: 'confirm_shortterm') 9 | 10 | def label_element_to_radio(radio_id) 11 | element('label', xpath: compose_label_xpath_for_radio(radio_id)) 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /features/frontend.comment.feature: -------------------------------------------------------------------------------- 1 | # @licence GNU GPL v2+ 2 | # @author Christoph Fischer 3 | 4 | Feature: Check the comment function on the frontend 5 | 6 | Background: 7 | Given I finished a private debit donation with iban 8 | 9 | Scenario: Checks the comment can be submitted 10 | Given I click on the add comment link 11 | And I enter a harmless comment text 12 | And I click the submit comment button 13 | Then a positive feedback should show -------------------------------------------------------------------------------- /features/support/pages/frontend_commentpage.rb: -------------------------------------------------------------------------------- 1 | # @licence GNU GPL v2+ 2 | # @author Christoph Fischer 3 | 4 | class FrontendCommentPage 5 | include PageObject 6 | 7 | link(:a_view_comments, id: 'view-comments-link') 8 | 9 | div(:div_your_story, id: 'wlightbox-your-story') 10 | div(:div_positiv_feedback, css: '#feedback .message.success') 11 | 12 | text_area(:text_comment, id: 'feedback-message') 13 | button(:button_publish, id: 'publishComment') 14 | end 15 | -------------------------------------------------------------------------------- /features/frontend.confirmcookie.feature: -------------------------------------------------------------------------------- 1 | # @licence GNU GPL v2+ 2 | # @author Christoph Fischer 3 | 4 | Feature: Check the confirm cookie function on the frontend 5 | 6 | Background: 7 | Given I visit Wikipedia 8 | And I reset the CentralNotice hide banner cookie 9 | And I finished a private debit donation with iban 10 | 11 | Scenario: Checks if the confirmation cookie was set 12 | When I visit Wikipedia 13 | Then The CentralNotice hide banner cookie should be set -------------------------------------------------------------------------------- /features/step_definitions/wporg_steps.rb: -------------------------------------------------------------------------------- 1 | When(/^I visit Wikipedia$/) do 2 | visit(WikipediaOrgFrontPage) 3 | end 4 | 5 | When(/^I reset the CentralNotice hide banner cookie$/) do 6 | cookie = "$.cookie('centralnotice_hide_fundraising', null, { path: '/' });" 7 | browser.execute_script(cookie) 8 | end 9 | 10 | Then(/^The CentralNotice hide banner cookie should be set$/) do 11 | cookie = "return $.cookie( 'centralnotice_hide_fundraising' ) !== null;" 12 | expect(browser.execute_script(cookie)).to eq true 13 | end 14 | -------------------------------------------------------------------------------- /features/support/modules/frontend_address_form.rb: -------------------------------------------------------------------------------- 1 | # @licence GNU GPL v2+ 2 | # @author Christoph Fischer 3 | 4 | module FrontendAddressForm 5 | include PageObject 6 | 7 | text_field(:input_company_name, id: 'company-name') 8 | text_field(:input_first_name, id: 'first-name') 9 | text_field(:input_last_name, id: 'last-name') 10 | text_field(:input_street, id: 'street') 11 | text_field(:input_post_code, id: 'post-code') 12 | text_field(:input_city, id: 'city') 13 | text_field(:input_email, id: 'email') 14 | end 15 | -------------------------------------------------------------------------------- /features/support/pages/frontend_creditpage.rb: -------------------------------------------------------------------------------- 1 | # @licence GNU GPL v2+ 2 | # @author Christoph Fischer 3 | 4 | class FrontendCreditPage 5 | include PageObject 6 | 7 | element(:micropayment_iframe, id: 'micropayment-portal') 8 | 9 | in_iframe({ id: 'micropayment-portal' }) do |mcp_frame| 10 | text_field(:input_holder, id: 'holder', frame: mcp_frame) 11 | text_field(:input_card_number, id: 'card-number', frame: mcp_frame) 12 | text_field(:input_cvc_code, id: 'cvc-code', frame: mcp_frame) 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /features/support/env.rb: -------------------------------------------------------------------------------- 1 | require 'mediawiki_selenium/cucumber' 2 | require 'mediawiki_selenium/pages' 3 | require 'mediawiki_selenium/step_definitions' 4 | 5 | require 'net/http' 6 | require 'active_support/all' 7 | require 'require_all' 8 | 9 | config = YAML.load_file('config/config.yml') 10 | config.each do |k, v| 11 | ENV["#{k}"] = "#{v}" unless ENV["#{k}"] 12 | end 13 | 14 | require_all 'features/support/utils' 15 | require_all 'features/support/modules' 16 | require_all 'features/support/pages' 17 | 18 | PageObject.default_element_wait = 10 # increased to avoid fails 19 | -------------------------------------------------------------------------------- /features/step_definitions/frontend_credit_steps.rb: -------------------------------------------------------------------------------- 1 | # @licence GNU GPL v2+ 2 | # @author Christoph Fischer 3 | 4 | Then(/^The credit card form shows$/) do 5 | expect(on(FrontendCreditPage).micropayment_iframe_element.wait_until_present) 6 | expect(on(FrontendCreditPage).input_holder_element.wait_until_present) 7 | end 8 | 9 | And(/^The cardholder should be the surname and name$/) do 10 | name = @address_data['first-name'] + ' ' + @address_data['last-name'] 11 | expect(on(FrontendCreditPage).input_holder_element.value).to be == name 12 | end 13 | -------------------------------------------------------------------------------- /features/support/modules/banner_form.rb: -------------------------------------------------------------------------------- 1 | # @licence GNU GPL v2+ 2 | # @author Christoph Fischer 3 | # 4 | # page object for the wikipedia.de banner with form 5 | 6 | module BannerForm 7 | include PageObject 8 | 9 | text_field(:input_amount, xpath: "//input[@id = 'amount_other']/following::input[1]") 10 | 11 | button(:button_debit, id: 'btnDirectDebit') 12 | button(:button_deposit, id: 'btnTransfer') 13 | button(:button_credit, id: 'btnCreditCard') 14 | button(:button_paypal, id: 'btnPayPal') 15 | 16 | def click_banner_amount(amount) 17 | browser.element(xpath: "//input[@id = \'#{amount}\']").click 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /features/support/utils/utils.rb: -------------------------------------------------------------------------------- 1 | # @licence GNU GPL v2+ 2 | # @author Christoph Fischer 3 | 4 | def generate_random_string(length = 8) 5 | chars = 'abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ' 6 | string = '' 7 | length.times { string << chars[rand(chars.size)] } 8 | string.capitalize 9 | end 10 | 11 | def generate_random_amount 12 | prng = Random.new 13 | prng.rand(1..99_999) 14 | end 15 | 16 | def generate_random_zipcode 17 | prng = Random.new 18 | prng.rand(10_000..99_999) 19 | end 20 | 21 | def compose_label_xpath_for_radio(radio_id) 22 | "//input[@id = \'#{radio_id}\']/following::label[1]" 23 | end 24 | 25 | def visibility_to_boolean(parameter) 26 | parameter == 'shows' ? true : false 27 | end 28 | -------------------------------------------------------------------------------- /features/frontend.newsletter.feature: -------------------------------------------------------------------------------- 1 | # @licence GNU GPL v2+ 2 | # @author Christoph Fischer 3 | 4 | Feature: Check the info checkbox on the frontend 5 | 6 | Background: 7 | Given I am on the fundraising frontpage 8 | And I select the 5 euro option 9 | And I select the deposit donation option 10 | And I click on the continue button 11 | And The address details form shows 12 | When I select the private donation option 13 | And I enter random valid private address data 14 | And I wait a second 15 | 16 | Scenario: Checks if the newsletter info is saved 17 | When I select the send information option 18 | And I click on the done button 19 | Then The deposit donation confirmation shows 20 | And The send information text shows 21 | -------------------------------------------------------------------------------- /features/support/pages/frontend_paypalpage.rb: -------------------------------------------------------------------------------- 1 | # @licence GNU GPL v2+ 2 | # @author Christoph Fischer 3 | 4 | class FrontendPaypalPage 5 | include PageObject 6 | 7 | div(:div_xpt_content_main, id: 'xptContentMain') 8 | span(:span_amount, id: 'mainTotalAmount') 9 | 10 | link(:a_back_to_frontend, xpath: "//input[@id = 'CONTEXT_CGI_VAR']/following::a[1]") 11 | 12 | text_field(:input_login_email, id: 'login_email') 13 | text_field(:input_login_password, id: 'login_password') 14 | button(:button_login, id: 'login.x') 15 | 16 | # id is reused in a step (explained there) 17 | # rubocop:disable Style/ClassVars 18 | @@continue_button_id = 'continue' 19 | # rubocop:enable Style/ClassVars 20 | 21 | button(:button_continue, id: @@continue_button_id) 22 | end 23 | -------------------------------------------------------------------------------- /features/step_definitions/login_steps.rb: -------------------------------------------------------------------------------- 1 | # @licence GNU GPL v2+ 2 | # @author Christoph Fischer 3 | 4 | When(/^User enters valid credentials$/) do 5 | on(LoginPage) do |page| 6 | page.username = ENV['BACKEND_USERNAME'] 7 | page.password = ENV['BACKEND_PASSWORD'] 8 | end 9 | end 10 | 11 | Given(/^I am on the login page$/) do 12 | visit(LoginPage) 13 | end 14 | 15 | And(/^User clicks on login button$/) do 16 | on(LoginPage).login 17 | end 18 | 19 | Then(/^Username-Link should be shown$/) do 20 | on(BackendPage) do |page| 21 | page.wait_until do 22 | page.username_link? 23 | end 24 | end 25 | end 26 | 27 | Then(/^Logout-Link should be shown$/) do 28 | on(BackendPage) do |page| 29 | page.wait_until do 30 | page.logout_link? 31 | end 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /features/frontend.contactform.feature: -------------------------------------------------------------------------------- 1 | # @licence GNU GPL v2+ 2 | # @author Leszek Manicki 3 | 4 | Feature: Check the functions of the contact form 5 | 6 | Background: 7 | Given I am on the contact form page 8 | 9 | Scenario: Checks if entering all data and clicking submit button sends the message 10 | Given I enter valid random contact form data 11 | And I click the contact form submit button 12 | Then The contact message confirmation page shows 13 | 14 | Scenario Outline: Checks if relevant error message is shown when insufficient data is entered 15 | Given I enter valid random contact form data 16 | And I erase contents of the field from the contact form 17 | And I click the contact form submit button 18 | Then The field has an error message 19 | 20 | Examples: 21 | | field | 22 | | email | 23 | | subject | 24 | | message | 25 | -------------------------------------------------------------------------------- /config/config.yml.sample: -------------------------------------------------------------------------------- 1 | # Copy this file to config.yml on your local system and set the values to your needs. 2 | # You can always set all of the below variables in your local environment by doing 3 | # set = (on Windows) or 4 | # export = (on Unix) 5 | # The environment variable will then be used instead of the values in here. 6 | 7 | # local configuration 8 | FRONTEND_URL: "http://localhost/frontend/" 9 | WPDE_URL: "http://wikipedia.de/" 10 | 11 | # paypal only 12 | PAYPAL_USERNAME: "" 13 | PAYPAL_PASSWORD: "" 14 | 15 | # local browser configuration 16 | BROWSER: "firefox" 17 | 18 | # Needed for PayPal tests 19 | #BROWSER_TIMEOUT: 500 20 | 21 | # sauce browser configuration 22 | # uncomment to run on saucelabs 23 | #SAUCE_ONDEMAND_USERNAME: "SaucelabsUser" 24 | #SAUCE_ONDEMAND_ACCESS_KEY: "SaucelabsKey" 25 | 26 | # additional parameters https://saucelabs.com/platforms/webdriver 27 | #BROWSER: "firefox" 28 | #VERSION: "25" 29 | #PLATFORM: "Linux" 30 | -------------------------------------------------------------------------------- /features/support/pages/frontend_contact_form_page.rb: -------------------------------------------------------------------------------- 1 | # @licence GNU GPL v2+ 2 | # @author Leszek Manicki 3 | 4 | class FrontendContactFormPage 5 | include PageObject 6 | 7 | page_url ENV['FRONTEND_URL'] + 'contact/get-in-touch' 8 | 9 | text_field(:input_first_name, id: 'first-name') 10 | text_field(:input_last_name, id: 'last-name') 11 | text_field(:input_email, id: 'email') 12 | text_field(:input_subject, id: 'subject') 13 | text_area(:text_message, id: 'messageBody') 14 | 15 | button(:button_submit, id: 'contactFormSubmit') 16 | 17 | div(:error, class: 'errorbox') 18 | 19 | def random_form_data 20 | form_data = {} 21 | form_data['first-name'] = generate_random_string 22 | form_data['last-name'] = generate_random_string 23 | form_data['email'] = generate_random_string + '@example.com' 24 | form_data['subject'] = generate_random_string 25 | form_data['message'] = generate_random_string(100) 26 | 27 | form_data 28 | end 29 | 30 | def error_for_field(field_id) 31 | field_id = 'messageBody' if field_id == 'message' 32 | element(:span, css: '#' + field_id + ' ~ .form-error') 33 | end 34 | 35 | end 36 | -------------------------------------------------------------------------------- /environments.yml: -------------------------------------------------------------------------------- 1 | # Customize this configuration as necessary to provide defaults for various 2 | # test environments. 3 | # 4 | # The set of defaults to use is determined by the MEDIAWIKI_ENVIRONMENT 5 | # environment variable. 6 | # 7 | # export MEDIAWIKI_ENVIRONMENT=mw-vagrant-host 8 | # bundle exec cucumber 9 | # 10 | # Additional variables set by the environment will override the corresponding 11 | # defaults defined here. 12 | # 13 | # export MEDIAWIKI_ENVIRONMENT=mw-vagrant-host 14 | # export MEDIAWIKI_USER=Selenium_user2 15 | # bundle exec cucumber 16 | # 17 | mw-vagrant-host: &default 18 | mediawiki_url: http://127.0.0.1:8080/wiki/ 19 | mediawiki_user: Selenium_user 20 | mediawiki_password: vagrant 21 | 22 | mw-vagrant-guest: 23 | mediawiki_url: http://127.0.0.1/wiki/ 24 | mediawiki_user: Selenium_user 25 | mediawiki_password: vagrant 26 | 27 | beta: 28 | mediawiki_url: http://en.wikipedia.beta.wmflabs.org/wiki/ 29 | mediawiki_user: Selenium_user 30 | # mediawiki_password: SET THIS IN THE ENVIRONMENT! 31 | 32 | test2: 33 | mediawiki_url: http://test2.wikipedia.org/wiki/ 34 | mediawiki_user: Selenium_user 35 | # mediawiki_password: SET THIS IN THE ENVIRONMENT! 36 | 37 | default: *default 38 | -------------------------------------------------------------------------------- /features/frontend.credit.feature: -------------------------------------------------------------------------------- 1 | # @licence GNU GPL v2+ 2 | # @author Christoph Fischer 3 | 4 | @only_online 5 | Feature: Check the credit process on the frontend 6 | 7 | Background: 8 | Given I am on the fundraising frontpage 9 | And I select the 5 euro option 10 | And I select the credit donation option 11 | And I click on the continue button 12 | And The address details form shows 13 | 14 | @only_online 15 | Scenario: Check the anonymous credit card donation 16 | When I select the anonymous donation option 17 | And I wait a second 18 | And I click on the done button 19 | Then The credit card form shows 20 | 21 | @only_online 22 | Scenario: Check the non anonymous credit card donation 23 | When I select the private donation option 24 | And I enter random valid private address data 25 | And I wait a second 26 | And I click on the done button 27 | Then The credit card form shows 28 | And The cardholder should be the surname and name 29 | 30 | @only_online 31 | Scenario: Check the non anonymous credit card donation 32 | When I select the business donation option 33 | And I enter random valid business address data 34 | And I wait a second 35 | And I click on the done button 36 | Then The credit card form shows 37 | -------------------------------------------------------------------------------- /features/wpde.address.feature: -------------------------------------------------------------------------------- 1 | # @licence GNU GPL v2+ 2 | # @author Christoph Fischer 3 | 4 | @ui_only 5 | @banner_campaign 6 | Feature: Check the address validation on the wikipedia.de banner lightbox 7 | 8 | Background: 9 | Given I am on the wikipedia.de frontpage 10 | And The wikipedia.de lightbox banner shows 11 | And I click on the deposit button 12 | And The donation lightbox shows 13 | And The address details form shows 14 | 15 | @ui_only 16 | Scenario Outline: Checks if insufficient address data stops the process 17 | And I select the private donation option 18 | And I enter random valid private address data 19 | And I erase the data field 20 | And I click on the done button 21 | Then Address form should be visible 22 | 23 | Examples: 24 | | field | 25 | | city | 26 | | first name | 27 | | street | 28 | | email | 29 | | postcode | 30 | 31 | @ui_only 32 | Scenario Outline: Checks if invalid address data stops the process 33 | And I select the private donation option 34 | And I enter random valid private address data 35 | And I enter an invalid 36 | And I click on the done button 37 | Then Address form should be visible 38 | 39 | Examples: 40 | | field | 41 | | email | 42 | | postcode | 43 | -------------------------------------------------------------------------------- /features/step_definitions/frontend_comment_steps.rb: -------------------------------------------------------------------------------- 1 | # @licence GNU GPL v2+ 2 | # @author Christoph Fischer 3 | 4 | And(/^I finished a (private|business) debit donation with iban$/) do |address_type| 5 | step 'I am on the fundraising frontpage' 6 | step 'I select the 5 euro option' 7 | step 'I select the debit donation option' 8 | step 'I click on the continue button' 9 | step 'The address details form shows' 10 | step 'I enter a valid german iban' 11 | step "I select the #{address_type} donation option" 12 | step "I enter random valid #{address_type} address data" 13 | step 'I click on the continue button' 14 | step 'The debit confirmation form shows' 15 | step 'I confirm the debit contract' 16 | step 'I confirm the notification contract' 17 | step 'I click on the done button' 18 | step 'The debit receipt shows' 19 | end 20 | 21 | Given(/^I click on the add comment link$/) do 22 | on(FrontendCommentPage).a_view_comments_element.click 23 | end 24 | 25 | And(/^I enter a harmless comment text$/) do 26 | on(FrontendCommentPage).text_comment = 'Ich mag Wikimedia!' 27 | end 28 | 29 | And(/^I click the submit comment button$/) do 30 | on(FrontendCommentPage).button_publish_element.click 31 | end 32 | 33 | Then(/^a positive feedback should show$/) do 34 | expect(on(FrontendCommentPage).div_positiv_feedback_element.wait_until_present) 35 | end 36 | -------------------------------------------------------------------------------- /features/frontend.address.feature: -------------------------------------------------------------------------------- 1 | # @licence GNU GPL v2+ 2 | # @author Christoph Fischer 3 | 4 | @ui_only 5 | Feature: Check the address validation on the frontend 6 | 7 | Background: 8 | Given I am on the fundraising frontpage 9 | And I select the 5 euro option 10 | And I select the deposit donation option 11 | And I click on the continue button 12 | And The address details form shows 13 | 14 | @ui_only 15 | Scenario Outline: Checks if insufficient address data stops the process 16 | And I select the private donation option 17 | And I enter random valid private address data 18 | And I erase the data field 19 | And I click on the done button 20 | Then Address form should be visible 21 | And error message should be visible 22 | 23 | Examples: 24 | | field | 25 | | city | 26 | | first name | 27 | | street | 28 | | email | 29 | | postcode | 30 | 31 | @ui_only 32 | Scenario Outline: Checks if invalid address data stops the process 33 | And I select the private donation option 34 | And I enter random valid private address data 35 | And I enter an invalid 36 | And I click on the done button 37 | Then Address form should be visible 38 | And error message should be visible 39 | 40 | Examples: 41 | | field | 42 | | email | 43 | | postcode | 44 | -------------------------------------------------------------------------------- /features/wpde.credit.feature: -------------------------------------------------------------------------------- 1 | # @licence GNU GPL v2+ 2 | # @author Christoph Fischer 3 | 4 | @banner_campaign 5 | Feature: Check the credit process on the wikipedia.de banner lightbox 6 | 7 | Background: 8 | Given I am on the wikipedia.de frontpage 9 | And The wikipedia.de lightbox banner shows 10 | And I change the lightbox to testmode 11 | And I click on the credit button 12 | And The donation lightbox shows 13 | And The address details form shows 14 | 15 | 16 | Scenario: Check the anonymous credit card donation 17 | When I select the anonymous donation option 18 | And I wait a second 19 | And I click on the done button 20 | And I switch to the new window 21 | Then The credit card form shows 22 | 23 | 24 | Scenario: Check the non anonymous credit card donation 25 | When I select the private donation option 26 | And I enter random valid private address data 27 | And I wait a second 28 | And I click on the done button 29 | And I switch to the new window 30 | Then The credit card form shows 31 | And The cardholder should be the surname and name 32 | 33 | 34 | Scenario: Check the non anonymous credit card donation 35 | When I select the business donation option 36 | And I enter random valid business address data 37 | And I wait a second 38 | And I click on the done button 39 | And I switch to the new window 40 | Then The credit card form shows 41 | -------------------------------------------------------------------------------- /features/frontend.deposit.feature: -------------------------------------------------------------------------------- 1 | # @licence GNU GPL v2+ 2 | # @author Christoph Fischer 3 | 4 | Feature: Check the deposit process on the frontend 5 | 6 | Background: 7 | Given I am on the fundraising frontpage 8 | And I select the deposit donation option 9 | 10 | 11 | Scenario Outline: Checks if deposit donation transfers the right amount 12 | When I select the