woocommerce/packages/js/admin-e2e-tests
Vladimir Reznichenko 68532ce433
CI: update linting jobs to skip build step (#49193)
In this PR, we introduce changes to linting and PHPUnit jobs in order to speed them up: skip or minimize the build step.
2024-07-08 08:39:39 +02:00
..
changelog [Accessibilite] Fix typo in packages/js/admin-e2e-tests/ test (#48642) 2024-06-21 10:02:08 -07:00
src [Accessibilite] Fix typo in packages/js/admin-e2e-tests/ test (#48642) 2024-06-21 10:02:08 -07:00
typings Moved WCA Packages 2022-03-18 14:25:26 -07:00
.eslintrc.js CI: update linting jobs to skip build step (#49193) 2024-07-08 08:39:39 +02: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 chore: Unify imports syntax in admin-e2e, add missing dependencies (#33901) 2022-08-29 10:36:36 +08:00
composer.json bump php version in packages/js/*/composer.json (#42020) 2024-01-04 10:18:34 -04:00
composer.lock Update changelogger to 3.3.0 to support PR number capturing with merge (#36266) 2023-01-05 14:42:51 +05:30
package.json Update to pnpm 9.1 (#47385) 2024-05-13 10:57:39 -03:00
tsconfig.json Update tsconfigs to explicitly include files to avoid TS build errors (#47156) 2024-05-07 13:18:56 +12: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:

import { testAdminBasicSetup } from '@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