Skip to content

Commit

Permalink
update: update dbdata
Browse files Browse the repository at this point in the history
  • Loading branch information
shashwatahalder01 committed Mar 8, 2024
1 parent 9547331 commit 40e023e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 58 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/all-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -119,15 +119,15 @@ jobs:
if: success()
run: |
cd plugins/dokan-pro
npm ci
npm ci || npm i
npm run build
# Install test dependencies
- name: Install test dependencies
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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions tests/pw/tests/api/_env.setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/pw/tests/e2e/_env.setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down
56 changes: 6 additions & 50 deletions tests/pw/utils/dbData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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',
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/pw/utils/testData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},

Expand Down

0 comments on commit 40e023e

Please sign in to comment.