Skip to content

Commit

Permalink
Fix block checkout address fillup.
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdharmesh committed Aug 28, 2024
1 parent c87531b commit feb1d82
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/e2e/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,10 @@ export async function addToCart(page) {
* @param {Object} customerDetails Customer billing details
*/
export async function blockFillBillingDetails(page, customerDetails) {
const card = await page.locator('.wc-block-components-address-card');
if (await card.isVisible()) {
await card.locator('.wc-block-components-address-card__edit').click();
}
await page.locator('#email').fill(customerDetails.email);
await page.locator('#billing-first_name').fill(customerDetails.firstname);
await page.locator('#billing-last_name').fill(customerDetails.lastname);
Expand Down

0 comments on commit feb1d82

Please sign in to comment.