diff --git a/.github/workflows/e2e_api_tests.yml b/.github/workflows/e2e_api_tests.yml
index 91a059ff27..7847e1d2b8 100644
--- a/.github/workflows/e2e_api_tests.yml
+++ b/.github/workflows/e2e_api_tests.yml
@@ -46,7 +46,6 @@ env:
CUSTOMER2: customer2
USER_PASSWORD: 01dokan01
GMAP: ${{secrets.GMAP}}
- MAPBOX: ${{secrets.MAPBOX}}
BASE_URL: http://localhost:9999
CI: true
FORCE_COLOR: 1
diff --git a/tests/pw/.env.example b/tests/pw/.env.example
index 86fd70496f..da3798eef2 100644
--- a/tests/pw/.env.example
+++ b/tests/pw/.env.example
@@ -1,24 +1,21 @@
-# Plugin Configuration
-ADMIN=John_Doe [Admin username]
-ADMIN_PASSWORD=AdminPass123 [Password for the admin account]
-VENDOR=David_Johnson [Vendor username]
-VENDOR2=jhonathon_Smith [Vendor username]
-CUSTOMER=Michael_Williams [Customer username]
-USER_PASSWORD=Passw0rd123 [Password for all other users]
-DOKAN_PRO=true [Dokan pro active status]
-LICENSE_KEY=license_key [Dokan License key]
-GMAP=map_key [Google Maps API key]
-MAPBOX=mapbox_key [Mapbox Maps API key]
-TALKJS_APP_ID=talkjs_app_id [TalkJS App ID]
-TALKJS_APP_SECRET=talkjs_app_secret [TalkJS App Secret]
-VONAGE_API_KEY=vonage_key [Vonage SMS API key]
-VONAGE_API_SECRET=vonage_secret [Vonage SMS API secret]
-FB_APP_ID=facebook_app_id [Facebook App ID]
-FB_APP_SECRET=facebook_app_secret [Facebook App secret]
-PRINTFUL_APP_ID=printful_app_id [Printful App ID]
-PRINTFUL_APP_SECRET=printful_app_secret [Printful App secret]
-RECAPTCHA_SITE_KEY=recaptcha_site_key [reCAPTCHA site key]
-RECAPTCHA_SECRET_KEY=recaptcha_secret_key [reCAPTCHA secret key]
+# Plugin Configuration
+ADMIN=John_Doe [Admin username]
+ADMIN_PASSWORD=AdminPass123 [Password for the admin account]
+VENDOR=David_Johnson [Vendor username]
+VENDOR2=jhonathon_Smith [Vendor username]
+CUSTOMER=Michael_Williams [Customer username]
+USER_PASSWORD=Passw0rd123 [Password for all other users]
+DOKAN_PRO=true [Dokan pro active status]
+LICENSE_KEY=licence_key [Dokan License key]
+GMAP=map_key [Google Maps API key]
+TALKJS_APP_ID=talkjs_app_id [TalkJS App ID]
+TALKJS_APP_SECRET=talkjs_app_secret [TalkJS App Secret]
+VONAGE_API_KEY=vonage_key [Vonage SMS API key]
+VONAGE_API_SECRET=vonage_secret [Vonage SMS API secret]
+FB_APP_ID=facebook_app_id [Facebook App ID]
+FB_APP_SECRET=facebook_app_secret [Facebook App secret]
+PRINTFUL_APP_ID=printful_app_id [Printful App ID]
+PRINTFUL_APP_SECRET=printful_app_secret [Printful App secret]
# Playwright Configuration
BASE_URL=https://example.com [Base URL of the test site]
diff --git a/tests/pw/README.MD b/tests/pw/README.MD
index 70d18d450e..ac217ed7fa 100644
--- a/tests/pw/README.MD
+++ b/tests/pw/README.MD
@@ -6,32 +6,32 @@
## :bookmark: Table of contents
-- [Pre-requisites :pushpin:](#pre-requisites)
- - [Install Node](#install-node)
- - [Install NVM](#install-nvm)
- - [Install Docker](#install-docker)
+- [Pre-requisites :pushpin:](#pre-requisites)
+ - [Install Node](#install-node)
+ - [Install NVM](#install-nvm)
+ - [Install Docker](#install-docker)
-- [Prep for tests :construction:](#prep-for-tests)
- - [Build Dokan plugin](#build-dokan-plugin)
- - [Install Dependencies](#install-dependencies)
- - [Start Wordpress Environment](#start-wordpress-environment)
- - [Create Env file](#create-env-file)
+- [Prep for tests :construction:](#prep-for-tests)
+ - [Build Dokan plugin](#build-dokan-plugin)
+ - [Install Dependencies](#install-dependencies)
+ - [Start Wordpress Environment](#start-wordpress-environment)
+ - [Create Env file](#create-env-file)
-- [Running tests :test_tube: ](#running-tests)
- - [How to run test projects](#how-to-run-test-projects)
- - [How to run tests](#how-to-run-tests)
- - [How to skip tests](#how-to-skip-tests)
- - [How to debug tests](#how-to-debug-tests)
- - [How to serve reports](#how-to-serve-reports)
+- [Running tests :test_tube: ](#running-tests)
+ - [How to run test projects](#how-to-run-test-projects)
+ - [How to run tests](#how-to-run-tests)
+ - [How to skip tests](#how-to-skip-tests)
+ - [How to debug tests](#how-to-debug-tests)
+ - [How to serve reports](#how-to-serve-reports)
-- [Contributing to Dokan-e2e-api-test](#Contributing-to-dokan-e2e-api-test)
- - [How to wright tests](#how-to-run-tests)
+- [Contributing to Dokan-e2e-api-test](#Contributing-to-dokan-e2e-api-test)
+ - [How to wright tests](#how-to-run-tests)
@@ -121,26 +121,23 @@ Create .env file according to .env.example file
```
# Plugin Configuration
-ADMIN=John_Doe [Admin username]
-ADMIN_PASSWORD=AdminPass123 [Password for the admin account]
-VENDOR=David_Johnson [Vendor username]
-VENDOR2=Johnathon_Smith [Vendor username]
-CUSTOMER=Michael_Williams [Customer username]
-USER_PASSWORD=Passw0rd123 [Password for all other users]
-DOKAN_PRO=true [Dokan pro active status]
-LICENSE_KEY=license_key [Dokan License key]
-GMAP=map_key [Google Maps API key]
-MAPBOX=mapbox_key [Mapbox Maps API key]
-TALKJS_APP_ID=talkjs_app_id [TalkJS App ID]
-TALKJS_APP_SECRET=talkjs_app_secret [TalkJS App Secret]
-VONAGE_API_KEY=vonage_key [Vonage SMS API key]
-VONAGE_API_SECRET=vonage_secret [Vonage SMS API secret]
-FB_APP_ID=facebook_app_id [Facebook App ID]
-FB_APP_SECRET=facebook_app_secret [Facebook App secret]
-PRINTFUL_APP_ID=printful_app_id [Printful App ID]
-PRINTFUL_APP_SECRET=printful_app_secret [Printful App secret]
-RECAPTCHA_SITE_KEY=recaptcha_site_key [reCAPTCHA site key]
-RECAPTCHA_SECRET_KEY=recaptcha_secret_key [reCAPTCHA secret key]
+ADMIN=John_Doe [Admin username]
+ADMIN_PASSWORD=AdminPass123 [Password for the admin account]
+VENDOR=David_Johnson [Vendor username]
+VENDOR2=Johnathon_Smith [Vendor username]
+CUSTOMER=Michael_Williams [Customer username]
+USER_PASSWORD=Passw0rd123 [Password for all other users]
+DOKAN_PRO=true [Dokan pro active status]
+LICENSE_KEY=licence_key [Dokan License key]
+GMAP=map_key [Google Maps API key]
+TALKJS_APP_ID=talkjs_app_id [TalkJS App ID]
+TALKJS_APP_SECRET=talkjs_app_secret [TalkJS App Secret]
+VONAGE_API_KEY=vonage_key [Vonage SMS API key]
+VONAGE_API_SECRET=vonage_secret [Vonage SMS API secret]
+FB_APP_ID=facebook_app_id [Facebook App ID]
+FB_APP_SECRET=facebook_app_secret [Facebook App secret]
+PRINTFUL_APP_ID=printful_app_id [Printful App ID]
+PRINTFUL_APP_SECRET=printful_app_secret [Printful App secret]
# Playwright Configuration
BASE_URL=https://example.com [Base URL of the test site]
diff --git a/tests/pw/e2e.config.ts b/tests/pw/e2e.config.ts
index afc051c1dd..8a70dbc577 100644
--- a/tests/pw/e2e.config.ts
+++ b/tests/pw/e2e.config.ts
@@ -21,11 +21,11 @@ export default defineConfig({
/* The maximum number of test failures for the whole test suite run. After reaching this number, testing will stop and exit with an error. */
maxFailures: CI ? 50 : 50,
/* Maximum time one test can run for. */
- timeout: CI ? 35 * 1000 : 45 * 1000,
+ timeout: CI ? 35 * 1000 : 40 * 1000,
/* Configuration for the expect assertion library */
expect: {
/* Maximum time expect() should wait for the condition to be met. For example in `await expect(locator).toHaveText();`*/
- timeout: 15 * 1000,
+ timeout: 10 * 1000,
toHaveScreenshot: {
maxDiffPixelRatio: 0.2,
maxDiffPixels: 500,
diff --git a/tests/pw/feature-map/feature-map.yml b/tests/pw/feature-map/feature-map.yml
index 76cd0b4085..044d729366 100644
--- a/tests/pw/feature-map/feature-map.yml
+++ b/tests/pw/feature-map/feature-map.yml
@@ -294,27 +294,10 @@
- page: 'Store Appearance'
features:
- admin:
- admin can enable store map on store sidebar [lite]: true
- admin can disable store map on store sidebar [lite]: true
- admin can set map api source (Google Maps) [lite]: true
- admin can set map api source (Mapbox) [lite]: true
- admin can enable Google reCAPTCHA validation [lite]: true
- admin can disable Google reCAPTCHA validation [lite]: true
- admin can enable store contact form on store sidebar [lite]: true
- admin can disable store contact form on store sidebar [lite]: true
- admin can set store header template (default) [lite]: true
- admin can set store header template (layout1) [lite]: true
- admin can set store header template (layout2) [lite]: true
- admin can set store header template (layout3) [lite]: true
- admin can enable store open-close time on store sidebar [lite]: true
- admin can disable store open-close time on store sidebar [lite]: true
- admin can enable store sidebar from theme [lite]: true
- admin can disable store sidebar from theme [lite]: true
- admin can enable vendor info on single store page [lite]: true
- admin can disable vendor info on single store page [lite]: true
- admin can enable Dokan FontAwesome library [lite]: true
- admin can disable Dokan FontAwesome library [lite]: true
+ customer:
+ store map is disabled on store sidebar [lite]: true
+ store open-close time is disabled store sidebar [lite]: true
+ vendor info is disabled on single store page [lite]: false
- page: 'Store List'
features:
@@ -677,7 +660,7 @@
admin can refresh license: true
admin can deactivate license: true
-- page: 'Feature Lock'
+- page: 'Feature lock'
features:
admin:
admin can view license expiration notice: false
diff --git a/tests/pw/fixtures/page.ts b/tests/pw/fixtures/page.ts
index d846919d2e..af0c3ecc09 100644
--- a/tests/pw/fixtures/page.ts
+++ b/tests/pw/fixtures/page.ts
@@ -41,7 +41,7 @@ import { ShortcodePage } from '@pages/shortcodePage';
import { SingleProductPage } from '@pages/singleProductPage';
import { SingleStorePage } from '@pages/singleStorePage';
import { SpmvPage } from '@pages/spmvPage';
-import { StoreAppearancePage } from '@pages/storeAppearancePage';
+import { StoreAppearance } from '@pages/storeAppearance';
import { StoreCategoriesPage } from '@pages/storeCategoriesPage';
import { StoreListingPage } from '@pages/storeListingPage';
import { StoreReviewsPage } from '@pages/storeReviewsPage';
@@ -111,7 +111,7 @@ type pages = {
singleProductPage: SingleProductPage;
singleStorePage: SingleStorePage;
spmvPage: SpmvPage;
- storeAppearance: StoreAppearancePage;
+ storeAppearance: StoreAppearance;
storeCategoriesPage: StoreCategoriesPage;
storeListingPage: StoreListingPage;
storeReviewsPage: StoreReviewsPage;
@@ -308,7 +308,7 @@ export const test = base.extend({
},
storeAppearance: async ({ page }, use) => {
- await use(new StoreAppearancePage(page));
+ await use(new StoreAppearance(page));
},
storeCategoriesPage: async ({ page }, use) => {
diff --git a/tests/pw/pages/basePage.ts b/tests/pw/pages/basePage.ts
index 0186a2578c..d0d2bb9a72 100644
--- a/tests/pw/pages/basePage.ts
+++ b/tests/pw/pages/basePage.ts
@@ -1487,12 +1487,6 @@ export class BasePage {
return visibleSelectors;
}
- // assert element to exists
- async toExists(selector: string) {
- const exists = await this.isLocatorExists(selector);
- expect(exists).toBe(true);
- }
-
// assert value to be equal
toBeEqual(received: any, expected: any) {
expect(received).toEqual(expected);
@@ -1610,12 +1604,6 @@ export class BasePage {
.toBe(200);
}
- // assert element not to exists
- async notToExists(selector: string) {
- const exists = await this.isLocatorExists(selector);
- expect(exists).toBe(false);
- }
-
// assert two element to have same count
async toHaveEqualCount(selector1: string, selector2: string, options?: { timeout?: number; intervals?: number[] }) {
await this.toPass(async () => {
diff --git a/tests/pw/pages/privacyPolicyPage.ts b/tests/pw/pages/privacyPolicyPage.ts
index 3d94ab77ec..61d410e417 100644
--- a/tests/pw/pages/privacyPolicyPage.ts
+++ b/tests/pw/pages/privacyPolicyPage.ts
@@ -16,7 +16,7 @@ export class PrivacyPolicyPage extends CustomerPage {
// contact vendor
async contactVendor(storeName: string, storeContactData: storeContactData) {
await this.toPass(async () => {
- await this.gotoUntilNetworkidle(data.subUrls.frontend.vendorDetails(helpers.slugify(storeName)), { waitUntil: 'networkidle' }, true);
+ await this.gotoUntilNetworkidle(data.subUrls.frontend.vendorDetails(helpers.slugify(storeName)));
await this.toBeVisible(singleStoreCustomer.storeContactForm.storeContactForm);
});
await this.clearAndType(singleStoreCustomer.storeContactForm.name, storeContactData.name);
diff --git a/tests/pw/pages/selectors.ts b/tests/pw/pages/selectors.ts
index 9e54cdfafe..bb36387e20 100644
--- a/tests/pw/pages/selectors.ts
+++ b/tests/pw/pages/selectors.ts
@@ -1447,10 +1447,10 @@ export const selector = {
popup: {
dokanUpgradePopup: '#dokan-upgrade-popup',
closeDokanUpgradePopup: '#dokan-upgrade-popup .close',
- upgradeToProText: 'div.modal-content p.upgrade-text',
- upgradeToPro: 'div.modal-content a.upgrade-button',
- proCard: 'div.modal-content div.promo-card',
- alreadyUpdated: 'div.modal-content a.already-updated',
+ upgradeToProText: '.upgrade-text',
+ upgradeToPro: '.upgrade-button',
+ proCard: '.promo-card',
+ alreadyUpdated: '.already-updated',
},
// modules
@@ -6087,7 +6087,6 @@ export const selector = {
// banner and profile picture
banner: '.dokan-banner .dokan-banner-drag',
- bannerHelpText: 'div.dokan-banner p.help-block',
bannerImage: '//div[@class="image-wrap"]//img[@class="dokan-banner-img"]',
uploadedBanner: 'div#dokan-profile-picture-wrapper div.gravatar-wrap',
removeBannerImage: '.close.dokan-remove-banner-image',
@@ -7441,24 +7440,25 @@ export const selector = {
// Store Profile Summary
storeProfile: {
- storeProfileInfoBox: 'div.profile-info-box',
storeProfileSummary: '.dokan-single-store .profile-info-summery',
- storeBanner: 'div.profile-info-img',
+ storeBanner: '.profile-info-img',
- profileInfoHead: 'div.profile-info-head',
- profileImage: 'div.profile-img.profile-img-circle',
- storeName: 'div.profile-info-head h1.store-name',
+ profileInfoHead: '.profile-info-head',
+ profileImage: '.profile-img.profile-img-circle',
+ storeName: '.profile-info-head .store-name',
verifiedIcon: '//div[@data-original-title="Verified"]',
verifiedIconByIcon: (icon: string) => `//div[@data-original-title="Verified"]//i[@class="${icon}"]`,
- profileInfo: 'div.profile-info',
- storeInfo: 'ul.dokan-store-info',
- storeAddress: 'li.dokan-store-address',
- storePhone: 'li.dokan-store-phone',
- storeEmail: 'li.dokan-store-email',
- // storeRating: 'li.dokan-store-rating',
- // storeOpenClose: 'li.dokan-store-open-close',
+ profileInfo: '.profile-info',
+ storeInfo: '.dokan-store-info',
+ storeAddress: '.dokan-store-address',
+ storePhone: '.dokan-store-phone',
+ storeEmail: '.dokan-store-email',
+ // storeRating: '.dokan-store-rating',
+ // storeOpenClose: '.dokan-store-open-close',
+ storeSocial: '.store-social',
+
euComplianceData: {
companyName: 'li.dokan-company-name',
companyId: 'li.dokan-company-id-number',
@@ -7466,8 +7466,6 @@ export const selector = {
bankName: 'li.dokan-bank-name',
bankIban: 'li.dokan-bank-iban',
},
-
- storeSocial: 'ul.store-social',
},
// Store open close time
@@ -7590,8 +7588,6 @@ export const selector = {
coupon: (code: string) => `//span[@class="coupon-code"]//strong[normalize-space()="${code}"]`,
},
- dokanStoreSideBar: 'div.dokan-store-sidebar div.dokan-widget-area',
-
storeContactForm: {
storeContactForm: 'form#dokan-form-contact-seller',
name: 'form#dokan-form-contact-seller input[placeholder="Your Name"]',
@@ -7602,18 +7598,8 @@ export const selector = {
privacyPolicy: 'div.dokan-privacy-policy-text p',
privacyPolicyLink: 'a.dokan-privacy-policy-link',
},
-
- storeMap: {
- storeMap: 'div#dokan-store-location',
- googleMap: '//div[@id="dokan-store-location"]//a[contains(@href,"https://maps.google.com/")]',
- mapbox: '//div[@id="dokan-store-location"]//a[@href="https://www.mapbox.com/"]',
- },
-
+ storeMap: 'div#dokan-store-location',
storeOpenCloseTime: 'div.dokan-store-open-close',
-
- googleRecaptcha: '//iframe[@title="reCAPTCHA"]',
-
- dokanFontAwesomeLibrary: 'link#dokan-fontawesome-css',
},
cMyOrders: {
diff --git a/tests/pw/pages/storeAppearance.ts b/tests/pw/pages/storeAppearance.ts
new file mode 100644
index 0000000000..b1188ecd7e
--- /dev/null
+++ b/tests/pw/pages/storeAppearance.ts
@@ -0,0 +1,29 @@
+import { Page } from '@playwright/test';
+import { BasePage } from '@pages/basePage';
+import { selector } from '@pages/selectors';
+import { helpers } from '@utils/helpers';
+import { data } from '@utils/testData';
+
+// selectors
+const singleStoreCustomer = selector.customer.cSingleStore;
+
+export class StoreAppearance extends BasePage {
+ constructor(page: Page) {
+ super(page);
+ }
+
+ async disableMapOnStoreSidebar(storeName: string) {
+ await this.goIfNotThere(data.subUrls.frontend.vendorDetails(helpers.slugify(storeName)));
+ await this.notToBeVisible(singleStoreCustomer.storeMap);
+ }
+
+ async disableStoreOpenCloseTimeOnStoreSidebar(storeName: string) {
+ await this.goto(data.subUrls.frontend.vendorDetails(helpers.slugify(storeName)));
+ await this.notToBeVisible(singleStoreCustomer.storeOpenCloseTime);
+ }
+
+ async disableVendorInfoOnSingleStorePage(storeName: string) {
+ await this.goto(data.subUrls.frontend.vendorDetails(helpers.slugify(storeName)));
+ await this.notToBeVisible(singleStoreCustomer.storeOpenCloseTime);
+ }
+}
diff --git a/tests/pw/pages/storeAppearancePage.ts b/tests/pw/pages/storeAppearancePage.ts
deleted file mode 100644
index e7ceb78f8a..0000000000
--- a/tests/pw/pages/storeAppearancePage.ts
+++ /dev/null
@@ -1,113 +0,0 @@
-import { Page } from '@playwright/test';
-import { BasePage } from '@pages/basePage';
-import { selector } from '@pages/selectors';
-import { helpers } from '@utils/helpers';
-import { data } from '@utils/testData';
-
-// selectors
-const singleStoreCustomer = selector.customer.cSingleStore;
-
-export class StoreAppearancePage extends BasePage {
- constructor(page: Page) {
- super(page);
- }
-
- async gotoSingleStore(storeName: string): Promise {
- await this.gotoUntilNetworkidle(data.subUrls.frontend.vendorDetails(helpers.slugify(storeName)), { waitUntil: 'networkidle' }, true);
- }
-
- // view store map on store sidebar
- async viewStoreMapOnStoreSidebar(status: 'enable' | 'disable', storeName: string): Promise {
- await this.gotoSingleStore(storeName);
- if (status === 'enable') {
- await this.toBeVisible(singleStoreCustomer.storeMap.storeMap);
- } else {
- await this.notToBeVisible(singleStoreCustomer.storeMap.storeMap);
- }
- }
-
- // view map api source
- async viewMapAPISource(api: 'Google Maps' | 'Mapbox', storeName: string): Promise {
- await this.gotoSingleStore(storeName);
- if (api === 'Google Maps') {
- await this.multipleElementVisible([singleStoreCustomer.storeMap.storeMap, singleStoreCustomer.storeMap.googleMap]);
- } else {
- await this.multipleElementVisible([singleStoreCustomer.storeMap.storeMap, singleStoreCustomer.storeMap.mapbox]);
- }
- }
-
- // set Google reCAPTCHA
- async viewGoogleRecaptcha(status: 'enable' | 'disable', storeName: string): Promise {
- await this.gotoSingleStore(storeName);
- if (status === 'enable') {
- await this.toBeVisible(singleStoreCustomer.googleRecaptcha);
- } else {
- await this.notToBeVisible(singleStoreCustomer.googleRecaptcha);
- }
- }
-
- // view store contact form on store sidebar
- async viewStoreContactFormOnStoreSidebar(status: 'enable' | 'disable', storeName: string): Promise {
- await this.gotoSingleStore(storeName);
- if (status === 'enable') {
- await this.toBeVisible(singleStoreCustomer.storeContactForm.storeContactForm);
- } else {
- await this.notToBeVisible(singleStoreCustomer.storeContactForm.storeContactForm);
- }
- }
-
- // view store header template
- async viewStoreHeaderTemplate(template: 'default' | 'layout1' | 'layout2' | 'layout3', storeName: string): Promise {
- await this.gotoSingleStore(storeName);
- await this.toHaveClass(singleStoreCustomer.storeProfile.storeProfileInfoBox, `profile-info-box profile-layout-${template}`);
- }
-
- // view store open-close time on store sidebar
- async viewStoreOpenCloseTimeOnStoreSidebar(status: 'enable' | 'disable', storeName: string): Promise {
- await this.gotoSingleStore(storeName);
- if (status === 'enable') {
- await this.toBeVisible(singleStoreCustomer.storeOpenCloseTime);
- } else {
- await this.notToBeVisible(singleStoreCustomer.storeOpenCloseTime);
- }
- }
-
- // set banner size
- async setBannerSize(bannerSize: { width: string; height: string }): Promise {
- await this.goIfNotThere(data.subUrls.frontend.vDashboard.settingsStore);
- await this.toContainText(selector.vendor.vStoreSettings.bannerHelpText, `${bannerSize.width}x${bannerSize.height}`);
- //todo: add more assertion
- }
-
- // view store sidebar from theme
- async viewStoreSideBarFromTheme(status: 'enable' | 'disable', storeName: string): Promise {
- await this.gotoSingleStore(storeName);
- if (status === 'enable') {
- await this.toBeVisible(singleStoreCustomer.dokanStoreSideBar);
- } else {
- await this.notToBeVisible(singleStoreCustomer.dokanStoreSideBar);
- // todo: add more assertions
- }
- }
-
- // view vendor info on single store page
- async viewVendorInfoOnSingleStorePage(status: 'enable' | 'disable', storeName: string): Promise {
- await this.gotoSingleStore(storeName);
- const vendorInfo = [singleStoreCustomer.storeProfile.storeAddress, singleStoreCustomer.storeProfile.storePhone, singleStoreCustomer.storeProfile.storeEmail];
- if (status === 'enable') {
- await this.multipleElementVisible(vendorInfo);
- } else {
- await this.multipleElementNotVisible(vendorInfo);
- }
- }
-
- // view Font Awesome library icons on vendor dashboard
- async viewFontAwesomeLibrary(status: 'enable' | 'disable', storeName: string): Promise {
- await this.gotoSingleStore(storeName);
- if (status === 'enable') {
- await this.toExists(singleStoreCustomer.dokanFontAwesomeLibrary);
- } else {
- await this.notToExists(singleStoreCustomer.dokanFontAwesomeLibrary);
- }
- }
-}
diff --git a/tests/pw/tests/e2e/_auth.setup.ts b/tests/pw/tests/e2e/_auth.setup.ts
index 411e533de1..63a283cbfc 100644
--- a/tests/pw/tests/e2e/_auth.setup.ts
+++ b/tests/pw/tests/e2e/_auth.setup.ts
@@ -3,11 +3,8 @@ import { LoginPage } from '@pages/loginPage';
import { ApiUtils } from '@utils/apiUtils';
import { payloads } from '@utils/payloads';
import { data } from '@utils/testData';
-import { dbUtils } from '@utils/dbUtils';
import { helpers } from '@utils/helpers';
-const { DOKAN_PRO } = process.env;
-
setup.describe('add & authenticate users', () => {
let apiUtils: ApiUtils;
@@ -36,18 +33,6 @@ setup.describe('add & authenticate users', () => {
setup('add vendor1', { tag: ['@lite'] }, async () => {
const [, sellerId] = await apiUtils.createStore(payloads.createStore1, payloads.adminAuth, true);
- // add open-close time
- await apiUtils.updateStore(sellerId, { ...payloads.storeResetFields, ...payloads.storeOpenClose }, payloads.adminAuth);
- // add review
- if (DOKAN_PRO) {
- await apiUtils.createStoreReview(sellerId, { ...payloads.createStoreReview, rating: 5 }, payloads.customerAuth);
- }
- // add map location
- 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);
-
helpers.createEnvVar('VENDOR_ID', sellerId);
});
@@ -58,18 +43,6 @@ setup.describe('add & authenticate users', () => {
setup('add vendor2', { tag: ['@lite'] }, async () => {
const [, sellerId] = await apiUtils.createStore(payloads.createStore2, payloads.adminAuth, true);
- // add open-close time
- await apiUtils.updateStore(sellerId, payloads.createStore2, payloads.adminAuth);
- // add review
- if (DOKAN_PRO) {
- await apiUtils.createStoreReview(sellerId, { ...payloads.createStoreReview, rating: 5 }, payloads.customerAuth);
- }
- // add map location
- 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);
-
helpers.createEnvVar('VENDOR2_ID', sellerId);
});
diff --git a/tests/pw/tests/e2e/_env.setup.ts b/tests/pw/tests/e2e/_env.setup.ts
index 247ffac16e..33cbc196d9 100644
--- a/tests/pw/tests/e2e/_env.setup.ts
+++ b/tests/pw/tests/e2e/_env.setup.ts
@@ -113,7 +113,7 @@ setup.describe('setup woocommerce settings', () => {
});
setup('disable woocommerce variable product tour', { tag: ['@lite'] }, async () => {
- await dbUtils.setUserMeta('1', 'woocommerce_admin_variable_product_tour_shown', 'yes', false);
+ await dbUtils.setUserMeta('1','woocommerce_admin_variable_product_tour_shown', 'yes', false);
});
setup('disable storefront sticky add to cart', { tag: ['@lite'] }, async () => {
diff --git a/tests/pw/tests/e2e/catalogmode.spec.ts b/tests/pw/tests/e2e/catalogmode.spec.ts
index 9187d853ec..e5df6faa23 100644
--- a/tests/pw/tests/e2e/catalogmode.spec.ts
+++ b/tests/pw/tests/e2e/catalogmode.spec.ts
@@ -55,11 +55,11 @@ test.describe('Catalog mode test', () => {
});
test('admin can disable hide product price in catalog mode', { tag: ['@lite', '@admin'] }, async () => {
- await dbUtils.updateOptionValue(dbData.dokan.optionName.selling, { catalog_mode_hide_product_price: 'off' });
+ const [previousSettings] = await dbUtils.updateOptionValue(dbData.dokan.optionName.selling, { catalog_mode_hide_product_price: 'off' });
await vendor.accessCatalogModeSettings();
// reset
- await dbUtils.updateOptionValue(dbData.dokan.optionName.selling, { catalog_mode_hide_product_price: 'on' });
+ await dbUtils.setOptionValue(dbData.dokan.optionName.selling, previousSettings);
});
//vendor
diff --git a/tests/pw/tests/e2e/commission.spec.ts b/tests/pw/tests/e2e/commission.spec.ts
index 5f06035cb6..009cad46d5 100644
--- a/tests/pw/tests/e2e/commission.spec.ts
+++ b/tests/pw/tests/e2e/commission.spec.ts
@@ -13,7 +13,7 @@ test.describe('Commission test', () => {
let vendor: CommissionPage;
let aPage: Page, vPage: Page;
let apiUtils: ApiUtils;
- let subscriptionProductId: string = '1';
+ let subscriptionProductId: string;
let sellerId: string;
test.beforeAll(async ({ browser }) => {
diff --git a/tests/pw/tests/e2e/euCompliance.spec.ts b/tests/pw/tests/e2e/euCompliance.spec.ts
index db45bdddf1..e7c3aa9fbb 100644
--- a/tests/pw/tests/e2e/euCompliance.spec.ts
+++ b/tests/pw/tests/e2e/euCompliance.spec.ts
@@ -102,11 +102,10 @@ test.describe('EU Compliance test', () => {
});
test('admin can hide vendors EU compliance data from single store page', { tag: ['@pro', '@admin'] }, async () => {
- await dbUtils.updateOptionValue(dbData.dokan.optionName.appearance, { hide_vendor_info: dbData.testData.dokan.hideVendorEuInfo });
+ const [previousSettings] = await dbUtils.updateOptionValue(dbData.dokan.optionName.appearance, { hide_vendor_info: dbData.testData.dokan.hideVendorEuInfo });
await admin.hideEuComplianceVendor(data.predefined.vendorStores.vendor1);
-
// reset
- await dbUtils.updateOptionValue(dbData.dokan.optionName.appearance, { hide_vendor_info: dbData.testData.dokan.unhideVendorEuInfo });
+ await dbUtils.setOptionValue(dbData.dokan.optionName.appearance, previousSettings);
});
// vendor
diff --git a/tests/pw/tests/e2e/liveSearch.spec.ts b/tests/pw/tests/e2e/liveSearch.spec.ts
index 6f1ce17431..05e886393f 100644
--- a/tests/pw/tests/e2e/liveSearch.spec.ts
+++ b/tests/pw/tests/e2e/liveSearch.spec.ts
@@ -13,8 +13,8 @@ test.describe('Live search test', () => {
cPage = await customerContext.newPage();
customer = new LiveSearch(cPage);
- await dbUtils.updateOptionValue(dbData.dokanWidgets.names.liveSearch, dbData.dokanWidgets.values.liveSearchWidget);
- await dbUtils.updateOptionValue('sidebars_widgets', { ...dbData.sidebarWidgets, 'sidebar-1': [dbData.dokanWidgets.widgets.liveSearch] });
+ await dbUtils.updateOptionValue('widget_dokna_product_search', dbData.liveSearchWidget);
+ await dbUtils.updateOptionValue('sidebars_widgets', { ...dbData.sidebarWidgets, 'sidebar-1': ['dokna_product_search-2'] });
await dbUtils.setOptionValue(dbData.dokan.optionName.liveSearch, dbData.dokan.liveSearchSettings);
});
diff --git a/tests/pw/tests/e2e/privacyPolicy.spec.ts b/tests/pw/tests/e2e/privacyPolicy.spec.ts
index 6eed761f58..02e61da7c9 100644
--- a/tests/pw/tests/e2e/privacyPolicy.spec.ts
+++ b/tests/pw/tests/e2e/privacyPolicy.spec.ts
@@ -16,14 +16,14 @@ test.describe('Privacy Policy & Store Contact form test', () => {
customer = new PrivacyPolicyPage(cPage);
apiUtils = new ApiUtils(await request.newContext());
- // await dbUtils.updateOptionValue(dbData.dokanWidgets.names.storeContactForm, dbData.dokanWidgets.values.storeContactFormWidget);
- // await dbUtils.updateOptionValue('sidebars_widgets', { 'sidebar-store': [dbData.dokanWidgets.widgets.storeContactForm] });
+ // await dbUtils.updateOptionValue('widget_dokan-store-contact-widget', dbData.storeContactFormWidget);
+ // await dbUtils.updateOptionValue('sidebars_widgets', { ...dbData.sidebarWidgets, 'sidebar-store': ['dokan-store-contact-widget-2'] });
});
test.afterAll(async () => {
await dbUtils.updateOptionValue(dbData.dokan.optionName.privacyPolicy, { enable_privacy: 'on' });
await dbUtils.updateOptionValue(dbData.dokan.optionName.appearance, { contact_seller: 'on' });
- await dbUtils.setOptionValue('sidebars_widgets', dbData.emptySideBarsWidgets);
+ await dbUtils.setOptionValue('sidebars_widgets', dbData.emptySideBarsWidgets); // todo: remove in future
await cPage.close();
await apiUtils.dispose();
});
@@ -41,8 +41,7 @@ test.describe('Privacy Policy & Store Contact form test', () => {
await customer.disablePrivacyPolicy(data.predefined.vendorStores.vendor1);
});
- // todo: remove below test: duplicate test
- test.skip('admin can disable store contact form from store sidebar', { tag: ['@lite', '@customer'] }, async () => {
+ test('admin can disable store contact form from store sidebar', { tag: ['@lite', '@customer'] }, async () => {
await dbUtils.updateOptionValue(dbData.dokan.optionName.appearance, { contact_seller: 'off' });
await customer.disableStoreContactForm(data.predefined.vendorStores.vendor1);
});
diff --git a/tests/pw/tests/e2e/storeAppearance.spec.ts b/tests/pw/tests/e2e/storeAppearance.spec.ts
index 4b7eeaff3e..0ad1c6ddeb 100644
--- a/tests/pw/tests/e2e/storeAppearance.spec.ts
+++ b/tests/pw/tests/e2e/storeAppearance.spec.ts
@@ -1,103 +1,41 @@
-import { test, Page, request } from '@playwright/test';
-import { StoreAppearancePage } from '@pages/storeAppearancePage';
-import { ApiUtils } from '@utils/apiUtils';
+import { test, Page } from '@playwright/test';
+import { StoreAppearance } from '@pages/storeAppearance';
+// import { CustomerPage } from '@pages/customerPage';
import { dbUtils } from '@utils/dbUtils';
import { data } from '@utils/testData';
import { dbData } from '@utils/dbData';
-import { payloads } from '@utils/payloads';
-const { VENDOR_ID } = process.env;
+test.describe.skip('Store Appearance test', () => {
+ let customer: StoreAppearance;
+ // let customerPage: CustomerPage;
+ let cPage: Page;
-test.describe('Store Appearance test', () => {
- let admin: StoreAppearancePage;
- let aPage: Page;
- let apiUtils: ApiUtils;
+ // todo: need to remove default dokan store sidebar content
test.beforeAll(async ({ browser }) => {
- const adminContext = await browser.newContext(data.auth.adminAuth);
- aPage = await adminContext.newPage();
- admin = new StoreAppearancePage(aPage);
-
- apiUtils = new ApiUtils(await request.newContext());
- // await dbUtils.updateOptionValue(dbData.dokanWidgets.names.storeLocation, dbData.dokanWidgets.values.storeLocationWidget);
- // await dbUtils.updateOptionValue(dbData.dokanWidgets.names.storeOpenClose, dbData.dokanWidgets.values.storeOpenCloseWidget);
- // await dbUtils.updateOptionValue(dbData.dokanWidgets.names.storeContactForm, dbData.dokanWidgets.values.storeContactFormWidget);
- // await dbUtils.updateOptionValue('sidebars_widgets', { 'sidebar-store': [dbData.dokanWidgets.widgets.storeLocation, dbData.dokanWidgets.widgets.storeOpenClose, dbData.dokanWidgets.widgets.storeContactForm] });
+ const customerContext = await browser.newContext(data.auth.customerAuth);
+ cPage = await customerContext.newPage();
+ // customerPage = new CustomerPage(cPage);
+ customer = new StoreAppearance(cPage);
});
test.afterAll(async () => {
- await dbUtils.setOptionValue(dbData.dokan.optionName.appearance, dbData.dokan.appearanceSettings);
- // await dbUtils.setOptionValue('sidebars_widgets', dbData.emptySideBarsWidgets);
- await aPage.close();
- await apiUtils.dispose();
- });
-
- ['enable', 'disable'].forEach((status: string) => {
- test.skip(`admin can ${status} store map on store sidebar`, { tag: ['@lite', '@admin'] }, async () => {
- await dbUtils.updateOptionValue(dbData.dokan.optionName.appearance, { store_map: status === 'enable' ? 'on' : 'off' });
- await admin.viewStoreMapOnStoreSidebar(status as 'enable' | 'disable', data.predefined.vendorStores.vendor1);
- });
- });
-
- ['Google Maps', 'Mapbox'].forEach((api: string) => {
- test.skip(`admin can set map api source (${api})`, { tag: ['@lite', '@admin'] }, async () => {
- await dbUtils.updateOptionValue(dbData.dokan.optionName.appearance, { store_map: 'on', map_api_source: api === 'Google Maps' ? 'google_maps' : 'mapbox' });
- await admin.viewMapAPISource(api as 'Google Maps' | 'Mapbox', data.predefined.vendorStores.vendor1);
- });
- });
-
- ['enable', 'disable'].forEach((status: string) => {
- test.skip(`admin can ${status} Google reCAPTCHA validation`, { tag: ['@lite', '@admin'] }, async () => {
- await dbUtils.updateOptionValue(dbData.dokan.optionName.appearance, { recaptcha_enable_status: status === 'enable' ? 'on' : 'off' });
- await admin.viewGoogleRecaptcha(status as 'enable' | 'disable', data.predefined.vendorStores.vendor1);
- });
- });
-
- ['enable', 'disable'].forEach((status: string) => {
- test(`admin can ${status} store contact form on store sidebar`, { tag: ['@lite', '@admin'] }, async () => {
- await dbUtils.updateOptionValue(dbData.dokan.optionName.appearance, { contact_seller: status === 'enable' ? 'on' : 'off' });
- await admin.viewStoreContactFormOnStoreSidebar(status as 'enable' | 'disable', data.predefined.vendorStores.vendor1);
- });
- });
-
- ['default', 'layout1', 'layout2', 'layout3'].forEach((template: string) => {
- test(`admin can set store header template (${template})`, { tag: ['@lite', '@admin'] }, async () => {
- await dbUtils.updateOptionValue(dbData.dokan.optionName.appearance, { store_header_template: template });
- await admin.viewStoreHeaderTemplate(template as 'default' | 'layout1' | 'layout2' | 'layout3', data.predefined.vendorStores.vendor1);
- });
- });
-
- ['enable', 'disable'].forEach((status: string) => {
- test(`admin can ${status} store open-close time on store sidebar`, { tag: ['@lite', '@admin'] }, async () => {
- await dbUtils.updateOptionValue(dbData.dokan.optionName.appearance, { store_open_close: status === 'enable' ? 'on' : 'off' });
- await admin.viewStoreOpenCloseTimeOnStoreSidebar(status as 'enable' | 'disable', data.predefined.vendorStores.vendor1);
- });
- });
-
- test('admin can set store banner size', { tag: ['@lite', '@admin'] }, async () => {
- await admin.setBannerSize(data.storeBanner);
+ await dbUtils.updateOptionValue(dbData.dokan.optionName.appearance, { store_map: 'on', store_open_close: 'on', hide_vendor_info: { email: '', phone: '', address: '' } });
+ await cPage.close();
});
- ['enable', 'disable'].forEach((status: string) => {
- test(`admin can ${status} store sidebar from theme`, { tag: ['@lite', '@admin'] }, async () => {
- await dbUtils.updateOptionValue(dbData.dokan.optionName.appearance, { enable_theme_store_sidebar: status === 'enable' ? 'off' : 'on' });
- await admin.viewStoreSideBarFromTheme(status as 'enable' | 'disable', data.predefined.vendorStores.vendor1);
- });
+ test('store map is disabled on store sidebar', { tag: ['@lite', '@customer'] }, async () => {
+ await dbUtils.updateOptionValue(dbData.dokan.optionName.appearance, { store_map: 'off' });
+ await customer.disableMapOnStoreSidebar(data.predefined.vendorStores.vendor1);
});
- ['enable', 'disable'].forEach((status: string) => {
- test(`admin can ${status} vendor info on single store page`, { tag: ['@lite', '@admin'] }, async () => {
- // await apiUtils.updateStore(VENDOR_ID, { show_email: 'yes' }, payloads.adminAuth); // todo: apply this after api issue fix
- await apiUtils.updateStore(VENDOR_ID, { ...payloads.storeResetFields, show_email: 'yes' }, payloads.adminAuth);
- await dbUtils.updateOptionValue(dbData.dokan.optionName.appearance, { hide_vendor_info: status === 'enable' ? { email: '', phone: '', address: '' } : { email: 'email', phone: 'phone', address: 'address' } });
- await admin.viewVendorInfoOnSingleStorePage(status as 'enable' | 'disable', data.predefined.vendorStores.vendor1);
- });
+ test('store open-close time is disabled store sidebar', { tag: ['@lite', '@customer'] }, async () => {
+ await dbUtils.updateOptionValue(dbData.dokan.optionName.appearance, { store_open_close: 'off' });
+ await customer.disableStoreOpenCloseTimeOnStoreSidebar(data.predefined.vendorStores.vendor1);
});
- ['enable', 'disable'].forEach((status: string) => {
- test(`admin can ${status} Dokan FontAwesome library`, { tag: ['@lite', '@admin'] }, async () => {
- await dbUtils.updateOptionValue(dbData.dokan.optionName.appearance, { disable_dokan_fontawesome: status === 'enable' ? 'off' : 'on' });
- await admin.viewFontAwesomeLibrary(status as 'enable' | 'disable', data.predefined.vendorStores.vendor1);
- });
+ test.skip('vendor info is disabled on single store page', { tag: ['@lite', '@customer'] }, async () => {
+ await dbUtils.updateOptionValue(dbData.dokan.optionName.appearance, { hide_vendor_info: { email: 'email', phone: 'phone', address: 'address' } });
+ await customer.disableVendorInfoOnSingleStorePage(data.predefined.vendorStores.vendor1);
});
});
diff --git a/tests/pw/tests/e2e/vendor.spec.ts b/tests/pw/tests/e2e/vendor.spec.ts
index 80d9f27854..54e61b5a04 100644
--- a/tests/pw/tests/e2e/vendor.spec.ts
+++ b/tests/pw/tests/e2e/vendor.spec.ts
@@ -26,11 +26,9 @@ test.describe('Vendor functionality test', () => {
test('vendor can register (address fields are enabled)', { tag: ['@lite', '@vendor'] }, async ({ page }) => {
const vendor = new VendorPage(page);
- await dbUtils.updateOptionValue(dbData.dokan.optionName.general, { enabled_address_on_reg: 'on' });
+ const [previousSettings] = await dbUtils.updateOptionValue(dbData.dokan.optionName.general, { enabled_address_on_reg: 'on' });
await vendor.vendorRegister({ ...data.vendor.vendorInfo, addressFieldsEnabled: true }, { ...data.vendorSetupWizard, choice: false });
-
- // reset
- await dbUtils.updateOptionValue(dbData.dokan.optionName.general, { enabled_address_on_reg: 'off' });
+ await dbUtils.setOptionValue(dbData.dokan.optionName.general, previousSettings);
});
test('vendor can login', { tag: ['@lite', '@vendor'] }, async ({ page }) => {
diff --git a/tests/pw/tests/e2e/vendorProductSubscription.spec.ts b/tests/pw/tests/e2e/vendorProductSubscription.spec.ts
index 74a5e04170..ee6cb4766f 100644
--- a/tests/pw/tests/e2e/vendorProductSubscription.spec.ts
+++ b/tests/pw/tests/e2e/vendorProductSubscription.spec.ts
@@ -9,7 +9,7 @@ test.describe('Product subscriptions test', () => {
let customer: VendorProductSubscriptionPage;
let vPage: Page, cPage: Page;
let apiUtils: ApiUtils;
- let subscriptionId: string = '1';
+ let subscriptionId: string;
test.beforeAll(async ({ browser }) => {
const vendorContext = await browser.newContext(data.auth.vendorAuth);
diff --git a/tests/pw/types/environment.d.ts b/tests/pw/types/environment.d.ts
index 80df42a725..b35bb7c3d1 100644
--- a/tests/pw/types/environment.d.ts
+++ b/tests/pw/types/environment.d.ts
@@ -34,8 +34,6 @@ declare global {
TALKJS_APP_SECRET: string;
PRINTFUL_APP_ID: string;
PRINTFUL_APP_SECRET: string;
- RECAPTCHA_SITE_KEY: string;
- RECAPTCHA_SECRET_KEY: string;
DOKAN_PRO: boolean;
SITE_LANGUAGE: string;
SITE_TITLE: string;
diff --git a/tests/pw/utils/dbData.ts b/tests/pw/utils/dbData.ts
index 8e2bd3aa04..4ea204278a 100644
--- a/tests/pw/utils/dbData.ts
+++ b/tests/pw/utils/dbData.ts
@@ -1,4 +1,4 @@
-const { BASE_URL, GMAP, MAPBOX, LICENSE_KEY, CATEGORY_ID, TALKJS_APP_ID, TALKJS_APP_SECRET, PRINTFUL_APP_ID, PRINTFUL_APP_SECRET, RECAPTCHA_SITE_KEY, RECAPTCHA_SECRET_KEY } = process.env;
+const { BASE_URL, GMAP, MAPBOX, LICENSE_KEY, CATEGORY_ID, TALKJS_APP_ID, TALKJS_APP_SECRET, PRINTFUL_APP_ID, PRINTFUL_APP_SECRET } = process.env;
export const dbData = {
dokan: {
@@ -220,20 +220,17 @@ export const dbData = {
appearanceSettings: {
appearance_options: '',
- store_map: 'on', // 'on', 'off'
- map_api_source: 'google_maps', // google_maps, mapbox
+ store_map: 'on',
+ map_api_source: 'google_maps',
gmap_api_key: GMAP ?? '',
mapbox_access_token: MAPBOX ?? '',
recaptcha_validation_label: '',
- recaptcha_enable_status: 'off',
- recaptcha_site_key: RECAPTCHA_SITE_KEY ?? '',
- recaptcha_secret_key: RECAPTCHA_SECRET_KEY ?? '',
contact_seller: 'on',
- store_header_template: 'default', // default, layout1, layout2, layout3
+ store_header_template: 'default',
store_banner_width: '625',
store_banner_height: '300',
store_open_close: 'on',
- enable_theme_store_sidebar: 'off', // on, off
+ enable_theme_store_sidebar: 'off',
hide_vendor_info: {
email: '',
phone: '',
@@ -244,8 +241,7 @@ export const dbData = {
dokan_bank_name: '',
dokan_bank_iban: '',
},
- disable_dokan_fontawesome: 'off', // on, off
- dashboard_menu_manager: [],
+ disable_dokan_fontawesome: 'off',
},
menuManagerSettings: {
@@ -1344,6 +1340,20 @@ export const dbData = {
// widgets & sidebars
+ widgets: {
+ bestSelling: 'dokan-best-selling-widget-2',
+ category: 'dokan-category-menu-2',
+ filter: 'dokan-filter-product-2',
+ liveSearch: 'dokna_product_search-2',
+ storeContactForm: 'dokan-store-contact-widget-2',
+ storeLocation: 'dokan-store-location-2',
+ storeMenu: 'dokan-store-menu-2',
+ storeOpenClose: 'dokan-store-open-close-widget-2',
+ topRated: 'dokan-top-rated-2',
+
+ // emptySideBarsWidgets: { wp_inactive_widgets: [] },
+ },
+
sidebars: {
wp_inactive_widgets: 'wp_inactive_widgets',
'sidebar-store': 'sidebar-store',
@@ -1370,66 +1380,16 @@ export const dbData = {
emptySideBarsWidgets: { wp_inactive_widgets: [] },
// dokan widgets
- dokanWidgets: {
- // names (option names)
- names: {
- bestSelling: 'widget_dokan-best-selling-widget',
- bestSeller: 'widget_dokan-best-seller-widget',
- category: 'widget_dokan-category-menu',
- featureSeller: 'widget_dokan-feature-seller-widget',
- filter: 'widget_dokan-filter-product',
- geolocation: 'widget_dokan-geolocation-widget-filters',
- liveSearch: 'widget_dokna_product_search',
- productAdvertisement: 'widget_dokan_product_advertisement_widget',
- productLocation: 'widget_dokan-geolocation-widget-product-location',
- sellerBadge: 'widget_dokan_seller_badges',
- storeContactForm: 'widget_dokan-store-contact-widget',
- storeLocation: 'widget_dokan-store-location',
- storeMenu: 'widget_dokan-store-menu',
- storeOpenClose: 'widget_dokan-store-open-close-widget',
- storeSupport: 'widget_dokan-store-support-widget',
- topRated: 'widget_dokan-top-rated',
- verifications: 'widget_dokan-verification-list',
- },
-
- // values (option values)
- values: {
- defaultValues: { _multiwidget: 1 },
-
- storeLocationWidget: {
- '2': { title: 'Store Location' },
- _multiwidget: 1,
- },
-
- storeOpenCloseWidget: {
- '2': {
- title: 'Store Time',
- },
- _multiwidget: 1,
- },
-
- storeContactFormWidget: {
- '2': { title: 'Contact Vendor' },
- _multiwidget: 1,
- },
-
- liveSearchWidget: {
- '2': { title: 'Live Search' },
- _multiwidget: 1,
- },
+ storeContactFormWidget: {
+ '2': {
+ title: 'Contact Vendor',
},
+ _multiwidget: 1,
+ },
- widgets: {
- bestSelling: 'dokan-best-selling-widget-2',
- category: 'dokan-category-menu-2',
- filter: 'dokan-filter-product-2',
- liveSearch: 'dokna_product_search-2',
- storeContactForm: 'dokan-store-contact-widget-2',
- storeLocation: 'dokan-store-location-2',
- storeMenu: 'dokan-store-menu-2',
- storeOpenClose: 'dokan-store-open-close-widget-2',
- topRated: 'dokan-top-rated-2',
- },
+ liveSearchWidget: {
+ '2': { title: 'Live Search' },
+ _multiwidget: 1,
},
// test db data
@@ -1465,28 +1425,6 @@ export const dbData = {
enabled_more_products_tab: 'on',
},
- unhideVendorInfo: {
- email: '',
- phone: '',
- address: '',
- dokan_company_name: '',
- dokan_company_id_number: '',
- dokan_vat_number: '',
- dokan_bank_name: '',
- dokan_bank_iban: '',
- },
-
- unhideVendorEuInfo: {
- email: '',
- phone: '',
- address: '',
- dokan_company_name: '',
- dokan_company_id_number: '',
- dokan_vat_number: '',
- dokan_bank_name: '',
- dokan_bank_iban: '',
- },
-
hideVendorInfo: {
email: 'email',
phone: 'phone',
diff --git a/tests/pw/utils/payloads.ts b/tests/pw/utils/payloads.ts
index e6416ac129..0194a65271 100644
--- a/tests/pw/utils/payloads.ts
+++ b/tests/pw/utils/payloads.ts
@@ -4,7 +4,7 @@ import { dbData } from '@utils/dbData';
const basicAuth = (username: string, password: string) => 'Basic ' + Buffer.from(username + ':' + password).toString('base64');
-const { ADMIN, VENDOR, VENDOR2, CUSTOMER, CUSTOMER2, ADMIN_PASSWORD, USER_PASSWORD, CUSTOMER_ID, VENDOR_ID, VENDOR2_ID, PRODUCT_ID, PRODUCT_ID_V2, TAG_ID, ATTRIBUTE_ID } = process.env;
+const { ADMIN, VENDOR, VENDOR2, VENDOR3, CUSTOMER, CUSTOMER2, ADMIN_PASSWORD, USER_PASSWORD, CUSTOMER_ID, VENDOR_ID, VENDOR2_ID, PRODUCT_ID, PRODUCT_ID_V2, TAG_ID, ATTRIBUTE_ID } = process.env;
export const payloads = {
// wp
@@ -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',
@@ -3756,12 +3756,11 @@ export const payloads = {
createStore: () => ({
user_login: `${faker.person.firstName()}_${faker.string.nanoid(5)}`,
user_pass: String(USER_PASSWORD),
+ role: 'seller',
email: faker.internet.email(),
store_name: `${faker.person.firstName()}_store`,
first_name: faker.person.firstName(),
last_name: faker.person.lastName(),
- role: 'seller',
- notify_vendor: 'yes',
social: {
fb: 'https://www.facebook.com/',
twitter: 'https://www.twitter.com/',
@@ -3783,13 +3782,19 @@ export const payloads = {
country: 'US',
},
location: '40.7127753,-74.0059728',
+ banner: 0,
banner_id: 0,
+ gravatar: 0,
gravatar_id: 0,
- enable_tnc: 'yes',
+ show_more_product_tab: true,
+ enable_tnc: 'on',
store_tnc: 'test Vendor terms and conditions',
featured: 'yes',
- enabled: 'yes',
- trusted: 'yes', // publish product directly
+ rating: {
+ rating: '0.00',
+ count: 1,
+ },
+ enabled: true,
payment: {
paypal: {
email: 'paypal@g.c',
@@ -3804,62 +3809,14 @@ export const payloads = {
iban: '123456',
swift: '12345',
},
- skrill: {
- email: 'skrill@g.c',
- },
- dokan_custom: {
- withdraw_method_name: 'Bksh',
- withdraw_method_type: 'Phone',
- value: '0123456789',
- },
- // "stripe": false,
- // stripe_express: false,
- // 'dokan-moip-connect': true,
- // dokan_razorpay: false,
},
- // store_open_close: {
- // enabled: 'yes',
- // time: {
- // monday: {
- // status: 'open',
- // opening_time: ['12:00 am'],
- // closing_time: ['11:59 pm'],
- // },
- // tuesday: {
- // status: 'open',
- // opening_time: ['12:00 am'],
- // closing_time: ['11:59 pm'],
- // },
- // wednesday: {
- // status: 'open',
- // opening_time: ['12:00 am'],
- // closing_time: ['11:59 pm'],
- // },
- // thursday: {
- // status: 'open',
- // opening_time: ['12:00 am'],
- // closing_time: ['11:59 pm'],
- // },
- // friday: {
- // status: 'open',
- // opening_time: ['12:00 am'],
- // closing_time: ['11:59 pm'],
- // },
- // saturday: {
- // status: 'open',
- // opening_time: ['12:00 am'],
- // closing_time: ['11:59 pm'],
- // },
- // sunday: {
- // status: 'open',
- // opening_time: ['12:00 am'],
- // closing_time: ['11:59 pm'],
- // },
- // },
- // open_notice: 'Store is open',
- // close_notice: 'Store is closed',
- // },
- sale_only_here: 'yes',
+ trusted: true,
+ store_open_close: {
+ enabled: false,
+ time: [],
+ open_notice: 'Store is open',
+ close_notice: 'Store is closed',
+ },
company_name: faker.company.name(),
company_id_number: faker.string.alphanumeric(5),
vat_number: faker.string.alphanumeric(10),
@@ -3868,38 +3825,13 @@ export const payloads = {
categories: [
{
// id: 74,
- // name: 'Uncategorized',
- // slug: 'uncategorized',
+ name: 'Uncategorized',
+ slug: 'uncategorized',
},
],
-
- // vendorwise commission
- admin_commission_type: '', // fixed, category_based
- admin_commission: '5',
- admin_additional_fee: '5',
- admin_category_commission: {
- all: {
- flat: '7',
- percentage: '7',
- },
- items: {
- '27': {
- flat: '7',
- percentage: '7',
- },
- },
- },
- // store_seo: {
- // 'dokan-seo-meta-title': 'meta title',
- // 'dokan-seo-meta-desc': 'meta description',
- // 'dokan-seo-meta-keywords': 'meta keywords',
- // 'dokan-seo-og-title': 'facebook title',
- // 'dokan-seo-og-desc': 'facebook description',
- // 'dokan-seo-og-image': '0',
- // 'dokan-seo-twitter-title': 'twitter title',
- // 'dokan-seo-twitter-desc': 'twitter description',
- // 'dokan-seo-twitter-image': '0',
- // },
+ admin_commission: '',
+ admin_additional_fee: '',
+ admin_commission_type: '',
}),
updateStore: () => ({
@@ -3918,7 +3850,7 @@ export const payloads = {
threads: 'https://www.threads.net/',
},
phone: '0123456789',
- show_email: 'yes',
+ show_email: false,
address: {
street_1: 'abc street',
street_2: 'xyz street',
@@ -3927,16 +3859,26 @@ export const payloads = {
state: 'NY',
country: 'US',
},
- location: '40.7127753,-74.0059728',
+ location: '',
+ banner: '',
banner_id: 0,
+ gravatar: '',
gravatar_id: 0,
- enable_tnc: 'yes',
- store_tnc: 'test Vendor terms and conditions',
- featured: 'yes',
- enabled: 'yes',
- trusted: 'yes', // publish product directly
+ shop_url: '',
+ show_more_product_tab: true,
+ toc_enabled: false,
+ store_toc: '',
+ featured: true,
+ rating: {
+ rating: '0.00',
+ count: 1,
+ },
+ trusted: true,
+ enabled: true,
+ registered: '',
payment: {
paypal: {
+ 0: 'email',
email: 'paypal@g.c',
},
bank: {
@@ -3949,79 +3891,24 @@ export const payloads = {
iban: '123456',
swift: '12345',
},
- skrill: {
- email: 'skrill@g.c',
- },
- dokan_custom: {
- withdraw_method_name: 'Bksh',
- withdraw_method_type: 'Phone',
- value: '0123456789',
- },
- // "stripe": false,
- // stripe_express: false,
- // 'dokan-moip-connect': true,
- // dokan_razorpay: false,
+ stripe: false,
},
- // store_open_close: {
- // enabled: 'yes',
- // time: {
- // monday: {
- // status: 'open',
- // opening_time: ['12:00 am'],
- // closing_time: ['11:59 pm'],
- // },
- // tuesday: {
- // status: 'open',
- // opening_time: ['12:00 am'],
- // closing_time: ['11:59 pm'],
- // },
- // wednesday: {
- // status: 'open',
- // opening_time: ['12:00 am'],
- // closing_time: ['11:59 pm'],
- // },
- // thursday: {
- // status: 'open',
- // opening_time: ['12:00 am'],
- // closing_time: ['11:59 pm'],
- // },
- // friday: {
- // status: 'open',
- // opening_time: ['12:00 am'],
- // closing_time: ['11:59 pm'],
- // },
- // saturday: {
- // status: 'open',
- // opening_time: ['12:00 am'],
- // closing_time: ['11:59 pm'],
- // },
- // sunday: {
- // status: 'open',
- // opening_time: ['12:00 am'],
- // closing_time: ['11:59 pm'],
- // },
- // },
- // open_notice: 'Store is open',
- // close_notice: 'Store is closed',
- // },
- sale_only_here: 'yes',
- company_name: faker.company.name(),
- company_id_number: faker.string.alphanumeric(5),
- vat_number: faker.string.alphanumeric(10),
- bank_name: faker.string.alphanumeric(7),
- bank_iban: faker.finance.iban(),
- categories: [
- {
- // id: 74,
- // name: 'Uncategorized',
- // slug: 'uncategorized',
- },
- ],
-
+ store_open_close: {
+ enabled: false,
+ time: [],
+ open_notice: 'Store is open',
+ close_notice: 'Store is closed',
+ },
+ company_name: '',
+ vat_number: '',
+ company_id_number: '',
+ bank_name: '',
+ bank_iban: '',
+ categories: [{}],
// vendorwise commission
admin_commission_type: '', // fixed, category_based
- admin_commission: '5',
- admin_additional_fee: '5',
+ admin_commission: '',
+ admin_additional_fee: '',
admin_category_commission: {
all: {
flat: '7',
@@ -4034,17 +3921,6 @@ export const payloads = {
},
},
},
- // store_seo: {
- // 'dokan-seo-meta-title': 'meta title',
- // 'dokan-seo-meta-desc': 'meta description',
- // 'dokan-seo-meta-keywords': 'meta keywords',
- // 'dokan-seo-og-title': 'facebook title',
- // 'dokan-seo-og-desc': 'facebook description',
- // 'dokan-seo-og-image': '0',
- // 'dokan-seo-twitter-title': 'twitter title',
- // 'dokan-seo-twitter-desc': 'twitter description',
- // 'dokan-seo-twitter-image': '0',
- // },
}),
// always revert vendor settings to this after altering in tests
@@ -4074,11 +3950,15 @@ export const payloads = {
banner_id: 0,
gravatar: 0,
gravatar_id: 0,
-
+ show_more_product_tab: true,
enable_tnc: 'on',
store_tnc: 'test Vendor terms and conditions',
featured: 'yes',
- enabled: 'yes',
+ // rating: {
+ // rating: '4.00', // todo: doesn't work on lite [might not implemented on lite]
+ // count: 1,
+ // },
+ enabled: true,
payment: {
paypal: {
email: 'paypal@g.c',
@@ -4094,7 +3974,7 @@ export const payloads = {
swift: '12345',
},
},
- trusted: 'yes',
+ trusted: true,
company_name: 'company name',
vat_number: '123456789',
company_id_number: '123456789',
@@ -4136,72 +4016,15 @@ export const payloads = {
bank_iban: faker.finance.iban(),
},
- storeResetFields: {
- featured: 'yes',
- enabled: 'yes',
- trusted: 'yes',
- enable_tnc: 'yes',
- show_email: 'yes',
- store_open_close: {
- enabled: 'yes',
- },
- },
-
- storeOpenClose: {
- store_open_close: {
- enabled: 'yes',
- time: {
- monday: {
- status: 'open',
- opening_time: ['12:00 am'],
- closing_time: ['11:59 pm'],
- },
- tuesday: {
- status: 'open',
- opening_time: ['12:00 am'],
- closing_time: ['11:59 pm'],
- },
- wednesday: {
- status: 'open',
- opening_time: ['12:00 am'],
- closing_time: ['11:59 pm'],
- },
- thursday: {
- status: 'open',
- opening_time: ['12:00 am'],
- closing_time: ['11:59 pm'],
- },
- friday: {
- status: 'open',
- opening_time: ['12:00 am'],
- closing_time: ['11:59 pm'],
- },
- saturday: {
- status: 'open',
- opening_time: ['12:00 am'],
- closing_time: ['11:59 pm'],
- },
- sunday: {
- status: 'open',
- opening_time: ['12:00 am'],
- closing_time: ['11:59 pm'],
- },
- },
- open_notice: 'Store is open',
- close_notice: 'Store is closed',
- },
- },
-
createStore1: {
user_login: VENDOR,
user_pass: USER_PASSWORD,
- user_nicename: `${VENDOR}store`, // store url
+ user_nicename: `${VENDOR}store`,
+ role: 'seller',
email: `${VENDOR}@email.com`,
store_name: `${VENDOR}store`,
first_name: VENDOR,
last_name: 'v',
- role: 'seller',
- notify_vendor: 'yes',
social: {
fb: 'https://www.facebook.com/',
twitter: 'https://www.twitter.com/',
@@ -4223,13 +4046,19 @@ export const payloads = {
country: 'US',
},
location: '40.7127753,-74.0059728',
+ banner: 0,
banner_id: 0,
+ gravatar: 0,
gravatar_id: 0,
- enable_tnc: 'yes',
+ show_more_product_tab: true,
+ enable_tnc: 'on',
store_tnc: 'test Vendor terms and conditions',
featured: 'yes',
- enabled: 'yes',
- trusted: 'yes', // publish product directly
+ // rating: {
+ // rating: '4.00', // todo: doesn't work on lite [might not implemented on lite]
+ // count: 1,
+ // },
+ enabled: true,
payment: {
paypal: {
email: 'paypal@g.c',
@@ -4244,62 +4073,57 @@ export const payloads = {
iban: '123456',
swift: '12345',
},
- skrill: {
- email: 'skrill@g.c',
- },
- dokan_custom: {
- withdraw_method_name: 'Bksh',
- withdraw_method_type: 'Phone',
- value: '0123456789',
- },
- // "stripe": false,
- // stripe_express: false,
- // 'dokan-moip-connect': true,
- // dokan_razorpay: false,
},
+ trusted: true,
// store_open_close: {
- // enabled: 'yes',
+ // enabled: false,
+ // time: [],
+ // open_notice: 'Store is open',
+ // close_notice: 'Store is closed',
+ // },
+ // store_open_close: {
+ // // todo: isn't implemented on dokan create store api
+ // enabled: 'yes', // todo:
// time: {
// monday: {
- // status: 'open',
- // opening_time: ['12:00 am'],
- // closing_time: ['11:59 pm'],
+ // status: 'open', // 'close'
+ // opening_time: ['12:00 am'], // []
+ // closing_time: ['11:30 pm'], // []
// },
// tuesday: {
// status: 'open',
// opening_time: ['12:00 am'],
- // closing_time: ['11:59 pm'],
+ // closing_time: ['11:30 pm'],
// },
// wednesday: {
// status: 'open',
// opening_time: ['12:00 am'],
- // closing_time: ['11:59 pm'],
+ // closing_time: ['11:30 pm'],
// },
// thursday: {
// status: 'open',
// opening_time: ['12:00 am'],
- // closing_time: ['11:59 pm'],
+ // closing_time: ['11:30 pm'],
// },
// friday: {
// status: 'open',
// opening_time: ['12:00 am'],
- // closing_time: ['11:59 pm'],
+ // closing_time: ['11:30 pm'],
// },
// saturday: {
// status: 'open',
// opening_time: ['12:00 am'],
- // closing_time: ['11:59 pm'],
+ // closing_time: ['11:30 pm'],
// },
// sunday: {
// status: 'open',
// opening_time: ['12:00 am'],
- // closing_time: ['11:59 pm'],
+ // closing_time: ['11:30 pm'],
// },
// },
// open_notice: 'Store is open',
// close_notice: 'Store is closed',
// },
- sale_only_here: 'yes',
company_name: faker.company.name(),
company_id_number: faker.string.alphanumeric(5),
vat_number: faker.string.alphanumeric(10),
@@ -4308,15 +4132,15 @@ export const payloads = {
categories: [
{
// id: 74,
- // name: 'Uncategorized',
- // slug: 'uncategorized',
+ name: 'Uncategorized',
+ slug: 'uncategorized',
},
],
// vendorwise commission
admin_commission_type: '', // fixed, category_based
- admin_commission: '5',
- admin_additional_fee: '5',
+ admin_commission: '',
+ admin_additional_fee: '',
admin_category_commission: {
all: {
flat: '7',
@@ -4329,29 +4153,17 @@ export const payloads = {
},
},
},
- // store_seo: {
- // 'dokan-seo-meta-title': 'meta title',
- // 'dokan-seo-meta-desc': 'meta description',
- // 'dokan-seo-meta-keywords': 'meta keywords',
- // 'dokan-seo-og-title': 'facebook title',
- // 'dokan-seo-og-desc': 'facebook description',
- // 'dokan-seo-og-image': '0',
- // 'dokan-seo-twitter-title': 'twitter title',
- // 'dokan-seo-twitter-desc': 'twitter description',
- // 'dokan-seo-twitter-image': '0',
- // },
},
createStore2: {
user_login: VENDOR2,
user_pass: USER_PASSWORD,
user_nicename: `${VENDOR2}store`,
+ role: 'seller',
email: `${VENDOR2}@email.com`,
store_name: `${VENDOR2}store`,
first_name: VENDOR2,
last_name: 'v',
- role: 'seller',
- notify_vendor: 'yes',
social: {
fb: 'https://www.facebook.com/',
twitter: 'https://www.twitter.com/',
@@ -4363,7 +4175,7 @@ export const payloads = {
threads: 'https://www.threads.net/',
},
phone: '0123456789',
- show_email: 'yes',
+ show_email: true, // todo: doesn't work on lite
address: {
street_1: 'abc street',
street_2: 'xyz street',
@@ -4373,15 +4185,22 @@ export const payloads = {
country: 'US',
},
location: '40.7127753,-74.0059728',
+ banner: 0,
banner_id: 0,
+ gravatar: 0,
gravatar_id: 0,
- enable_tnc: 'yes',
- store_tnc: 'test Vendor terms and conditions',
- featured: 'yes',
- enabled: 'yes',
- trusted: 'yes', // publish product directly
+ show_more_product_tab: true,
+ toc_enabled: true, // todo: doesn't work on lite
+ store_toc: 'test Vendor terms and conditions',
+ featured: true,
+ rating: {
+ rating: '4.00', // todo: doesn't work on lite
+ count: 1,
+ },
+ enabled: true,
payment: {
paypal: {
+ 0: 'email',
email: 'paypal@g.c',
},
bank: {
@@ -4394,62 +4213,199 @@ export const payloads = {
iban: '123456',
swift: '12345',
},
- skrill: {
- email: 'skrill@g.c',
+ stripe: false,
+ },
+ trusted: true,
+ // store_open_close: {
+ // enabled: false,
+ // time: [],
+ // open_notice: 'Store is open',
+ // close_notice: 'Store is closed',
+ // },
+ store_open_close: {
+ // todo: doesn't work on lite
+ enabled: true,
+ time: {
+ monday: {
+ status: 'open', // 'close'
+ opening_time: ['12:00 am'], // []
+ closing_time: ['11:30 pm'], // []
+ },
+ tuesday: {
+ status: 'open',
+ opening_time: ['12:00 am'],
+ closing_time: ['11:30 pm'],
+ },
+ wednesday: {
+ status: 'open',
+ opening_time: ['12:00 am'],
+ closing_time: ['11:30 pm'],
+ },
+ thursday: {
+ status: 'open',
+ opening_time: ['12:00 am'],
+ closing_time: ['11:30 pm'],
+ },
+ friday: {
+ status: 'open',
+ opening_time: ['12:00 am'],
+ closing_time: ['11:30 pm'],
+ },
+ saturday: {
+ status: 'open',
+ opening_time: ['12:00 am'],
+ closing_time: ['11:30 pm'],
+ },
+ sunday: {
+ status: 'open',
+ opening_time: ['12:00 am'],
+ closing_time: ['11:30 pm'],
+ },
+ },
+ open_notice: 'Store is open',
+ close_notice: 'Store is closed',
+ },
+ company_name: faker.company.name(),
+ company_id_number: faker.string.alphanumeric(5),
+ vat_number: faker.string.alphanumeric(10),
+ bank_name: faker.string.alphanumeric(7),
+ bank_iban: faker.finance.iban(),
+ categories: [
+ {
+ // id: 74,
+ name: 'Uncategorized',
+ slug: 'uncategorized',
+ },
+ ],
+
+ // vendorwise commission
+ admin_commission_type: '', // fixed, category_based
+ admin_commission: '',
+ admin_additional_fee: '',
+ admin_category_commission: {
+ all: {
+ flat: '7',
+ percentage: '7',
},
- dokan_custom: {
- withdraw_method_name: 'Bksh',
- withdraw_method_type: 'Phone',
- value: '0123456789',
+ items: {
+ '27': {
+ flat: '7',
+ percentage: '7',
+ },
},
- // "stripe": false,
- // stripe_express: false,
- // 'dokan-moip-connect': true,
- // dokan_razorpay: false,
},
+ },
+
+ createStore3: {
+ user_login: VENDOR3,
+ user_pass: USER_PASSWORD,
+ user_nicename: `${VENDOR3}store`,
+ role: 'seller',
+ email: `${VENDOR3}@email.com`,
+ store_name: `${VENDOR3}store`,
+ first_name: VENDOR3,
+ last_name: 'v',
+ social: {
+ fb: 'https://www.facebook.com/',
+ twitter: 'https://www.twitter.com/',
+ pinterest: 'https://www.pinterest.com/',
+ linkedin: 'https://www.linkedin.com/',
+ youtube: 'https://www.youtube.com/',
+ instagram: 'https://www.instagram.com/',
+ flickr: 'https://www.flickr.com/',
+ threads: 'https://www.threads.net/',
+ },
+ phone: '0123456789',
+ show_email: true, // todo: doesn't work on lite
+ address: {
+ street_1: 'abc street',
+ street_2: 'xyz street',
+ city: 'New York',
+ zip: '10003',
+ state: 'NY',
+ country: 'US',
+ },
+ location: '40.7127753,-74.0059728',
+ banner: 0,
+ banner_id: 0,
+ gravatar: 0,
+ gravatar_id: 0,
+ show_more_product_tab: true,
+ toc_enabled: true, // todo: doesn't work on lite
+ store_toc: 'test Vendor terms and conditions',
+ featured: true,
+ rating: {
+ rating: '4.00', // todo: doesn't work on lite
+ count: 1,
+ },
+ enabled: true,
+ payment: {
+ paypal: {
+ 0: 'email',
+ email: 'paypal@g.c',
+ },
+ bank: {
+ ac_name: 'account name',
+ ac_type: 'personal',
+ ac_number: '1234567',
+ bank_name: 'bank name',
+ bank_addr: 'bank address',
+ routing_number: '123456',
+ iban: '123456',
+ swift: '12345',
+ },
+ stripe: false,
+ },
+ trusted: true,
// store_open_close: {
- // enabled: 'yes',
- // time: {
- // monday: {
- // status: 'open',
- // opening_time: ['12:00 am'],
- // closing_time: ['11:59 pm'],
- // },
- // tuesday: {
- // status: 'open',
- // opening_time: ['12:00 am'],
- // closing_time: ['11:59 pm'],
- // },
- // wednesday: {
- // status: 'open',
- // opening_time: ['12:00 am'],
- // closing_time: ['11:59 pm'],
- // },
- // thursday: {
- // status: 'open',
- // opening_time: ['12:00 am'],
- // closing_time: ['11:59 pm'],
- // },
- // friday: {
- // status: 'open',
- // opening_time: ['12:00 am'],
- // closing_time: ['11:59 pm'],
- // },
- // saturday: {
- // status: 'open',
- // opening_time: ['12:00 am'],
- // closing_time: ['11:59 pm'],
- // },
- // sunday: {
- // status: 'open',
- // opening_time: ['12:00 am'],
- // closing_time: ['11:59 pm'],
- // },
- // },
- // open_notice: 'Store is open',
- // close_notice: 'Store is closed',
+ // enabled: false,
+ // time: [],
+ // open_notice: 'Store is open',
+ // close_notice: 'Store is closed',
// },
- sale_only_here: 'yes',
+ store_open_close: {
+ // todo: doesn't work on lite
+ enabled: true,
+ time: {
+ monday: {
+ status: 'open', // 'close'
+ opening_time: ['12:00 am'], // []
+ closing_time: ['11:30 pm'], // []
+ },
+ tuesday: {
+ status: 'open',
+ opening_time: ['12:00 am'],
+ closing_time: ['11:30 pm'],
+ },
+ wednesday: {
+ status: 'open',
+ opening_time: ['12:00 am'],
+ closing_time: ['11:30 pm'],
+ },
+ thursday: {
+ status: 'open',
+ opening_time: ['12:00 am'],
+ closing_time: ['11:30 pm'],
+ },
+ friday: {
+ status: 'open',
+ opening_time: ['12:00 am'],
+ closing_time: ['11:30 pm'],
+ },
+ saturday: {
+ status: 'open',
+ opening_time: ['12:00 am'],
+ closing_time: ['11:30 pm'],
+ },
+ sunday: {
+ status: 'open',
+ opening_time: ['12:00 am'],
+ closing_time: ['11:30 pm'],
+ },
+ },
+ open_notice: 'Store is open',
+ close_notice: 'Store is closed',
+ },
company_name: faker.company.name(),
company_id_number: faker.string.alphanumeric(5),
vat_number: faker.string.alphanumeric(10),
@@ -4459,14 +4415,13 @@ export const payloads = {
{
// id: 74,
// name: 'Uncategorized',
- // slug: 'uncategorized',
+ // slug: 'uncategorized'
},
],
-
// vendorwise commission
admin_commission_type: '', // fixed, category_based
- admin_commission: '5',
- admin_additional_fee: '5',
+ admin_commission: '',
+ admin_additional_fee: '',
admin_category_commission: {
all: {
flat: '7',
@@ -4479,17 +4434,6 @@ export const payloads = {
},
},
},
- // store_seo: {
- // 'dokan-seo-meta-title': 'meta title',
- // 'dokan-seo-meta-desc': 'meta description',
- // 'dokan-seo-meta-keywords': 'meta keywords',
- // 'dokan-seo-og-title': 'facebook title',
- // 'dokan-seo-og-desc': 'facebook description',
- // 'dokan-seo-og-image': '0',
- // 'dokan-seo-twitter-title': 'twitter title',
- // 'dokan-seo-twitter-desc': 'twitter description',
- // 'dokan-seo-twitter-image': '0',
- // },
},
createCustomer1: {
diff --git a/tests/pw/utils/testData.ts b/tests/pw/utils/testData.ts
index e54182b4c9..ad4135ea55 100644
--- a/tests/pw/utils/testData.ts
+++ b/tests/pw/utils/testData.ts
@@ -639,12 +639,6 @@ export const data = {
reviewMessage: () => faker.string.nanoid(10),
},
- // store banner
- storeBanner: {
- width: '625',
- height: '300',
- },
-
// store list
storeList: {
sort: 'most_recent',