1. Getting started

Please read the Feature Testing documentation before starting : https://github.com/openfoodfoundation/openfoodnetwork/wiki/Feature-Testing-Handbook

What kind of browsers and devices are we aiming to be compliant with?

Latest version of Firefox, Chrome and Safari, both mobile and desktop.

How can I test payment on OFN?

Don’t pay with real money, there are sandboxes for this :-)

Stripe

Use the Test Card Numbers page here : https://stripe.com/docs/testing

To have a various number of credit card that can lead to various cases (failure, success, missing field…)

It’s also useful to check the state of payments on Stripe Dashboard https://dashboard.stripe.com/test/dashboard (you’ll need to register and associate your hub/shop with your account)

Connect the hub/shop with Stripe, under Payment Methods (Admin). After doing this, it is possible to create two distinct Stripe payment methods, using either Stripe SCA or Stripe (Connect) as Provider for the service.

At the time of writing, these operations should work for both Stripe SCA and Stripe Connect, with basic test cards. This should work as well for Stripe SCA with cards requiring further 3D authentication.

Frontoffice tests

  • make a payment without saving a card

  • make a payment saving card

  • make a payment using previously saved card

  • add a card on account section and use it to checkout

  • delete saved card

  • capture the payment in the admin payments section of an order

  • as a user authorize a hub to use your card and verify the subscription payments work with that card

Backoffice tests - with basic test cards

  • After authorizing a hub to use your card (as a user):

  • Add an order under under /admin/orders -> New order

  • Check out using Stripe SCA and Stripe Connect as payment methods

  • Refunds: Cancel a Stripe payment in the Backoffice

All payments and payment attempts should be checked under https://dashboard.stripe.com/test/dashboard

Paypal

You can register an account with Paypal and create a test account: https://developer.paypal.com/developer/accounts/

  1. Create account in paypal - https://www.paypal.com/welcome/signup

  2. Create sandbox accounts (I think they are created automatically after creating a paypal account) - https://developer.paypal.com/developer/accounts/

  3. Verify your email

  4. Copy credentials - https://developer.paypal.com/developer/accounts/

    1. Open Profile of the facilitator/business account

    2. Go to API Credentials and store username, password and signature

  5. You can then use these detail to create a payment method in OFN.

When trying to pay with Paypal it will want you to log in. Create a buyer account with your developer test account (but I think it is done automatically. Once logged in your this buyer account account, you can checkout on the OFn and select "pay with visa card" for example without entering details and it should work.

Problems with PR staging?

In this page : https://semaphoreci.com/openfoodfoundation/openfoodnetwork-2/branches/dependabot-bundler-sass-3-4-25/builds/4 you can click "deploy failed" to get to https://semaphoreci.com/openfoodfoundation/openfoodnetwork-2/servers/au-staging/deploys/125 where you can open the last tab before the red one (it starts with git push -f [[email protected]](mailto:[email protected])"), if you scroll down or search for failed you will see the error.

Differences in Staging Servers (as of 21.02.2020)

UK and AU for performance test:

    • DOrV-Online enterprise has 10000 product on staging AU

    • UK has lots of enterprises

A short list on untestable things, on each staging server:

  • Don't test images on UK staging

  • For some time stripe wasn't testable on UK staging => fixed?

  • Don't test reports on ES

  • Don't test the map on FR

Product Import

  • Each staging server may be configured differently, .csv files used for importing products probably won’t work throughout all staging servers. Examples:

    • Category (category): in UK possible value is “Fruit & Vegetables” whereas in FR and KA only accepts “Fruit”

    • Tax Category (tax_category): KA and FR requires a value in this field, otherwise product import fails. For KA possible value is needs to be “IVA Espanyol”.