Your personal data will be used to support your experience throughout this website, to manage access to your account, and for other purposes described in our [dokan_privacy_policy]
', + dashboard_menu_manager: [], }, colorsSettings: { @@ -803,6 +814,7 @@ export const dbData = { 'color-4': '#DD3B0F', }, }, + dashboard_menu_manager: [], }, liveSearchSettings: { @@ -810,13 +822,33 @@ export const dbData = { dashboard_menu_manager: [], }, + printful: { + app: '', + size_guide_sub_section: '', + popup_title: 'Size Guide', + popup_text_color: '#000000', + popup_bg_color: '#FFFFFF', + tab_bg_color: '#EEEEEE', + active_tab_bg_color: '#DDDDDD', + size_guide_button_text: 'Size Guide', + button_text_color: '#1064A9', + primary_measurement_unit: 'inches', + app_id: PRINTFUL_APP_ID ?? '', + app_secret: PRINTFUL_APP_SECRET ?? '', + dashboard_menu_manager: [], + }, + storeSupportSettings: { enabled_for_customer_order: 'on', store_support_product_page: 'above_tab', support_button_label: 'Get Support', + dashboard_menu_manager: [], }, - sellerVerificationSettings: { + vendorVerificationSettings: { + verified_icon: 'check_circle_solid', + vendor_verification_methods: '', + vendor_verification_social_section: '', facebook_app_details: '', twitter_app_details: '', google_details: '', @@ -827,6 +859,17 @@ export const dbData = { twitter_app_secret: '', google_app_id: '', google_app_secret: '', + linkedin_app_id: '', + linkedin_app_secret: '', + dashboard_menu_manager: [], + }, + + VendorVerificationsInitialMethodIds: { + passport: 1, + national_id: 2, + driving_license: 3, + address: 4, + company: 5, }, verificationSMSGatewaysSettings: { @@ -843,12 +886,14 @@ export const dbData = { // twilio details twilio_details: '', + dashboard_menu_manager: [], }, emailVerificationSettings: { enabled: 'off', registration_notice: 'Please check your email and complete email verification to login.', login_notice: 'Please check your email and complete email verification to login.', + dashboard_menu_manager: [], }, socialAPISettings: { @@ -863,6 +908,7 @@ export const dbData = { fb_app_secret: '', twitter_app_id: '', twitter_app_secret: '', + dashboard_menu_manager: [], }, shippingStatusSettings: { @@ -906,6 +952,7 @@ export const dbData = { value: 'On the way', }, ], + dashboard_menu_manager: [], }, quoteSettings: { @@ -920,6 +967,7 @@ export const dbData = { decrease_offered_price: '0', enable_convert_to_order: 'off', enable_quote_converter_display: 'off', + dashboard_menu_manager: [], }, liveChatSettings: { @@ -954,12 +1002,14 @@ export const dbData = { }, ], rma_policy: 'Refund Policy
', + dashboard_menu_manager: [], }, wholesaleSettings: { wholesale_price_display: 'all_user', display_price_in_shop_archieve: 'on', need_approval_for_wholesale_customer: 'off', + dashboard_menu_manager: [], }, euComplianceSettings: { @@ -979,6 +1029,7 @@ export const dbData = { }, enabled_germanized: 'on', override_invoice_number: 'on', + dashboard_menu_manager: [], }, deliveryTimeSettings: { @@ -1029,6 +1080,7 @@ export const dbData = { opening_time: '12:00 am', closing_time: '11:59 pm', }, + dashboard_menu_manager: [], }, productAdvertisingSettings: { @@ -1040,6 +1092,7 @@ export const dbData = { featured: 'on', catalog_priority: 'on', hide_out_of_stock_items: 'on', + dashboard_menu_manager: [], }, geolocationSettings: { @@ -1057,6 +1110,7 @@ export const dbData = { address: 'New York, NY, USA', zoom: '10', }, + dashboard_menu_manager: [], }, productReportAbuseSettings: { @@ -1099,6 +1153,7 @@ export const dbData = { value: 'This product is fake', }, ], + dashboard_menu_manager: [], }, spmvSettings: { @@ -1107,21 +1162,6 @@ export const dbData = { available_vendor_list_title: 'Other Available Vendor', available_vendor_list_position: 'below_tabs', show_order: 'show_all', - }, - - printful: { - app: '', - size_guide_sub_section: '', - popup_title: 'Size Guide', - popup_text_color: '#000000', - popup_bg_color: '#FFFFFF', - tab_bg_color: '#EEEEEE', - active_tab_bg_color: '#DDDDDD', - size_guide_button_text: 'Size Guide', - button_text_color: '#1064A9', - primary_measurement_unit: 'inches', - app_id: PRINTFUL_APP_ID ?? '', - app_secret: PRINTFUL_APP_SECRET ?? '', dashboard_menu_manager: [], }, @@ -1136,6 +1176,7 @@ export const dbData = { cancelling_email_body: 'Dear subscriber, Your subscription has expired. Please renew your package to continue using it.', alert_email_subject: 'Subscription Ending Soon', alert_email_body: 'Dear subscriber, Your subscription will be ending soon. Please renew your package in a timely', + dashboard_menu_manager: [], }, // dokan pro license diff --git a/tests/pw/utils/dbUtils.ts b/tests/pw/utils/dbUtils.ts index 5f38b8a43d..50866bd80c 100644 --- a/tests/pw/utils/dbUtils.ts +++ b/tests/pw/utils/dbUtils.ts @@ -224,4 +224,11 @@ export const dbUtils = { const res = await dbUtils.dbQuery(query, [vendorId, followerId, currentTime, vendorId, followerId]); return res; }, + + async addStoreMapLocation(sellerId: string) { + await dbUtils.setUserMeta(sellerId, 'dokan_geo_latitude', '40.7127753', false); + await dbUtils.setUserMeta(sellerId, 'dokan_geo_longitude', '-74.0059728', false); + await dbUtils.setUserMeta(sellerId, 'dokan_geo_public', '1', false); + await dbUtils.setUserMeta(sellerId, 'dokan_geo_address', 'New York, NY, USA', false); + }, }; diff --git a/tests/pw/utils/payloads.ts b/tests/pw/utils/payloads.ts index e6416ac129..9d98d71de5 100644 --- a/tests/pw/utils/payloads.ts +++ b/tests/pw/utils/payloads.ts @@ -2251,7 +2251,7 @@ export const payloads = { // title : 'dokan', // description : 'Just another WordPress site', // url : 'http://dokan.test', - email : 'shashwata@wedevs.com', + email: 'shashwata@wedevs.com', timezone: 'Asia/Dhaka', date_format: 'F j, Y', time_format: 'g:i a', @@ -3628,22 +3628,23 @@ export const payloads = { colorSchemeCustomizer: 'color_scheme_customizer', deliveryTime: 'delivery_time', elementor: 'elementor', - exportImport: 'export_import', + euCompliance: 'germanized', followStore: 'follow_store', geolocation: 'geolocation', - germanized: 'germanized', liveChat: 'live_chat', liveSearch: 'live_search', mangopay: 'mangopay', moip: 'moip', - orderMinMax: 'order_min_max', + minMaxQuantities: 'order_min_max', paypalMarketplace: 'paypal_marketplace', printful: 'printful', productAddon: 'product_addon', productAdvertising: 'product_advertising', productEnquiry: 'product_enquiry', - productSubscription: 'product_subscription', + productSubscription: 'vsp', + productQa: 'product_qa', rankMath: 'rank_math', + razorpay: 'razorpay', reportAbuse: 'report_abuse', requestForQuotation: 'request_for_quotation', rma: 'rma', @@ -3657,9 +3658,10 @@ export const payloads = { stripeExpress: 'stripe_express', tableRateShipping: 'table_rate_shipping', vendorAnalytics: 'vendor_analytics', + vendorImportExport: 'export_import', vendorStaff: 'vendor_staff', vendorVerification: 'vendor_verification', - vsp: 'vsp', + vendorSubscription: 'product_subscription', wholesale: 'wholesale', }, @@ -4929,6 +4931,7 @@ export const payloads = { shipping_number: '#002', shipped_status: 'ss_pickedup', // ss_delivered, ss_cancelled, ss_proceccing, ss_ready_for_pickup, ss_pickedup (has more options) shipped_date: new Date(new Date().setDate(new Date().getDate() + 2)).toISOString(), + shipment_comments: 'updated shipment comment', }, vendorwiseCommission: { diff --git a/tests/pw/utils/schemas.ts b/tests/pw/utils/schemas.ts index 6af4cee463..9a003cdf61 100644 --- a/tests/pw/utils/schemas.ts +++ b/tests/pw/utils/schemas.ts @@ -788,8 +788,8 @@ const refundSchema = z.object({ reason: z.string(), item_qtys: z.record(z.number()), item_totals: z.record(z.string()), - tax_totals: z.record(z.record(z.number())), - restock_items: z.number(), + tax_totals: z.record(z.record(z.string().or(z.number()))), + restock_items: z.string().or(z.number()), created: z.string(), status: z.string(), method: z.string(), @@ -2751,23 +2751,12 @@ export const schemas = { // seller badge schema sellerBadgeSchema: { - verificationTypesSchema: z.object({ - id_verification: verificationTypeSchema, - company_verification: verificationTypeSchema, - address_verification: verificationTypeSchema, - phone_verification: verificationTypeSchema, - social_profiles: verificationTypeSchema, - }), - + verificationTypesSchema: z.record(z.string(), verificationTypeSchema), badgeEventsSchema: z.array(badgeEventSchema), - badgeSchema: badgeSchema, badgesSchema: z.array(badgeSchema), - badgeSeenSchema: z.boolean(), - badgeCreateUpdateSchema: badgeCreateUpdateSchema, - deleteBadgeSchema: z.object({ deleted: z.boolean(), }), diff --git a/tests/pw/utils/testData.ts b/tests/pw/utils/testData.ts index e54182b4c9..c1120801f5 100644 --- a/tests/pw/utils/testData.ts +++ b/tests/pw/utils/testData.ts @@ -32,6 +32,18 @@ const { TALKJS_APP_SECRET, PRINTFUL_APP_ID, PRINTFUL_APP_SECRET, + TEST_PUBLISH_KEY_STRIPE, + TEST_SECRET_KEY_STRIPE, + CLIENT_ID_STRIPE, + SANDBOX_CLIENT_ID_MANGOPAY, + SANDBOX_API_KEY_MANGOPAY, + TEST_KEY_ID_RAZORPAY, + TEST_KEY_SECRET_RAZORPAY, + TEST_PUBLISH_KEY_STRIPE_EXPRESS, + TEST_SECRET_KEY_STRIPE_EXPRESS, + TEST_MERCHANT_ID_PAYPAL_MARKETPLACE, + TEST_CLIENT_ID_PAYPAL_MARKETPLACE, + TEST_CLIENT_SECRET_PAYPAL_MARKETPLACE, } = process.env; const basicAuth = (username: string, password: string) => 'Basic ' + Buffer.from(username + ':' + password).toString('base64'); @@ -855,17 +867,17 @@ export const data = { title: 'Dokan Credit card (Stripe)', description: 'Pay with your credit card via Stripe.', displayNoticeInterval: '7', - testPublishableKey: 'pk_test_', - testSecretKey: 'sk_test_', - testClientId: 'ca_', + testPublishableKey: TEST_PUBLISH_KEY_STRIPE ?? 'pk_test_', + testSecretKey: TEST_SECRET_KEY_STRIPE ?? 'sk_test_', + testClientId: CLIENT_ID_STRIPE ?? 'ca_', }, paypalMarketPlace: { title: 'PayPal Marketplace', description: "Pay via PayPal Marketplace you can pay with your credit card if you don't have a PayPal account", - payPalMerchantId: 'partner_', - sandboxClientId: 'client_', - sandBoxClientSecret: 'secret_', + payPalMerchantId: TEST_MERCHANT_ID_PAYPAL_MARKETPLACE ?? 'partner_', + sandboxClientId: TEST_CLIENT_ID_PAYPAL_MARKETPLACE ?? 'client_', + sandBoxClientSecret: TEST_CLIENT_SECRET_PAYPAL_MARKETPLACE ?? 'secret_', payPalPartnerAttributionId: 'weDevs_SP_Dokan', disbursementMode: 'Delayed', // 'Immediate', 'On Order Complete', 'Delayed' paymentButtonType: 'Smart Payment Buttons', // 'Smart Payment Buttons', 'Standard Button' @@ -876,8 +888,8 @@ export const data = { mangoPay: { title: 'MangoPay', description: 'Pay via MangoPay', - sandboxClientId: 'client_', - sandBoxApiKey: 'secret_', + sandboxClientId: SANDBOX_CLIENT_ID_MANGOPAY ?? 'client_', + sandBoxApiKey: SANDBOX_API_KEY_MANGOPAY ?? 'secret_', availableCreditCards: 'CB/Visa/Mastercard', // 'CB/Visa/Mastercard', 'Maestro*', 'Bancontact/Mister Cash', 'Przelewy24*', 'Diners*', 'PayLib', 'iDeal*', 'MasterPass*', 'Bankwire Direct*' availableDirectPaymentServices: 'Sofort*', // 'Sofort*', 'Giropay*'], transferFunds: 'On payment completed', // 'On payment completed', 'On order completed', 'Delayed' @@ -889,8 +901,8 @@ export const data = { razorPay: { title: 'Razorpay', description: 'Pay securely by Credit or Debit card or Internet Banking through Razorpay.', - testKeyId: 'rzp_test', - testKeySecret: 'rzp_test', + testKeyId: TEST_KEY_ID_RAZORPAY ?? 'rzp_test', + testKeySecret: TEST_KEY_SECRET_RAZORPAY ?? 'rzp_test', disbursementMode: 'Delayed', // 'Immediate', 'On Order Complete', 'Delayed' announcementInterval: '7', }, @@ -898,8 +910,8 @@ export const data = { stripeExpress: { title: 'Dokan Express Payment Methods', description: 'Pay with your credit card via Stripe.', - testPublishableKey: 'pk_test_', - testSecretKey: 'sk_test_', + testPublishableKey: TEST_PUBLISH_KEY_STRIPE_EXPRESS ?? 'pk_test_', + testSecretKey: TEST_SECRET_KEY_STRIPE_EXPRESS ?? 'sk_test_', testWebhookSecret: 'webHook_test_', paymentMethods: { card: 'Credit/Debit Card', @@ -957,7 +969,7 @@ export const data = { shippingFeeRecipient: 'seller', // 'seller', 'admin' taxFeeRecipient: 'seller', // 'seller', 'admin' mapApiSource: 'google_maps', // 'google_maps', 'mapbox' - googleMapApiKey: GMAP, + googleMapApiKey: GMAP ?? '', sellingProductTypes: 'sell_both', // 'physical', 'digital', 'sell_both', commission: { commissionType: 'fixed', // 'fixed','category_based' @@ -1094,6 +1106,11 @@ export const data = { shippingSettings: 'wp-admin/admin.php?page=wc-settings&tab=shipping', shippingZone: (zoneId: string) => `wp-admin/admin.php?page=wc-settings&tab=shipping&zone_id=${zoneId}`, paymentSettings: 'wp-admin/admin.php?page=wc-settings&tab=checkout', + mangoPaySettings: 'wp-admin/admin.php?page=wc-settings&tab=checkout§ion=dokan_mangopay', + paypalMarketplaceSettings: 'wp-admin/admin.php?page=wc-settings&tab=checkout§ion=dokan_paypal_marketplace', + razorPaySettings: 'wp-admin/admin.php?page=wc-settings&tab=checkout§ion=dokan_razorpay', + stripeConnectSettings: 'wp-admin/admin.php?page=wc-settings&tab=checkout§ion=dokan-stripe-connect', + stripeExpressSettings: 'wp-admin/admin.php?page=wc-settings&tab=checkout§ion=dokan_stripe_express', accountSettings: 'wp-admin/admin.php?page=wc-settings&tab=account', }, }, @@ -1170,7 +1187,7 @@ export const data = { withdrawRequests: 'dashboard/withdraw-requests', reverseWithdrawal: 'dashboard/reverse-withdrawal', badges: 'dashboard/seller-badge', - productQA: 'dashboard/product-questions-answers', + productQa: 'dashboard/product-questions-answers', questionDetails: (questionId: string) => `dashboard/product-questions-answers/?question_id=${questionId}`, returnRequest: 'dashboard/return-request', staff: 'dashboard/staffs', @@ -2260,8 +2277,8 @@ export const data = { appearance: { settingTitle: 'Appearance Settings', mapApiSource: 'google_maps', // 'google_maps', 'mapbox' - googleMapApiKey: GMAP, - mapBoxApiKey: MAPBOX, + googleMapApiKey: GMAP ?? '', + mapBoxApiKey: MAPBOX ?? '', storeBannerWidth: '625', storeBannerHeight: '300', saveSuccessMessage: 'Setting has been saved successfully.',