Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix e2e tests for WP 6.4 #3771

Merged
merged 4 commits into from
Nov 21, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Adjust WooCommerce tests
  • Loading branch information
felipeelia committed Nov 20, 2023
commit 0ffcdeec1e5d739c4bf2d6871605b1d174171ae8
18 changes: 9 additions & 9 deletions tests/cypress/integration/features/woocommerce.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ describe('WooCommerce Feature', { tags: '@slow' }, () => {
context('Dashboard', () => {
before(() => {
cy.login();
cy.activatePlugin('woocommerce', 'wpCli');
cy.maybeEnableFeature('protected_content');
cy.maybeEnableFeature('woocommerce');
cy.activatePlugin('woocommerce', 'wpCli');
});

it('Can fetch orders and products from Elasticsearch', () => {
Expand Down Expand Up @@ -164,14 +164,14 @@ describe('WooCommerce Feature', { tags: '@slow' }, () => {

// checkout and place order.
cy.visit('checkout');
cy.get('#billing_first_name').type(userData.firstName);
cy.get('#billing_last_name').type(userData.lastName);
cy.get('#billing_address_1').type(userData.address);
cy.get('#billing_city').type(userData.city);
cy.get('#billing_postcode').type(userData.postCode);
cy.get('#billing_phone').type(userData.phoneNumber);
cy.get('#billing_email').clearThenType(userData.email);
cy.get('#place_order').click();
cy.get('#billing-first_name, #billing_first_name').type(userData.firstName);
cy.get('#billing-last_name, #billing_last_name').type(userData.lastName);
cy.get('#billing-address_1, #billing_address_1').type(userData.address);
cy.get('#billing-city, #billing_city').type(userData.city);
cy.get('#billing-postcode, #billing_postcode').type(userData.postCode);
cy.get('#billing-phone, #billing_phone').type(userData.phoneNumber);
cy.get('#email, #billing_email').clearThenType(userData.email);
cy.get('.wc-block-components-checkout-place-order-button, #place_order').click();

// ensure order is placed.
cy.url().should('include', '/checkout/order-received');
Expand Down
Loading