
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@woocommerce/e2e-core-tests
Advanced tools
This package contains the automated end-to-end tests for WooCommerce.
Follow E2E setup instructions.
Version 0.2.0 added a test installer that will populate the tests/e2e/specs
folder with test scripts for all the current core test suite. It also creates sample configuration files including all the configuration data needed to run the core tests.
npm install @woocommerce/e2e-environment --save-dev
npx wc-e2e install @woocommerce/e2e-core-tests
tests/e2e/docker/woocommerce.e2e-core-tests.sh
=> initialize.sh
tests/e2e/config/default-woocommerce.e2e-core-tests.json
=> default.json
tests/e2e/specs
in your repository if it does not exist..test.js
file within tests/e2e/specs
. Example code to run all the shopper tests:
const { runShopperTests } = require( '@woocommerce/e2e-core-tests' );
runShopperTests();
On a new site, the setup and activation tests prepare the site for the remainder of the tests. To retry/rerun the test suite on a site where setup/onboarding test have already run use the environment variable E2E_RETEST=1
.
The functions to access the core tests are:
runSetupOnboardingTests
- Run all setup and onboarding tests
runActivationTest
- Merchant can activate WooCommercerunOnboardingFlowTest
- Merchant can complete onboarding flowrunTaskListTest
- Merchant can complete onboarding task listrunInitialStoreSettingsTest
- Merchant can complete initial settingsrunMerchantTests
- Run all merchant tests
runAddShippingClassesTest
- Merchant can create shipping classes and let shopper test themrunAddNewShippingZoneTest
- Merchant can create shipping zones and let shopper test themrunAddSimpleProductTest
- Merchant can create a simple productrunAddVariableProductTest
- Merchant can create a variable productrunCreateCouponTest
- Merchant can create couponrunCreateOrderTest
- Merchant can create orderrunMerchantOrdersCustomerPaymentPage
- Merchant can visit the customer payment pagerunMerchantOrderEmailsTest
- Merchant can receive order emails and resend emails by Order ActionsrunEditOrderTest
- Merchant can edit an order in the dashboardrunOrderStatusFilterTest
- Merchant can filter orders by order statusrunOrderRefundTest
- Merchant can refund an orderrunOrderApplyCouponTest
- Merchant can apply a coupon to an orderrunOrderSearchingTest
- Merchant can search for order via different termsrunProductEditDetailsTest
- Merchant can edit an existing productrunProductSearchTest
- Merchant can search for a product and view itrunProductSettingsTest
- Merchant can update product settingsrunTaxSettingsTest
- Merchant can update tax settingsrunUpdateGeneralSettingsTest
- Merchant can update general settingsrunMerchantOrderEmailsTest
- Merchant can receive order emails and resend emails by Order ActionsrunAnalyticsPageLoadsTest
- Merchant can load and see all pages in AnalyticsrunImportProductsTest
- Merchant can import products via CSV filerunInitiateWccomConnectionTest
- Merchant can initiate connection to WooCommerce.comrunAdminPageLoadTests
- Merchant can load pages from the WP Admin sidebarrunShopperTests
- Run all shopper tests
runCartApplyCouponsTest
- Shopper can use coupons on cartrunCartPageTest
- Shopper can view and update cartrunCheckoutApplyCouponsTest
- Shopper can use coupons on checkoutrunCheckoutPageTest
- Shopper can complete checkoutrunMyAccountPageTest
- Shopper can access my account pagerunMyAccountPayOrderTest
- Shopper can pay for their order in My AccountrunProductBrowseSearchSortTest
- Shopper can browse, search & sort productsrunSingleProductPageTest
- Shopper can view single product page in many variations (simple, variable, grouped)runVariableProductUpdateTest
- Shopper can view and update variations on a variable productrunCheckoutCreateAccountTest
- Shopper can create an account during checkoutrunCheckoutLoginAccountTest
- Shopper can login to an account during checkoutrunMyAccountCreateAccountTest
- Shopper can create an account via my account pagerunCartCalculateShippingTest
- Shopper can calculate shipping in the cartrunCartRedirectionTest
- Shopper is redirected to the cart page after adding to cartrunOrderEmailReceivingTest
- Shopper can receive an email for his orderrunApiTests
- Run all API tests
runExternalProductAPITest
- Can create, read, and delete an external productrunGroupedProductAPITest
- Can create, read, and delete a grouped productrunVariableProductAPITest
- Can create, read, and delete a variable product and its variationsrunCouponApiTest
- Can create, read, and delete a couponrunOrderApiTest
- Can create, read, and delete an orderexample-test-name.test.js
under the appropriate folder in the specs
directory.const {
it,
describe,
beforeAll,
} = require( '@jest/globals' );
const runExampleTestName = () => {
describe('Example test', () => {
beforeAll(async () => {
// ...
});
it('do some example action', async () => {
// ...
});
// ...
});
});
module.exports = runExampleTestName;
specs/index.js
const runExampleTestName = require( './grouping/example-test-name.test' );
// ...
module.exports = {
// ...
runExampleTestName,
}
FAQs
End-To-End (E2E) tests for WooCommerce
The npm package @woocommerce/e2e-core-tests receives a total of 2 weekly downloads. As such, @woocommerce/e2e-core-tests popularity was classified as not popular.
We found that @woocommerce/e2e-core-tests demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 19 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.