Adds WooCommerce support to Cypress.
npm install -D cypress-woocommerce
Example:
import {
CustomerFlow,
StoreOwnerFlow
} from 'cypress-woocommerce';
describe( 'Cart page', () => {
before( () => {
StoreOwnerFlow.login();
StoreOwnerFlow.openSettings();
StoreOwnerFlow.logout();
} );
it( 'should display no item in the cart', () => {
CustomerFlow.goToCart()
cy.contains( '.cart-empty', 'Your cart is currently empty.' )
} );
} );