woocommerce/packages/js/admin-e2e-tests
Paul Sealock 5537da6e9d
Packages: Add Changelogger scripts (#32813)
2022-05-05 15:26:36 +12:00
..
changelog Packages: Add Changelogger scripts (#32813) 2022-05-05 15:26:36 +12:00
src Update e2e to use table instead 2022-04-29 09:09:06 +08:00
typings Moved WCA Packages 2022-03-18 14:25:26 -07:00
.eslintrc.js reference local eslint plugin package 2022-04-28 10:00:29 +12:00
.npmrc Moved WCA Packages 2022-03-18 14:25:26 -07:00
CHANGELOG.md Revert "Changed e2e payment settings page detection" 2022-04-21 14:08:32 +08:00
README.md Moved WCA Packages 2022-03-18 14:25:26 -07:00
composer.json Packages: Add Changelogger scripts (#32813) 2022-05-05 15:26:36 +12:00
composer.lock Packages: Add Changelogger scripts (#32813) 2022-05-05 15:26:36 +12:00
package.json Packages: Add Changelogger scripts (#32813) 2022-05-05 15:26:36 +12:00
project.json Added Changelogs 2022-05-02 12:55:48 -07:00
tsconfig.json Moved WCA Packages 2022-03-18 14:25:26 -07: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

pnpm 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