-
Notifications
You must be signed in to change notification settings - Fork 312
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
Add E2E tests for WooCommerce #2923
Conversation
…d-woocommerce-e2e-tests
…d-woocommerce-e2e-tests
|
||
cy.visitAdminPage('edit.php?post_type=shop_order'); | ||
|
||
cy.get('#post-search-input').type(`${userData.firstName} ${userData.lastName}{enter}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could expand this test a bit. Instead of simply searching for the user name, let's also search for order IDs, billing and shipping info, and items: https://github.com/10up/ElasticPress/blob/develop/includes/classes/Feature/WooCommerce/WooCommerce.php#L411
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
cy.get('#debug-menu-target-EP_Debug_Bar_ElasticPress .ep-query-debug').should( | ||
'contain.text', | ||
"'orderby' => 'date'", | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to be sure we are not capturing an autosuggest template query or similar, can we check for shop_order
in this query?
cy.get('#debug-menu-target-EP_Debug_Bar_ElasticPress .ep-query-debug').should( | ||
'contain.text', | ||
'Query Response Code: HTTP 200', | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same, can we check for shop_order
on this one as well?
'contain.text', | ||
`${userData.firstName} ${userData.lastName}`, | ||
); | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@burhandodhy can we bring to this file the test we have for Product variations skus?
Description of the Change
This PR adds new test cases for the WooCommerce feature.
Credits
Props @burhandodhy
Checklist: