woocommerce/packages/js/admin-e2e-tests
Paul Sealock 7229b65bc9
Changelogger: Fix PHPCS violations (#33664)
2022-07-07 08:54:48 +12:00
..
changelog Changelogger: Fix PHPCS violations (#33664) 2022-07-07 08:54:48 +12:00
src Add tests for react admin translations (#33510) 2022-07-05 17:16:15 -07: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 Changelogger: Fix PHPCS violations (#33664) 2022-07-07 08:54:48 +12:00
composer.lock Add PR numbers to changelog entries on code freeze process (#33627) 2022-06-28 11:15:39 -07:00
package.json Add helper tool for making sure build, lint, and test are run through Turborepo (#33573) 2022-06-28 13:17:05 -05:00
tsconfig.json Converted Spaces To Tabs In JSON 2022-05-10 13:31:01 -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