woocommerce/packages/js/admin-e2e-tests
Chi-Hsuan Huang 7068c78101
Fix JS lint errors (#33484)
* Fix @woocommerce/data lint errors

* Fix internal-e2e-builds lint error

* Fix lint errors
2022-06-21 16:37:34 +08:00
..
changelog Update onboarding email marketing checkbox default to false (#33292) 2022-06-13 09:55:57 +08:00
src Fix JS lint errors (#33484) 2022-06-21 16:37:34 +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 Set Composer Platform Requirements (#33245) 2022-05-27 14:57:33 -07:00
composer.lock Set Composer Platform Requirements (#33245) 2022-05-27 14:57:33 -07:00
package.json Migrate From Nx to Turborepo (#33079) 2022-06-09 14:40:07 -07: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