diff --git a/.github/workflows/e2e_api_tests.yml b/.github/workflows/e2e_api_tests.yml index 7847e1d2b8..91a059ff27 100644 --- a/.github/workflows/e2e_api_tests.yml +++ b/.github/workflows/e2e_api_tests.yml @@ -46,6 +46,7 @@ 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 da3798eef2..86fd70496f 100644 --- a/tests/pw/.env.example +++ b/tests/pw/.env.example @@ -1,21 +1,24 @@ -# 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] +# 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] # 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 ac217ed7fa..70d18d450e 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,23 +121,26 @@ 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=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] +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] # 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 8a70dbc577..afc051c1dd 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 : 40 * 1000, + timeout: CI ? 35 * 1000 : 45 * 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: 10 * 1000, + timeout: 15 * 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 044d729366..76cd0b4085 100644 --- a/tests/pw/feature-map/feature-map.yml +++ b/tests/pw/feature-map/feature-map.yml @@ -294,10 +294,27 @@ - page: 'Store Appearance' features: - 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 + 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 - page: 'Store List' features: @@ -660,7 +677,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 af0c3ecc09..d846919d2e 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 { StoreAppearance } from '@pages/storeAppearance'; +import { StoreAppearancePage } from '@pages/storeAppearancePage'; 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: StoreAppearance; + storeAppearance: StoreAppearancePage; storeCategoriesPage: StoreCategoriesPage; storeListingPage: StoreListingPage; storeReviewsPage: StoreReviewsPage; @@ -308,7 +308,7 @@ export const test = base.extend({ }, storeAppearance: async ({ page }, use) => { - await use(new StoreAppearance(page)); + await use(new StoreAppearancePage(page)); }, storeCategoriesPage: async ({ page }, use) => { diff --git a/tests/pw/pages/basePage.ts b/tests/pw/pages/basePage.ts index d0d2bb9a72..0186a2578c 100644 --- a/tests/pw/pages/basePage.ts +++ b/tests/pw/pages/basePage.ts @@ -1487,6 +1487,12 @@ 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); @@ -1604,6 +1610,12 @@ 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 61d410e417..3d94ab77ec 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))); + await this.gotoUntilNetworkidle(data.subUrls.frontend.vendorDetails(helpers.slugify(storeName)), { waitUntil: 'networkidle' }, true); 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 bb36387e20..9e54cdfafe 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: '.upgrade-text', - upgradeToPro: '.upgrade-button', - proCard: '.promo-card', - alreadyUpdated: '.already-updated', + 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', }, // modules @@ -6087,6 +6087,7 @@ 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', @@ -7440,25 +7441,24 @@ export const selector = { // Store Profile Summary storeProfile: { + storeProfileInfoBox: 'div.profile-info-box', storeProfileSummary: '.dokan-single-store .profile-info-summery', - storeBanner: '.profile-info-img', + storeBanner: 'div.profile-info-img', - profileInfoHead: '.profile-info-head', - profileImage: '.profile-img.profile-img-circle', - storeName: '.profile-info-head .store-name', + profileInfoHead: 'div.profile-info-head', + profileImage: 'div.profile-img.profile-img-circle', + storeName: 'div.profile-info-head h1.store-name', verifiedIcon: '//div[@data-original-title="Verified"]', verifiedIconByIcon: (icon: string) => `//div[@data-original-title="Verified"]//i[@class="${icon}"]`, - 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', - + 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', euComplianceData: { companyName: 'li.dokan-company-name', companyId: 'li.dokan-company-id-number', @@ -7466,6 +7466,8 @@ export const selector = { bankName: 'li.dokan-bank-name', bankIban: 'li.dokan-bank-iban', }, + + storeSocial: 'ul.store-social', }, // Store open close time @@ -7588,6 +7590,8 @@ 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"]', @@ -7598,8 +7602,18 @@ export const selector = { privacyPolicy: 'div.dokan-privacy-policy-text p', privacyPolicyLink: 'a.dokan-privacy-policy-link', }, - storeMap: 'div#dokan-store-location', + + 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/"]', + }, + 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 deleted file mode 100644 index b1188ecd7e..0000000000 --- a/tests/pw/pages/storeAppearance.ts +++ /dev/null @@ -1,29 +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 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 new file mode 100644 index 0000000000..e7ceb78f8a --- /dev/null +++ b/tests/pw/pages/storeAppearancePage.ts @@ -0,0 +1,113 @@ +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 63a283cbfc..411e533de1 100644 --- a/tests/pw/tests/e2e/_auth.setup.ts +++ b/tests/pw/tests/e2e/_auth.setup.ts @@ -3,8 +3,11 @@ 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; @@ -33,6 +36,18 @@ 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); }); @@ -43,6 +58,18 @@ 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 33cbc196d9..247ffac16e 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 e5df6faa23..9187d853ec 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 () => { - const [previousSettings] = await dbUtils.updateOptionValue(dbData.dokan.optionName.selling, { catalog_mode_hide_product_price: 'off' }); + await dbUtils.updateOptionValue(dbData.dokan.optionName.selling, { catalog_mode_hide_product_price: 'off' }); await vendor.accessCatalogModeSettings(); // reset - await dbUtils.setOptionValue(dbData.dokan.optionName.selling, previousSettings); + await dbUtils.updateOptionValue(dbData.dokan.optionName.selling, { catalog_mode_hide_product_price: 'on' }); }); //vendor diff --git a/tests/pw/tests/e2e/commission.spec.ts b/tests/pw/tests/e2e/commission.spec.ts index 009cad46d5..5f06035cb6 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; + let subscriptionProductId: string = '1'; 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 e7c3aa9fbb..db45bdddf1 100644 --- a/tests/pw/tests/e2e/euCompliance.spec.ts +++ b/tests/pw/tests/e2e/euCompliance.spec.ts @@ -102,10 +102,11 @@ test.describe('EU Compliance test', () => { }); test('admin can hide vendors EU compliance data from single store page', { tag: ['@pro', '@admin'] }, async () => { - const [previousSettings] = await dbUtils.updateOptionValue(dbData.dokan.optionName.appearance, { hide_vendor_info: dbData.testData.dokan.hideVendorEuInfo }); + await dbUtils.updateOptionValue(dbData.dokan.optionName.appearance, { hide_vendor_info: dbData.testData.dokan.hideVendorEuInfo }); await admin.hideEuComplianceVendor(data.predefined.vendorStores.vendor1); + // reset - await dbUtils.setOptionValue(dbData.dokan.optionName.appearance, previousSettings); + await dbUtils.updateOptionValue(dbData.dokan.optionName.appearance, { hide_vendor_info: dbData.testData.dokan.unhideVendorEuInfo }); }); // vendor diff --git a/tests/pw/tests/e2e/liveSearch.spec.ts b/tests/pw/tests/e2e/liveSearch.spec.ts index 05e886393f..6f1ce17431 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('widget_dokna_product_search', dbData.liveSearchWidget); - await dbUtils.updateOptionValue('sidebars_widgets', { ...dbData.sidebarWidgets, 'sidebar-1': ['dokna_product_search-2'] }); + 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.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 02e61da7c9..6eed761f58 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('widget_dokan-store-contact-widget', dbData.storeContactFormWidget); - // await dbUtils.updateOptionValue('sidebars_widgets', { ...dbData.sidebarWidgets, 'sidebar-store': ['dokan-store-contact-widget-2'] }); + // await dbUtils.updateOptionValue(dbData.dokanWidgets.names.storeContactForm, dbData.dokanWidgets.values.storeContactFormWidget); + // await dbUtils.updateOptionValue('sidebars_widgets', { 'sidebar-store': [dbData.dokanWidgets.widgets.storeContactForm] }); }); 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); // todo: remove in future + await dbUtils.setOptionValue('sidebars_widgets', dbData.emptySideBarsWidgets); await cPage.close(); await apiUtils.dispose(); }); @@ -41,7 +41,8 @@ test.describe('Privacy Policy & Store Contact form test', () => { await customer.disablePrivacyPolicy(data.predefined.vendorStores.vendor1); }); - test('admin can disable store contact form from store sidebar', { tag: ['@lite', '@customer'] }, async () => { + // todo: remove below test: duplicate test + test.skip('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 0ad1c6ddeb..4b7eeaff3e 100644 --- a/tests/pw/tests/e2e/storeAppearance.spec.ts +++ b/tests/pw/tests/e2e/storeAppearance.spec.ts @@ -1,41 +1,103 @@ -import { test, Page } from '@playwright/test'; -import { StoreAppearance } from '@pages/storeAppearance'; -// import { CustomerPage } from '@pages/customerPage'; +import { test, Page, request } from '@playwright/test'; +import { StoreAppearancePage } from '@pages/storeAppearancePage'; +import { ApiUtils } from '@utils/apiUtils'; import { dbUtils } from '@utils/dbUtils'; import { data } from '@utils/testData'; import { dbData } from '@utils/dbData'; +import { payloads } from '@utils/payloads'; -test.describe.skip('Store Appearance test', () => { - let customer: StoreAppearance; - // let customerPage: CustomerPage; - let cPage: Page; +const { VENDOR_ID } = process.env; - // todo: need to remove default dokan store sidebar content +test.describe('Store Appearance test', () => { + let admin: StoreAppearancePage; + let aPage: Page; + let apiUtils: ApiUtils; test.beforeAll(async ({ browser }) => { - const customerContext = await browser.newContext(data.auth.customerAuth); - cPage = await customerContext.newPage(); - // customerPage = new CustomerPage(cPage); - customer = new StoreAppearance(cPage); + 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] }); }); test.afterAll(async () => { - await dbUtils.updateOptionValue(dbData.dokan.optionName.appearance, { store_map: 'on', store_open_close: 'on', hide_vendor_info: { email: '', phone: '', address: '' } }); - await cPage.close(); + 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); }); - 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} 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 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} 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.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); + ['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); + }); }); }); diff --git a/tests/pw/tests/e2e/vendor.spec.ts b/tests/pw/tests/e2e/vendor.spec.ts index 54e61b5a04..80d9f27854 100644 --- a/tests/pw/tests/e2e/vendor.spec.ts +++ b/tests/pw/tests/e2e/vendor.spec.ts @@ -26,9 +26,11 @@ test.describe('Vendor functionality test', () => { test('vendor can register (address fields are enabled)', { tag: ['@lite', '@vendor'] }, async ({ page }) => { const vendor = new VendorPage(page); - const [previousSettings] = await dbUtils.updateOptionValue(dbData.dokan.optionName.general, { enabled_address_on_reg: 'on' }); + await dbUtils.updateOptionValue(dbData.dokan.optionName.general, { enabled_address_on_reg: 'on' }); await vendor.vendorRegister({ ...data.vendor.vendorInfo, addressFieldsEnabled: true }, { ...data.vendorSetupWizard, choice: false }); - await dbUtils.setOptionValue(dbData.dokan.optionName.general, previousSettings); + + // reset + await dbUtils.updateOptionValue(dbData.dokan.optionName.general, { enabled_address_on_reg: 'off' }); }); 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 ee6cb4766f..74a5e04170 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; + let subscriptionId: string = '1'; 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 b35bb7c3d1..80df42a725 100644 --- a/tests/pw/types/environment.d.ts +++ b/tests/pw/types/environment.d.ts @@ -34,6 +34,8 @@ 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 4ea204278a..8e2bd3aa04 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 } = process.env; +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; export const dbData = { dokan: { @@ -220,17 +220,20 @@ export const dbData = { appearanceSettings: { appearance_options: '', - store_map: 'on', - map_api_source: 'google_maps', + store_map: 'on', // 'on', 'off' + map_api_source: 'google_maps', // google_maps, mapbox 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', + store_header_template: 'default', // default, layout1, layout2, layout3 store_banner_width: '625', store_banner_height: '300', store_open_close: 'on', - enable_theme_store_sidebar: 'off', + enable_theme_store_sidebar: 'off', // on, off hide_vendor_info: { email: '', phone: '', @@ -241,7 +244,8 @@ export const dbData = { dokan_bank_name: '', dokan_bank_iban: '', }, - disable_dokan_fontawesome: 'off', + disable_dokan_fontawesome: 'off', // on, off + dashboard_menu_manager: [], }, menuManagerSettings: { @@ -1340,20 +1344,6 @@ 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', @@ -1380,16 +1370,66 @@ export const dbData = { emptySideBarsWidgets: { wp_inactive_widgets: [] }, // dokan widgets - storeContactFormWidget: { - '2': { - title: 'Contact Vendor', + 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', }, - _multiwidget: 1, - }, - liveSearchWidget: { - '2': { title: 'Live Search' }, - _multiwidget: 1, + // 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, + }, + }, + + 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', + }, }, // test db data @@ -1425,6 +1465,28 @@ 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 0194a65271..e6416ac129 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, VENDOR3, 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, 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,11 +3756,12 @@ 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/', @@ -3782,19 +3783,13 @@ export const payloads = { country: 'US', }, location: '40.7127753,-74.0059728', - banner: 0, banner_id: 0, - gravatar: 0, gravatar_id: 0, - show_more_product_tab: true, - enable_tnc: 'on', + enable_tnc: 'yes', store_tnc: 'test Vendor terms and conditions', featured: 'yes', - rating: { - rating: '0.00', - count: 1, - }, - enabled: true, + enabled: 'yes', + trusted: 'yes', // publish product directly payment: { paypal: { email: 'paypal@g.c', @@ -3809,14 +3804,62 @@ 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: false, - time: [], - open_notice: 'Store is open', - close_notice: 'Store is closed', - }, + // 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), @@ -3825,13 +3868,38 @@ export const payloads = { categories: [ { // id: 74, - name: 'Uncategorized', - slug: 'uncategorized', + // name: 'Uncategorized', + // slug: 'uncategorized', }, ], - admin_commission: '', - admin_additional_fee: '', - admin_commission_type: '', + + // 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', + // }, }), updateStore: () => ({ @@ -3850,7 +3918,7 @@ export const payloads = { threads: 'https://www.threads.net/', }, phone: '0123456789', - show_email: false, + show_email: 'yes', address: { street_1: 'abc street', street_2: 'xyz street', @@ -3859,26 +3927,16 @@ export const payloads = { state: 'NY', country: 'US', }, - location: '', - banner: '', + location: '40.7127753,-74.0059728', banner_id: 0, - gravatar: '', gravatar_id: 0, - 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: '', + enable_tnc: 'yes', + store_tnc: 'test Vendor terms and conditions', + featured: 'yes', + enabled: 'yes', + trusted: 'yes', // publish product directly payment: { paypal: { - 0: 'email', email: 'paypal@g.c', }, bank: { @@ -3891,24 +3949,79 @@ export const payloads = { iban: '123456', swift: '12345', }, - stripe: false, - }, - store_open_close: { - enabled: false, - time: [], - open_notice: 'Store is open', - close_notice: 'Store is closed', + 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, }, - company_name: '', - vat_number: '', - company_id_number: '', - bank_name: '', - bank_iban: '', - categories: [{}], + // 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', + }, + ], + // vendorwise commission admin_commission_type: '', // fixed, category_based - admin_commission: '', - admin_additional_fee: '', + admin_commission: '5', + admin_additional_fee: '5', admin_category_commission: { all: { flat: '7', @@ -3921,6 +4034,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', + // }, }), // always revert vendor settings to this after altering in tests @@ -3950,15 +4074,11 @@ 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', - // rating: { - // rating: '4.00', // todo: doesn't work on lite [might not implemented on lite] - // count: 1, - // }, - enabled: true, + enabled: 'yes', payment: { paypal: { email: 'paypal@g.c', @@ -3974,7 +4094,7 @@ export const payloads = { swift: '12345', }, }, - trusted: true, + trusted: 'yes', company_name: 'company name', vat_number: '123456789', company_id_number: '123456789', @@ -4016,15 +4136,72 @@ 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`, - role: 'seller', + user_nicename: `${VENDOR}store`, // store url 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/', @@ -4046,19 +4223,13 @@ export const payloads = { country: 'US', }, location: '40.7127753,-74.0059728', - banner: 0, banner_id: 0, - gravatar: 0, gravatar_id: 0, - show_more_product_tab: true, - enable_tnc: 'on', + enable_tnc: 'yes', store_tnc: 'test Vendor terms and conditions', featured: 'yes', - // rating: { - // rating: '4.00', // todo: doesn't work on lite [might not implemented on lite] - // count: 1, - // }, - enabled: true, + enabled: 'yes', + trusted: 'yes', // publish product directly payment: { paypal: { email: 'paypal@g.c', @@ -4073,57 +4244,62 @@ 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: 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: + // enabled: 'yes', // time: { // monday: { - // status: 'open', // 'close' - // opening_time: ['12:00 am'], // [] - // closing_time: ['11:30 pm'], // [] + // status: 'open', + // opening_time: ['12:00 am'], + // closing_time: ['11:59 pm'], // }, // tuesday: { // status: 'open', // opening_time: ['12:00 am'], - // closing_time: ['11:30 pm'], + // closing_time: ['11:59 pm'], // }, // wednesday: { // status: 'open', // opening_time: ['12:00 am'], - // closing_time: ['11:30 pm'], + // closing_time: ['11:59 pm'], // }, // thursday: { // status: 'open', // opening_time: ['12:00 am'], - // closing_time: ['11:30 pm'], + // closing_time: ['11:59 pm'], // }, // friday: { // status: 'open', // opening_time: ['12:00 am'], - // closing_time: ['11:30 pm'], + // closing_time: ['11:59 pm'], // }, // saturday: { // status: 'open', // opening_time: ['12:00 am'], - // closing_time: ['11:30 pm'], + // closing_time: ['11:59 pm'], // }, // sunday: { // status: 'open', // opening_time: ['12:00 am'], - // closing_time: ['11:30 pm'], + // 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), @@ -4132,15 +4308,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: '', - admin_additional_fee: '', + admin_commission: '5', + admin_additional_fee: '5', admin_category_commission: { all: { flat: '7', @@ -4153,17 +4329,29 @@ 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/', @@ -4175,7 +4363,7 @@ export const payloads = { threads: 'https://www.threads.net/', }, phone: '0123456789', - show_email: true, // todo: doesn't work on lite + show_email: 'yes', address: { street_1: 'abc street', street_2: 'xyz street', @@ -4185,22 +4373,15 @@ export const payloads = { 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, + enable_tnc: 'yes', + store_tnc: 'test Vendor terms and conditions', + featured: 'yes', + enabled: 'yes', + trusted: 'yes', // publish product directly payment: { paypal: { - 0: 'email', email: 'paypal@g.c', }, bank: { @@ -4213,199 +4394,62 @@ export const payloads = { iban: '123456', swift: '12345', }, - 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', + skrill: { + email: 'skrill@g.c', }, - items: { - '27': { - flat: '7', - percentage: '7', - }, + dokan_custom: { + withdraw_method_name: 'Bksh', + withdraw_method_type: 'Phone', + value: '0123456789', }, + // "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: false, - // time: [], - // open_notice: 'Store is open', - // close_notice: 'Store is closed', + // 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', // }, - 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', - }, + sale_only_here: 'yes', company_name: faker.company.name(), company_id_number: faker.string.alphanumeric(5), vat_number: faker.string.alphanumeric(10), @@ -4415,13 +4459,14 @@ export const payloads = { { // id: 74, // name: 'Uncategorized', - // slug: 'uncategorized' + // slug: 'uncategorized', }, ], + // vendorwise commission admin_commission_type: '', // fixed, category_based - admin_commission: '', - admin_additional_fee: '', + admin_commission: '5', + admin_additional_fee: '5', admin_category_commission: { all: { flat: '7', @@ -4434,6 +4479,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', + // }, }, createCustomer1: { diff --git a/tests/pw/utils/testData.ts b/tests/pw/utils/testData.ts index ad4135ea55..e54182b4c9 100644 --- a/tests/pw/utils/testData.ts +++ b/tests/pw/utils/testData.ts @@ -639,6 +639,12 @@ export const data = { reviewMessage: () => faker.string.nanoid(10), }, + // store banner + storeBanner: { + width: '625', + height: '300', + }, + // store list storeList: { sort: 'most_recent',