From 40e023e07e43aa413bbc1464040701a64e9d0fc2 Mon Sep 17 00:00:00 2001 From: shashwata Date: Fri, 8 Mar 2024 15:37:44 +0600 Subject: [PATCH] update: update dbdata --- .github/workflows/all-tests.yml | 8 ++--- tests/pw/tests/api/_env.setup.ts | 3 +- tests/pw/tests/e2e/_env.setup.ts | 2 +- tests/pw/utils/dbData.ts | 56 ++++---------------------------- tests/pw/utils/testData.ts | 2 +- 5 files changed, 13 insertions(+), 58 deletions(-) diff --git a/.github/workflows/all-tests.yml b/.github/workflows/all-tests.yml index 62de23ce76..a6dc1025da 100644 --- a/.github/workflows/all-tests.yml +++ b/.github/workflows/all-tests.yml @@ -106,7 +106,7 @@ jobs: - name: Npm install and build (Dokan-lite) if: success() run: | - npm ci + npm ci || npm i npm run build - name: Composer install and build (Dokan-pro) @@ -119,7 +119,7 @@ jobs: if: success() run: | cd plugins/dokan-pro - npm ci + npm ci || npm i npm run build # Install test dependencies @@ -127,7 +127,7 @@ jobs: if: success() run: | cd tests/pw - npm ci + npm ci || npm i # Override wp-env for pro required plugins - name: Allow override wp-env.json via .wp-env.override.json @@ -283,7 +283,7 @@ jobs: # Backup Database - name: Backup Database - if: steps.wp-env.outcome == 'success' + if: steps.db-port.outcome == 'success' run: | cd tests/pw npm run wp-env run tests-cli wp db export wp-data/db.sql diff --git a/tests/pw/tests/api/_env.setup.ts b/tests/pw/tests/api/_env.setup.ts index c4cb51468b..c8c4d4cbc4 100644 --- a/tests/pw/tests/api/_env.setup.ts +++ b/tests/pw/tests/api/_env.setup.ts @@ -44,12 +44,11 @@ setup.describe('setup site & woocommerce & user settings', () => { setup('set dokan license @pro', async () => { setup.skip(!DOKAN_PRO, 'skip on lite'); await dbUtils.setDokanSettings(dbData.dokan.optionName.dokanProLicense, dbData.dokan.dokanProLicense); - await dbUtils.setDokanSettings(dbData.dokan.optionName.dokanProActiveModules, dbData.dokan.dokanProActiveModules); }); setup('activate all dokan modules @pro', async () => { setup.skip(!DOKAN_PRO, 'skip on lite'); - await dbUtils.setDokanSettings(dbData.dokan.optionName.dokanProActiveModules, dbData.dokan.dokanProActiveModules); + await dbUtils.setDokanSettings(dbData.dokan.optionName.dokanProActiveModules, dbData.dokan.modules); }); setup('check active dokan modules @pro', async () => { diff --git a/tests/pw/tests/e2e/_env.setup.ts b/tests/pw/tests/e2e/_env.setup.ts index 7526ee6f1a..e08ab6c411 100644 --- a/tests/pw/tests/e2e/_env.setup.ts +++ b/tests/pw/tests/e2e/_env.setup.ts @@ -49,7 +49,7 @@ setup.describe('setup site & woocommerce & dokan settings', () => { setup('activate all dokan modules @pro', async () => { setup.skip(!DOKAN_PRO, 'skip on lite'); - await dbUtils.setDokanSettings(dbData.dokan.optionName.dokanProActiveModules, dbData.dokan.dokanProActiveModules); + await dbUtils.setDokanSettings(dbData.dokan.optionName.dokanProActiveModules, dbData.dokan.modules); }); setup('check active dokan modules @pro', async () => { diff --git a/tests/pw/utils/dbData.ts b/tests/pw/utils/dbData.ts index 5ae07820c1..a33ca9e66d 100644 --- a/tests/pw/utils/dbData.ts +++ b/tests/pw/utils/dbData.ts @@ -1091,7 +1091,6 @@ export const dbData = { alert_email_body: 'Dear subscriber, Your subscription will be ending soon. Please renew your package in a timely', }, - // dokan pro license dokanProLicense: { key: process.env.LICENSE_KEY, @@ -1105,24 +1104,26 @@ export const dbData = { }, // dokan pro modules - dokanProActiveModules: [ - 'booking', + modules: [ 'auction', + 'booking', 'color_scheme_customizer', 'delivery_time', 'elementor', - 'germanized', + 'export_import', 'follow_store', 'geolocation', + 'germanized', 'live_chat', 'live_search', 'mangopay', + 'moip', 'order_min_max', 'paypal_marketplace', 'product_addon', 'product_advertising', 'product_enquiry', - 'vsp', + 'product_subscription', 'rank_math', 'razorpay', 'report_abuse', @@ -1138,55 +1139,10 @@ export const dbData = { 'stripe_express', 'table_rate_shipping', 'vendor_analytics', - 'export_import', 'vendor_staff', - 'product_subscription', 'vendor_verification', - 'wholesale', - 'moip', - ], - - // modules - modules: [ - 'booking', - 'color_scheme_customizer', - 'delivery_time', - 'elementor', - 'export_import', - 'follow_store', - 'geolocation', - 'germanized', - 'live_chat', - 'live_search', - 'moip', - 'dokan_paypal_ap', - 'paypal_marketplace', - 'product_addon', - 'product_enquiry', - 'report_abuse', - 'rma', - 'seller_vacation', - 'shipstation', - 'auction', - 'spmv', - 'store_reviews', - 'store_support', - 'stripe', - 'product_advertising', - 'product_subscription', - 'vendor_analytics', - 'vendor_staff', 'vsp', - 'vendor_verification', 'wholesale', - 'rank_math', - 'table_rate_shipping', - 'mangopay', - 'order_min_max', - 'razorpay', - 'seller_badge', - 'stripe_express', - 'request_for_quotation', ], // abuse report diff --git a/tests/pw/utils/testData.ts b/tests/pw/utils/testData.ts index 827a8acde6..609e5e33f5 100644 --- a/tests/pw/utils/testData.ts +++ b/tests/pw/utils/testData.ts @@ -2026,7 +2026,7 @@ export const data = { // dokan license dokanLicense: { - correctKey: String(process.env.LICENSE_KEY), + correctKey: process.env.LICENSE_KEY, incorrectKey: 'ABC-123-DEF-456-GHI-789', },