woocommerce/plugins/woocommerce-admin/packages/admin-e2e-tests
Joshua T Flowers 0ab7c7a3ec Remove the preloaded onboarding options (https://github.com/woocommerce/woocommerce-admin/pull/7338)
* Remove unused options

* Remove preloade tracking option

* Remove preloaded wc_connect_options

* Remove preloaded modal options

* Refactor requesting options into task list component

* Remove preloaded dismissed and completed tasks

* Add changelog entry

* Wait for modal before attempting to dismiss

* Attempt to make closing welcome modal more robust

* Update the payment E2E tests to support new app flow

* Update isResolving selectors to hasFinishedResolution

Co-authored-by: Lourens Schep <lourensschep@gmail.com>
2021-08-10 14:58:01 -04:00
..
src Remove the preloaded onboarding options (https://github.com/woocommerce/woocommerce-admin/pull/7338) 2021-08-10 14:58:01 -04:00
typings Remove the preloaded onboarding options (https://github.com/woocommerce/woocommerce-admin/pull/7338) 2021-08-10 14:58:01 -04:00
.npmrc Allow packages to be built in isolation. (https://github.com/woocommerce/woocommerce-admin/pull/7286) 2021-07-14 16:38:57 -04:00
CHANGELOG.md Create E2E package (https://github.com/woocommerce/woocommerce-admin/pull/7084) 2021-07-13 16:38:05 -03:00
README.md Create E2E package (https://github.com/woocommerce/woocommerce-admin/pull/7084) 2021-07-13 16:38:05 -03:00
package.json Add rimraf dev dependency (https://github.com/woocommerce/woocommerce-admin/pull/7485) 2021-08-10 18:11:11 +08:00
tsconfig.json Allow packages to be built in isolation. (https://github.com/woocommerce/woocommerce-admin/pull/7286) 2021-07-14 16:38:57 -04:00

README.md

Admin E2E Tests

An end-to-end test suite for WooCommerce setup, onboarding, home screen/task list, and analytics.

Installation

Install the module

npm install @woocommerce/admin-e2e-tests --save

Usage

Create a E2E test specification file under /tests/e2e/specs/example.test.js:

const { testAdminBasicSetup } = require( '@woocommerce/admin-e2e-tests' );

testAdminBasicSetup();

See the wooCommerce E2E Boilerplate for instructions on setting up an E2E test environment.

Configuration

Add the following entries to tests/e2e/config/default.json

  "onboardingwizard": {
    "industry": "Test industry",
    "numberofproducts": "1 - 10",
    "sellingelsewhere": "No"
  },
  "settings": {
    "shipping": {
      "zonename": "United States",
      "zoneregions": "United States (US)",
      "shippingmethod": "Free shipping"
    }
  }

Available tests

The following test functions are included in the package:

Function Description
testAdminBasicSetup Test that WooCommerce can be activated with pretty permalinks
testAdminOnboardingWizard Complete the onboarding wizard with US merchant
testAdminNonUSRecommendedFeatures Complete the onboarding wizard with non-US merchant
testSelectiveBundleWCPay Ensure onboarding wizard offers WC Payments in appropriate contexts
testAdminAnalyticsPages Test that the React App is functional on Analytics pages
testAdminCouponsPage Test that the Coupons is functional
testAdminPaymentSetupTask Test that payment methods can be configured