From 11894a39869a0bf5a1a74b78c8ac500eca42b3a7 Mon Sep 17 00:00:00 2001 From: Tam Mullen Date: Fri, 20 Nov 2020 13:15:13 +0000 Subject: [PATCH] Added function for opening an existing order --- tests/e2e/utils/src/flows.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/e2e/utils/src/flows.js b/tests/e2e/utils/src/flows.js index 94b1340f548..e251c2d5fcb 100644 --- a/tests/e2e/utils/src/flows.js +++ b/tests/e2e/utils/src/flows.js @@ -20,6 +20,7 @@ const WP_ADMIN_DASHBOARD = baseUrl + 'wp-admin'; const WP_ADMIN_PLUGINS = baseUrl + 'wp-admin/plugins.php'; const WP_ADMIN_SETUP_WIZARD = baseUrl + 'wp-admin/admin.php?page=wc-admin'; const WP_ADMIN_ALL_ORDERS_VIEW = baseUrl + 'wp-admin/edit.php?post_type=shop_order'; +const WP_ADMIN_SINGLE_ORDER_VIEW = baseUrl + 'wp-admin/post.php?post='; const WP_ADMIN_NEW_COUPON = baseUrl + 'wp-admin/post-new.php?post_type=shop_coupon'; const WP_ADMIN_NEW_ORDER = baseUrl + 'wp-admin/post-new.php?post_type=shop_order'; const WP_ADMIN_NEW_PRODUCT = baseUrl + 'wp-admin/post-new.php?post_type=product'; @@ -281,6 +282,12 @@ const StoreOwnerFlow = { } ); }, + openOrder: async ( postID ) => { + await page.goto( WP_ADMIN_SINGLE_ORDER_VIEW + postID + `&action=edit`, { + waitUntil: 'networkidle0', + } ); + }, + openPermalinkSettings: async () => { await page.goto( WP_ADMIN_PERMALINK_SETTINGS, { waitUntil: 'networkidle0',