From 0420dd812aa3aa85f8f8e3a302762ebb9af53aac Mon Sep 17 00:00:00 2001 From: shashwata Date: Wed, 14 Feb 2024 00:56:18 +0600 Subject: [PATCH 1/4] update: update product addon tests --- tests/pw/tests/e2e/productAddons.spec.ts | 32 +++++++++++++++----- tests/pw/utils/apiEndPoints.ts | 6 ++-- tests/pw/utils/apiUtils.ts | 38 ++++++++++++++++++++++++ tests/pw/utils/dbUtils.ts | 8 +++++ tests/pw/utils/payloads.ts | 12 ++++++-- 5 files changed, 82 insertions(+), 14 deletions(-) diff --git a/tests/pw/tests/e2e/productAddons.spec.ts b/tests/pw/tests/e2e/productAddons.spec.ts index aceb86b332..9fae12df14 100644 --- a/tests/pw/tests/e2e/productAddons.spec.ts +++ b/tests/pw/tests/e2e/productAddons.spec.ts @@ -1,40 +1,56 @@ -import { test, Page } from '@playwright/test'; +import { test, request, Page } from '@playwright/test'; import { ProductAddonsPage } from '@pages/productAddonsPage'; +import { ApiUtils } from '@utils/apiUtils'; import { data } from '@utils/testData'; +import { payloads } from '@utils/payloads'; +import { dbUtils } from '@utils/dbUtils'; + +const { VENDOR_ID } = process.env; test.describe('Product addon functionality test', () => { let vendor: ProductAddonsPage; let vPage: Page; + let addonId: string; let addonName: string; let addonFieldTitle: string; + let apiUtils: ApiUtils; + + async function createVendorProductAddon(): Promise<[string, string, string]> { + const [, addonId, addonName, addonFieldTitle] = await apiUtils.createProductAddon(payloads.createProductAddons(), payloads.adminAuth); + await dbUtils.updateCell(addonId, VENDOR_ID); + console.log(addonId, addonName, addonFieldTitle); + return [addonId, addonName, addonFieldTitle]; + } test.beforeAll(async ({ browser }) => { const vendorContext = await browser.newContext(data.auth.vendorAuth); vPage = await vendorContext.newPage(); vendor = new ProductAddonsPage(vPage); - addonName = data.vendor.addon.randomName(); - addonFieldTitle = data.vendor.addon.randomTitle(); - await vendor.addAddon({ ...data.vendor.addon, name: addonName, titleRequired: addonFieldTitle }); + apiUtils = new ApiUtils(await request.newContext()); + [addonId, addonName, addonFieldTitle] = await createVendorProductAddon(); }); test.afterAll(async () => { + await apiUtils.deleteAllProductAddons(payloads.adminAuth); await vPage.close(); + await apiUtils.dispose(); }); - test('vendor product addons menu page is rendering properly @pro @explo', async () => { + test('vendor product addons menu page is rendering properly @pro @exp @v', async () => { await vendor.vendorProductAddonsSettingsRenderProperly(); }); - test('vendor can add addons @pro', async () => { + test('vendor can add addons @pro @v', async () => { await vendor.addAddon({ ...data.vendor.addon, name: data.vendor.addon.randomName() }); }); - test('vendor can edit addon @pro', async () => { + test('vendor can edit addon @pro @v', async () => { await vendor.editAddon({ ...data.vendor.addon, name: addonName, titleRequired: addonFieldTitle }); }); - test('vendor can delete addon @pro', async () => { + test('vendor can delete addon @pro @v', async () => { + const [, addonName] = await createVendorProductAddon(); await vendor.deleteAddon({ ...data.vendor.addon, name: addonName }); }); }); diff --git a/tests/pw/utils/apiEndPoints.ts b/tests/pw/utils/apiEndPoints.ts index 625582a260..dd09c12769 100644 --- a/tests/pw/utils/apiEndPoints.ts +++ b/tests/pw/utils/apiEndPoints.ts @@ -538,10 +538,10 @@ export const endPoints = { productAddons: { getAllProductAddons: `${SERVER_URL}/wc-product-add-ons/v1/product-add-ons`, - getSingleProductAddon: (productId: string) => `${SERVER_URL}/wc-product-add-ons/v1/product-add-ons${productId}`, + getSingleProductAddon: (productId: string) => `${SERVER_URL}/wc-product-add-ons/v1/product-add-ons/${productId}`, createProductAddon: `${SERVER_URL}/wc-product-add-ons/v1/product-add-ons`, - updateProductAddon: (productId: string) => `${SERVER_URL}/wc-product-add-ons/v1/product-add-ons${productId}`, - deleteProductAddon: (productId: string) => `${SERVER_URL}/wc-product-add-ons/v1/product-add-ons${productId}`, + updateProductAddon: (productId: string) => `${SERVER_URL}/wc-product-add-ons/v1/product-add-ons/${productId}`, + deleteProductAddon: (productId: string) => `${SERVER_URL}/wc-product-add-ons/v1/product-add-ons/${productId}`, }, }, diff --git a/tests/pw/utils/apiUtils.ts b/tests/pw/utils/apiUtils.ts index 8b32729c9a..4438648e8e 100644 --- a/tests/pw/utils/apiUtils.ts +++ b/tests/pw/utils/apiUtils.ts @@ -1789,4 +1789,42 @@ export class ApiUtils { return orderDetails; } + + /** + * woocommerce product addon api methods + */ + + // get all product addons + async getAllProductAddons(auth?: auth): Promise { + const [, responseBody] = await this.get(endPoints.wc.productAddons.getAllProductAddons, { headers: auth }); + return responseBody; + } + + // create product addon + async createProductAddon(payload: object, auth?: auth): Promise<[responseBody, string, string, string]> { + const [, responseBody] = await this.post(endPoints.wc.productAddons.createProductAddon, { data: payload, headers: auth }); + const productAddonId = String(responseBody?.id); + const addonName = responseBody.name; + const addonFieldTitle = responseBody.fields[0].name; + return [responseBody, productAddonId, addonName, addonFieldTitle]; + } + + // delete product addon + async deleteProductAddon(productAddonId: string, auth?: auth): Promise { + const [, responseBody] = await this.delete(endPoints.wc.productAddons.deleteProductAddon(productAddonId), { headers: auth }); + return responseBody; + } + + // delete all product addons + async deleteAllProductAddons(auth?: auth): Promise { + const allProductAddons = await this.getAllProductAddons(auth); + if (!allProductAddons?.length) { + console.log('No product addon exists'); + return; + } + const allProductAddonIds = allProductAddons.map((o: { id: unknown }) => o.id); + for (const productAddonId of allProductAddonIds) { + await this.deleteProductAddon(productAddonId, auth); + } + } } diff --git a/tests/pw/utils/dbUtils.ts b/tests/pw/utils/dbUtils.ts index 7f851fd852..804f8f3fd5 100644 --- a/tests/pw/utils/dbUtils.ts +++ b/tests/pw/utils/dbUtils.ts @@ -123,4 +123,12 @@ export const dbUtils = { // console.log(res); return [res, refundId]; }, + + // update cell + async updateCell(id: any, value: any): Promise { + const queryUpdate = `UPDATE ${dbPrefix}_posts SET post_author = '${value}' WHERE ID = '${id}';`; + const res = await dbUtils.dbQuery(queryUpdate); + // console.log(res); + return res; + }, }; diff --git a/tests/pw/utils/payloads.ts b/tests/pw/utils/payloads.ts index b68e8c55b9..1cb7576bfe 100644 --- a/tests/pw/utils/payloads.ts +++ b/tests/pw/utils/payloads.ts @@ -484,8 +484,8 @@ export const payloads = { }), createProductAddons: () => ({ - name: 'Test Addons Group_1' + faker.string.nanoid(10), - priority: 1, + name: 'Test Addons Group_' + faker.string.nanoid(10), + priority: 10, restrict_to_categories: [], fields: [ { @@ -507,7 +507,13 @@ export const payloads = { options: [ { label: 'Option 1', - price: '30', + price: '10', + image: '', + price_type: 'flat_fee', + }, + { + label: 'Option 2', + price: '20', image: '', price_type: 'flat_fee', }, From fc2301f74dc2cfeb60e6a6d791860a84cad7fa33 Mon Sep 17 00:00:00 2001 From: shashwata Date: Wed, 14 Feb 2024 01:22:13 +0600 Subject: [PATCH 2/4] added test tags and refactor suit for parallism --- tests/pw/e2e.config.ts | 2 +- tests/pw/package.json | 22 +++--- tests/pw/pages/shopPage.ts | 5 +- tests/pw/tests/api/_env.setup.ts | 3 +- tests/pw/tests/api/modules.spec.ts | 4 +- tests/pw/tests/e2e/_env.setup.ts | 2 +- tests/pw/tests/e2e/abuseReports.spec.ts | 25 +++--- tests/pw/tests/e2e/admin.spec.ts | 8 +- tests/pw/tests/e2e/adminDashboard.spec.ts | 6 +- tests/pw/tests/e2e/announcements.spec.ts | 30 ++++---- tests/pw/tests/e2e/coupons.spec.ts | 22 +++--- tests/pw/tests/e2e/customer.spec.ts | 20 ++--- tests/pw/tests/e2e/emailVerification.spec.ts | 4 +- tests/pw/tests/e2e/followStore.spec.ts | 28 ++++--- tests/pw/tests/e2e/help.spec.ts | 4 +- tests/pw/tests/e2e/license.spec.ts | 9 ++- tests/pw/tests/e2e/modules.spec.ts | 23 ++++-- tests/pw/tests/e2e/myOrders.spec.ts | 12 +-- tests/pw/tests/e2e/orders.spec.ts | 31 ++++---- tests/pw/tests/e2e/payments.spec.ts | 77 ++++++++++--------- tests/pw/tests/e2e/plugin.spec.ts | 40 +++++----- tests/pw/tests/e2e/privacyPolicy.spec.ts | 8 +- tests/pw/tests/e2e/proPromo.spec.ts | 2 +- tests/pw/tests/e2e/productAdvertising.spec.ts | 26 ++++--- tests/pw/tests/e2e/productEnquiry.spec.ts | 9 +-- tests/pw/tests/e2e/productQA.spec.ts | 46 +++++------ tests/pw/tests/e2e/productReviews.spec.ts | 18 ++--- tests/pw/tests/e2e/products.spec.ts | 72 ++++++++--------- tests/pw/tests/e2e/refunds.spec.ts | 14 ++-- tests/pw/tests/e2e/reports.spec.ts | 12 +-- .../pw/tests/e2e/requestForQuoteRules.spec.ts | 15 ++-- tests/pw/tests/e2e/requestForQuotes.spec.ts | 47 ++++++----- tests/pw/tests/e2e/reverseWithdraws.spec.ts | 16 ++-- tests/pw/tests/e2e/sellerBadges.spec.ts | 32 ++++---- tests/pw/tests/e2e/setting.spec.ts | 24 +++--- tests/pw/tests/e2e/settings.spec.ts | 52 ++++++------- tests/pw/tests/e2e/shop.spec.ts | 15 ++-- tests/pw/tests/e2e/singleProduct.spec.ts | 16 ++-- tests/pw/tests/e2e/singleStore.spec.ts | 12 +-- tests/pw/tests/e2e/spmv.spec.ts | 32 ++++---- tests/pw/tests/e2e/storeAppearance.spec.ts | 6 +- tests/pw/tests/e2e/storeCategories.spec.ts | 14 ++-- tests/pw/tests/e2e/storeReviews.spec.ts | 24 +++--- tests/pw/tests/e2e/storeSupports.spec.ts | 68 ++++++++-------- tests/pw/tests/e2e/storelisting.spec.ts | 22 +++--- tests/pw/tests/e2e/stores.spec.ts | 22 +++--- tests/pw/tests/e2e/tools.spec.ts | 16 ++-- tests/pw/tests/e2e/vendor.spec.ts | 16 ++-- tests/pw/tests/e2e/vendorAnalytics.spec.ts | 2 +- tests/pw/tests/e2e/vendorAuction.spec.ts | 26 +++---- tests/pw/tests/e2e/vendorBooking.spec.ts | 42 +++++----- tests/pw/tests/e2e/vendorDashboard.spec.ts | 2 +- tests/pw/tests/e2e/vendorDeliveryTime.spec.ts | 14 ++-- .../e2e/vendorProductSubscription.spec.ts | 72 +++++++++-------- tests/pw/tests/e2e/vendorReports.spec.ts | 4 +- .../pw/tests/e2e/vendorReturnRequest.spec.ts | 18 ++--- tests/pw/tests/e2e/vendorSettings.spec.ts | 42 +++++----- tests/pw/tests/e2e/vendorShipping.spec.ts | 18 ++--- tests/pw/tests/e2e/vendorStaff.spec.ts | 10 +-- tests/pw/tests/e2e/vendorTools.spec.ts | 10 +-- .../pw/tests/e2e/vendorVerifications.spec.ts | 22 +++--- tests/pw/tests/e2e/wholesaleCustomers.spec.ts | 24 +++--- tests/pw/tests/e2e/withdraws.spec.ts | 32 ++++---- tests/pw/utils/apiUtils.ts | 13 ++-- tests/pw/utils/interfaces.ts | 2 +- tests/pw/utils/testData.ts | 2 +- 66 files changed, 707 insertions(+), 681 deletions(-) diff --git a/tests/pw/e2e.config.ts b/tests/pw/e2e.config.ts index c27998e50f..74b037831c 100644 --- a/tests/pw/e2e.config.ts +++ b/tests/pw/e2e.config.ts @@ -23,7 +23,7 @@ export default defineConfig({ // forbidOnly : !!process.env.CI, /* Fail the build on CI if you accidentally left test-only in the source code. */ repeatEach: 1 /* The number of times to repeat each test, useful for debugging flaky tests. */, retries: process.env.CI ? 1 : 0 /* The maximum number of retry attempts given to failed tests. */, - workers: process.env.CI ? 4 : 1 /* Opt out of parallel tests on CI. */, + workers: process.env.CI ? 4 : 4 /* Opt out of parallel tests on CI. */, reportSlowTests: { max: 2, threshold: 25 } /* Whether to report slow test files. Pass null to disable this feature. */, reporter: process.env.CI ? [ diff --git a/tests/pw/package.json b/tests/pw/package.json index 892224c836..fdd2140013 100644 --- a/tests/pw/package.json +++ b/tests/pw/package.json @@ -11,18 +11,18 @@ "pw:deps-only": "playwright install-deps chromium", "test": "npx playwright test", "test:site_setup": "npx playwright test --project=site_setup", - "test:api": "npx playwright test --project=api_tests --config=api.config.ts ", - "test:e2e": "npx playwright test --project=e2e_tests --config=e2e.config.ts ", + "test:api": "npx playwright test --project=api_tests --config=api.config.ts", + "test:e2e": "npx playwright test --project=e2e_tests --config=e2e.config.ts", "test:e2e-i": "npx playwright test --project=e2e_tests --headed", - "test:e2e:lite": "npx playwright test --project=e2e_tests --grep '@lite|@liteOnly' --grep-invert '@pro' --config=e2e.config.ts ", - "test:api:lite": "npx playwright test --project=api_tests --grep '@lite|@liteOnly' --grep-invert @pro --config=api.config.ts ", - "test:e2e:lite:explo": "npx playwright test --project=e2e_tests --grep '(?=.*@lite)(?=.*@explo)' --config=e2e.config.ts ", - "test:api:pro": "npx playwright test --project=api_tests --grep '@lite|@pro' --grep-invert @liteOnly --config=api.config.ts ", - "test:e2e:pro": "npx playwright test --project=e2e_tests --grep '@lite' --grep-invert @liteOnly --config=e2e.config.ts ", - "test:e2e:pro_": "npx playwright test --project=e2e_tests --grep '@lite|@pro' --grep-invert @liteOnly --config=e2e.config.ts ", - "test:e2e:visual": "npx playwright test --project=e2e_tests --grep @visual --config=e2e.config.ts ", - "test:e2e:explo": "npx playwright test --project=e2e_tests --grep @explo --config=e2e.config.ts ", - "test:e2e:core": "npx playwright test --project=e2e_tests --grep @core --config=e2e.config.ts ", + "test:e2e:lite": "npx playwright test --project=e2e_tests --grep '@lite|@liteOnly' --grep-invert '@pro' --config=e2e.config.ts", + "test:api:lite": "npx playwright test --project=api_tests --grep '@lite|@liteOnly' --grep-invert @pro --config=api.config.ts", + "test:e2e:lite:explo": "npx playwright test --project=e2e_tests --grep '(?=.*@lite)(?=.*@exp)' --config=e2e.config.ts", + "test:api:pro": "npx playwright test --project=api_tests --grep '@lite|@pro' --grep-invert @liteOnly --config=api.config.ts", + "test:e2e:pro": "npx playwright test --project=e2e_tests --grep '@lite' --grep-invert @liteOnly --config=e2e.config.ts", + "test:e2e:pro_": "npx playwright test --project=e2e_tests --grep '@lite|@pro' --grep-invert @liteOnly --config=e2e.config.ts", + "test:e2e:visual": "npx playwright test --project=e2e_tests --grep @visual --config=e2e.config.ts", + "test:e2e:explo": "npx playwright test --project=e2e_tests --grep @exp --config=e2e.config.ts", + "test:e2e:core": "npx playwright test --project=e2e_tests --grep @core --config=e2e.config.ts", "test:grep": "npx playwright test --grep", "test:debug": "npx playwright test --debug", "test:codegen": "playwright codegen", diff --git a/tests/pw/pages/shopPage.ts b/tests/pw/pages/shopPage.ts index d1865db586..de45d0154e 100644 --- a/tests/pw/pages/shopPage.ts +++ b/tests/pw/pages/shopPage.ts @@ -80,10 +80,8 @@ export class ShopPage extends CustomerPage { } // products on map - async productOnMap(productName?: string) { + async productOnMap() { await this.goIfNotThere(data.subUrls.frontend.shop); - // await this.click(selector.customer.cShop.map.productOnMap.productOnMap); - // await this.toBeVisibleAnyOfThem([selector.customer.cShop.map.productOnMap.productPopup, selector.customer.cShop.map.productOnMap.productListPopup]); // implement this instead of if-else soln const storePinIsVisible = await this.isVisible(selector.customer.cShop.map.productOnMap.productPin); if (storePinIsVisible) { await this.click(selector.customer.cShop.map.productOnMap.productPin); @@ -93,7 +91,6 @@ export class ShopPage extends CustomerPage { await this.toBeVisible(selector.customer.cShop.map.productOnMap.productListPopup); await this.click(selector.customer.cShop.map.productOnMap.closePopup); } - productName && (await this.toBeVisible(selector.customer.cShop.map.productOnMap.productOnList(productName))); } // go to product details diff --git a/tests/pw/tests/api/_env.setup.ts b/tests/pw/tests/api/_env.setup.ts index 9f5e9ac12e..f56666682a 100644 --- a/tests/pw/tests/api/_env.setup.ts +++ b/tests/pw/tests/api/_env.setup.ts @@ -73,8 +73,7 @@ setup.describe('setup test environment', () => { await dbUtils.setDokanSettings(dbData.dokan.optionName.reverseWithdraw, dbData.dokan.reverseWithdrawSettings); }); - setup.skip('get test environment info @lite', async () => { - //todo: might not needed anymore + setup('get test environment info @lite', async () => { const [, systemInfo] = await apiUtils.getSystemStatus(payloads.adminAuth); helpers.writeFile(data.systemInfo, JSON.stringify(systemInfo)); }); diff --git a/tests/pw/tests/api/modules.spec.ts b/tests/pw/tests/api/modules.spec.ts index 640f9be633..4a10e2e00f 100644 --- a/tests/pw/tests/api/modules.spec.ts +++ b/tests/pw/tests/api/modules.spec.ts @@ -18,6 +18,7 @@ test.describe('modules api test', () => { }); test.afterAll(async () => { + await apiUtils.activateModules([randomModule]); await apiUtils.dispose(); }); @@ -33,9 +34,6 @@ test.describe('modules api test', () => { expect(response.ok()).toBeTruthy(); expect(responseBody).toBeTruthy(); expect(responseBody).toMatchSchema(schemas.modulesSchema); - - // reactivate module - // await apiUtils.activateModules(randomModule) }); test('activate a module @pro', async () => { diff --git a/tests/pw/tests/e2e/_env.setup.ts b/tests/pw/tests/e2e/_env.setup.ts index f32af73697..4da5b7e725 100644 --- a/tests/pw/tests/e2e/_env.setup.ts +++ b/tests/pw/tests/e2e/_env.setup.ts @@ -325,7 +325,7 @@ setup.describe('setup dokan settings e2e', () => { expect(product).toBeTruthy(); }); - setup.skip('save store settings to update store on map @lite', async () => { + setup('save store settings to update store on map @lite', async () => { await vendorPage.updateStoreMapViaSettingsSave(); }); }); diff --git a/tests/pw/tests/e2e/abuseReports.spec.ts b/tests/pw/tests/e2e/abuseReports.spec.ts index 930956340b..7dd3f2b648 100644 --- a/tests/pw/tests/e2e/abuseReports.spec.ts +++ b/tests/pw/tests/e2e/abuseReports.spec.ts @@ -36,46 +36,51 @@ test.describe('Abuse report test', () => { test.afterAll(async () => { await aPage.close(); await cPage.close(); - await gPage.close(); + // await gPage.close(); await apiUtils.dispose(); }); - test('dokan abuse report menu page is rendering properly @pro @explo', async () => { + test('dokan abuse report menu page is rendering properly @pro @exp @a', async () => { await admin.adminAbuseReportRenderProperly(); }); - test('admin can view abuse report details @pro @explo', async () => { + test('admin can view abuse report details @pro @exp @a', async () => { await admin.abuseReportDetails(); }); - test('admin can filter abuse reports by abuse reason @pro', async () => { + test('admin can filter abuse reports by abuse reason @pro @a', async () => { await admin.filterAbuseReports('This content is spam', 'by-reason'); }); - test('admin can filter abuse reports by product @pro', async () => { + test('admin can filter abuse reports by product @pro @a', async () => { await admin.filterAbuseReports(data.predefined.simpleProduct.product1.name, 'by-product'); }); - test('admin can filter abuse reports by vendor @pro', async () => { + test('admin can filter abuse reports by vendor @pro @a', async () => { await admin.filterAbuseReports(data.predefined.vendorStores.vendor1, 'by-vendor'); }); - test('admin can perform abuse report bulk action @pro', async () => { + test.skip('admin can perform abuse report bulk action @pro @a', async () => { + // todo: might cause other tests to fail in parallel await admin.abuseReportBulkAction('delete'); }); // customer - test('customer can report product @pro', async () => { + test('customer can report product @pro @c', async () => { await customer.reportProduct(data.predefined.simpleProduct.product1.name, data.product.report); }); - test('guest customer can report product @pro', async () => { + test('guest customer can report product @pro @g', async ({ page }) => { + guest = new AbuseReportsPage(page); //todo: apply guest user like this where every test need seperate guest user await guest.reportProduct(data.predefined.simpleProduct.product1.name, data.product.report); }); - test('only logged-in customer can report product @pro', async () => { + test.skip('guest customer need to log-in to report product @pro @g', async ({ page }) => { + // todo: might cause other tests to fail in parallel + guest = new AbuseReportsPage(page); await dbUtils.setDokanSettings(dbData.dokan.optionName.productReportAbuse, { ...dbData.dokan.productReportAbuseSettings, reported_by_logged_in_users_only: 'on' }); await guest.reportProduct(data.predefined.simpleProduct.product1.name, data.product.report); + await dbUtils.setDokanSettings(dbData.dokan.optionName.productReportAbuse, dbData.dokan.productReportAbuseSettings); }); }); diff --git a/tests/pw/tests/e2e/admin.spec.ts b/tests/pw/tests/e2e/admin.spec.ts index 014256e144..76ddd22d9b 100644 --- a/tests/pw/tests/e2e/admin.spec.ts +++ b/tests/pw/tests/e2e/admin.spec.ts @@ -21,11 +21,11 @@ test.describe('Admin user functionality test', () => { await page.close(); }); - test('admin can login @lite', async () => { + test('admin can login @lite @a', async () => { await loginPage.adminLogin(data.admin); }); - test('admin can logout @lite', async () => { + test('admin can logout @lite @a', async () => { await loginPage.adminLogin(data.admin); await loginPage.logoutBackend(); }); @@ -85,11 +85,11 @@ test.describe('Admin functionality test', () => { // await adminPage.addShippingMethod(data.shipping.shippingMethods.vendorShipping) // }) - test('dokan notice @lite', async () => { + test('dokan notice @lite @a', async () => { await adminPage.dokanNotice(); }); - test('dokan promotion @lite', async () => { + test('dokan promotion @lite @a', async () => { await adminPage.dokanPromotion(); }); }); diff --git a/tests/pw/tests/e2e/adminDashboard.spec.ts b/tests/pw/tests/e2e/adminDashboard.spec.ts index 28b9ec0a20..24bfbecf12 100644 --- a/tests/pw/tests/e2e/adminDashboard.spec.ts +++ b/tests/pw/tests/e2e/adminDashboard.spec.ts @@ -21,16 +21,16 @@ test.describe('Admin dashboard test', () => { await apiUtils.dispose(); }); - test('dokan admin dashboard is rendering properly @lite @explo', async () => { + test('dokan admin dashboard is rendering properly @lite @exp @a', async () => { await admin.adminDashboardRenderProperly(); }); - test('admin dashboard at a glance values are accurate @lite', async () => { + test('admin dashboard at a glance values are accurate @lite @a', async () => { const summary = await apiUtils.getAdminReportSummary(payloads.adminAuth); await admin.dokanAtAGlanceValueAccuracy(summary); }); - test('admin can add dokan news subscriber @lite', async () => { + test('admin can add dokan news subscriber @lite @a', async () => { await admin.addDokanNewsSubscriber(data.user.userDetails); }); }); diff --git a/tests/pw/tests/e2e/announcements.spec.ts b/tests/pw/tests/e2e/announcements.spec.ts index 58eed111ca..5200b26019 100644 --- a/tests/pw/tests/e2e/announcements.spec.ts +++ b/tests/pw/tests/e2e/announcements.spec.ts @@ -4,7 +4,7 @@ import { ApiUtils } from '@utils/apiUtils'; import { data } from '@utils/testData'; import { payloads } from '@utils/payloads'; -test.describe('Announcements test', () => { +test.describe('Announcements test (admin)', () => { let admin: AnnouncementsPage; let aPage: Page; let apiUtils: ApiUtils; @@ -24,45 +24,49 @@ test.describe('Announcements test', () => { await apiUtils.dispose(); }); - test('dokan announcements menu page is rendering properly @pro @explo', async () => { + //admin + + test('dokan announcements menu page is rendering properly @pro @exp @a', async () => { await admin.adminAnnouncementsRenderProperly(); }); - test('admin can send announcement @pro', async () => { + test('admin can send announcement @pro @a', async () => { await admin.addAnnouncement({ ...data.announcement, title: data.announcement.randomTitle() }); }); - test('admin can schedule announcement @pro', async () => { + test('admin can schedule announcement @pro @a', async () => { await admin.addAnnouncement({ ...data.announcement, title: data.announcement.randomTitle(), publishType: 'schedule' }); }); - test('admin can edit announcement @pro', async () => { + test('admin can edit announcement @pro @a', async () => { await admin.editAnnouncement({ ...data.announcement, title: announcementTitle }); }); - test('admin can trash announcement @pro', async () => { + test('admin can trash announcement @pro @a', async () => { + const [, , announcementTitle] = await apiUtils.createAnnouncement(payloads.createAnnouncement(), payloads.adminAuth); await admin.updateAnnouncement(announcementTitle, 'trash'); }); - test('admin can restore announcement @pro', async () => { + test('admin can restore announcement @pro @a', async () => { const [, announcementId, announcementTitle] = await apiUtils.createAnnouncement(payloads.createAnnouncement(), payloads.adminAuth); await apiUtils.deleteAnnouncement(announcementId, payloads.adminAuth); await admin.updateAnnouncement(announcementTitle, 'restore'); }); - test('admin can permanently delete announcement @pro', async () => { + test('admin can permanently delete announcement @pro @a', async () => { const [, announcementId, announcementTitle] = await apiUtils.createAnnouncement(payloads.createAnnouncement(), payloads.adminAuth); await apiUtils.deleteAnnouncement(announcementId, payloads.adminAuth); await admin.updateAnnouncement(announcementTitle, 'permanently-delete'); }); - test('admin can perform announcements bulk action @pro', async () => { + test.skip('admin can perform announcements bulk action @pro @a', async () => { + // todo: might cause other tests to fail in parallel // await apiUtils.createAnnouncement(payloads.createAnnouncement(), payloads.adminAuth); await admin.announcementBulkAction('trash'); }); }); -test.describe('Announcements test vendor', () => { +test.describe('Announcements test (vendor)', () => { let vendor: AnnouncementsPage; let vPage: Page; let apiUtils: ApiUtils; @@ -84,15 +88,15 @@ test.describe('Announcements test vendor', () => { // vendor - test('vendor announcement menu page is rendering properly @pro @explo', async () => { + test('vendor announcement menu page is rendering properly @pro @exp @v', async () => { await vendor.vendorAnnouncementsRenderProperly(); }); - test('vendor can view announcement details @pro', async () => { + test('vendor can view announcement details @pro @v', async () => { await vendor.vendorViewAnnouncement(announcement); }); - test('vendor can delete announcement @pro', async () => { + test('vendor can delete announcement @pro @v', async () => { await vendor.vendorDeleteAnnouncement(announcement.title); }); }); diff --git a/tests/pw/tests/e2e/coupons.spec.ts b/tests/pw/tests/e2e/coupons.spec.ts index 1c99d54350..ef6b3e5455 100644 --- a/tests/pw/tests/e2e/coupons.spec.ts +++ b/tests/pw/tests/e2e/coupons.spec.ts @@ -40,40 +40,44 @@ test.describe('Coupons test', () => { await apiUtils.dispose(); }); - test('admin can add marketplace coupon @pro', async () => { + test('admin can add marketplace coupon @pro @a', async () => { await admin.addMarketplaceCoupon({ ...data.coupon, title: data.coupon.couponTitle() }); }); - test('vendor coupon menu page is rendering properly @pro @explo', async () => { + //vendor + + test('vendor coupon menu page is rendering properly @pro @exp @v', async () => { await vendor.vendorCouponsRenderProperly(); }); - test('vendor can view marketPlace coupon @pro @explo', async () => { + test('vendor can view marketPlace coupon @pro @exp @v', async () => { await vendor.viewMarketPlaceCoupon(marketplaceCouponCode); }); - test('vendor can add coupon @pro', async () => { + test('vendor can add coupon @pro @v', async () => { await vendor.addCoupon({ ...data.coupon, title: data.coupon.couponTitle() }); }); - test('vendor can edit coupon @pro', async () => { + test('vendor can edit coupon @pro @v', async () => { await vendor.editCoupon({ ...data.coupon, title: couponCode }); }); - test('vendor can delete coupon @pro', async () => { + test('vendor can delete coupon @pro @v', async () => { const [, , couponCode] = await apiUtils.createCoupon([PRODUCT_ID], payloads.createCoupon(), payloads.vendorAuth); await vendor.deleteCoupon(couponCode); }); - test('customer can view coupon on single store @pro', async () => { + //customer + + test('customer can view coupon on single store @pro @c', async () => { await customer.viewStoreCoupon(data.predefined.vendorStores.vendor1, couponCode); }); - test('customer can apply coupon @pro', async () => { + test('customer can apply coupon @pro @c', async () => { await customer.applyCoupon(data.predefined.simpleProduct.product1.name, data.predefined.coupon.couponCode); }); - test('customer can buy product with coupon @pro', async () => { + test('customer can buy product with coupon @pro @c', async () => { await customer.buyProductWithCoupon(data.predefined.simpleProduct.product1.name, data.predefined.coupon.couponCode); }); }); diff --git a/tests/pw/tests/e2e/customer.spec.ts b/tests/pw/tests/e2e/customer.spec.ts index 2e8aa53c6c..af5d27e117 100644 --- a/tests/pw/tests/e2e/customer.spec.ts +++ b/tests/pw/tests/e2e/customer.spec.ts @@ -23,20 +23,20 @@ test.describe('Customer user functionality test', () => { await page.close(); }); - test('customer can register @lite', async () => { + test('customer can register @lite @c', async () => { await customer.customerRegister(data.customer.customerInfo); }); - test('customer can login @lite', async () => { + test('customer can login @lite @c', async () => { await loginPage.login(data.customer); }); - test('customer can logout @lite', async () => { + test('customer can logout @lite @c', async () => { await loginPage.login(data.customer); await loginPage.logout(); }); - test('customer can become a vendor @lite', async () => { + test('customer can become a vendor @lite @c', async () => { await customer.customerRegister(data.customer.customerInfo); await customer.customerBecomeVendor(data.customer.customerInfo); }); @@ -59,30 +59,30 @@ test.describe('Customer functionality test', () => { await cPage.close(); }); - test('customer can add billing details @lite', async () => { + test('customer can add billing details @lite @c', async () => { await customer.addBillingAddress(data.customer.customerInfo.billing); }); - test('customer can add shipping details @lite', async () => { + test('customer can add shipping details @lite @c', async () => { await customer.addShippingAddress(data.customer.customerInfo.shipping); }); - test('customer can add customer details @lite', async () => { + test('customer can add customer details @lite @c', async () => { await customer.addCustomerDetails(data.customer); }); - test('customer can add product to cart @lite', async () => { + test('customer can add product to cart @lite @c', async () => { const productName = data.predefined.simpleProduct.product1.name; await customer.addProductToCart(productName, 'single-product'); await customer.productIsOnCart(productName); }); - test('customer can buy product @lite', async () => { + test('customer can buy product @lite @c', async () => { await customer.addProductToCart(data.predefined.simpleProduct.product1.name, 'single-product'); await customer.placeOrder(); }); - test('customer can buy multi vendor products @lite', async () => { + test('customer can buy multi-vendor products @lite @c', async () => { await customer.addProductToCart(data.predefined.simpleProduct.product1.name, 'single-product'); await customer.addProductToCart(data.predefined.vendor2.simpleProduct.product1.name, 'single-product', false); await customer.placeOrder(); diff --git a/tests/pw/tests/e2e/emailVerification.spec.ts b/tests/pw/tests/e2e/emailVerification.spec.ts index 9200920920..f503ed7259 100644 --- a/tests/pw/tests/e2e/emailVerification.spec.ts +++ b/tests/pw/tests/e2e/emailVerification.spec.ts @@ -22,11 +22,11 @@ test.describe('Email verifications test', () => { await gPage.close(); }); - test('user can see registration notice (2-step authentication) while registering as customer @pro', async () => { + test('user can see registration notice (2-step auth) while registering as customer @pro @g', async () => { await guest.register(user); }); - test('user can see registration notice (2-step authentication) while loggingIn @pro', async () => { + test('user can see registration notice (2-step auth) while loggingIn @pro @g', async () => { await guest.login(user); }); }); diff --git a/tests/pw/tests/e2e/followStore.spec.ts b/tests/pw/tests/e2e/followStore.spec.ts index acb375b785..14ab6a48bf 100644 --- a/tests/pw/tests/e2e/followStore.spec.ts +++ b/tests/pw/tests/e2e/followStore.spec.ts @@ -1,14 +1,16 @@ import { test, request, Page } from '@playwright/test'; import { FollowStorePage } from '@pages/followStorePage'; -// import { ApiUtils } from '@utils/apiUtils'; +import { ApiUtils } from '@utils/apiUtils'; import { data } from '@utils/testData'; -// import { payloads } from '@utils/payloads'; +import { payloads } from '@utils/payloads'; + +const { VENDOR_ID } = process.env; test.describe('Follow stores functionality test', () => { let vendor: FollowStorePage; let customer: FollowStorePage; let vPage: Page, cPage: Page; - // let apiUtils: ApiUtils; + let apiUtils: ApiUtils; test.beforeAll(async ({ browser }) => { const vendorContext = await browser.newContext(data.auth.vendorAuth); @@ -19,35 +21,39 @@ test.describe('Follow stores functionality test', () => { cPage = await customerContext.newPage(); customer = new FollowStorePage(cPage); - // apiUtils = new ApiUtils(await request.newContext()); - // todo: need followers + apiUtils = new ApiUtils(await request.newContext()); + await apiUtils.followUnfollowStore(VENDOR_ID, payloads.customerAuth); }); test.afterAll(async () => { await vPage.close(); await cPage.close(); - // await apiUtils.dispose(); + await apiUtils.dispose(); }); // follow store - test('customer followed vendors menu page is rendering properly @pro @explo', async () => { + // customer + + test('customer followed vendors menu page is rendering properly @pro @exp @c', async () => { await customer.customerFollowedVendorsRenderProperly(); }); - test('customer can follow store on store listing @pro', async () => { + test('customer can follow store on store listing @pro @c', async () => { await customer.followStore(data.predefined.vendorStores.vendor1, data.predefined.vendorStores.followFromStoreListing); }); - test('customer can follow store on single store @pro', async () => { + test('customer can follow store on single store @pro @c', async () => { await customer.followStore(data.predefined.vendorStores.vendor1, data.predefined.vendorStores.followFromSingleStore); }); - test('vendor followers menu page is rendering properly @pro @explo', async () => { + //vendor + + test('vendor followers menu page is rendering properly @pro @exp @v', async () => { await vendor.vendorFollowersRenderProperly(); }); - test('vendor can view followers @pro', async () => { + test('vendor can view followers @pro @v', async () => { await vendor.vendorViewFollowers(); }); }); diff --git a/tests/pw/tests/e2e/help.spec.ts b/tests/pw/tests/e2e/help.spec.ts index 87245030af..35508c5004 100644 --- a/tests/pw/tests/e2e/help.spec.ts +++ b/tests/pw/tests/e2e/help.spec.ts @@ -16,11 +16,11 @@ test.describe('Dokan help test', () => { await aPage.close(); }); - test('dokan help menu page is rendering properly @lite @explo', async () => { + test('dokan help menu page is rendering properly @lite @exp @a', async () => { await admin.adminHelpRenderProperly(); }); - test('dokan get help dropdown is rendering properly @lite @explo', async () => { + test('dokan get help dropdown is rendering properly @lite @exp @a', async () => { await admin.adminGetHelpDropdownRenderProperly(); }); }); diff --git a/tests/pw/tests/e2e/license.spec.ts b/tests/pw/tests/e2e/license.spec.ts index b4a155e94d..8b0a3695f5 100644 --- a/tests/pw/tests/e2e/license.spec.ts +++ b/tests/pw/tests/e2e/license.spec.ts @@ -13,22 +13,23 @@ test.describe('License test', () => { }); test.afterAll(async () => { + await admin.activateLicense(data.dokanLicense.correctKey); await aPage.close(); }); - test('dokan license menu page is rendering properly @pro @explo', async () => { + test('dokan license menu page is rendering properly @pro @exp @a', async () => { await admin.adminLicenseRenderProperly(); }); - test("admin can't activate license with incorrect key @pro @neg", async () => { + test("admin can't activate license with incorrect key @pro @a @neg", async () => { await admin.activateLicense(data.dokanLicense.incorrectKey, 'incorrect'); }); - test('admin can activate license @pro', async () => { + test('admin can activate license @pro @a', async () => { await admin.activateLicense(data.dokanLicense.correctKey); }); - test('admin can deactivate license @pro', async () => { + test('admin can deactivate license @pro @a', async () => { await admin.activateLicense(data.dokanLicense.correctKey); await admin.deactivateLicense(); }); diff --git a/tests/pw/tests/e2e/modules.spec.ts b/tests/pw/tests/e2e/modules.spec.ts index 3408b233b8..d50ee226ee 100644 --- a/tests/pw/tests/e2e/modules.spec.ts +++ b/tests/pw/tests/e2e/modules.spec.ts @@ -1,46 +1,53 @@ -import { test, Page } from '@playwright/test'; +import { test, request, Page } from '@playwright/test'; import { ModulesPage } from '@pages/modulesPage'; +import { ApiUtils } from '@utils/apiUtils'; +import { payloads } from '@utils/payloads'; import { data } from '@utils/testData'; test.describe('Modules test', () => { let admin: ModulesPage; let aPage: Page; + let apiUtils: ApiUtils; test.beforeAll(async ({ browser }) => { const adminContext = await browser.newContext(data.auth.adminAuth); aPage = await adminContext.newPage(); admin = new ModulesPage(aPage); + + apiUtils = new ApiUtils(await request.newContext()); }); test.afterAll(async () => { await aPage.close(); + await apiUtils.dispose(); }); - test('dokan modules menu page is rendering properly @pro @explo', async () => { + test('dokan modules menu page is rendering properly @pro @exp @a', async () => { await admin.adminModulesRenderProperly(); }); - test('admin can search module @pro', async () => { + test('admin can search module @pro @a', async () => { await admin.searchModule(data.modules.modulesName.AuctionIntegration); }); - test('admin can filter modules by category @pro', async () => { + test('admin can filter modules by category @pro @a', async () => { await admin.filterModules(data.modules.moduleCategory.productManagement); }); - test('admin can deactivate module @pro', async () => { + test('admin can deactivate module @pro @a', async () => { await admin.activateDeactivateModule(data.modules.modulesName.AuctionIntegration); }); - test('admin can activate module @pro', async () => { + test('admin can activate module @pro @a', async () => { + await apiUtils.deactivateModules([payloads.moduleids.auction]); await admin.activateDeactivateModule(data.modules.modulesName.AuctionIntegration); }); - test('admin can perform module bulk action @pro', async () => { + test('admin can perform module bulk action @pro @a', async () => { await admin.moduleBulkAction('activate'); }); - test('admin can change module view layout @pro', async () => { + test('admin can change module view layout @pro @a', async () => { await admin.moduleViewLayout(data.modules.layout.list); }); }); diff --git a/tests/pw/tests/e2e/myOrders.spec.ts b/tests/pw/tests/e2e/myOrders.spec.ts index 71a8f2b381..0ac4b510bf 100644 --- a/tests/pw/tests/e2e/myOrders.spec.ts +++ b/tests/pw/tests/e2e/myOrders.spec.ts @@ -23,32 +23,32 @@ test.describe('My orders functionality test', () => { await apiUtils.dispose(); }); - test('customer my orders page is rendering properly @lite', async () => { + test('customer my orders page is rendering properly @lite @c', async () => { await customer.myOrdersRenderProperly(); }); - test('customer can view order details @lite', async () => { + test('customer can view order details @lite @c', async () => { const [, , orderId] = await apiUtils.createOrderWithStatus(PRODUCT_ID, { ...payloads.createOrder, customer_id: CUSTOMER_ID }, data.order.orderStatus.completed, payloads.vendorAuth); await customer.viewOrderDetails(orderId); }); - test('customer can view order note @lite', async () => { + test('customer can view order note @lite @c', async () => { const orderNote = data.orderNote.note(); const [, orderId] = await apiUtils.createOrderNote(PRODUCT_ID, { ...payloads.createOrder, customer_id: CUSTOMER_ID }, { ...payloads.createOrderNoteForCustomer, note: orderNote }, payloads.vendorAuth); await customer.viewOrderNote(orderId, orderNote); }); - test('customer can pay pending payment order @lite', async () => { + test('customer can pay pending payment order @lite @c', async () => { const [, , orderId] = await apiUtils.createOrderWithStatus(PRODUCT_ID, { ...payloads.createOrder, customer_id: CUSTOMER_ID }, data.order.orderStatus.pending, payloads.vendorAuth); await customer.payPendingOrder(orderId, 'bank'); }); - test('customer can cancel order @lite', async () => { + test('customer can cancel order @lite @c', async () => { const [, , orderId] = await apiUtils.createOrderWithStatus(PRODUCT_ID, { ...payloads.createOrder, customer_id: CUSTOMER_ID }, data.order.orderStatus.pending, payloads.vendorAuth); await customer.cancelPendingOrder(orderId); }); - test.skip('customer can order again @lite', async () => { + test.skip('customer can order again @lite @c', async () => { const [, , orderId] = await apiUtils.createOrderWithStatus(PRODUCT_ID, { ...payloads.createOrder, customer_id: CUSTOMER_ID }, data.order.orderStatus.completed, payloads.vendorAuth); await customer.orderAgain(orderId); }); diff --git a/tests/pw/tests/e2e/orders.spec.ts b/tests/pw/tests/e2e/orders.spec.ts index 8f7abd2ead..62fada22d9 100644 --- a/tests/pw/tests/e2e/orders.spec.ts +++ b/tests/pw/tests/e2e/orders.spec.ts @@ -30,68 +30,69 @@ test.describe('Order functionality test', () => { // orders - test('vendor order menu page is rendering properly @lite @explo', async () => { + test('vendor order menu page is rendering properly @lite @exp @v', async () => { await vendor.vendorOrdersRenderProperly(); }); - test('vendor can export all orders @lite', async () => { + test('vendor can export all orders @lite @v', async () => { await vendor.exportOrders('all'); }); - test('vendor can export filtered orders @lite', async () => { + test('vendor can export filtered orders @lite @v', async () => { await vendor.filterOrders('by-customer', data.customer.username); await vendor.exportOrders('filtered'); }); - test('vendor can search order @lite', async () => { + test('vendor can search order @lite @v', async () => { await vendor.searchOrder(orderId); }); - test('vendor can filter orders by customer @lite', async () => { + test('vendor can filter orders by customer @lite @v', async () => { await vendor.filterOrders('by-customer', data.customer.username); }); - test('vendor can filter orders by date range @lite', async () => { + test('vendor can filter orders by date range @lite @v', async () => { await vendor.filterOrders('by-date', data.date.dateRange); }); - test('vendor can view order details @lite', async () => { + test('vendor can view order details @lite @v', async () => { await vendor.viewOrderDetails(orderId); }); - test('vendor can update order status on table @lite', async () => { + test('vendor can update order status on order table @lite @v', async () => { await vendor.updateOrderStatusOnTable(orderId, data.order.orderStatus.processing); }); - test('vendor can update order status on order details @lite', async () => { + test('vendor can update order status on order details @lite @v', async () => { + [, , orderId] = await apiUtils.createOrderWithStatus(PRODUCT_ID, { ...payloads.createOrder, customer_id: CUSTOMER_ID }, data.order.orderStatus.onhold, payloads.vendorAuth); await vendor.updateOrderStatus(orderId, data.order.orderStatus.completed); }); - test('vendor can add order note @lite', async () => { + test('vendor can add order note @lite @v', async () => { await vendor.addOrderNote(orderId, data.orderNote.customer); }); - test('vendor can add private order note @lite', async () => { + test('vendor can add private order note @lite @v', async () => { await vendor.addOrderNote(orderId, data.orderNote.private); }); - test('vendor can add tracking details to order @lite', async () => { + test('vendor can add tracking details to order @lite @v', async () => { DOKAN_PRO && (await dbUtils.setDokanSettings(dbData.dokan.optionName.shippingStatus, { ...dbData.dokan.shippingStatusSettings, enabled: 'off' })); await vendor.addTrackingDetails(orderId, data.orderTrackingDetails); DOKAN_PRO && (await dbUtils.setDokanSettings(dbData.dokan.optionName.shippingStatus, { ...dbData.dokan.shippingStatusSettings, enabled: 'on' })); }); - test('vendor can add shipment to order @pro', async () => { + test('vendor can add shipment to order @pro @v', async () => { await vendor.addShipment(orderId, data.orderShipmentDetails); }); - // test.skip('vendor can add downloadable product permission to order @lite', async ( ) => { + // test.skip('vendor can add downloadable product permission to order @lite @v', async ( ) => { // const [,, downloadableProductName] = await apiUtils.createProduct(payloads.createDownloadableProduct(), payloads.vendorAuth); // await vendor.addDownloadableProduct(orderId, downloadableProductName); // await vendor.removeDownloadableProduct(orderId, downloadableProductName); // }); - test('vendor can perform order bulk action @lite', async () => { + test('vendor can perform order bulk action @lite @v', async () => { await vendor.orderBulkAction('completed', orderId); }); }); diff --git a/tests/pw/tests/e2e/payments.spec.ts b/tests/pw/tests/e2e/payments.spec.ts index 03f6686cc4..e2db7592dc 100644 --- a/tests/pw/tests/e2e/payments.spec.ts +++ b/tests/pw/tests/e2e/payments.spec.ts @@ -5,16 +5,15 @@ import { data } from '@utils/testData'; import { payloads } from '@utils/payloads'; test.describe('Payments test', () => { - // let admin: PaymentsPage; + let admin: PaymentsPage; let vendor: PaymentsPage; - // let aPage: Page, vPage: Page; - let vPage: Page; + let aPage: Page, vPage: Page; let apiUtils: ApiUtils; test.beforeAll(async ({ browser }) => { - // const adminContext = await browser.newContext(data.auth.adminAuth); - // aPage = await adminContext.newPage(); - // admin = new PaymentsPage(aPage); + const adminContext = await browser.newContext(data.auth.adminAuth); + aPage = await adminContext.newPage(); + admin = new PaymentsPage(aPage); const vendorContext = await browser.newContext(data.auth.vendorAuth); vPage = await vendorContext.newPage(); @@ -24,70 +23,76 @@ test.describe('Payments test', () => { }); test.afterAll(async () => { - // await aPage.close(); + await aPage.close(); await vPage.close(); - await apiUtils.setStoreSettings(payloads.defaultStoreSettings, payloads.vendorAuth) await apiUtils.dispose(); }); - // test('admin can add basic payment methods', async ( ) => { - // await adminPage.setupBasicPaymentMethods(data.payment) - // }) + //admin - // test('admin can add strip payment method', async ( ) => { - // await adminPage.setupStripeConnect(data.payment) - // }) + test.skip('admin can add basic payment methods @lite @a', async () => { + await admin.setupBasicPaymentMethods(data.payment); + }); + + test.skip('admin can add strip payment method @pro @a', async () => { + await admin.setupStripeConnect(data.payment); + }); + + test.skip('admin can add paypal marketplace payment method @pro @a', async () => { + await admin.setupPaypalMarketPlace(data.payment); + }); - // test('admin can add paypal marketplace payment method', async ( ) => { - // await adminPage.setupPaypalMarketPlace(data.payment) - // }) + test.skip('admin can add mangopay payment method @pro @a', async () => { + await admin.setupMangoPay(data.payment); + }); - // test('admin can add mangopay payment method', async ( ) => { - // await adminPage.setupMangoPay(data.payment) - // }) + test.skip('admin can add razorpay payment method @pro @a', async () => { + await admin.setupRazorpay(data.payment); + }); - // test('admin can add razorpay payment method', async ( ) => { - // await adminPage.setupRazorpay(data.payment) - // }) + test.skip('admin can add strip express payment method @pro @a', async () => { + await admin.setupStripeExpress(data.payment); + }); - // test('admin can add strip express payment method', async ( ) => { - // await adminPage.setupStripeExpress(data.payment) - // }) + //vendor - test('vendor payment menu is rendering properly @lite @explo', async () => { + test('vendor payment menu is rendering properly @lite @exp @v', async () => { await vendor.vendorPaymentSettingsRenderProperly(); }); - test('vendor can add paypal payment method @lite', async () => { + test('vendor can add paypal payment method @lite @v', async () => { await vendor.setBasicPayment({ ...data.vendor.payment, methodName: 'paypal' }); }); - test('vendor can add bank payment method @lite', async () => { + test('vendor can add bank payment method @lite @v', async () => { await vendor.setBankTransfer(data.vendor.payment); }); - test('vendor can add skrill payment method @pro', async () => { + test('vendor can add skrill payment method @pro @v', async () => { await vendor.setBasicPayment({ ...data.vendor.payment, methodName: 'skrill' }); }); - test('vendor can add custom payment method @pro', async () => { + test('vendor can add custom payment method @pro @v', async () => { await vendor.setBasicPayment({ ...data.vendor.payment, methodName: 'custom' }); }); - test('vendor can disconnect paypal payment method @lite', async () => { + test('vendor can disconnect paypal payment method @lite @v', async () => { await vendor.disconnectBasicPayment({ ...data.vendor.payment, methodName: 'paypal' }); + //reset + await apiUtils.setStoreSettings(payloads.defaultStoreSettings, payloads.vendorAuth); }); - test('vendor can disconnect bank payment method @lite', async () => { + test('vendor can disconnect bank payment method @lite @v', async () => { await vendor.disconnectBasicPayment({ ...data.vendor.payment, methodName: 'bank' }); - //todo: need to reset disconnect, also update other tests + // reset + await apiUtils.setStoreSettings(payloads.defaultStoreSettings, payloads.vendorAuth); }); - test('vendor can disconnect skrill payment method @pro', async () => { + test('vendor can disconnect skrill payment method @pro @v', async () => { await vendor.disconnectBasicPayment({ ...data.vendor.payment, methodName: 'skrill' }); }); - test('vendor can disconnect custom payment method @pro', async () => { + test('vendor can disconnect custom payment method @pro @v', async () => { await vendor.disconnectBasicPayment({ ...data.vendor.payment, methodName: 'custom' }); }); }); diff --git a/tests/pw/tests/e2e/plugin.spec.ts b/tests/pw/tests/e2e/plugin.spec.ts index b6180f9919..c6ac4f8b11 100644 --- a/tests/pw/tests/e2e/plugin.spec.ts +++ b/tests/pw/tests/e2e/plugin.spec.ts @@ -5,14 +5,14 @@ import { data } from '@utils/testData'; import { payloads } from '@utils/payloads'; test.describe.skip('Plugin functionality test', () => { - let pluginPage: PluginPage; + let admin: PluginPage; let aPage: Page; let apiUtils: ApiUtils; test.beforeAll(async ({ browser }) => { const adminContext = await browser.newContext(data.auth.adminAuth); aPage = await adminContext.newPage(); - pluginPage = new PluginPage(aPage); + admin = new PluginPage(aPage); apiUtils = new ApiUtils(await request.newContext()); }); @@ -24,41 +24,41 @@ test.describe.skip('Plugin functionality test', () => { //todo: install plugin - test('Activate dokan lite plugin @lite', async () => { + test('activate dokan lite plugin @lite @a', async () => { await apiUtils.updatePlugin('dokan/dokan', { status: 'inactive' }, payloads.adminAuth); - await pluginPage.activatePlugin(data.plugin.pluginName.dokanlite); + await admin.activatePlugin(data.plugin.pluginName.dokanLite); }); - test('Deactivate dokan lite plugin @lite', async () => { + test('deactivate dokan lite plugin @lite @a', async () => { await apiUtils.updatePlugin('dokan/dokan', { status: 'active' }, payloads.adminAuth); - await pluginPage.deactivateDokanPlugin(data.plugin.pluginName.dokanlite, false); + await admin.deactivateDokanPlugin(data.plugin.pluginName.dokanLite, false); }); - test('Deactivate dokan lite plugin with deactivate reason @lite', async () => { + test('deactivate dokan lite plugin with deactivate reason @lite @a', async () => { await apiUtils.updatePlugin('dokan/dokan', { status: 'active' }, payloads.adminAuth); - await pluginPage.deactivateDokanPlugin(data.plugin.pluginName.dokanlite, true); + await admin.deactivateDokanPlugin(data.plugin.pluginName.dokanLite, true); }); - test('Activate dokan pro plugin @pro', async () => { + test('activate dokan pro plugin @pro @a', async () => { await apiUtils.updatePlugin('dokan-pro/dokan-pro', { status: 'inactive' }, payloads.adminAuth); - await pluginPage.activatePlugin(data.plugin.pluginName.dokanPro); + await admin.activatePlugin(data.plugin.pluginName.dokanPro); }); - test('Deactivate dokan pro plugin @pro', async () => { + test('deactivate dokan pro plugin @pro @a', async () => { await apiUtils.updatePlugin('dokan-pro/dokan-pro', { status: 'active' }, payloads.adminAuth); - await pluginPage.deactivateDokanPlugin(data.plugin.pluginName.dokanPro, false); + await admin.deactivateDokanPlugin(data.plugin.pluginName.dokanPro, false); }); - test('Deactivate dokan pro plugin with deactivate reason @pro', async () => { + test('deactivate dokan pro plugin with deactivate reason @pro @a', async () => { await apiUtils.updatePlugin('dokan-pro/dokan-pro', { status: 'active' }, payloads.adminAuth); - await pluginPage.deactivateDokanPlugin(data.plugin.pluginName.dokanPro, true); + await admin.deactivateDokanPlugin(data.plugin.pluginName.dokanPro, true); }); - // test('Delete dokan lite plugin @lite', async ( ) => { - // await pluginPage.activatePlugin(data.plugin.dokanLite); - // }); + test('delete dokan lite plugin @lite @a', async () => { + await admin.activatePlugin(data.plugin.pluginName.dokanLite); + }); - // test('Delete dokan pro plugin @pro', async ( ) => { - // await pluginPage.activatePlugin(data.plugin.dokanLite); - // }); + test('delete dokan pro plugin @pro @a', async () => { + await admin.activatePlugin(data.plugin.pluginName.dokanLite); + }); }); diff --git a/tests/pw/tests/e2e/privacyPolicy.spec.ts b/tests/pw/tests/e2e/privacyPolicy.spec.ts index b3230e04f7..c71a966e10 100644 --- a/tests/pw/tests/e2e/privacyPolicy.spec.ts +++ b/tests/pw/tests/e2e/privacyPolicy.spec.ts @@ -30,20 +30,20 @@ test.describe.skip('Privacy Policy & Store Contact form test', () => { await apiUtils.dispose(); }); - test('customer can contact vendor @lite', async () => { + test('customer can contact vendor @lite @c', async () => { await customer.contactVendor(data.predefined.vendorStores.vendor1, data.storeContactData); }); - test('customer can navigate to dokan privacy policy @lite', async () => { + test('customer can navigate to dokan privacy policy @lite @c', async () => { await customer.goToPrivacyPolicy(data.predefined.vendorStores.vendor1); }); - test('privacy policy is disabled on store contact form @lite', async () => { + test('privacy policy is disabled on store contact form @lite @c', async () => { await dbUtils.setDokanSettings(dbData.dokan.optionName.privacyPolicy, { ...privacyPolicySettings, enable_privacy: 'off' }); await customer.disablePrivacyPolicy(data.predefined.vendorStores.vendor1); }); - test('store contact form is disabled on store sidebar @lite', async () => { + test('store contact form is disabled on store sidebar @lite @c', async () => { await dbUtils.setDokanSettings(dbData.dokan.optionName.appearance, { ...dbData.dokan.appearanceSettings, contact_seller: 'off' }); await customer.disableStoreContactForm(data.predefined.vendorStores.vendor1); }); diff --git a/tests/pw/tests/e2e/proPromo.spec.ts b/tests/pw/tests/e2e/proPromo.spec.ts index 46c9846b2a..1149da1326 100644 --- a/tests/pw/tests/e2e/proPromo.spec.ts +++ b/tests/pw/tests/e2e/proPromo.spec.ts @@ -22,7 +22,7 @@ test.describe('Dokan pro feature promo test', () => { await apiUtils.dispose(); }); - test('dokan pro features promo @liteOnly', async () => { + test('dokan pro features promo @liteOnly @a', async () => { // await apiUtils.updatePlugin('dokan-pro/dokan-pro', { status:'inactive' }, payloads.adminAuth); await admin.dokanProPromo(); // await apiUtils.updatePlugin('dokan-pro/dokan-pro', { status:'active' }, payloads.adminAuth); diff --git a/tests/pw/tests/e2e/productAdvertising.spec.ts b/tests/pw/tests/e2e/productAdvertising.spec.ts index 1626374027..05cc8a2ea9 100644 --- a/tests/pw/tests/e2e/productAdvertising.spec.ts +++ b/tests/pw/tests/e2e/productAdvertising.spec.ts @@ -32,50 +32,52 @@ test.describe('Product Advertising test', () => { await apiUtils.dispose(); }); - test('dokan product advertising menu page is rendering properly @pro @explo', async () => { + test('dokan product advertising menu page is rendering properly @pro @exp', async () => { await admin.adminProductAdvertisingRenderProperly(); }); - test('admin can add product advertisement @pro', async () => { + test('admin can add product advertisement @pro @a', async () => { await admin.addNewProductAdvertisement({ ...data.productAdvertisement, advertisedProduct: productName }); }); - test('admin can search advertised product @pro', async () => { + test('admin can search advertised product @pro @a', async () => { await admin.searchAdvertisedProduct(productName); }); - test('admin can filter advertised product by stores @pro', async () => { + test('admin can filter advertised product by stores @pro @a', async () => { await admin.filterAdvertisedProduct(data.productAdvertisement.filter.byStore, 'by-store'); }); - test('admin can filter advertised product by creation process @pro', async () => { + test('admin can filter advertised product by creation process @pro @a', async () => { await admin.filterAdvertisedProduct(data.productAdvertisement.filter.createVia.admin, 'by-creation'); }); - test('admin can expire advertised product @pro', async () => { + test('admin can expire advertised product @pro @a', async () => { await admin.updateAdvertisedProduct(productName, 'expire'); }); - test('admin can delete advertised product @pro', async () => { + test('admin can delete advertised product @pro @a', async () => { await admin.updateAdvertisedProduct(productName, 'delete'); }); - test('admin can perform product advertising bulk action @pro', async () => { + test('admin can perform product advertising bulk action @pro @a', async () => { // await apiUtils.createProductAdvertisement(payloads.createProduct(), payloads.vendorAuth); await admin.productAdvertisingBulkAction('delete'); }); - test('vendor can buy product advertising @pro', async () => { - const orderId = await vendor.buyProductAdvertising(data.productAdvertisement.advertisedProduct); + test('vendor can buy product advertising @pro @v', async () => { + //todo: p1_v1 status gets pending review; need to resolve + [, , productName] = await apiUtils.createProduct(payloads.createProduct(), payloads.vendorAuth); + const orderId = await vendor.buyProductAdvertising(productName); await apiUtils.updateOrderStatus(orderId, 'wc-completed', payloads.adminAuth); }); - // test('vendor can buy booking product advertising @pro', async ( ) => { // todo: + // test('vendor can buy booking product advertising @pro @v', async ( ) => { // todo: // const orderId = await vendor.buyProductAdvertising(data.productAdvertisement.advertisedProduct); // await apiUtils.updateOrderStatus(orderId, 'wc-completed', payloads.adminAuth); // }); - // test('vendor can buy auction product advertising @pro', async ( ) => { // todo: + // test('vendor can buy auction product advertising @pro @v', async ( ) => { // todo: // const orderId = await vendor.buyProductAdvertising(data.productAdvertisement.advertisedProduct); // await apiUtils.updateOrderStatus(orderId, 'wc-completed', payloads.adminAuth); // }); diff --git a/tests/pw/tests/e2e/productEnquiry.spec.ts b/tests/pw/tests/e2e/productEnquiry.spec.ts index ec28548a48..5d0f0d3aa5 100644 --- a/tests/pw/tests/e2e/productEnquiry.spec.ts +++ b/tests/pw/tests/e2e/productEnquiry.spec.ts @@ -9,17 +9,12 @@ import { payloads } from '@utils/payloads'; const { VENDOR_ID, CUSTOMER_ID } = process.env; test.describe('Product Enquiry test', () => { - // let admin: ProductEnquiryPage; let customer: ProductEnquiryPage; let guest: ProductEnquiryPage; let cPage: Page, gPage: Page; let apiUtils: ApiUtils; test.beforeAll(async ({ browser }) => { - // const adminContext = await browser.newContext(data.auth.adminAuth); - // aPage = await adminContext.newPage(); - // admin = new ProductEnquiryPage(aPage); - const customerContext = await browser.newContext(data.auth.customerAuth); cPage = await customerContext.newPage(); customer = new ProductEnquiryPage(cPage); @@ -39,11 +34,11 @@ test.describe('Product Enquiry test', () => { await apiUtils.dispose(); }); - test('customer can enquire product @pro', async () => { + test('customer can enquire product @pro @c', async () => { await customer.enquireProduct(data.predefined.simpleProduct.product1.name, data.product.enquiry); }); - test('guest customer can enquire product @pro', async () => { + test('guest customer can enquire product @pro @g', async () => { await guest.enquireProduct(data.predefined.simpleProduct.product1.name, data.product.enquiry); }); }); diff --git a/tests/pw/tests/e2e/productQA.spec.ts b/tests/pw/tests/e2e/productQA.spec.ts index 5b276229b8..f2444443dd 100644 --- a/tests/pw/tests/e2e/productQA.spec.ts +++ b/tests/pw/tests/e2e/productQA.spec.ts @@ -49,11 +49,11 @@ test.describe('Product QA functionality test', () => { // admin - test('admin product QA menu page is rendering properly @pro @explo', async () => { + test('admin product QA menu page is rendering properly @pro @exp @a', async () => { await admin.adminProductQARenderProperly(); }); - test('admin can view product question details @pro @explo', async () => { + test('admin can view product question details @pro @exp @a', async () => { const [, questionId] = await apiUtils.createProductQuestion({ ...payloads.createProductQuestion(), product_id: PRODUCT_ID }, payloads.customerAuth); await admin.viewQuestionDetails(questionId); }); @@ -64,100 +64,100 @@ test.describe('Product QA functionality test', () => { // await admin.decreaseUnreadQuestionCount(); // }); - test('admin can filter questions by vendor @pro', async () => { + test('admin can filter questions by vendor @pro @a', async () => { await admin.filterQuestions(data.questionAnswers.filter.byVendor, 'by-vendor'); }); - test('admin can filter questions by product @pro', async () => { + test('admin can filter questions by product @pro @a', async () => { await admin.filterQuestions(data.questionAnswers.filter.byProduct, 'by-product'); }); - test('admin can edit question @pro', async () => { + test('admin can edit question @pro @a', async () => { await admin.editQuestion(questionId, data.questionAnswers); }); - test('admin can answer to question @pro', async () => { + test('admin can answer to question @pro @a', async () => { const [, questionId] = await apiUtils.createProductQuestion({ ...payloads.createProductQuestion(), product_id: PRODUCT_ID }, payloads.customerAuth); await admin.answerQuestion(questionId, data.questionAnswers); }); - test('admin can edit answer @pro', async () => { + test('admin can edit answer @pro @a', async () => { await admin.editAnswer(questionId, data.questionAnswers); }); - test('admin can delete answer @pro', async () => { + test('admin can delete answer @pro @a', async () => { await admin.deleteAnswer(questionId); }); - test('admin can edit (hide) question visibility @pro', async () => { + test('admin can edit (hide) question visibility @pro @a', async () => { await admin.editQuestionVisibility(questionId, 'hide'); }); - test('admin can edit (show) question visibility @pro', async () => { + test('admin can edit (show) question visibility @pro @a', async () => { await apiUtils.updateProductQuestion(questionId, payloads.updateProductQuestion(), payloads.adminAuth); await admin.editQuestionVisibility(questionId, 'show'); }); - test('admin can delete a question @pro', async () => { + test('admin can delete a question @pro @a', async () => { const [, questionId] = await apiUtils.createProductQuestion({ ...payloads.createProductQuestion(), product_id: PRODUCT_ID }, payloads.customerAuth); await admin.deleteQuestion(questionId); }); - test('admin can perform store support bulk action @pro', async () => { + test('admin can perform store support bulk action @pro @a', async () => { await admin.productQuestionsBulkAction('read'); }); // vendor - test('vendor product QA menu page is rendering properly @pro @explo', async () => { + test('vendor product QA menu page is rendering properly @pro @exp @v', async () => { await vendor.vendorProductQARenderProperly(); }); - test('vendor can view product question details @pro @explo', async () => { + test('vendor can view product question details @pro @exp @v', async () => { const [, questionId] = await apiUtils.createProductQuestion({ ...payloads.createProductQuestion(), product_id: PRODUCT_ID }, payloads.customerAuth); await vendor.vendorViewQuestionDetails(questionId); }); // todo: vendor receive notification for new question - // test('unread count decrease after admin viewing a question @pro', async () => { + // test('unread count decrease after admin viewing a question @pro @a', async () => { // await admin.decreaseUnreadQuestionCount(); // }); - test('vendor can filter questions @pro', async () => { + test('vendor can filter questions @pro @v', async () => { await vendor.vendorFilterQuestions(data.predefined.simpleProduct.product1.name); }); - test('vendor can answer to question @pro', async () => { + test('vendor can answer to question @pro @v', async () => { const [, questionId] = await apiUtils.createProductQuestion({ ...payloads.createProductQuestion(), product_id: PRODUCT_ID }, payloads.customerAuth); await vendor.vendorAnswerQuestion(questionId, data.questionAnswers); }); - test('vendor can edit answer @pro', async () => { + test('vendor can edit answer @pro @v', async () => { await vendor.vendorEditAnswer(questionId, data.questionAnswers); }); - test('vendor can delete a answer @pro', async () => { + test('vendor can delete a answer @pro @v', async () => { await vendor.vendorDeleteAnswer(questionId); }); - test('vendor can delete a question @pro', async () => { + test('vendor can delete a question @pro @v', async () => { await vendor.vendorDeleteQuestion(questionId); }); // customer - test('customer can search question @pro', async () => { + test('customer can search question @pro @c', async () => { await customer.searchQuestion(data.predefined.simpleProduct.product1.name, data.questionAnswers); }); - test('customer can post question @pro', async () => { + test('customer can post question @pro @c', async () => { await customer.postQuestion(data.predefined.simpleProduct.product1.name, data.questionAnswers); }); // guest - test('guest customer need to sign-in/signup post question @pro', async () => { + test('guest customer need to sign-in/signup post question @pro @g', async () => { await guest.postQuestion(data.predefined.simpleProduct.product1.name, data.questionAnswers); }); }); diff --git a/tests/pw/tests/e2e/productReviews.spec.ts b/tests/pw/tests/e2e/productReviews.spec.ts index 31a0f33424..eac6e3889c 100644 --- a/tests/pw/tests/e2e/productReviews.spec.ts +++ b/tests/pw/tests/e2e/productReviews.spec.ts @@ -26,44 +26,44 @@ test.describe('Product Reviews test', () => { await apiUtils.dispose(); }); - test('vendor product reviews menu page is rendering properly @pro @explo', async () => { + test('vendor product reviews menu page is rendering properly @pro @exp @v', async () => { await vendor.vendorProductReviewsRenderProperly(); }); - test('vendor can view product review @pro @explo', async () => { + test('vendor can view product review @pro @exp @v', async () => { await vendor.viewProductReview(reviewMessage); }); - test('vendor can unApprove product review @pro', async () => { + test('vendor can unApprove product review @pro @v', async () => { await vendor.updateProductReview('unApprove', reviewMessage); }); - test('vendor can spam product review @pro', async () => { + test('vendor can spam product review @pro @v', async () => { const [, , reviewMessage] = await apiUtils.createProductReview(PRODUCT_ID, payloads.createProductReview(), payloads.vendorAuth); await vendor.updateProductReview('spam', reviewMessage); }); - test('vendor can trash product review @pro', async () => { + test('vendor can trash product review @pro @v', async () => { const [, , reviewMessage] = await apiUtils.createProductReview(PRODUCT_ID, payloads.createProductReview(), payloads.vendorAuth); await vendor.updateProductReview('trash', reviewMessage); }); - test('vendor can approve product review @pro', async () => { + test('vendor can approve product review @pro @v', async () => { const [, , reviewMessage] = await apiUtils.createProductReview(PRODUCT_ID, { ...payloads.createProductReview(), status: 'hold' }, payloads.vendorAuth); await vendor.updateProductReview('approve', reviewMessage); }); - test('vendor can restore trashed product review @pro', async () => { + test('vendor can restore trashed product review @pro @v', async () => { const [, , reviewMessage] = await apiUtils.createProductReview(PRODUCT_ID, { ...payloads.createProductReview(), status: 'trash' }, payloads.vendorAuth); await vendor.updateProductReview('restore', reviewMessage); }); - test('vendor can permanently-delete product review @pro', async () => { + test('vendor can permanently-delete product review @pro @v', async () => { const [, , reviewMessage] = await apiUtils.createProductReview(PRODUCT_ID, { ...payloads.createProductReview(), status: 'trash' }, payloads.vendorAuth); await vendor.updateProductReview('permanently-delete', reviewMessage); }); - test('vendor can perform product reviews bulk action @pro', async () => { + test('vendor can perform product reviews bulk action @pro @v', async () => { await vendor.productReviewsBulkActions('hold'); }); }); diff --git a/tests/pw/tests/e2e/products.spec.ts b/tests/pw/tests/e2e/products.spec.ts index ff6a0c2276..a792f146a6 100644 --- a/tests/pw/tests/e2e/products.spec.ts +++ b/tests/pw/tests/e2e/products.spec.ts @@ -30,35 +30,35 @@ test.describe('Product functionality test', () => { await apiUtils.dispose(); }); - test('admin can add product category @lite', async () => { + test('admin can add product category @lite @a', async () => { await admin.addCategory(data.product.category.randomCategory()); }); - test('admin can add product attribute @lite', async () => { + test('admin can add product attribute @lite @a', async () => { await admin.addAttribute(data.product.attribute.randomAttribute()); }); - test('admin can add simple product @lite', async () => { + test('admin can add simple product @lite @a', async () => { await admin.addSimpleProduct(data.product.simple); }); - // test('admin can add variable product @pro', async ( ) => { + // test('admin can add variable product @pro @a', async ( ) => { // await admin.addVariableProduct(data.product.variable); // }); - test('admin can add simple subscription @pro', async () => { + test('admin can add simple subscription @pro @a', async () => { await admin.addSimpleSubscription(data.product.simpleSubscription); }); - // test('admin can add variable subscription @pro', async ( ) => { + // test('admin can add variable subscription @pro @a', async ( ) => { // await admin.addVariableSubscription(data.product.variableSubscription); // }); - test('admin can add external product @lite', async () => { + test('admin can add external product @lite @a', async () => { await admin.addExternalProduct(data.product.external); }); - test('admin can add vendor subscription @pro', async () => { + test('admin can add vendor subscription @pro @a', async () => { await admin.addDokanSubscription(data.product.vendorSubscription); }); @@ -66,35 +66,35 @@ test.describe('Product functionality test', () => { // todo: move create product in separate files, or product functionality to another page - test('vendor can add simple product @lite', async () => { + test('vendor can add simple product @lite @v', async () => { await vendor.vendorAddSimpleProduct(data.product.simple, false); }); - test('vendor can add variable product @pro', async () => { + test('vendor can add variable product @pro @v', async () => { await vendor.vendorAddVariableProduct(data.product.variable, false); }); - test('vendor can add simple subscription product @pro', async () => { + test('vendor can add simple subscription product @pro @v', async () => { await vendor.vendorAddSimpleSubscription(data.product.simpleSubscription, false); }); - test('vendor can add variable subscription product @pro', async () => { + test('vendor can add variable subscription product @pro @v', async () => { await vendor.vendorAddVariableSubscription(data.product.variableSubscription, false); }); - test('vendor can add external product @pro', async () => { + test('vendor can add external product @pro @v', async () => { await vendor.vendorAddExternalProduct(data.product.external, false); }); - test('vendor can add downloadable product @lite', async () => { + test('vendor can add downloadable product @lite @v', async () => { await vendor.vendorAddDownloadableProduct(data.product.downloadable, false); }); - test('vendor can add virtual product @lite', async () => { + test('vendor can add virtual product @lite @v', async () => { await vendor.vendorAddVirtualProduct(data.product.virtual, false); }); - test('vendor can add product category @lite', async () => { + test('vendor can add product category @lite @v', async () => { await vendor.vendorAddProductCategory(data.predefined.simpleProduct.product1.name, data.product.category.unCategorized); }); @@ -102,85 +102,85 @@ test.describe('Product functionality test', () => { // todo: add multistep product categories test // todo: add product categories settings test - test('vendor product menu page is rendering properly @lite @explo', async () => { + test('vendor product menu page is rendering properly @lite @exp @v', async () => { await vendor.vendorProductsRenderProperly(); }); - test('vendor can export products @pro', async () => { + test('vendor can export products @pro @v', async () => { await vendor.exportProducts(); }); - test('vendor can search product @lite', async () => { + test('vendor can search product @lite @v', async () => { await vendor.searchProduct(data.predefined.simpleProduct.product1.name); }); - test('vendor can filter products by date @lite', async () => { + test('vendor can filter products by date @lite @v', async () => { await vendor.filterProducts('by-date', '1'); }); - test('vendor can filter products by category @lite', async () => { + test('vendor can filter products by category @lite @v', async () => { await vendor.filterProducts('by-category', 'Uncategorized'); }); - test('vendor can filter products by type @pro', async () => { + test('vendor can filter products by type @pro @v', async () => { await vendor.filterProducts('by-type', 'simple'); }); - test('vendor can filter products by other @pro', async () => { + test('vendor can filter products by other @pro @v', async () => { await vendor.filterProducts('by-other', 'featured'); }); - test('vendor can view product @lite', async () => { + test('vendor can view product @lite @v', async () => { await vendor.viewProduct(data.predefined.simpleProduct.product1.name); }); - test("vendor can't buy own product @pro", async () => { + test("vendor can't buy own product @pro @v", async () => { await vendor.cantBuyOwnProduct(productName); }); - test('vendor can edit product @lite', async () => { + test('vendor can edit product @lite @v', async () => { await vendor.editProduct({ ...data.product.simple, editProduct: productName }); }); - test('vendor can quick edit product @pro', async () => { + test('vendor can quick edit product @pro @v', async () => { await vendor.quickEditProduct({ ...data.product.simple, editProduct: productName }); }); - test('vendor can add product description @lite', async () => { + test('vendor can add product description @lite @v', async () => { await vendor.addProductDescription(productName, data.product.productInfo.description); }); - // test('vendor can add product quantity discount @pro', async ( ) => { + // test('vendor can add product quantity discount @pro @v', async ( ) => { // await vendor.addProductQuantityDiscount(data.predefined.simpleProduct.product1.name, data.product.productInfo.quantityDiscount); // }); - test('vendor can add product rma options @pro', async () => { + test('vendor can add product rma options @pro @v', async () => { await vendor.addProductRmaOptions(productName, data.vendor.rma); }); - test('vendor can add product wholesale options @pro', async () => { + test('vendor can add product wholesale options @pro @v', async () => { await vendor.addProductWholesaleOptions(productName, data.product.productInfo.wholesaleOption); }); - test.skip('vendor can add product min-max options @pro', async () => { + test.skip('vendor can add product min-max options @pro @v', async () => { await vendor.addProductMinMaxOptions(productName, data.product.productInfo.minMax); }); - test('vendor can add product other options @lite', async () => { + test('vendor can add product other options @lite @v', async () => { await vendor.addProductOtherOptions(productName, data.product.productInfo.otherOptions); }); - test.skip('vendor can add catalog mode @lite', async () => { + test.skip('vendor can add catalog mode @lite @v', async () => { await vendor.addCatalogMode(productName); }); // todo: add more product edit tests -> discount, wholesale, advertising - test('vendor can duplicate product @pro', async () => { + test('vendor can duplicate product @pro @v', async () => { await vendor.duplicateProduct(productName); }); - test('vendor can permanently delete product @lite', async () => { + test('vendor can permanently delete product @lite @v', async () => { const [, , productName] = await apiUtils.createProduct(payloads.createProduct(), payloads.vendorAuth); await vendor.permanentlyDeleteProduct(productName); }); diff --git a/tests/pw/tests/e2e/refunds.spec.ts b/tests/pw/tests/e2e/refunds.spec.ts index 0fb3e2e7ef..d8a95f1a76 100644 --- a/tests/pw/tests/e2e/refunds.spec.ts +++ b/tests/pw/tests/e2e/refunds.spec.ts @@ -34,37 +34,37 @@ test.describe('Refunds test', () => { await apiUtils.dispose(); }); - test('admin refunds menu page is rendering properly @pro @explo', async () => { + test('admin refunds menu page is rendering properly @pro @exp @a', async () => { await admin.adminRefundRequestsRenderProperly(); }); - test('admin can search refund requests @pro', async () => { + test('admin can search refund requests @pro @a', async () => { await admin.searchRefundRequests(orderId); // await admin.searchRefundRequests(data.predefined.vendorStores.vendor1); }); - test('admin can approve refund request @pro', async () => { + test('admin can approve refund request @pro @a', async () => { await admin.updateRefundRequests(orderId, 'approve'); }); - test('admin can cancel refund requests @pro', async () => { + test('admin can cancel refund requests @pro @a', async () => { const [, orderResponseBody, orderId] = await apiUtils.createOrderWithStatus(PRODUCT_ID, payloads.createOrder, data.order.orderStatus.processing, payloads.vendorAuth); await dbUtils.createRefund(orderResponseBody); await admin.updateRefundRequests(orderId, 'cancel'); }); - test('admin can perform refund requests bulk actions @pro', async () => { + test('admin can perform refund requests bulk actions @pro @a', async () => { const [, orderResponseBody, ,] = await apiUtils.createOrderWithStatus(PRODUCT_ID, payloads.createOrder, data.order.orderStatus.processing, payloads.vendorAuth); await dbUtils.createRefund(orderResponseBody); await admin.refundRequestsBulkAction('completed'); }); - test('vendor can full refund @pro', async () => { + test('vendor can full refund @pro @v', async () => { const [, , orderId] = await apiUtils.createOrderWithStatus(PRODUCT_ID, { ...payloads.createOrder, customer_id: CUSTOMER_ID }, data.order.orderStatus.completed, payloads.vendorAuth); await vendor.refundOrder(orderId, data.predefined.simpleProduct.product1.name); }); - test('vendor can partial refund @pro', async () => { + test('vendor can partial refund @pro @v', async () => { const [, , orderId] = await apiUtils.createOrderWithStatus(PRODUCT_ID, { ...payloads.createOrder, customer_id: CUSTOMER_ID }, data.order.orderStatus.completed, payloads.vendorAuth); await vendor.refundOrder(orderId, data.predefined.simpleProduct.product1.name, true); }); diff --git a/tests/pw/tests/e2e/reports.spec.ts b/tests/pw/tests/e2e/reports.spec.ts index 02296f84a5..9fdf22de7e 100644 --- a/tests/pw/tests/e2e/reports.spec.ts +++ b/tests/pw/tests/e2e/reports.spec.ts @@ -27,30 +27,30 @@ test.describe('Reports test', () => { // reports - test('admin reports menu page is rendering properly @pro @explo', async () => { + test('admin reports menu page is rendering properly @pro @exp @a', async () => { await admin.adminReportsRenderProperly(); }); // all logs - test('admin All Logs menu page is rendering properly @pro @explo', async () => { + test('admin All Logs menu page is rendering properly @pro @exp @a', async () => { await admin.adminAllLogsRenderProperly(); }); - test('admin can search all logs @pro', async () => { + test('admin can search all logs @pro @a', async () => { await admin.searchAllLogs(orderId); }); - test('admin can export all logs @pro', async () => { + test('admin can export all logs @pro @a', async () => { // await admin.exportAllLogs(orderId); await admin.exportAllLogs(); }); - test('admin can filter all logs by store name @pro', async () => { + test('admin can filter all logs by store name @pro @a', async () => { await admin.filterAllLogsByStore(data.predefined.vendorStores.vendor1); }); - test('admin can filter all logs by order status @pro', async () => { + test('admin can filter all logs by order status @pro @a', async () => { await admin.filterAllLogsByStatus('completed'); }); }); diff --git a/tests/pw/tests/e2e/requestForQuoteRules.spec.ts b/tests/pw/tests/e2e/requestForQuoteRules.spec.ts index ca6aecd359..a4a54e4276 100644 --- a/tests/pw/tests/e2e/requestForQuoteRules.spec.ts +++ b/tests/pw/tests/e2e/requestForQuoteRules.spec.ts @@ -25,34 +25,33 @@ test.describe('Request for quotation Rules test', () => { // quote rules - test('admin quote rules menu page is rendering properly @pro @explo', async () => { + test('admin quote rules menu page is rendering properly @pro @exp @a', async () => { await admin.adminQuoteRulesRenderProperly(); }); - test('admin can add quote rule @pro', async () => { + test('admin can add quote rule @pro @a', async () => { await admin.addQuoteRule({ ...data.requestForQuotation.quoteRule, title: data.requestForQuotation.quoteRule.title() }); }); - test('admin can edit quote rule @pro', async () => { + test('admin can edit quote rule @pro @a', async () => { await admin.editQuoteRule({ ...data.requestForQuotation.quoteRule, title: quoteRuleTitle }); }); - test('admin can trash quote rule @pro', async () => { + test('admin can trash quote rule @pro @a', async () => { await admin.updateQuoteRule(quoteRuleTitle, 'trash'); }); - test('admin can restore quote rule @pro', async () => { + test('admin can restore quote rule @pro @a', async () => { await admin.updateQuoteRule(quoteRuleTitle, 'restore'); }); - test('admin can permanently delete quote rule @pro', async () => { + test('admin can permanently delete quote rule @pro @a', async () => { await apiUtils.createQuoteRule({ ...payloads.createQuoteRule(), rule_name: data.requestForQuotation.trashedQuoteRule.title, status: data.requestForQuotation.trashedQuoteRule.status }, payloads.adminAuth); await admin.updateQuoteRule(data.requestForQuotation.trashedQuoteRule.title, 'permanently-delete'); }); - // todo: need order for this type of test for whole project , will fail others tests while running parallel - test('admin can perform quote rule bulk actions @pro', async () => { + test('admin can perform quote rule bulk actions @pro @a', async () => { await admin.quoteRulesBulkAction('trash'); }); }); diff --git a/tests/pw/tests/e2e/requestForQuotes.spec.ts b/tests/pw/tests/e2e/requestForQuotes.spec.ts index ebc85e4028..5d76b32b2b 100644 --- a/tests/pw/tests/e2e/requestForQuotes.spec.ts +++ b/tests/pw/tests/e2e/requestForQuotes.spec.ts @@ -31,43 +31,43 @@ test.describe('Request for quotation test admin', () => { // quotes - test('admin quotes menu page is rendering properly @pro @explo', async () => { + test('admin quotes menu page is rendering properly @pro @exp @a', async () => { await admin.adminQuotesRenderProperly(); }); - test('admin can add quote @pro', async () => { + test('admin can add quote @pro @a', async () => { await admin.addQuote({ ...data.requestForQuotation.quote, title: data.requestForQuotation.quote.title() }); }); - test('admin can edit quote @pro', async () => { + test('admin can edit quote @pro @a', async () => { await admin.editQuote({ ...data.requestForQuotation.quote, title: quoteTitle }); }); - test('admin can trash quote @pro', async () => { + test('admin can trash quote @pro @a', async () => { await admin.updateQuote(quoteTitle, 'trash'); }); - test('admin can restore quote @pro', async () => { + test('admin can restore quote @pro @a', async () => { const [, , quoteTitle] = await apiUtils.createQuoteRequest({ ...payloads.createQuoteRequest(), product_ids: productId, status: 'trash', user_id: CUSTOMER_ID }, payloads.adminAuth); await admin.updateQuote(quoteTitle, 'restore'); }); - test('admin can permanently delete quote @pro', async () => { + test('admin can permanently delete quote @pro @a', async () => { const [, , quoteTitle] = await apiUtils.createQuoteRequest({ ...payloads.createQuoteRequest(), product_ids: productId, status: 'trash', user_id: CUSTOMER_ID }, payloads.adminAuth); await admin.updateQuote(quoteTitle, 'permanently-delete'); }); - test('admin can approve quote @pro', async () => { + test('admin can approve quote @pro @a', async () => { const [, , quoteTitle] = await apiUtils.createQuoteRequest({ ...payloads.createQuoteRequest(), product_ids: productId, user_id: CUSTOMER_ID }, payloads.adminAuth); await admin.approveQuote(quoteTitle); }); - test('admin can convert quote to order @pro', async () => { + test('admin can convert quote to order @pro @a', async () => { const [, , quoteTitle] = await apiUtils.createQuoteRequest({ ...payloads.createQuoteRequest(), product_ids: productId, status: 'approve', user_id: CUSTOMER_ID }, payloads.adminAuth); await admin.convertQuoteToOrder(quoteTitle); }); - test('admin can perform quote bulk actions @pro', async () => { + test('admin can perform quote bulk actions @pro @a', async () => { await admin.quotesBulkAction('trash'); }); }); @@ -97,23 +97,23 @@ test.describe('Request for quotation test vendor', () => { await vPage.close(); }); - test('vendor request quotes menu page is rendering properly @pro @explo', async () => { + test('vendor request quotes menu page is rendering properly @pro @exp @v', async () => { await vendor.vendorRequestQuotesRenderProperly(); }); - test('vendor can view request quote details @pro @explo', async () => { + test('vendor can view request quote details @pro @exp @v', async () => { await vendor.vendorViewQuoteDetails(quoteTitle); }); - test('vendor can update quote request @pro', async () => { + test('vendor can update quote request @pro @v', async () => { await vendor.vendorUpdateQuoteRequest(quoteId, { ...data.requestForQuotation.vendorUpdateQuote, productName: productName }); }); - test('vendor can approve quote request @pro', async () => { + test('vendor can approve quote request @pro @v', async () => { await vendor.vendorApproveQuoteRequest(quoteId); }); - test('vendor can convert quote request to order @pro', async () => { + test('vendor can convert quote request to order @pro @v', async () => { // const [, quoteId] = await apiUtils.createQuoteRequest({ ...payloads.createQuoteRequest(), product_ids: productId, status: 'approve', user_id: CUSTOMER_ID }, payloads.adminAuth); await vendor.vendorConvertQuoteToOrder(quoteId); }); @@ -142,9 +142,8 @@ test.describe('Request for quotation test customer', () => { [, pId, productName] = await apiUtils.createProduct(payloads.createProduct(), payloads.vendorAuth); productId.push(pId); - const [responseBody] = await apiUtils.createQuoteRule({ ...payloads.createQuoteRule(), product_ids: productId, apply_on_all_product: '0' }, payloads.adminAuth); - // console.log(responseBody); - // console.log(productName); + await apiUtils.createQuoteRule({ ...payloads.createQuoteRule(), product_ids: productId, apply_on_all_product: '0' }, payloads.adminAuth); + [, quoteId] = await apiUtils.createQuoteRequest({ ...payloads.createQuoteRequest(), product_ids: productId, user_id: CUSTOMER_ID }, payloads.adminAuth); }); @@ -153,32 +152,32 @@ test.describe('Request for quotation test customer', () => { await gPage.close(); }); - test('customer request for quote menu page is rendering properly @pro @explo', async () => { + test('customer request for quote menu page is rendering properly @pro @exp @c', async () => { await customer.requestForQuoteRenderProperly(); }); - test('customer requested quote page is rendering properly @pro @explo', async () => { + test('customer requested quote page is rendering properly @pro @exp @c', async () => { await customer.requestedQuotesRenderProperly(); }); - test('customer can view requested quote details @pro @explo', async () => { + test('customer can view requested quote details @pro @exp @c', async () => { await customer.customerViewRequestedQuoteDetails(quoteId); }); - test('customer can update quote request @pro', async () => { + test('customer can update quote request @pro @c', async () => { await customer.customerUpdateRequestedQuote(quoteId, { ...data.requestForQuotation.customerQuoteProduct, productName: productName }); }); - test('customer can pay order converted from quote request @pro', async () => { + test('customer can pay order converted from quote request @pro @c', async () => { await apiUtils.convertQuoteToOrder(quoteId, payloads.adminAuth); await customer.payConvertedQuote(quoteId); }); - test.skip('customer can quote product @pro @explo', async () => { + test.skip('customer can quote product @pro @exp @c', async () => { await customer.customerQuoteProduct({ ...data.requestForQuotation.customerQuoteProduct, productName: productName }); }); - test.skip('guest customer can quote product @pro @explo', async () => { + test.skip('guest customer can quote product @pro @exp @g', async () => { await guest.customerQuoteProduct({ ...data.requestForQuotation.customerQuoteProduct, productName: productName }, data.requestForQuotation.guest()); }); }); diff --git a/tests/pw/tests/e2e/reverseWithdraws.spec.ts b/tests/pw/tests/e2e/reverseWithdraws.spec.ts index eba65a3bb4..c38c076d23 100644 --- a/tests/pw/tests/e2e/reverseWithdraws.spec.ts +++ b/tests/pw/tests/e2e/reverseWithdraws.spec.ts @@ -46,37 +46,37 @@ test.describe('Reverse withdraw test', () => { await apiUtils.dispose(); }); - test('dokan admin reverse withdraw menu page is rendering properly @lite @explo', async () => { + test('dokan admin reverse withdraw menu page is rendering properly @lite @exp @a', async () => { await admin.adminReverseWithdrawRenderProperly(); }); - test.skip('filter reverse withdraws by store @lite', async () => { + test.skip('filter reverse withdraws by store @lite @a', async () => { await admin.filterReverseWithdraws(data.predefined.vendorStores.vendor1); }); - test('admin can crete reverse withdraws @lite', async () => { + test('admin can crete reverse withdraws @lite @a', async () => { await admin.addReverseWithdrawal(data.reverseWithdraw); }); // vendor - test('vendor reverse withdrawal menu page is rendering properly @lite @explo', async () => { + test('vendor reverse withdrawal menu page is rendering properly @lite @exp @v', async () => { await vendor.vendorReverseWithdrawalRenderProperly(); }); - test('vendor can view reverse withdrawal notice @lite @explo', async () => { + test('vendor can view reverse withdrawal notice @lite @exp @v', async () => { await vendor.vendorViewReverseWithdrawalNotice(); }); - test('vendor can view reverse withdrawal announcement @pro @explo', async () => { + test('vendor can view reverse withdrawal announcement @pro @exp @v', async () => { await vendor.vendorViewReverseWithdrawalAnnouncement(); }); - test('vendor can filter reverse withdrawals @lite', async () => { + test('vendor can filter reverse withdrawals @lite @v', async () => { await vendor.vendorFilterReverseWithdrawals(data.date.dateRange); }); - test('vendor can pay reverse pay balance @lite', async () => { + test('vendor can pay reverse pay balance @lite @v', async () => { const orderId = await vendor.vendorPayReversePayBalance(); await apiUtils.updateOrderStatus(orderId, data.order.orderStatus.completed, payloads.adminAuth); }); diff --git a/tests/pw/tests/e2e/sellerBadges.spec.ts b/tests/pw/tests/e2e/sellerBadges.spec.ts index 7674620239..52d3d5af60 100644 --- a/tests/pw/tests/e2e/sellerBadges.spec.ts +++ b/tests/pw/tests/e2e/sellerBadges.spec.ts @@ -29,72 +29,72 @@ test.describe('Seller badge test', () => { await apiUtils.dispose(); }); - test('dokan seller badge menu page is rendering properly @pro @explo', async () => { + test('dokan seller badge menu page is rendering properly @pro @exp @a', async () => { await admin.adminSellerBadgeRenderProperly(); }); - test('admin can preview seller badge @pro @explo', async () => { + test('admin can preview seller badge @pro @exp @a', async () => { await admin.previewSellerBadge(data.sellerBadge.eventName.productsPublished); }); - test('admin can view seller badge details @pro @explo', async () => { + test('admin can view seller badge details @pro @exp @a', async () => { await admin.viewSellerBadge(data.sellerBadge.eventName.productsPublished); }); - test('admin can search seller badge @pro', async () => { + test('admin can search seller badge @pro @a', async () => { await admin.searchSellerBadge(data.sellerBadge.eventName.productsPublished); }); - test('admin can create seller badge @pro', async () => { + test('admin can create seller badge @pro @a', async () => { await admin.createSellerBadge({ ...data.sellerBadge, badgeName: data.sellerBadge.eventName.numberOfItemsSold }); }); - test('admin can edit seller badge @pro', async () => { + test('admin can edit seller badge @pro @a', async () => { await admin.editSellerBadge({ ...data.sellerBadge, badgeName: data.sellerBadge.eventName.productsPublished }); }); - // test.skip('admin can filter vendors by seller badge @pro', async ( ) => { + // test.skip('admin can filter vendors by seller badge @pro @a', async ( ) => { // await admin.filterVendorsByBadge(data.sellerBadge.eventName.productsPublished); // }); - // test.skip('admin can view seller badge vendors @pro', async ( ) => { + // test.skip('admin can view seller badge vendors @pro @a', async ( ) => { // await admin.sellerBadgeVendors(data.sellerBadge.eventName.productsPublished); // }); - test('admin can view seller badges acquired by vendor @pro', async () => { + test('admin can view seller badges acquired by vendor @pro @a', async () => { await admin.sellerBadgeAcquiredByVendor(data.predefined.vendorStores.vendor1); }); - test('admin can update seller badge status @pro', async () => { + test('admin can update seller badge status @pro @a', async () => { await apiUtils.createSellerBadge(payloads.createSellerBadgeExclusiveToPlatform, payloads.adminAuth); await admin.updateSellerBadge(data.sellerBadge.eventName.exclusiveToPlatform, 'draft'); }); - test('admin can delete seller badge @pro', async () => { + test('admin can delete seller badge @pro @a', async () => { await apiUtils.createSellerBadge(payloads.createSellerBadgeExclusiveToPlatform, payloads.adminAuth); await admin.updateSellerBadge(data.sellerBadge.eventName.exclusiveToPlatform, 'delete'); }); - test('admin can perform seller badge bulk action @pro', async () => { + test('admin can perform seller badge bulk action @pro @a', async () => { await apiUtils.createSellerBadge(payloads.createSellerBadgeFeatureProducts, payloads.adminAuth); await admin.sellerBadgeBulkAction('delete', data.sellerBadge.eventName.featuredProducts); }); // vendor - test('vendor badges menu page is rendering properly @pro @explo', async () => { + test('vendor badges menu page is rendering properly @pro @exp @v', async () => { await vendor.vendorSellerBadgeRenderProperly(); }); - test('vendor can view badge acquired congratulation popup message action @pro', async () => { + test('vendor can view badge acquired congratulation popup message action @pro @v', async () => { await vendor.sellerBadgeCongratsPopup(); }); - test('vendor can search seller badge @pro', async () => { + test('vendor can search seller badge @pro @v', async () => { await vendor.vendorSearchSellerBadge(data.sellerBadge.eventName.productsPublished); }); - test('vendor can filter seller badges @pro', async () => { + test('vendor can filter seller badges @pro @v', async () => { await vendor.filterSellerBadges('available_badges'); }); }); diff --git a/tests/pw/tests/e2e/setting.spec.ts b/tests/pw/tests/e2e/setting.spec.ts index e14e5a99f6..5fd847b0ff 100644 --- a/tests/pw/tests/e2e/setting.spec.ts +++ b/tests/pw/tests/e2e/setting.spec.ts @@ -9,7 +9,7 @@ import { payloads } from '@utils/payloads'; const { CI, CUSTOMER_ID, PRODUCT_ID } = process.env; -test.describe('Settings test', () => { +test.describe.skip('Settings test', () => { let admin: SettingPage; let vendor: SettingPage; let customer: SettingPage; @@ -47,7 +47,7 @@ test.describe('Settings test', () => { // general settings - test.skip('admin can set vendor store url (general settings) @lite', async () => { + test.skip('admin can set vendor store url (general settings) @lite @a', async () => { // todo: need to run on serial mode, will fail other tests await dbUtils.setDokanSettings(dbData.dokan.optionName.general, { ...dbData.dokan.generalSettings, custom_store_url: 'stores' }); CI ? await helpers.execommand(data.command.permalink) : await helpers.execommand(data.command.permalinkLocal); @@ -58,7 +58,7 @@ test.describe('Settings test', () => { CI ? await helpers.execommand(data.command.permalink) : await helpers.execommand(data.command.permalinkLocal); }); - test('admin can set vendor setup wizard logo & message (general settings) @lite', async () => { + test('admin can set vendor setup wizard logo & message (general settings) @lite @a', async () => { apiUtils = new ApiUtils(await request.newContext()); const [responseBody] = await apiUtils.uploadFile(data.image.dokan, payloads.adminAuth); const logoUrl = responseBody.source_url; @@ -70,12 +70,12 @@ test.describe('Settings test', () => { await admin.vendorSetupWizardLogoAndMessageSetting(logoUrl, dbData.testData.dokan.generalSettings.setup_wozard_message_without_html); }); - test('admin can disable vendor setup wizard (general settings) @lite', async () => { + test('admin can disable vendor setup wizard (general settings) @lite @g', async () => { await dbUtils.setDokanSettings(dbData.dokan.optionName.general, { ...dbData.dokan.generalSettings, disable_welcome_wizard: 'on' }); await guest.disableVendorSetupWizardSetting(); }); - test('admin can set store terms and conditions (general settings) @lite', async () => { + test('admin can set store terms and conditions (general settings) @lite @v', async () => { await dbUtils.setDokanSettings(dbData.dokan.optionName.general, { ...dbData.dokan.generalSettings, seller_enable_terms_and_conditions: 'on' }); await vendor.setStoreTermsAndConditions('on'); @@ -83,12 +83,12 @@ test.describe('Settings test', () => { await vendor.setStoreTermsAndConditions('off'); }); - test('admin can set store products per page (general settings) @lite', async () => { + test('admin can set store products per page (general settings) @lite @c', async () => { await dbUtils.setDokanSettings(dbData.dokan.optionName.general, { ...dbData.dokan.generalSettings, store_products_per_page: '1' }); await customer.setStoreProductsPerPage(data.predefined.vendorStores.vendor1, 1); }); - test('admin can enable address fields on registration (general settings) @lite', async () => { + test('admin can enable address fields on registration (general settings) @lite @g', async () => { await dbUtils.setDokanSettings(dbData.dokan.optionName.general, { ...dbData.dokan.generalSettings, enabled_address_on_reg: 'on' }); await guest.enableAddressFieldsOnRegistration('on'); @@ -96,7 +96,7 @@ test.describe('Settings test', () => { await guest.enableAddressFieldsOnRegistration('off'); }); - test('admin can enable store terms and conditions on registration (general settings) @pro', async () => { + test('admin can enable store terms and conditions on registration (general settings) @pro @v', async () => { await dbUtils.setDokanSettings(dbData.dokan.optionName.general, { ...dbData.dokan.generalSettings, enable_tc_on_reg: 'on' }); await vendor.enableStoreTermsAndConditionsOnRegistration('on'); @@ -104,7 +104,7 @@ test.describe('Settings test', () => { await vendor.enableStoreTermsAndConditionsOnRegistration('off'); }); - test('admin can set show vendor info (general settings) @lite', async () => { + test('admin can set show vendor info (general settings) @lite @c', async () => { await dbUtils.setDokanSettings(dbData.dokan.optionName.general, { ...dbData.dokan.generalSettings, show_vendor_info: 'on' }); await customer.setShowVendorInfo(data.predefined.simpleProduct.product1.name, 'on'); @@ -112,7 +112,7 @@ test.describe('Settings test', () => { await customer.setShowVendorInfo(data.predefined.simpleProduct.product1.name, 'off'); }); - test('admin can enable more products tab (general settings) @lite', async () => { + test('admin can enable more products tab (general settings) @lite @c', async () => { await dbUtils.setDokanSettings(dbData.dokan.optionName.general, { ...dbData.dokan.generalSettings, enabled_more_products_tab: 'on' }); await customer.enableMoreProductsTab(data.predefined.simpleProduct.product1.name, 'on'); @@ -122,7 +122,7 @@ test.describe('Settings test', () => { // selling settings - test('admin can enable vendor selling (selling settings) @lite', async () => { + test('admin can enable vendor selling (selling settings) @lite @g', async () => { await dbUtils.setDokanSettings(dbData.dokan.optionName.selling, { ...dbData.dokan.sellingSettings, new_seller_enable_selling: 'on' }); await guest.enableVendorSelling('on'); @@ -130,7 +130,7 @@ test.describe('Settings test', () => { await guest.enableVendorSelling('off'); }); - test('admin can set order status change capability (selling settings) @lite', async () => { + test('admin can set order status change capability (selling settings) @lite @v', async () => { apiUtils = new ApiUtils(await request.newContext()); const [, , orderId] = await apiUtils.createOrderWithStatus(PRODUCT_ID, { ...payloads.createOrder, customer_id: CUSTOMER_ID }, data.order.orderStatus.onhold, payloads.vendorAuth); diff --git a/tests/pw/tests/e2e/settings.spec.ts b/tests/pw/tests/e2e/settings.spec.ts index 20de85152f..3793e97262 100644 --- a/tests/pw/tests/e2e/settings.spec.ts +++ b/tests/pw/tests/e2e/settings.spec.ts @@ -4,7 +4,7 @@ import { dbData } from '@utils/dbData'; import { dbUtils } from '@utils/dbUtils'; import { data } from '@utils/testData'; -test.describe('Settings test', () => { +test.describe.skip('Settings test', () => { let admin: SettingsPage; let aPage: Page; @@ -18,108 +18,108 @@ test.describe('Settings test', () => { await aPage.close(); }); - test('dokan settings menu page is rendering properly @lite @explo', async () => { + test('dokan settings menu page is rendering properly @lite @exp @a', async () => { await admin.dokanSettingsRenderProperly(); }); - test('admin can scroll to top on settings @lite', async () => { + test('admin can scroll to top on settings @lite @a', async () => { await admin.scrollToTopSettings(); }); - test('admin can search settings @lite', async () => { + test('admin can search settings @lite @a', async () => { await admin.searchSettings('Selling Options'); }); // dokan settings - test('admin can set dokan general settings @lite', async () => { + test('admin can set dokan general settings @lite @a', async () => { await admin.setDokanGeneralSettings(data.dokanSettings.general); }); - test('admin can set dokan selling settings @lite', async () => { + test('admin can set dokan selling settings @lite @a', async () => { await admin.setDokanSellingSettings(data.dokanSettings.selling); }); - test('admin can set dokan withdraw settings @lite', async () => { + test('admin can set dokan withdraw settings @lite @a', async () => { await admin.setDokanWithdrawSettings(data.dokanSettings.withdraw); }); - test('admin can set dokan reverse withdraw settings @lite', async () => { + test('admin can set dokan reverse withdraw settings @lite @a', async () => { await admin.setDokanReverseWithdrawSettings(data.dokanSettings.reverseWithdraw); }); - test('admin can set dokan page settings @lite', async () => { + test('admin can set dokan page settings @lite @a', async () => { await admin.setPageSettings(data.dokanSettings.page); }); - test('admin can set dokan appearance settings @lite', async () => { + test('admin can set dokan appearance settings @lite @a', async () => { await admin.setDokanAppearanceSettings(data.dokanSettings.appearance); }); - test('admin can set dokan privacy policy settings @lite', async () => { + test('admin can set dokan privacy policy settings @lite @a', async () => { const privacyPolicySettings = await dbUtils.getDokanSettings(dbData.dokan.optionName.privacyPolicy); await admin.setDokanPrivacyPolicySettings({ ...data.dokanSettings.privacyPolicy, privacyPage: privacyPolicySettings.privacyPage }); }); - test('admin can set dokan color settings @pro', async () => { + test('admin can set dokan color settings @pro @a', async () => { await admin.setDokanColorSettings(data.dokanSettings.colors); }); - test('admin can set dokan live search settings @pro', async () => { + test('admin can set dokan live search settings @pro @a', async () => { await admin.setDokanLiveSearchSettings(data.dokanSettings.liveSearch); }); - test('admin can set dokan store support settings @pro', async () => { + test('admin can set dokan store support settings @pro @a', async () => { await admin.setDokanStoreSupportSettings(data.dokanSettings.storeSupport); }); - test('admin can set dokan email verification settings @pro', async () => { + test('admin can set dokan email verification settings @pro @a', async () => { await admin.setDokanEmailVerificationSettings(data.dokanSettings.emailVerification); // reset settings await dbUtils.setDokanSettings(dbData.dokan.optionName.emailVerification, dbData.dokan.emailVerificationSettings); }); - test('admin can set dokan shipping status settings @pro', async () => { + test('admin can set dokan shipping status settings @pro @a', async () => { await admin.setDokanShippingStatusSettings(data.dokanSettings.shippingStatus); }); - test('admin can set dokan quote settings @pro', async () => { + test('admin can set dokan quote settings @pro @a', async () => { await admin.setDokanQuoteSettings(data.dokanSettings.quote); }); - test('admin can set dokan rma settings @pro', async () => { + test('admin can set dokan rma settings @pro @a', async () => { await admin.setDokanRmaSettings(data.dokanSettings.rma); }); - test('admin can set dokan wholesale settings @pro', async () => { + test('admin can set dokan wholesale settings @pro @a', async () => { await admin.setDokanWholesaleSettings(data.dokanSettings.wholesale); }); - test('admin can set dokan eu compliance settings @pro', async () => { + test('admin can set dokan eu compliance settings @pro @a', async () => { await admin.setDokanEuComplianceSettings(data.dokanSettings.euCompliance); }); - test('admin can set dokan delivery time settings @pro', async () => { + test('admin can set dokan delivery time settings @pro @a', async () => { await admin.setDokanDeliveryTimeSettings(data.dokanSettings.deliveryTime); }); - test('admin can set dokan product advertising settings @pro', async () => { + test('admin can set dokan product advertising settings @pro @a', async () => { await admin.setDokanProductAdvertisingSettings(data.dokanSettings.productAdvertising); }); - test('admin can set dokan geolocation settings @pro', async () => { + test('admin can set dokan geolocation settings @pro @a', async () => { await admin.setDokanGeolocationSettings(data.dokanSettings.geolocation); }); - test('admin can set dokan product report abuse settings @pro', async () => { + test('admin can set dokan product report abuse settings @pro @a', async () => { await admin.setDokanProductReportAbuseSettings(data.dokanSettings.productReportAbuse); }); - test('admin can set dokan spmv settings @pro', async () => { + test('admin can set dokan spmv settings @pro @a', async () => { await admin.setDokanSpmvSettings(data.dokanSettings.spmv); }); - test('admin can set dokan vendor subscription settings @pro', async () => { + test('admin can set dokan vendor subscription settings @pro @a', async () => { await admin.setDokanVendorSubscriptionSettings(data.dokanSettings.vendorSubscription); await dbUtils.setDokanSettings(dbData.dokan.optionName.vendorSubscription, dbData.dokan.vendorSubscriptionSettings); }); diff --git a/tests/pw/tests/e2e/shop.spec.ts b/tests/pw/tests/e2e/shop.spec.ts index 7645e71647..2657aa87f7 100644 --- a/tests/pw/tests/e2e/shop.spec.ts +++ b/tests/pw/tests/e2e/shop.spec.ts @@ -24,32 +24,31 @@ test.describe('Shop functionality test', () => { // shop page - test('shop page is rendering properly @lite @explo', async () => { + test('shop page is rendering properly @lite @exp @c', async () => { await customer.shopRenderProperly(); }); - test('customer can sort products @lite', async () => { + test('customer can sort products @lite @c', async () => { await customer.sortProducts('price'); }); - test('customer can search product @lite', async () => { + test('customer can search product @lite @c', async () => { await customer.searchProduct(data.predefined.simpleProduct.product1.name); }); - test('customer can filter products by category @pro', async () => { + test('customer can filter products by category @pro @c', async () => { await customer.filterProducts('by-category', 'uncategorized'); }); - test('customer can filter products by location @pro', async () => { + test('customer can filter products by location @pro @c', async () => { await customer.filterProducts('by-location', 'New York, NY, USA'); }); - test('customer can view products on map @pro', async () => { + test('customer can view products list on map @pro @c', async () => { await customer.productOnMap(); - // await customer.productOnMap(data.predefined.simpleProduct.product1.name); }); - test('customer can go to product details from shop @lite', async () => { + test('customer can go to product details from shop @lite @c', async () => { await customer.goToProductDetailsFromShop(data.predefined.simpleProduct.product1.name); }); }); diff --git a/tests/pw/tests/e2e/singleProduct.spec.ts b/tests/pw/tests/e2e/singleProduct.spec.ts index 3760acc0b4..5587913ee2 100644 --- a/tests/pw/tests/e2e/singleProduct.spec.ts +++ b/tests/pw/tests/e2e/singleProduct.spec.ts @@ -23,35 +23,35 @@ test.describe('Single product functionality test', () => { // single product page - test('single product is rendering properly @lite @explo', async () => { + test('single product is rendering properly @lite @exp @c', async () => { await customer.singleProductRenderProperly(data.predefined.simpleProduct.product1.name); }); - test('customer can view highlighted vendor info @lite', async () => { + test('customer can view highlighted vendor info @lite @c', async () => { await customer.viewHighlightedVendorInfo(data.predefined.simpleProduct.product1.name); }); - test('customer can view product vendor info @lite', async () => { + test('customer can view product vendor info @lite @c', async () => { await customer.productVendorInfo(data.predefined.simpleProduct.product1.name); }); - test('customer can view product location @pro', async () => { + test('customer can view product location @pro @c', async () => { await customer.productLocation(data.predefined.simpleProduct.product1.name); }); - test('customer can view product warranty policy @pro', async () => { + test('customer can view product warranty policy @pro @c', async () => { await customer.productWarrantyPolicy(data.predefined.simpleProduct.product1.name); }); - test('customer can view more products @lite', async () => { + test('customer can view more products @lite @c', async () => { await customer.viewMoreProducts(data.predefined.simpleProduct.product1.name); }); - test('customer can view related products @lite', async () => { + test('customer can view related products @lite @c', async () => { await customer.viewRelatedProducts(data.predefined.simpleProduct.product1.name); }); - test('customer can review product @lite', async () => { + test('customer can review product @lite @c', async () => { await customer.reviewProduct(data.predefined.simpleProduct.product1.name, data.product.review); }); }); diff --git a/tests/pw/tests/e2e/singleStore.spec.ts b/tests/pw/tests/e2e/singleStore.spec.ts index d36135cc34..545a1530d5 100644 --- a/tests/pw/tests/e2e/singleStore.spec.ts +++ b/tests/pw/tests/e2e/singleStore.spec.ts @@ -23,29 +23,29 @@ test.describe('Single store functionality test', () => { // single store page - test('dokan single store page is rendering properly @lite @explo', async () => { + test('dokan single store page is rendering properly @lite @exp @c', async () => { await customer.singleStoreRenderProperly(data.predefined.vendorStores.vendor1); }); - // test.skip('customer can view store open-close time on single store @lite', async ( ) => { + // test.skip('customer can view store open-close time on single store @lite @c', async ( ) => { // // todo: pre: need store open close // await customer.storeOpenCloseTime(data.predefined.vendorStores.vendor1); // }); - test('customer can search product on single store @lite', async () => { + test('customer can search product on single store @lite @c', async () => { await customer.singleStoreSearchProduct(data.predefined.vendorStores.vendor1, data.predefined.simpleProduct.product1.name); }); - test('customer can sort products on single store @lite', async () => { + test('customer can sort products on single store @lite @c', async () => { await customer.singleStoreSortProducts(data.predefined.vendorStores.vendor1, 'price'); }); - // test.skip('customer can view store terms and conditions @lite', async ( ) => { + // test.skip('customer can view store terms and conditions @lite @c', async ( ) => { // // todo: pre need toc on store and admin settings // await customer.storeTermsAndCondition(data.predefined.vendorStores.vendor1, data.vendor.toc); // }); - test('customer can share store @pro', async () => { + test('customer can share store @pro @c', async () => { await customer.storeShare(data.predefined.vendorStores.vendor1, data.storeShare.facebook); }); }); diff --git a/tests/pw/tests/e2e/spmv.spec.ts b/tests/pw/tests/e2e/spmv.spec.ts index 4fd6d89d00..7edb812f1b 100644 --- a/tests/pw/tests/e2e/spmv.spec.ts +++ b/tests/pw/tests/e2e/spmv.spec.ts @@ -44,66 +44,68 @@ test.describe('Vendor SPMV test', () => { await apiUtils.dispose(); }); - test('admin can assign SPMV product to other vendor @pro', async () => { - test.skip(true,'test is failing for woocommerce booking v2.8.0') + test('admin can assign SPMV product to other vendor @pro @a', async () => { + test.skip(true, 'test is failing for woocommerce booking v2.0.8'); const [, productId] = await apiUtils.createProduct({ ...payloads.createProduct(), name: data.predefined.spmv.productName() }, payloads.vendor2Auth); await admin.assignSpmvProduct(productId, data.predefined.vendorStores.vendor1); }); - test('vendor spmv menu page is rendering properly @pro @explo', async () => { + //vendor + + test('vendor spmv menu page is rendering properly @pro @exp @v', async () => { await vendor.vendorSpmvRenderProperly(); }); - test('vendor can search similar product on spmv page @pro', async () => { + test('vendor can search similar product on spmv page @pro @v', async () => { await vendor.searchSimilarProduct(productName, 'spmv'); }); - test('vendor can search similar product on product popup @pro', async () => { + test('vendor can search similar product on product popup @pro @v', async () => { await vendor.searchSimilarProduct(productName, 'popup'); }); - test('vendor can search similar booking product @pro', async () => { + test('vendor can search similar booking product @pro @v', async () => { const [, , bookableProductName] = await apiUtils.createBookableProduct(payloads.createBookableProduct(), payloads.vendor2Auth); await vendor.searchSimilarProduct(bookableProductName, 'booking'); }); - test('vendor can search similar auction product @pro', async () => { + test('vendor can search similar auction product @pro @v', async () => { const [, , auctionProductName] = await apiUtils.createProduct(payloads.createAuctionProduct(), payloads.vendor2Auth); await vendor.searchSimilarProduct(auctionProductName, 'auction'); }); - test('vendor can go to own product edit from spmv page @pro', async () => { + test('vendor can go to own product edit from spmv page @pro @v', async () => { await vendor.goToProductEditFromSPMV(data.predefined.simpleProduct.product1.name); }); - test('vendor can sort spmv products @pro', async () => { + test('vendor can sort spmv products @pro @v', async () => { await vendor.sortSpmvProduct('price'); }); - test('vendor can clone product @pro', async () => { + test('vendor can clone product @pro @v', async () => { await vendor.cloneProduct(productName); }); - test('vendor can clone product via sell item button @pro', async () => { + test('vendor can clone product via sell item button @pro @v', async () => { const [, , productName] = await apiUtils.createProduct({ ...payloads.createProduct(), name: data.predefined.spmv.productName() }, payloads.vendor2Auth); await vendor.cloneProductViaSellItemButton(productName); }); // customer - test('customer can view other available vendors @pro', async () => { + test('customer can view other available vendors @pro @c', async () => { await customer.viewOtherAvailableVendors(productName1); }); - test('customer can view other available vendor @pro', async () => { + test('customer can view other available vendor @pro @c', async () => { await customer.viewOtherAvailableVendor(productName1, data.predefined.vendorStores.vendor1); }); - test('customer can view other available vendor product @pro', async () => { + test('customer can view other available vendor product @pro @c', async () => { await customer.viewOtherAvailableVendorProduct(productName1, data.predefined.vendorStores.vendor1); }); - test('customer can add to cart other available vendor product @pro', async () => { + test('customer can add to cart other available vendor product @pro @c', async () => { await customer.addToCartOtherAvailableVendorsProduct(productName1, data.predefined.vendorStores.vendor1); }); }); diff --git a/tests/pw/tests/e2e/storeAppearance.spec.ts b/tests/pw/tests/e2e/storeAppearance.spec.ts index 59b8b1caac..535d4078eb 100644 --- a/tests/pw/tests/e2e/storeAppearance.spec.ts +++ b/tests/pw/tests/e2e/storeAppearance.spec.ts @@ -31,17 +31,17 @@ test.describe.skip('Store Appearance test', () => { await apiUtils.dispose(); }); - test('store map is disabled on store sidebar @lite', async () => { + test('store map is disabled on store sidebar @lite @c', async () => { await dbUtils.setDokanSettings(dbData.dokan.optionName.appearance, { ...dbData.dokan.appearanceSettings, store_map: 'off' }); await customer.disableMapOnStoreSidebar(data.predefined.vendorStores.vendor1); }); - test('store open-close time is disabled store sidebar @lite', async () => { + test('store open-close time is disabled store sidebar @lite @c', async () => { await dbUtils.setDokanSettings(dbData.dokan.optionName.appearance, { ...dbData.dokan.appearanceSettings, store_open_close: 'off' }); await customer.disableStoreOpenCloseTimeOnStoreSidebar(data.predefined.vendorStores.vendor1); }); - test.skip('vendor info is disabled on single store page @lite', async () => { + test.skip('vendor info is disabled on single store page @lite @c', async () => { // todo: need to fix console.log(await dbUtils.getDokanSettings(dbData.dokan.optionName.appearance)); await dbUtils.setDokanSettings(dbData.dokan.optionName.appearance, { diff --git a/tests/pw/tests/e2e/storeCategories.spec.ts b/tests/pw/tests/e2e/storeCategories.spec.ts index cb7f9b892d..733699cecb 100644 --- a/tests/pw/tests/e2e/storeCategories.spec.ts +++ b/tests/pw/tests/e2e/storeCategories.spec.ts @@ -32,33 +32,33 @@ test.describe('Store categories test', () => { // store categories - test('admin store category page is rendering properly @pro @explo', async () => { + test('admin store category page is rendering properly @pro @exp @a', async () => { await admin.adminStoreCategoryRenderProperly(); }); - test('admin can add store category @pro', async () => { + test('admin can add store category @pro @a', async () => { await admin.addStoreCategory(data.storeCategory()); }); - test('admin can search store category @pro', async () => { + test('admin can search store category @pro @a', async () => { await admin.searchStoreCategory(categoryName); }); - test('admin can edit store category @pro', async () => { + test('admin can edit store category @pro @a', async () => { await admin.editStoreCategory({ ...data.storeCategory(), name: categoryName }); }); - test('admin can set default store category @pro', async () => { + test('admin can set default store category @pro @a', async () => { await admin.updateStoreCategory(categoryName, 'set-default'); // reset default category await apiUtils.setDefaultStoreCategory('Uncategorized', payloads.adminAuth); }); - test('admin can delete store category @pro', async () => { + test('admin can delete store category @pro @a', async () => { await admin.updateStoreCategory(categoryName, 'delete'); }); - test('vendor can update own store category @pro', async () => { + test('vendor can update own store category @pro @v', async () => { const [, , categoryName] = await apiUtils.createStoreCategory(payloads.createStoreCategory(), payloads.adminAuth); await vendor.vendorUpdateStoreCategory(categoryName); }); diff --git a/tests/pw/tests/e2e/storeReviews.spec.ts b/tests/pw/tests/e2e/storeReviews.spec.ts index aaf2f1e55c..346e910f48 100644 --- a/tests/pw/tests/e2e/storeReviews.spec.ts +++ b/tests/pw/tests/e2e/storeReviews.spec.ts @@ -41,56 +41,56 @@ test.describe('Store Reviews test', () => { await apiUtils.dispose(); }); - test('dokan store reviews menu page is rendering properly @pro @explo', async () => { + test('dokan store reviews menu page is rendering properly @pro @exp @a', async () => { await admin.adminStoreReviewsRenderProperly(); }); - test('admin can view store review @pro @explo', async () => { + test('admin can view store review @pro @exp @a', async () => { await admin.viewStoreReview(); }); - test('admin can edit store review @pro', async () => { + test('admin can edit store review @pro @a', async () => { await admin.editStoreReview(data.storeReview.review()); }); - test('admin can filter store reviews by vendor @pro', async () => { + test('admin can filter store reviews by vendor @pro @a', async () => { await admin.filterStoreReviews(data.storeReview.filter.byVendor); }); - test('admin can delete store review @pro', async () => { + test('admin can delete store review @pro @a', async () => { await admin.deleteStoreReview(); }); - test('admin can restore deleted store review @pro', async () => { + test('admin can restore deleted store review @pro @a', async () => { await admin.restoreStoreReview(); }); - test('admin can permanently delete store review @pro', async () => { + test('admin can permanently delete store review @pro @a', async () => { await admin.permanentlyDeleteStoreReview(); }); - test('admin can perform store reviews bulk action @pro', async () => { + test('admin can perform store reviews bulk action @pro @a', async () => { await apiUtils.createStoreReview(VENDOR_ID, payloads.createStoreReview, payloads.customerAuth); await admin.storeReviewsBulkAction('trash'); }); - test('customer can review store @pro', async () => { + test('customer can review store @pro @c', async () => { // remove any previous reviews await apiUtils.updateBatchStoreReviews('trash', [], payloads.adminAuth); await customer.reviewStore(data.predefined.vendorStores.vendor1, data.storeReview.review(), 'create'); }); - test('customer can edit store review @pro', async () => { + test('customer can edit store review @pro @c', async () => { await customer.reviewStore(data.predefined.vendorStores.vendor1, data.storeReview.review(), 'edit'); }); - test('customer can view own review @pro', async () => { + test('customer can view own review @pro @c', async () => { await apiUtils.updateBatchStoreReviews('trash', [], payloads.adminAuth); await apiUtils.createStoreReview(VENDOR_ID, payloads.createStoreReview, payloads.customerAuth); await customer.viewOwnReview(data.predefined.vendorStores.vendor1); }); - test("vendor can't review own store @pro", async () => { + test("vendor can't review own store @pro @v", async () => { await vendor.cantReviewOwnStore(data.predefined.vendorStores.vendor1); }); }); diff --git a/tests/pw/tests/e2e/storeSupports.spec.ts b/tests/pw/tests/e2e/storeSupports.spec.ts index ef4302997f..6f05f075b2 100644 --- a/tests/pw/tests/e2e/storeSupports.spec.ts +++ b/tests/pw/tests/e2e/storeSupports.spec.ts @@ -29,58 +29,58 @@ test.describe('Store Support test (admin)', () => { await apiUtils.dispose(); }); - test('dokan store support menu page is rendering properly @pro @explo', async () => { + test('dokan store support menu page is rendering properly @pro @exp @a', async () => { await admin.adminStoreSupportRenderProperly(); }); - test('unread count decrease after admin viewing a support ticket @pro', async () => { + test('unread count decrease after admin viewing a support ticket @pro @a', async () => { await admin.decreaseUnreadSupportTicketCount(supportTicketId); }); - test('admin can view support ticket details @pro @explo', async () => { + test('admin can view support ticket details @pro @exp @a', async () => { await admin.adminViewSupportTicketDetails(supportTicketId); }); - test('admin can search support ticket @pro', async () => { + test('admin can search support ticket @pro @a', async () => { await admin.searchSupportTicket(supportTicketId); // await admin.searchSupportTicket(data.storeSupport.title); // todo: }); - test('admin can filter support tickets by vendor @pro', async () => { + test('admin can filter support tickets by vendor @pro @a', async () => { await admin.filterSupportTickets(data.storeSupport.filter.byVendor, 'by-vendor'); }); - test('admin can filter support tickets by customer @pro', async () => { + test('admin can filter support tickets by customer @pro @a', async () => { await admin.filterSupportTickets(data.storeSupport.filter.byCustomer, 'by-customer'); }); - test('admin can reply to support ticket as admin @pro', async () => { + test('admin can reply to support ticket as admin @pro @a', async () => { await admin.replySupportTicket(supportTicketId, data.storeSupport.chatReply.asAdmin); }); - test('admin can reply to support ticket as vendor @pro', async () => { + test('admin can reply to support ticket as vendor @pro @a', async () => { await admin.replySupportTicket(supportTicketId, data.storeSupport.chatReply.asVendor); }); - test('admin can disable support ticket email notification @pro', async () => { + test('admin can disable support ticket email notification @pro @a', async () => { // await apiUtils.updateSupportTicketEmailNotification(supportTicketId, { notification: true, }, payloads.adminAuth); await admin.updateSupportTicketEmailNotification(supportTicketId, 'disable'); }); - test('admin can enable support ticket email notification @pro', async () => { + test('admin can enable support ticket email notification @pro @a', async () => { await apiUtils.updateSupportTicketEmailNotification(supportTicketId, { notification: false }, payloads.adminAuth); await admin.updateSupportTicketEmailNotification(supportTicketId, 'enable'); }); - test('admin can close support ticket @pro', async () => { + test('admin can close support ticket @pro @a', async () => { await admin.closeSupportTicket(supportTicketId); }); - test('admin can reopen closed support ticket @pro', async () => { + test('admin can reopen closed support ticket @pro @a', async () => { await admin.reopenSupportTicket(closedSupportTicketId); }); - test('admin can perform store support bulk action @pro', async () => { + test('admin can perform store support bulk action @pro @a', async () => { const [, supportTicketId] = await apiUtils.createSupportTicket({ ...payloads.createSupportTicket, author: CUSTOMER_ID, meta: { store_id: VENDOR_ID } }); await admin.storeSupportBulkAction('close', supportTicketId); }); @@ -115,49 +115,49 @@ test.describe('Store Support test (customer)', () => { await apiUtils.dispose(); }); - test('customer store support menu page is rendering properly @pro @explo', async () => { + test('customer store support menu page is rendering properly @pro @exp @c', async () => { await customer.customerStoreSupportRenderProperly(); }); - test('customer can view support ticket details @pro @explo', async () => { + test('customer can view support ticket details @pro @exp @c', async () => { await customer.customerViewSupportTicketDetails(supportTicketId); }); - test('customer can ask for store support on single product @pro', async () => { + test('customer can ask for store support on single product @pro @c', async () => { await customer.storeSupport(data.predefined.simpleProduct.product1.name, data.customer.getSupport, 'product'); }); - test('customer can ask for store support on single store @pro', async () => { + test('customer can ask for store support on single store @pro @c', async () => { await customer.storeSupport(data.predefined.vendorStores.vendor1, data.customer.getSupport, 'store'); }); - test('customer can ask for store support on order details @pro', async () => { + test('customer can ask for store support on order details @pro @c', async () => { await customer.storeSupport(orderId, data.customer.getSupport, 'order'); }); - test('customer can ask for store support on order received @pro', async () => { + test('customer can ask for store support on order received @pro @c', async () => { const orderKey = responseBody.order_key; await customer.storeSupport(orderId + ',' + orderKey, data.customer.getSupport, 'order-received'); }); - test('customer can ask for store support for order @pro', async () => { + test('customer can ask for store support for order @pro @c', async () => { await customer.storeSupport(data.predefined.vendorStores.vendor1, { ...data.customer.getSupport, orderId: orderId }, 'store'); }); - test('customer can view reference order number on support ticket @pro', async () => { + test('customer can view reference order number on support ticket @pro @c', async () => { await customer.viewOrderReferenceNumberOnSupportTicket(supportTicketId, orderId); }); - test('customer can send message to support ticket @pro', async () => { + test('customer can send message to support ticket @pro @c', async () => { await customer.sendMessageToSupportTicket(supportTicketId, data.customer.supportTicket); }); - test("customer can't send message to closed support ticket @pro", async () => { + test("customer can't send message to closed support ticket @pro @c", async () => { const [, supportTicketId] = await apiUtils.createSupportTicket({ ...payloads.createSupportTicket, status: 'closed', author: CUSTOMER_ID, meta: { store_id: VENDOR_ID, order_id: orderId } }); await customer.cantSendMessageToSupportTicket(supportTicketId); }); - test('guest customer need to login before asking for store support @pro', async () => { + test('guest customer need to login before asking for store support @pro @g', async () => { await guest.storeSupport(data.predefined.vendorStores.vendor1, data.customer.getSupport, 'store'); }); }); @@ -185,46 +185,46 @@ test.describe('Store Support test (vendor)', () => { // vendor - test('vendor store support menu page is rendering properly @pro @explo', async () => { + test('vendor store support menu page is rendering properly @pro @exp @v', async () => { await vendor.vendorStoreSupportRenderProperly(); }); - test('vendor can view support ticket details @pro @explo', async () => { + test('vendor can view support ticket details @pro @exp @v', async () => { await vendor.vendorViewSupportTicketDetails(supportTicketId); }); - test('vendor can filter support tickets by customer @pro', async () => { + test('vendor can filter support tickets by customer @pro @v', async () => { await vendor.vendorFilterSupportTickets('by-customer', data.storeSupport.filter.byCustomer); }); - test('vendor can filter support tickets by date range @pro', async () => { + test('vendor can filter support tickets by date range @pro @v', async () => { await vendor.vendorFilterSupportTickets('by-date', data.date.dateRange); }); - test('vendor can search support ticket @pro', async () => { + test('vendor can search support ticket @pro @v', async () => { await vendor.vendorSearchSupportTicket('id', supportTicketId); // await vendor.vendorSearchSupportTicket('title', data.storeSupport.title); // todo: separate or in same test }); - test('vendor can reply to support ticket @pro', async () => { + test('vendor can reply to support ticket @pro @v', async () => { await vendor.vendorReplySupportTicket(supportTicketId, data.storeSupport.chatReply.reply); }); - test('vendor can close support ticket @pro', async () => { + test('vendor can close support ticket @pro @v', async () => { await vendor.vendorCloseSupportTicket(supportTicketId); }); - test('vendor can reopen closed support ticket @pro', async () => { + test('vendor can reopen closed support ticket @pro @v', async () => { const [, closedSupportTicketId] = await apiUtils.createSupportTicket({ ...payloads.createSupportTicket, status: 'closed', author: CUSTOMER_ID, meta: { store_id: VENDOR_ID } }); await vendor.vendorReopenSupportTicket(closedSupportTicketId); }); - test('vendor can close support ticket with a chat reply @pro', async () => { + test('vendor can close support ticket with a chat reply @pro @v', async () => { const [, supportTicketId] = await apiUtils.createSupportTicket({ ...payloads.createSupportTicket, author: CUSTOMER_ID, meta: { store_id: VENDOR_ID } }); await vendor.vendorCloseSupportTicketWithReply(supportTicketId, 'closing this ticket'); }); - test('vendor can reopen closed support ticket with a chat reply @pro', async () => { + test('vendor can reopen closed support ticket with a chat reply @pro @v', async () => { const [, closedSupportTicketId] = await apiUtils.createSupportTicket({ ...payloads.createSupportTicket, status: 'closed', author: CUSTOMER_ID, meta: { store_id: VENDOR_ID } }); await vendor.vendorReopenSupportTicketWithReply(closedSupportTicketId, 'reopening this ticket'); }); diff --git a/tests/pw/tests/e2e/storelisting.spec.ts b/tests/pw/tests/e2e/storelisting.spec.ts index 5bec3941ac..6e676c932d 100644 --- a/tests/pw/tests/e2e/storelisting.spec.ts +++ b/tests/pw/tests/e2e/storelisting.spec.ts @@ -23,48 +23,48 @@ test.describe('Store listing functionality test', () => { // store listing - test('dokan store list page is rendering properly @lite @explo', async () => { + test('dokan store list page is rendering properly @lite @exp @c', async () => { await customer.storeListRenderProperly(); }); - test('customer can sort stores @lite', async () => { + test('customer can sort stores @lite @c', async () => { await customer.sortStores(data.storeList.sort); }); - test('customer can change store view layout @lite', async () => { + test('customer can change store view layout @lite @c', async () => { await customer.storeViewLayout(data.storeList.layout.list); }); - test('customer can search store @lite', async () => { + test('customer can search store @lite @c', async () => { await customer.searchStore(data.predefined.vendorStores.vendor1); }); - test('customer can filter stores by category @pro', async () => { + test('customer can filter stores by category @pro @c', async () => { await customer.filterStores('by-category', 'Uncategorized'); }); - test('customer can filter stores by location @pro', async () => { + test('customer can filter stores by location @pro @c', async () => { await customer.filterStores('by-location', 'New York, NY, USA'); }); - test.skip('customer can filter stores by ratings @pro', async () => { + test.skip('customer can filter stores by ratings @pro @c', async () => { await customer.filterStores('by-ratings', '1'); }); - test('customer can filter featured stores @pro', async () => { + test('customer can filter featured stores @pro @c', async () => { await customer.filterStores('featured'); }); - test.skip('customer can filter open now stores @pro', async () => { + test.skip('customer can filter open now stores @pro @c', async () => { await customer.filterStores('open-now'); }); - test('customer can view stores on map @pro', async () => { + test('customer can view stores on map @pro @c', async () => { await customer.storeOnMap(); // await customer.storeOnMap(data.predefined.vendorStores.vendor1); }); - test('customer can go to single store from store list @lite', async () => { + test('customer can go to single store from store list @lite @c', async () => { await customer.goToSingleStoreFromStoreListing(data.predefined.vendorStores.vendor1); }); }); diff --git a/tests/pw/tests/e2e/stores.spec.ts b/tests/pw/tests/e2e/stores.spec.ts index 2555e0e4c4..c2148974ac 100644 --- a/tests/pw/tests/e2e/stores.spec.ts +++ b/tests/pw/tests/e2e/stores.spec.ts @@ -27,47 +27,47 @@ test.describe('Stores test', () => { // stores - test('admin vendors menu page is rendering properly @lite @explo', async () => { + test('admin vendors menu page is rendering properly @lite @exp @a', async () => { await admin.adminVendorsRenderProperly(); }); - test('admin can view vendor details @pro', async () => { + test('admin can view vendor details @pro @a', async () => { await admin.viewVendorDetails(VENDOR_ID); }); - test('admin can email vendor @pro', async () => { + test('admin can email vendor @pro @a', async () => { await admin.emailVendor(VENDOR_ID, data.vendor.vendorInfo.sendEmail); }); - test('admin can add vendor @lite', async () => { + test('admin can add vendor @lite @a', async () => { await admin.addVendor(data.vendor.vendorInfo); }); - test('admin can search vendors @lite', async () => { + test('admin can search vendors @lite @a', async () => { await admin.searchVendor(data.predefined.vendorStores.vendor1); }); - test("admin can disable vendor's selling capability @lite", async () => { + test("admin can disable vendor's selling capability @lite @a", async () => { await admin.updateVendor(data.predefined.vendorStores.vendor1, 'disable'); //todo: nedd different vendor for this }); - test("admin can enable vendor's selling capability @lite", async () => { + test("admin can enable vendor's selling capability @lite @a", async () => { await admin.updateVendor(data.predefined.vendorStores.vendor1, 'enable'); }); - test('admin can edit vendor info @lite', async () => { + test('admin can edit vendor info @lite @a', async () => { await admin.editVendor(data.vendor); }); - test('admin can view vendor products @lite', async () => { + test('admin can view vendor products @lite @a', async () => { await admin.viewVendor(data.predefined.vendorStores.vendor1, 'products'); }); - test('admin can view vendor orders @lite', async () => { + test('admin can view vendor orders @lite @a', async () => { await admin.viewVendor(data.predefined.vendorStores.vendor1, 'orders'); }); - test('admin can perform vendor bulk actions @lite', async () => { + test('admin can perform vendor bulk actions @lite @a', async () => { await admin.vendorBulkAction('approved'); }); }); diff --git a/tests/pw/tests/e2e/tools.spec.ts b/tests/pw/tests/e2e/tools.spec.ts index e2dd7f74cd..406b76ed90 100644 --- a/tests/pw/tests/e2e/tools.spec.ts +++ b/tests/pw/tests/e2e/tools.spec.ts @@ -22,27 +22,27 @@ test.describe('Tools test', () => { await apiUtils.dispose(); }); - test('dokan tools menu page is rendering properly @pro @explo', async () => { + test('dokan tools menu page is rendering properly @pro @exp @a', async () => { await admin.adminToolsRenderProperly(); }); - test.skip('admin can perform dokan page Installation @pro', async () => { + test.skip('admin can perform dokan page Installation @pro @a', async () => { await admin.dokanPageInstallation(); }); - test('admin can regenerate order commission @pro', async () => { + test('admin can regenerate order commission @pro @a', async () => { await admin.regenerateOrderCommission(); }); - test('admin can check for duplicate orders @pro', async () => { + test('admin can check for duplicate orders @pro @a', async () => { await admin.checkForDuplicateOrders(); }); - test('admin can set dokan setup wizard @lite', async () => { + test('admin can set dokan setup wizard @lite @a', async () => { await admin.setDokanSetupWizard(data.dokanSetupWizard); }); - test('admin can regenerate variable product variations author IDs @pro', async () => { + test('admin can regenerate variable product variations author IDs @pro @a', async () => { await admin.regenerateVariableProductVariationsAuthorIds(); }); @@ -50,12 +50,12 @@ test.describe('Tools test', () => { // await admin.importDummyData(); // }); - test('admin can clear dummy data @pro', async () => { + test('admin can clear dummy data @pro @a', async () => { await apiUtils.importDummyData(payloads.dummyData, payloads.adminAuth); await admin.clearDummyData(); }); - test('admin can test distance matrix API @pro', async () => { + test('admin can test distance matrix API @pro @a', async () => { await admin.testDistanceMatrixApi(data.tools.distanceMatrixApi); }); }); diff --git a/tests/pw/tests/e2e/vendor.spec.ts b/tests/pw/tests/e2e/vendor.spec.ts index 59207e046b..435f46b5c4 100644 --- a/tests/pw/tests/e2e/vendor.spec.ts +++ b/tests/pw/tests/e2e/vendor.spec.ts @@ -26,21 +26,21 @@ test.describe('Vendor user functionality test', () => { // await apiUtils.dispose(); }); - test('vendor can register @lite', async () => { + test('vendor can register @lite @v', async () => { await vendorPage.vendorRegister(data.vendor.vendorInfo, { ...data.vendorSetupWizard, choice: false }); }); - test('vendor can register (address fields are enabled) @lite', async () => { + test('vendor can register (address fields are enabled) @lite @v', async () => { await dbUtils.setDokanSettings(dbData.dokan.optionName.general, { ...dbData.dokan.generalSettings, enabled_address_on_reg: 'on' }); await vendorPage.vendorRegister({ ...data.vendor.vendorInfo, addressFieldsEnabled: true }, { ...data.vendorSetupWizard, choice: false }); await dbUtils.setDokanSettings(dbData.dokan.optionName.general, { ...dbData.dokan.generalSettings, enabled_address_on_reg: 'off' }); }); - test('vendor can login @lite', async () => { + test('vendor can login @lite @v', async () => { await loginPage.login(data.vendor); }); - test('vendor can logout @lite', async () => { + test('vendor can logout @lite @v', async () => { await loginPage.login(data.vendor); await loginPage.logout(); }); @@ -63,19 +63,19 @@ test.describe('Vendor functionality test', () => { await vPage.close(); }); - test('vendor can setup setup-wizard @lite', async () => { + test('vendor can setup setup-wizard @lite @v', async () => { await vendor.vendorSetupWizard(data.vendorSetupWizard); }); - test('vendor account details menu page is rendering properly @lite @explo', async () => { + test('vendor account details menu page is rendering properly @lite @exp @v', async () => { await vendor.vendorAccountDetailsRenderProperly(); }); - test('vendor update account details @lite', async () => { + test('vendor update account details @lite @v', async () => { await vendor.addVendorDetails(data.vendor); }); - test('vendor can visit own Store @lite', async () => { + test('vendor can visit own Store @lite @v', async () => { await vendor.visitStore(data.predefined.vendorStores.vendor1); }); }); diff --git a/tests/pw/tests/e2e/vendorAnalytics.spec.ts b/tests/pw/tests/e2e/vendorAnalytics.spec.ts index d6edb16b83..f4c1b63ad0 100644 --- a/tests/pw/tests/e2e/vendorAnalytics.spec.ts +++ b/tests/pw/tests/e2e/vendorAnalytics.spec.ts @@ -16,7 +16,7 @@ test.describe('Vendor analytics test', () => { await vPage.close(); }); - test('vendor analytics menu page is rendering properly @pro @explo', async () => { + test('vendor analytics menu page is rendering properly @pro @exp @v', async () => { await vendor.vendorAnalyticsRenderProperly(); }); }); diff --git a/tests/pw/tests/e2e/vendorAuction.spec.ts b/tests/pw/tests/e2e/vendorAuction.spec.ts index 2605069d9b..dfa734037c 100644 --- a/tests/pw/tests/e2e/vendorAuction.spec.ts +++ b/tests/pw/tests/e2e/vendorAuction.spec.ts @@ -37,56 +37,56 @@ test.describe('Auction Product test', () => { await apiUtils.dispose(); }); - test('admin can add auction product @pro', async () => { + test('admin can add auction product @pro @a', async () => { await admin.adminAddAuctionProduct(data.product.auction); }); - test('vendor auction menu page is rendering properly @pro @explo', async () => { + test('vendor auction menu page is rendering properly @pro @exp @v', async () => { await vendor.vendorAuctionRenderProperly(); }); - test('vendor can add auction product @pro', async () => { + test('vendor can add auction product @pro @v', async () => { await vendor.addAuctionProduct({ ...data.product.auction, name: data.product.auction.productName() }); }); - test('vendor can edit auction product @pro', async () => { + test('vendor can edit auction product @pro @v', async () => { await vendor.editAuctionProduct({ ...data.product.auction, name: auctionProductName }); }); - test('vendor can view auction product @pro', async () => { + test('vendor can view auction product @pro @v', async () => { await vendor.viewAuctionProduct(auctionProductName); }); - test("vendor can't bid own product @pro", async () => { + test("vendor can't bid own product @pro @v", async () => { await vendor.cantBidOwnProduct(auctionProductName); }); - test('vendor can search auction product @pro', async () => { + test('vendor can search auction product @pro @v', async () => { await vendor.searchAuctionProduct(auctionProductName); }); - test('vendor can permanently delete auction product @pro', async () => { + test('vendor can permanently delete auction product @pro @v', async () => { const [, , auctionProductName] = await apiUtils.createProduct(payloads.createAuctionProduct(), payloads.vendorAuth); await vendor.deleteAuctionProduct(auctionProductName); }); - test('vendor auction activity page is rendering properly @pro @explo', async () => { + test('vendor auction activity page is rendering properly @pro @exp @v', async () => { await vendor.vendorAuctionActivityRenderProperly(); }); - test('vendor can filter auction activity @pro', async () => { + test('vendor can filter auction activity @pro @v', async () => { await vendor.filterAuctionActivity(data.date.dateRange); }); - test('vendor can search auction activity @pro', async () => { + test('vendor can search auction activity @pro @v', async () => { await vendor.searchAuctionActivity(data.customer.username); }); - test('customer can bid auction product @pro', async () => { + test('customer can bid auction product @pro @c', async () => { await customer.bidAuctionProduct(auctionProductName); }); - test.skip('customer can buy auction product with buy it now price @pro', async () => { + test.skip('customer can buy auction product with buy it now price @pro @c', async () => { const [, , auctionProductName] = await apiUtils.createProduct(payloads.createAuctionProduct(), payloads.vendorAuth); // todo: buy it now price is not saved by api await customer.buyAuctionProduct(auctionProductName); }); diff --git a/tests/pw/tests/e2e/vendorBooking.spec.ts b/tests/pw/tests/e2e/vendorBooking.spec.ts index 3ae773de4d..b93a081a2a 100644 --- a/tests/pw/tests/e2e/vendorBooking.spec.ts +++ b/tests/pw/tests/e2e/vendorBooking.spec.ts @@ -38,90 +38,90 @@ test.describe('Booking Product test', () => { await apiUtils.dispose(); }); - test('admin can add booking product @pro', async () => { + test('admin can add booking product @pro @a', async () => { await admin.adminAddBookingProduct(data.product.booking); }); - test('vendor booking menu page is rendering properly @pro @explo', async () => { + test('vendor booking menu page is rendering properly @pro @exp @v', async () => { await vendor.vendorBookingRenderProperly(); }); - test('vendor manage booking page is rendering properly @pro @explo', async () => { + test('vendor manage booking page is rendering properly @pro @exp @v', async () => { await vendor.vendorManageBookingRenderProperly(); }); - test('vendor booking calendar page is rendering properly @pro @explo', async () => { + test('vendor booking calendar page is rendering properly @pro @exp @v', async () => { await vendor.vendorBookingCalendarRenderProperly(); }); - test('vendor manage booking resource page is rendering properly @pro @explo', async () => { + test('vendor manage booking resource page is rendering properly @pro @exp @v', async () => { await vendor.vendorManageResourcesRenderProperly(); }); - test('vendor can add booking product @pro', async () => { + test('vendor can add booking product @pro @v', async () => { await vendor.addBookingProduct({ ...data.product.booking, name: data.product.booking.productName() }); }); - test('vendor can edit booking product @pro', async () => { + test('vendor can edit booking product @pro @v', async () => { await vendor.editBookingProduct({ ...data.product.booking, name: bookableProductName }); }); - test('vendor can filter booking products by date @pro', async () => { + test('vendor can filter booking products by date @pro @v', async () => { await vendor.filterBookingProducts('by-date', '1'); }); - test('vendor can filter booking products by category @pro', async () => { + test('vendor can filter booking products by category @pro @v', async () => { await vendor.filterBookingProducts('by-category', 'Uncategorized'); }); - test('vendor can filter booking products by other @pro', async () => { + test('vendor can filter booking products by other @pro @v', async () => { await vendor.filterBookingProducts('by-other', 'featured'); }); - test('vendor can view booking product @pro', async () => { + test('vendor can view booking product @pro @v', async () => { await vendor.viewBookingProduct(bookableProductName); }); - test("vendor can't buy own booking product @pro", async () => { + test("vendor can't buy own booking product @pro @v", async () => { await vendor.cantBuyOwnBookingProduct(bookableProductName); }); - test('vendor can search booking product @pro', async () => { + test('vendor can search booking product @pro @v', async () => { await vendor.searchBookingProduct(bookableProductName); }); - test('vendor can duplicate booking product @pro', async () => { + test('vendor can duplicate booking product @pro @v', async () => { await vendor.duplicateBookingProduct(bookableProductName); }); - test('vendor can permanently delete booking product @pro', async () => { + test('vendor can permanently delete booking product @pro @v', async () => { const [, , bookableProductName] = await apiUtils.createBookableProduct(payloads.createBookableProduct(), payloads.vendorAuth); await vendor.deleteBookingProduct(bookableProductName); }); - test('vendor can add booking resource @pro', async () => { + test('vendor can add booking resource @pro @v', async () => { await vendor.addBookingResource(data.product.booking.resource.resourceName()); }); - test('vendor can edit booking resource @pro', async () => { + test('vendor can edit booking resource @pro @v', async () => { await vendor.editBookingResource({ ...data.product.booking.resource, name: bookingResourceName }); }); - test('vendor can delete booking resource @pro', async () => { + test('vendor can delete booking resource @pro @v', async () => { const bookingResourceName = data.product.booking.resource.resourceName(); await vendor.addBookingResource(bookingResourceName); await vendor.deleteBookingResource(bookingResourceName); }); - test('vendor can add booking for guest customer @pro', async () => { + test('vendor can add booking for guest customer @pro @v', async () => { await vendor.addBooking(bookableProductName, data.bookings); }); - test('vendor can add booking for existing customer @pro', async () => { + test('vendor can add booking for existing customer @pro @v', async () => { await vendor.addBooking(bookableProductName, data.bookings, data.customer.username); }); - test.skip('customer can buy bookable product @pro', async () => { + test.skip('customer can buy bookable product @pro @c', async () => { // todo: customer storage state gets reset somehow (from previous tests) await customer.buyBookableProduct(bookableProductName, data.bookings); }); diff --git a/tests/pw/tests/e2e/vendorDashboard.spec.ts b/tests/pw/tests/e2e/vendorDashboard.spec.ts index 135fb7b852..c33f9d7ba8 100644 --- a/tests/pw/tests/e2e/vendorDashboard.spec.ts +++ b/tests/pw/tests/e2e/vendorDashboard.spec.ts @@ -16,7 +16,7 @@ test.describe('Vendor dashboard test', () => { await vPage.close(); }); - test('vendor dashboard is rendering properly @lite @explo', async () => { + test('vendor dashboard is rendering properly @lite @exp @v', async () => { await vendor.vendorDashboardRenderProperly(); }); }); diff --git a/tests/pw/tests/e2e/vendorDeliveryTime.spec.ts b/tests/pw/tests/e2e/vendorDeliveryTime.spec.ts index a134e42acb..6ab63d1c7a 100644 --- a/tests/pw/tests/e2e/vendorDeliveryTime.spec.ts +++ b/tests/pw/tests/e2e/vendorDeliveryTime.spec.ts @@ -30,32 +30,32 @@ test.describe('Vendor delivery time test', () => { // await apiUtils.dispose(); }); - test('vendor delivery time menu page is rendering properly @pro @explo', async () => { + test('vendor delivery time menu page is rendering properly @pro @exp @v', async () => { await vendor.vendorDeliveryTimeRenderProperly(); }); - test('vendor delivery time settings menu page is rendering properly @pro @explo', async () => { + test('vendor delivery time settings menu page is rendering properly @pro @exp @v', async () => { await vendor.vendorDeliveryTimeSettingsRenderProperly(); }); - test('vendor can set delivery time settings @pro', async () => { + test('vendor can set delivery time settings @pro @v', async () => { await vendor.setDeliveryTimeSettings(data.vendor.deliveryTime); }); - test('vendor can filter delivery time @pro', async () => { + test('vendor can filter delivery time @pro @v', async () => { await vendor.filterDeliveryTime('delivery'); }); - test('vendor can change view style of delivery time calender @pro', async () => { + test('vendor can change view style of delivery time calender @pro @v', async () => { await vendor.updateCalendarView('week'); }); - test.skip('customer can buy product with delivery time @pro', async () => { + test.skip('customer can buy product with delivery time @pro @c', async () => { await customer.addProductToCart(data.predefined.simpleProduct.product1.name, 'single-product'); await customer.placeOrderWithDeliverTimeStorePickup('delivery-time', data.deliveryTime); }); - test.skip('customer can buy product with store pickup @pro', async () => { + test.skip('customer can buy product with store pickup @pro @c', async () => { await dbUtils.setDokanSettings(dbData.dokan.optionName.deliveryTime, { ...dbData.dokan.deliveryTimeSettings, allow_vendor_override_settings: 'off' }); // todo: added for: previous test is disable store pickup await customer.addProductToCart(data.predefined.simpleProduct.product1.name, 'single-product'); await customer.placeOrderWithDeliverTimeStorePickup('store-pickup', data.deliveryTime); diff --git a/tests/pw/tests/e2e/vendorProductSubscription.spec.ts b/tests/pw/tests/e2e/vendorProductSubscription.spec.ts index e568d451ac..0f620ff5d6 100644 --- a/tests/pw/tests/e2e/vendorProductSubscription.spec.ts +++ b/tests/pw/tests/e2e/vendorProductSubscription.spec.ts @@ -29,51 +29,55 @@ test.describe('Product subscriptions test', () => { await apiUtils.dispose(); }); - test('vendor user subscriptions menu page is rendering properly @pro @explo', async () => { + //vendor + + test('vendor user subscriptions menu page is rendering properly @pro @exp @v', async () => { await vendor.vendorUserSubscriptionsRenderProperly(); }); - // test.skip('vendor can view product subscription details @pro @explo', async ( ) => { - // await vendor.filterProductSubscriptions('by-customer', data.customer.username); - // }); + test.skip('vendor can view product subscription details @pro @exp @v', async () => { + await vendor.filterProductSubscriptions('by-customer', data.customer.username); + }); - // test.skip('vendor can filter user subscriptions by customer @pro', async ( ) => { - // await vendor.filterProductSubscriptions('by-customer', data.customer.username); - // }); + test.skip('vendor can filter user subscriptions by customer @pro @v', async () => { + await vendor.filterProductSubscriptions('by-customer', data.customer.username); + }); - // test.skip('vendor can filter user subscriptions by date @pro', async ( ) => { - // await vendor.filterProductSubscriptions('by-date', data.date.previousDate); - // }); + test.skip('vendor can filter user subscriptions by date @pro @v', async () => { + await vendor.filterProductSubscriptions('by-date', data.date.previousDate); + }); - // test.skip('vendor can view user subscription @pro', async ( ) => { - // await vendor.viewProductSubscription(data.customer.username); - // }); + test.skip('vendor can view user subscription @pro @v', async () => { + await vendor.viewProductSubscription(data.customer.username); + }); - // test('customer can view product subscription details @pro @explo', async ( ) => { - // await customer.customerViewProductSubscription('2328'); - // }); + // customer - // test('customer can cancel subscription @pro', async ( ) => { - // await customer.cancelProductSubscription('2328'); - // }); + test.skip('customer can view product subscription details @pro @exp @c', async () => { + await customer.customerViewProductSubscription('2328'); + }); - // test('customer can reactivate subscription @pro', async ( ) => { - // await customer.reactivateProductSubscription('2328'); - // }); + test.skip('customer can cancel subscription @pro @c', async () => { + await customer.cancelProductSubscription('2328'); + }); - // test('customer can change address of subscription @pro', async ( ) => { - // await customer.changeAddressOfProductSubscription('2328', data.customer.customerInfo.shipping); - // }); + test.skip('customer can reactivate subscription @pro @c', async () => { + await customer.reactivateProductSubscription('2328'); + }); + + test.skip('customer can change address of subscription @pro @c', async () => { + await customer.changeAddressOfProductSubscription('2328', data.customer.customerInfo.shipping); + }); - // test('customer can change payment of subscription @pro', async ( ) => { - // await customer.changePaymentOfProductSubscription('2328'); - // }); + test.skip('customer can change payment of subscription @pro @c', async () => { + await customer.changePaymentOfProductSubscription('2328'); + }); - // test('customer can renew subscription @pro', async ( ) => { - // await customer.renewProductSubscription('2328'); - // }); + test.skip('customer can renew subscription @pro @c', async () => { + await customer.renewProductSubscription('2328'); + }); - // test('customer can buy product subscription @pro', async ( ) => { - // await customer.buyProductSubscription(data.predefined.simpleSubscription.product1); - // }); + test.skip('customer can buy product subscription @pro @c', async () => { + await customer.buyProductSubscription(data.predefined.simpleSubscription.product1); + }); }); diff --git a/tests/pw/tests/e2e/vendorReports.spec.ts b/tests/pw/tests/e2e/vendorReports.spec.ts index cee02f9877..55bb91fb3f 100644 --- a/tests/pw/tests/e2e/vendorReports.spec.ts +++ b/tests/pw/tests/e2e/vendorReports.spec.ts @@ -22,11 +22,11 @@ test.describe('Vendor analytics test', () => { // await apiUtils.dispose(); }); - test('vendor reports menu page is rendering properly @pro @explo', async () => { + test('vendor reports menu page is rendering properly @pro @exp @v', async () => { await vendor.vendorReportsRenderProperly(); }); - test('vendor can export statement @pro', async () => { + test('vendor can export statement @pro @v', async () => { await vendor.exportStatement(); }); }); diff --git a/tests/pw/tests/e2e/vendorReturnRequest.spec.ts b/tests/pw/tests/e2e/vendorReturnRequest.spec.ts index 437b7b46c6..e53a3fdc34 100644 --- a/tests/pw/tests/e2e/vendorReturnRequest.spec.ts +++ b/tests/pw/tests/e2e/vendorReturnRequest.spec.ts @@ -47,43 +47,43 @@ test.describe.skip('Vendor RMA test', () => { // await apiUtils.dispose(); }); - test('vendor return request menu page is rendering properly @pro @explo', async () => { + test('vendor return request menu page is rendering properly @pro @exp @v', async () => { await vendor.vendorReturnRequestRenderProperly(); }); - test('vendor can view return request details @pro @explo', async () => { + test('vendor can view return request details @pro @exp @v', async () => { await vendor.vendorViewRmaDetails(orderId); }); - test('customer can send rma message @pro', async () => { + test('customer can send rma message @pro @c', async () => { await customer.customerSendRmaMessage(orderId, 'test customer rma message'); }); - test('vendor can send rma message @pro', async () => { + test('vendor can send rma message @pro @v', async () => { // todo: depends on customer can request warranty, remove dependency await vendor.vendorSendRmaMessage(orderId, 'test vendor rma message'); }); - test('vendor can update rma status @pro', async () => { + test('vendor can update rma status @pro @v', async () => { await vendor.vendorUpdateRmaStatus(orderId, 'processing'); }); - test('vendor can rma refund @pro', async () => { + test('vendor can rma refund @pro @v', async () => { await vendor.vendorRmaRefund(orderId, data.predefined.simpleProduct.product1.name, 'processing'); }); - test('vendor can delete rma request @pro', async () => { + test('vendor can delete rma request @pro @v', async () => { // todo:need separate rma request await vendor.vendorDeleteRmaRequest(orderId); }); // customer - test('customer return request menu page is rendering properly @pro @explo', async () => { + test('customer return request menu page is rendering properly @pro @exp @c', async () => { await customer.customerReturnRequestRenderProperly(); }); - test('customer can request warranty @pro', async () => { + test('customer can request warranty @pro @c', async () => { await customer1.addProductToCartFromSingleProductPage(data.predefined.simpleProduct.product1.name); await customer1.goToCheckout(); const orderId = await customer1.paymentOrder(); diff --git a/tests/pw/tests/e2e/vendorSettings.spec.ts b/tests/pw/tests/e2e/vendorSettings.spec.ts index e28ec56f59..4e3c58989c 100644 --- a/tests/pw/tests/e2e/vendorSettings.spec.ts +++ b/tests/pw/tests/e2e/vendorSettings.spec.ts @@ -26,23 +26,23 @@ test.describe('Vendor settings test', () => { await apiUtils.dispose(); }); - test('vendor store settings menu page is rendering properly @lite @explo', async () => { + test('vendor store settings menu page is rendering properly @lite @exp @v', async () => { await vendor.vendorStoreSettingsRenderProperly(); }); - test('vendor shipstation settings menu page is rendering properly @pro @explo', async () => { + test('vendor shipstation settings menu page is rendering properly @pro @exp @v', async () => { await vendor.vendorShipstationSettingsRenderProperly(); }); - test('vendor social profile settings menu page is rendering properly @pro @explo', async () => { + test('vendor social profile settings menu page is rendering properly @pro @exp @v', async () => { await vendor.vendorSocialProfileSettingsRenderProperly(); }); - test('vendor rma settings menu page is rendering properly @pro @explo', async () => { + test('vendor rma settings menu page is rendering properly @pro @exp @v', async () => { await vendor.vendorRmaSettingsRenderProperly(); }); - test('vendor store seo settings menu page is rendering properly @pro @explo', async () => { + test('vendor store seo settings menu page is rendering properly @pro @exp @v', async () => { await vendor.vendorStoreSeoSettingsRenderProperly(); }); @@ -50,35 +50,35 @@ test.describe('Vendor settings test', () => { // todo: ensure which settings need to reset, and test data should be what - test('vendor can set store basic settings @lite', async () => { + test('vendor can set store basic settings @lite @v', async () => { await vendor.setStoreSettings(data.vendor.vendorInfo, 'basic'); }); - test('vendor can set store address settings @lite', async () => { + test('vendor can set store address settings @lite @v', async () => { await vendor.setStoreSettings(data.vendor.vendorInfo, 'address'); }); - test('vendor can set company info settings @pro', async () => { + test('vendor can set company info settings @pro @v', async () => { await vendor.setStoreSettings(data.vendor.vendorInfo, 'company-info'); }); - test('vendor can set map settings @lite', async () => { + test('vendor can set map settings @lite @v', async () => { await vendor.setStoreSettings(data.vendor.vendorInfo, 'map'); }); - test('vendor can set terms and conditions settings @lite', async () => { + test('vendor can set terms and conditions settings @lite @v', async () => { await vendor.setStoreSettings(data.vendor.vendorInfo, 'toc'); }); - test('vendor can set open-close settings @lite', async () => { + test('vendor can set open-close settings @lite @v', async () => { await vendor.setStoreSettings(data.vendor.vendorInfo, 'open-close'); }); - test('vendor can set vacation settings @pro', async () => { + test('vendor can set vacation settings @pro @v', async () => { await vendor.setStoreSettings(data.vendor.vendorInfo, 'vacation'); }); - test('vendor can set catalog settings @lite', async () => { + test('vendor can set catalog settings @lite @v', async () => { await dbUtils.setDokanSettings(dbData.dokan.optionName.selling, dbData.dokan.sellingSettings); await vendor.setStoreSettings(data.vendor.vendorInfo, 'catalog'); // await vendor.resetCatalog(); @@ -87,37 +87,37 @@ test.describe('Vendor settings test', () => { await dbUtils.setDokanSettings(dbData.dokan.optionName.selling, { ...dbData.dokan.sellingSettings, catalog_mode_hide_add_to_cart_button: 'off', catalog_mode_hide_product_price: 'off' }); }); - test('vendor can set discount settings @pro', async () => { + test('vendor can set discount settings @pro @v', async () => { await vendor.setStoreSettings(data.vendor.vendorInfo, 'discount'); }); - test('vendor can set biography settings @pro', async () => { + test('vendor can set biography settings @pro @v', async () => { await vendor.setStoreSettings(data.vendor.vendorInfo, 'biography'); }); - test('vendor can set store support settings @pro', async () => { + test('vendor can set store support settings @pro @v', async () => { await vendor.setStoreSettings(data.vendor.vendorInfo, 'store-support'); }); - test('vendor can set min-max settings @pro', async () => { + test('vendor can set min-max settings @pro @v', async () => { await vendor.setStoreSettings(data.vendor.vendorInfo, 'min-max'); // disable min-max await dbUtils.setDokanSettings(dbData.dokan.optionName.selling, { ...dbData.dokan.sellingSettings, enable_min_max_quantity: 'off', enable_min_max_amount: 'off' }); }); - test('vendor can set shipStation settings @pro', async () => { + test('vendor can set shipStation settings @pro @v', async () => { await vendor.setShipStation(data.vendor.shipStation); }); - test('vendor can set social profile settings @pro', async () => { + test('vendor can set social profile settings @pro @v', async () => { await vendor.setSocialProfile(data.vendor.socialProfileUrls); }); - test('vendor can set rma settings @pro', async () => { + test('vendor can set rma settings @pro @v', async () => { await vendor.setRmaSettings(data.vendor.rma); }); - test('vendor can set store seo settings @pro', async () => { + test('vendor can set store seo settings @pro @v', async () => { await vendor.setStoreSeo(data.vendor.seo); }); }); diff --git a/tests/pw/tests/e2e/vendorShipping.spec.ts b/tests/pw/tests/e2e/vendorShipping.spec.ts index ed619b6c05..84871f8954 100644 --- a/tests/pw/tests/e2e/vendorShipping.spec.ts +++ b/tests/pw/tests/e2e/vendorShipping.spec.ts @@ -22,40 +22,40 @@ test.describe('Vendor shipping test', () => { // await apiUtils.dispose(); }); - test('vendor shipping settings menu page is rendering properly @pro @explo', async () => { + test('vendor shipping settings menu page is rendering properly @pro @exp @v', async () => { await vendor.vendorShippingSettingsRenderProperly(); }); - test('vendor can set shipping policy @pro', async () => { + test('vendor can set shipping policy @pro @v', async () => { await vendor.setShippingPolicies(data.vendor.shipping.shippingPolicy); }); - test('vendor can add flat rate shipping @pro', async () => { + test('vendor can add flat rate shipping @pro @v', async () => { await vendor.addShippingMethod(data.vendor.shipping.shippingMethods.flatRate); }); - test('vendor can add free shipping @pro', async () => { + test('vendor can add free shipping @pro @v', async () => { await vendor.addShippingMethod(data.vendor.shipping.shippingMethods.freeShipping); }); - test('vendor can add local pickup shipping @pro', async () => { + test('vendor can add local pickup shipping @pro @v', async () => { await vendor.addShippingMethod(data.vendor.shipping.shippingMethods.localPickup); }); - test('vendor can add table rate shipping @pro', async () => { + test('vendor can add table rate shipping @pro @v', async () => { await vendor.addShippingMethod(data.vendor.shipping.shippingMethods.tableRateShipping); }); - test('vendor can add dokan distance rate shipping @pro', async () => { + test('vendor can add dokan distance rate shipping @pro @v', async () => { await vendor.addShippingMethod(data.vendor.shipping.shippingMethods.distanceRateShipping); }); - test('vendor can edit shipping method @pro', async () => { + test('vendor can edit shipping method @pro @v', async () => { await vendor.addShippingMethod(data.vendor.shipping.shippingMethods.localPickup, false, true); await vendor.addShippingMethod(data.vendor.shipping.shippingMethods.localPickup); }); - test('vendor can delete shipping method @pro', async () => { + test('vendor can delete shipping method @pro @v', async () => { await vendor.addShippingMethod(data.vendor.shipping.shippingMethods.flatRate, true, true); // todo: add with api v2 settings group await vendor.deleteShippingMethod(data.vendor.shipping.shippingMethods.flatRate); }); diff --git a/tests/pw/tests/e2e/vendorStaff.spec.ts b/tests/pw/tests/e2e/vendorStaff.spec.ts index d662fe030f..38d0a45e0e 100644 --- a/tests/pw/tests/e2e/vendorStaff.spec.ts +++ b/tests/pw/tests/e2e/vendorStaff.spec.ts @@ -24,23 +24,23 @@ test.describe('Vendor staff test', () => { await apiUtils.dispose(); }); - test('vendor staff menu page is rendering properly @pro @explo', async () => { + test('vendor staff menu page is rendering properly @pro @exp @v', async () => { await vendor.vendorStaffRenderProperly(); }); - test('vendor can add new staff @pro', async () => { + test('vendor can add new staff @pro @v', async () => { await vendor.addStaff(data.staff()); }); - test('vendor can edit staff @pro', async () => { + test('vendor can edit staff @pro @v', async () => { await vendor.editStaff(staff); }); - test('vendor can manage staff permission @pro', async () => { + test('vendor can manage staff permission @pro @v', async () => { await vendor.manageStaffPermission(staff.firstName + ' ' + staff.lastName); }); - test('vendor can delete staff @pro', async () => { + test('vendor can delete staff @pro @v', async () => { await vendor.deleteStaff(staff.firstName + ' ' + staff.lastName); }); }); diff --git a/tests/pw/tests/e2e/vendorTools.spec.ts b/tests/pw/tests/e2e/vendorTools.spec.ts index 64df8ca151..2eb457e7a1 100644 --- a/tests/pw/tests/e2e/vendorTools.spec.ts +++ b/tests/pw/tests/e2e/vendorTools.spec.ts @@ -16,23 +16,23 @@ test.describe('Vendor tools test', () => { await vPage.close(); }); - test('vendor tools menu page is rendering properly @pro @explo', async () => { + test('vendor tools menu page is rendering properly @pro @exp @v', async () => { await vendor.vendorToolsRenderProperly(); }); - test('vendor can export product as xml @pro', async () => { + test('vendor can export product as xml @pro @v', async () => { await vendor.exportProduct('xml'); }); - test('vendor can export product as csv @pro', async () => { + test('vendor can export product as csv @pro @v', async () => { await vendor.exportProduct('csv'); }); - test('vendor can import product as xml @pro', async () => { + test('vendor can import product as xml @pro @v', async () => { await vendor.importProduct('xml', 'utils/sampleData/products.xml'); }); - test('vendor can import product as csv @pro', async () => { + test('vendor can import product as csv @pro @v', async () => { await vendor.importProduct('csv', 'utils/sampleData/products.csv'); }); }); diff --git a/tests/pw/tests/e2e/vendorVerifications.spec.ts b/tests/pw/tests/e2e/vendorVerifications.spec.ts index 51b8b2b701..4a6eed883c 100644 --- a/tests/pw/tests/e2e/vendorVerifications.spec.ts +++ b/tests/pw/tests/e2e/vendorVerifications.spec.ts @@ -24,51 +24,51 @@ test.describe('Verifications test', () => { // vendor - test('vendor verifications settings menu page is rendering properly @pro @explo', async () => { + test('vendor verifications settings menu page is rendering properly @pro @exp @v', async () => { await vendor.vendorVerificationsSettingsRenderProperly(); }); - test('vendor can send id verification request @pro', async () => { + test('vendor can send id verification request @pro @v', async () => { await vendor.sendIdVerificationRequest(data.vendor.verification); }); - test('vendor can send address verification request @pro', async () => { + test('vendor can send address verification request @pro @v', async () => { await vendor.sendAddressVerificationRequest(data.vendor.verification); }); - test('vendor can send company verification request @pro', async () => { + test('vendor can send company verification request @pro @v', async () => { await vendor.sendCompanyVerificationRequest(data.vendor.verification); }); // todo: remove dependency: admin tests depends on vendor tests - test('admin verifications menu page is rendering properly @pro @explo', async () => { + test('admin verifications menu page is rendering properly @pro @exp @a', async () => { await admin.adminVerificationsRenderProperly(); }); - // test('admin can approve ID verification request @pro', async ( ) => { + // test('admin can approve ID verification request @pro @a', async ( ) => { // await admin.approveVerificationRequest(data.predefined.vendorInfo.username, 'id', 'approve'); // }); - // test('admin can approve address verification request @pro', async ( ) => { + // test('admin can approve address verification request @pro @a', async ( ) => { // await admin.approveVerificationRequest(data.predefined.vendorInfo.username, 'address', 'approve'); // }); - // test('admin can approve company verification request @pro', async ( ) => { + // test('admin can approve company verification request @pro @a', async ( ) => { // await admin.approveVerificationRequest(data.predefined.vendorInfo.username, 'company', 'approve'); // }); // todo: admin can reject requests - // test('admin can disapprove approved ID verification request @pro', async ( ) => { + // test('admin can disapprove approved ID verification request @pro @a', async ( ) => { // await admin.disapproveVerificationRequest(data.predefined.vendorInfo.username, 'id'); // }); - // test('admin can disapprove approved address verification request @pro', async ( ) => { + // test('admin can disapprove approved address verification request @pro @a', async ( ) => { // await admin.disapproveVerificationRequest(data.predefined.vendorInfo.username, 'address'); // }); - // test('admin can disapprove approved company verification request @pro', async ( ) => { + // test('admin can disapprove approved company verification request @pro @a', async ( ) => { // await admin.disapproveVerificationRequest(data.predefined.vendorInfo.username, 'company'); // }); }); diff --git a/tests/pw/tests/e2e/wholesaleCustomers.spec.ts b/tests/pw/tests/e2e/wholesaleCustomers.spec.ts index 9e2d021cec..621c29a172 100644 --- a/tests/pw/tests/e2e/wholesaleCustomers.spec.ts +++ b/tests/pw/tests/e2e/wholesaleCustomers.spec.ts @@ -37,44 +37,44 @@ test.describe('Wholesale customers test (admin)', () => { await apiUtils.dispose(); }); - test('dokan wholesale customers menu page is rendering properly @pro @explo', async () => { + test('dokan wholesale customers menu page is rendering properly @pro @exp @a', async () => { await admin.adminWholesaleCustomersRenderProperly(); }); - test('admin can search wholesale customer @pro', async () => { + test('admin can search wholesale customer @pro @a', async () => { await admin.searchWholesaleCustomer(data.predefined.customerInfo.username1); }); - test("admin can disable customer's wholesale capability @pro", async () => { + test("admin can disable customer's wholesale capability @pro @a", async () => { await admin.updateWholesaleCustomer(data.predefined.customerInfo.username1, 'disable'); }); - test("admin can enable customer's wholesale capability @pro", async () => { + test("admin can enable customer's wholesale capability @pro @a", async () => { await admin.updateWholesaleCustomer(data.predefined.customerInfo.username1, 'enable'); }); - test('admin can edit wholesale customer @pro', async () => { + test('admin can edit wholesale customer @pro @a', async () => { await admin.editWholesaleCustomer(data.customer); }); - test('admin can view wholesale customer orders @pro', async () => { + test('admin can view wholesale customer orders @pro @a', async () => { await admin.viewWholesaleCustomerOrders(data.predefined.customerInfo.username1); }); - test('admin can delete wholesale customer @pro', async () => { + test('admin can delete wholesale customer @pro @a', async () => { await admin.updateWholesaleCustomer(data.predefined.customerInfo.username1, 'delete'); }); - test('admin can perform wholesale customer bulk action @pro', async () => { + test('admin can perform wholesale customer bulk action @pro @a', async () => { await admin.wholesaleCustomerBulkAction('activate'); }); - test('customer can become a wholesale customer', async () => { + test('customer can become a wholesale customer @c', async () => { await customerPage.customerRegister(data.customer.customerInfo); await customer.customerBecomeWholesaleCustomer(); }); - test('customer can request for become a wholesale customer', async () => { + test('customer can request for become a wholesale customer @c', async () => { await dbUtils.setDokanSettings(dbData.dokan.optionName.wholesale, { ...dbData.dokan.wholesaleSettings, need_approval_for_wholesale_customer: 'on' }); await customerPage.customerRegister(data.customer.customerInfo); await customer.customerRequestForBecomeWholesaleCustomer(); @@ -109,11 +109,11 @@ test.describe.skip('Wholesale customers test customer', () => { await cPage.close(); }); - test('customer can see wholesale price on shop archive', async () => { + test('customer can see wholesale price on shop archive @c', async () => { await customer.viewWholeSalePrice(productName); }); - test('customer can buy wholesale product', async () => { + test('customer can buy wholesale product @c', async () => { await customerPage.addProductToCart(productName, 'single-product', true, minimumWholesaleQuantity); await customer.assertWholesalePrice(wholesalePrice, minimumWholesaleQuantity); await customerPage.paymentOrder(); diff --git a/tests/pw/tests/e2e/withdraws.spec.ts b/tests/pw/tests/e2e/withdraws.spec.ts index b24547d3b9..e25c1f502d 100644 --- a/tests/pw/tests/e2e/withdraws.spec.ts +++ b/tests/pw/tests/e2e/withdraws.spec.ts @@ -35,75 +35,75 @@ test.describe('Withdraw test', () => { await apiUtils.dispose(); }); - test('admin withdraw menu page is rendering properly @lite @explo', async () => { + test('admin withdraw menu page is rendering properly @lite @exp @a', async () => { await admin.adminWithdrawsRenderProperly(); }); - test('admin can filter withdraws by vendor @lite', async () => { + test('admin can filter withdraws by vendor @lite @a', async () => { await admin.filterWithdraws(data.predefined.vendorStores.vendor1, 'by-vendor'); }); - test('admin can filter withdraws by payment methods @lite', async () => { + test('admin can filter withdraws by payment methods @lite @a', async () => { await admin.filterWithdraws(data.vendor.withdraw.defaultWithdrawMethod.paypal, 'by-payment-method'); }); - test('admin can export withdraws', async () => { + test('admin can export withdraws @a', async () => { await admin.exportWithdraws(); }); - test('admin can add note to withdraw request @lite', async () => { + test('admin can add note to withdraw request @lite @a', async () => { await admin.addNoteWithdrawRequest(data.predefined.vendorStores.vendor1, 'test withdraw note'); }); - test('admin can approve withdraw request @lite', async () => { + test('admin can approve withdraw request @lite @a', async () => { await admin.updateWithdrawRequest(data.predefined.vendorStores.vendor1, 'approve'); }); - test('admin can cancel withdraw request @lite', async () => { + test('admin can cancel withdraw request @lite @a', async () => { await apiUtils.createWithdraw({ ...payloads.createWithdraw, amount: minimumWithdrawLimit }, payloads.vendorAuth); await admin.updateWithdrawRequest(data.predefined.vendorStores.vendor1, 'cancel'); }); - test('admin can delete withdraw request @lite', async () => { + test('admin can delete withdraw request @lite @a', async () => { await apiUtils.createWithdraw({ ...payloads.createWithdraw, amount: minimumWithdrawLimit }, payloads.vendorAuth); await admin.updateWithdrawRequest(data.predefined.vendorStores.vendor1, 'delete'); }); - test('admin can perform withdraw bulk actions @lite', async () => { + test('admin can perform withdraw bulk actions @lite @a', async () => { await apiUtils.createWithdraw({ ...payloads.createWithdraw, amount: minimumWithdrawLimit }, payloads.vendorAuth); await admin.withdrawBulkAction('cancelled'); }); // vendor - test('vendor withdraw menu page is rendering properly @lite @explo', async () => { + test('vendor withdraw menu page is rendering properly @lite @exp @v', async () => { await vendor.vendorWithdrawRenderProperly(); }); - test('vendor withdraw requests page is rendering properly @lite @explo', async () => { + test('vendor withdraw requests page is rendering properly @lite @exp @v', async () => { await vendor.vendorWithdrawRequestsRenderProperly(); }); - test.skip('vendor can request withdraw @lite', async () => { + test.skip('vendor can request withdraw @lite @v', async () => { await apiUtils.cancelWithdraw('', payloads.vendorAuth); await vendor.requestWithdraw({ ...data.vendor.withdraw, minimumWithdrawAmount: minimumWithdrawLimit, currentBalance: currentBalance }); }); - test("vendor can't request withdraw when pending request exits @lite", async () => { + test("vendor can't request withdraw when pending request exits @lite @v", async () => { await apiUtils.createWithdraw({ ...payloads.createWithdraw, amount: minimumWithdrawLimit }, payloads.vendorAuth); await vendor.cantRequestWithdraw(); }); - test('vendor can cancel request withdraw @lite', async () => { + test('vendor can cancel request withdraw @lite @v', async () => { await apiUtils.createWithdraw({ ...payloads.createWithdraw, amount: minimumWithdrawLimit }, payloads.vendorAuth); await vendor.cancelWithdrawRequest(); }); - test('vendor can add auto withdraw disbursement schedule @pro', async () => { + test('vendor can add auto withdraw disbursement schedule @pro @v', async () => { await vendor.addAutoWithdrawDisbursementSchedule({ ...data.vendor.withdraw, minimumWithdrawAmount: minimumWithdrawLimit }); }); - test('vendor can add default withdraw payment methods @lite', async () => { + test('vendor can add default withdraw payment methods @lite @v', async () => { await vendor.addDefaultWithdrawPaymentMethods(data.vendor.withdraw.defaultWithdrawMethod.bankTransfer); // Cleanup await vendor.addDefaultWithdrawPaymentMethods(data.vendor.withdraw.defaultWithdrawMethod.paypal); diff --git a/tests/pw/utils/apiUtils.ts b/tests/pw/utils/apiUtils.ts index 4438648e8e..1637b3c7fc 100644 --- a/tests/pw/utils/apiUtils.ts +++ b/tests/pw/utils/apiUtils.ts @@ -732,14 +732,14 @@ export class ApiUtils { } // get activate modules - async activateModules(moduleIds: string, auth?: auth): Promise { - const [, responseBody] = await this.put(endPoints.activateModule, { data: { module: [moduleIds] }, headers: auth }); + async activateModules(moduleIds: string[], auth?: auth): Promise { + const [, responseBody] = await this.put(endPoints.activateModule, { data: { module: moduleIds }, headers: auth }); return responseBody; } // get deactivated modules - async deactivateModules(moduleIds: string, auth?: auth): Promise { - const [, responseBody] = await this.put(endPoints.deactivateModule, { data: { module: [moduleIds] }, headers: auth }); + async deactivateModules(moduleIds: string[], auth?: auth): Promise { + const [, responseBody] = await this.put(endPoints.deactivateModule, { data: { module: moduleIds }, headers: auth }); return responseBody; } @@ -1777,14 +1777,13 @@ export class ApiUtils { discount_total: responseBody.discount_total, discount_tax: responseBody.discount_tax, }, - line_items:{ + line_items: { subtotal: responseBody.line_items.subtotal, subtotal_tax: responseBody.line_items.subtotal_tax, total: responseBody.line_items.total, total_tax: responseBody.line_items.total_tax, price: responseBody.line_items.price, - - } + }, }; return orderDetails; diff --git a/tests/pw/utils/interfaces.ts b/tests/pw/utils/interfaces.ts index 1896718ad5..85b7e0dc26 100644 --- a/tests/pw/utils/interfaces.ts +++ b/tests/pw/utils/interfaces.ts @@ -594,7 +594,7 @@ export interface payment { card: string; ideal: string; }; - iDealBanks: string; + iDealBanks: string[]; disbursementMode: string; customerBankStatement: string; paymentRequestButtonType: string; diff --git a/tests/pw/utils/testData.ts b/tests/pw/utils/testData.ts index b7d196cbb0..7d844d6bfc 100644 --- a/tests/pw/utils/testData.ts +++ b/tests/pw/utils/testData.ts @@ -67,7 +67,7 @@ export const data = { dokanPro: ['dokan-pro'], activeClass: 'active', pluginName: { - dokanlite: 'dokan-lite', + dokanLite: 'dokan-lite', dokanPro: 'dokan-pro', }, }, From 25e512bea451623eec9f401848bf1b39b16712d7 Mon Sep 17 00:00:00 2001 From: shashwata Date: Wed, 14 Feb 2024 01:25:38 +0600 Subject: [PATCH 3/4] update module tests --- tests/pw/tests/e2e/modules.spec.ts | 2 +- tests/pw/utils/payloads.ts | 40 ++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/tests/pw/tests/e2e/modules.spec.ts b/tests/pw/tests/e2e/modules.spec.ts index d50ee226ee..0b489e556b 100644 --- a/tests/pw/tests/e2e/modules.spec.ts +++ b/tests/pw/tests/e2e/modules.spec.ts @@ -39,7 +39,7 @@ test.describe('Modules test', () => { }); test('admin can activate module @pro @a', async () => { - await apiUtils.deactivateModules([payloads.moduleids.auction]); + await apiUtils.deactivateModules([payloads.moduleIds.auction]); await admin.activateDeactivateModule(data.modules.modulesName.AuctionIntegration); }); diff --git a/tests/pw/utils/payloads.ts b/tests/pw/utils/payloads.ts index 1cb7576bfe..92819bc0a3 100644 --- a/tests/pw/utils/payloads.ts +++ b/tests/pw/utils/payloads.ts @@ -2211,6 +2211,46 @@ export const payloads = { // module + moduleIds: { + booking: 'booking', + colorSchemeCustomize: 'color_scheme_customizer', + deliveryTime: 'delivery_time', + elementor: 'elementor', + exportImport: 'export_import', + followStore: 'follow_store', + geolocation: 'geolocation', + germanized: 'germanized', + liveChat: 'live_chat', + liveSearch: 'live_search', + moip: 'moip', + paypalMarketplace: 'paypal_marketplace', + productAddon: 'product_addon', + productEnquiry: 'product_enquiry', + reportAbuse: 'report_abuse', + rma: 'rma', + sellerVacation: 'seller_vacation', + shipstation: 'shipstation', + auction: 'auction', + spmv: 'spmv', + storeReviews: 'store_reviews', + storeSupport: 'store_support', + stripe: 'stripe', + productAdvertising: 'product_advertising', + productSubscription: 'product_subscription', + vendorAnalytics: 'vendor_analytics', + vendorStaff: 'vendor_staff', + vsp: 'vsp', + vendorVerification: 'vendor_verification', + wholesale: 'wholesale', + rankMath: 'rank_math', + tableRateShipping: 'table_rate_shipping', + mangopay: 'mangopay', + orderMinMax: 'order_min_max', + sellerBadge: 'seller_badge', + stripeExpress: 'stripe_express', + requestForQuotation: 'request_for_quotation', + }, + deactivateModule: { module: ['booking'], }, From 49cde25b5ada01952b402dc965e092b08882ed13 Mon Sep 17 00:00:00 2001 From: shashwata Date: Wed, 14 Feb 2024 14:43:32 +0600 Subject: [PATCH 4/4] refactored suite for parallism --- tests/pw/pages/adminPage.ts | 26 ----- tests/pw/pages/loginPage.ts | 1 + ...PromoPage.ts => noticeAndPromotionPage.ts} | 32 ++++++- tests/pw/pages/shippingPage.ts | 2 +- tests/pw/tests/e2e/admin.spec.ts | 95 +++++++------------ tests/pw/tests/e2e/noticeAndPromotion.spec.ts | 30 ++++++ tests/pw/tests/e2e/proPromo.spec.ts | 30 ------ tests/pw/tests/e2e/productAddons.spec.ts | 3 +- tests/pw/tests/e2e/productAdvertising.spec.ts | 36 ++++--- tests/pw/tests/e2e/productEnquiry.spec.ts | 18 ++-- tests/pw/tests/e2e/productQA.spec.ts | 38 ++++---- tests/pw/tests/e2e/productReviews.spec.ts | 4 +- tests/pw/tests/e2e/products.spec.ts | 24 ++--- tests/pw/utils/apiUtils.ts | 7 +- 14 files changed, 163 insertions(+), 183 deletions(-) rename tests/pw/pages/{proPromoPage.ts => noticeAndPromotionPage.ts} (56%) create mode 100644 tests/pw/tests/e2e/noticeAndPromotion.spec.ts delete mode 100644 tests/pw/tests/e2e/proPromo.spec.ts diff --git a/tests/pw/pages/adminPage.ts b/tests/pw/pages/adminPage.ts index 3d87eaa723..a75896e03a 100644 --- a/tests/pw/pages/adminPage.ts +++ b/tests/pw/pages/adminPage.ts @@ -143,30 +143,4 @@ export class AdminPage extends BasePage { await this.click(selector.admin.dokan.dokanSetupWizard.visitDokanDashboard); await this.toBeVisible(selector.admin.dokan.dashboard.dashboardText); } - - // dokan notice & promotion - - // dokan notice - async dokanPromotion() { - await this.goto(data.subUrls.backend.dokan.dokan); - // dokan promotion elements are visible - const isPromotionVisible = await this.isVisible(selector.admin.dokan.promotion.promotion); - if (isPromotionVisible) { - await this.multipleElementVisible(selector.admin.dokan.promotion); - } else { - console.log('No promotion is ongoing'); - } - } - - // dokan notice - async dokanNotice() { - await this.goto(data.subUrls.backend.dokan.dokan); - - // dokan notice elements are visible - const isPromotionVisible = await this.isVisible(selector.admin.dokan.promotion.promotion); - isPromotionVisible ? await this.notToHaveCount(selector.admin.dokan.notice.noticeDiv1, 0) : await this.notToHaveCount(selector.admin.dokan.notice.noticeDiv, 0); - await this.notToHaveCount(selector.admin.dokan.notice.slider, 0); - await this.notToHaveCount(selector.admin.dokan.notice.sliderPrev, 0); - await this.notToHaveCount(selector.admin.dokan.notice.sliderNext, 0); - } } diff --git a/tests/pw/pages/loginPage.ts b/tests/pw/pages/loginPage.ts index 2c54f3a6c1..e45185c6c2 100644 --- a/tests/pw/pages/loginPage.ts +++ b/tests/pw/pages/loginPage.ts @@ -77,6 +77,7 @@ export class LoginPage extends BasePage { // admin logout async logoutBackend(): Promise { + await this.goIfNotThere(data.subUrls.backend.adminLogin); await this.hover(selector.backend.userMenu); await this.clickAndWaitForResponseAndLoadState(data.subUrls.backend.adminLogout, selector.backend.logout, 302); const loggedInUser = await this.getCurrentUser(); diff --git a/tests/pw/pages/proPromoPage.ts b/tests/pw/pages/noticeAndPromotionPage.ts similarity index 56% rename from tests/pw/pages/proPromoPage.ts rename to tests/pw/pages/noticeAndPromotionPage.ts index 5763f97741..4910fb9ea4 100644 --- a/tests/pw/pages/proPromoPage.ts +++ b/tests/pw/pages/noticeAndPromotionPage.ts @@ -3,13 +3,39 @@ import { AdminPage } from '@pages/adminPage'; import { selector } from '@pages/selectors'; import { data } from '@utils/testData'; -export class ProPromoPage extends AdminPage { +export class NoticeAndPromotionPage extends AdminPage { constructor(page: Page) { super(page); } - // dokan pro promo - async dokanProPromo() { + // dokan notice & promotion + + // dokan notice + async dokanNoticeRenderProperly() { + await this.goto(data.subUrls.backend.dokan.dokan); + + // dokan notice elements are visible + const isPromotionVisible = await this.isVisible(selector.admin.dokan.promotion.promotion); + isPromotionVisible ? await this.notToHaveCount(selector.admin.dokan.notice.noticeDiv1, 0) : await this.notToHaveCount(selector.admin.dokan.notice.noticeDiv, 0); + await this.notToHaveCount(selector.admin.dokan.notice.slider, 0); + await this.notToHaveCount(selector.admin.dokan.notice.sliderPrev, 0); + await this.notToHaveCount(selector.admin.dokan.notice.sliderNext, 0); + } + + // dokan promotion + async dokanPromotionRenderProperly() { + await this.goto(data.subUrls.backend.dokan.dokan); + // dokan promotion elements are visible + const isPromotionVisible = await this.isVisible(selector.admin.dokan.promotion.promotion); + if (isPromotionVisible) { + await this.multipleElementVisible(selector.admin.dokan.promotion); + } else { + console.log('No promotion is ongoing'); + } + } + + // dokan pro promotion + async dokanProPromotionRenderProperly() { // dokan promo banner await this.goIfNotThere(data.subUrls.backend.dokan.dokan); diff --git a/tests/pw/pages/shippingPage.ts b/tests/pw/pages/shippingPage.ts index d0817620d2..56d2c6591a 100644 --- a/tests/pw/pages/shippingPage.ts +++ b/tests/pw/pages/shippingPage.ts @@ -5,7 +5,7 @@ import { data } from '@utils/testData'; import { helpers } from '@utils/helpers'; // import { shipping } from '@utils/interfaces'; -export class shippingPage extends AdminPage { +export class ShippingPage extends AdminPage { constructor(page: Page) { super(page); } diff --git a/tests/pw/tests/e2e/admin.spec.ts b/tests/pw/tests/e2e/admin.spec.ts index 76ddd22d9b..ee05f947b9 100644 --- a/tests/pw/tests/e2e/admin.spec.ts +++ b/tests/pw/tests/e2e/admin.spec.ts @@ -1,95 +1,70 @@ import { test, Page } from '@playwright/test'; import { LoginPage } from '@pages/loginPage'; import { AdminPage } from '@pages/adminPage'; -// import { ApiUtils } from '@utils/apiUtils'; +import { TaxPage } from '@pages/taxPage'; +import { ShippingPage } from '@pages/shippingPage'; import { data } from '@utils/testData'; -// import { payloads } from '@utils/payloads'; - -test.describe('Admin user functionality test', () => { - test.use(data.auth.noAuth); - - let loginPage: LoginPage; - let page: Page; - - test.beforeAll(async ({ browser }) => { - const context = await browser.newContext(); - page = await context.newPage(); - loginPage = new LoginPage(page); - }); - - test.afterAll(async () => { - await page.close(); - }); - - test('admin can login @lite @a', async () => { - await loginPage.adminLogin(data.admin); - }); - - test('admin can logout @lite @a', async () => { - await loginPage.adminLogin(data.admin); - await loginPage.logoutBackend(); - }); -}); test.describe('Admin functionality test', () => { let adminPage: AdminPage; + let taxPage: TaxPage; + let shippingPage: ShippingPage; let aPage: Page; test.beforeAll(async ({ browser }) => { const adminContext = await browser.newContext(data.auth.adminAuth); aPage = await adminContext.newPage(); adminPage = new AdminPage(aPage); + taxPage = new TaxPage(aPage); + shippingPage = new ShippingPage(aPage); }); test.afterAll(async () => { await aPage.close(); }); - // test('admin can add categories @lite', async ( ) => { - // await adminPage.addCategory(data.product.category.randomCategory()); - // }); + test('admin can login @lite @a', async ({ page }) => { + const loginPage = new LoginPage(page); + await loginPage.adminLogin(data.admin); + }); - // test('admin can add attributes @lite', async ( ) => { - // await adminPage.addAttributes(data.product.attribute.randomAttribute()); - // }); + test('admin can logout @lite @a', async ({ page }) => { + const loginPage = new LoginPage(page); + await loginPage.adminLogin(data.admin); + await loginPage.logoutBackend(); + }); // settings // tax settings - // test('admin can set standard tax rate', async ( ) => { - // await adminPage.addStandardTaxRate(data.tax) - // }) - // shipping settings - // test('admin can set flat rate shipping', async ( ) => { - // await adminPage.addShippingMethod(data.shipping.shippingMethods.flatRate); - // }); + test('admin can set standard tax rate @lite @a', async () => { + await taxPage.addStandardTaxRate(data.tax); + }); - // test('admin can set free shipping', async ( ) => { - // await adminPage.addShippingMethod(data.shipping.shippingMethods.freeShipping) - // }) + // shipping settings - // test('admin can set local pickup shipping', async ( ) => { - // await adminPage.addShippingMethod(data.shipping.shippingMethods.localPickup) - // }) + test.skip('admin can set flat rate shipping @lite @a', async () => { + await shippingPage.addShippingMethod(data.shipping.shippingMethods.flatRate); + }); - // test('admin can set table rate shipping', async ( ) => { - // await adminPage.addShippingMethod(data.shipping.shippingMethods.tableRateShipping) - // }) + test.skip('admin can set free shipping @lite @a', async () => { + await shippingPage.addShippingMethod(data.shipping.shippingMethods.freeShipping); + }); - // test('admin can set distance rate shipping', async ( ) => { - // await adminPage.addShippingMethod(data.shipping.shippingMethods.distanceRateShipping) - // }) + test.skip('admin can set local pickup shipping @lite @a', async () => { + await shippingPage.addShippingMethod(data.shipping.shippingMethods.localPickup); + }); - // test('admin can set vendor shipping', async ( ) => { - // await adminPage.addShippingMethod(data.shipping.shippingMethods.vendorShipping) - // }) + test.skip('admin can set table rate shipping @pro @a', async () => { + await shippingPage.addShippingMethod(data.shipping.shippingMethods.tableRateShipping); + }); - test('dokan notice @lite @a', async () => { - await adminPage.dokanNotice(); + test.skip('admin can set distance rate shipping @pro @a', async () => { + await shippingPage.addShippingMethod(data.shipping.shippingMethods.distanceRateShipping); }); - test('dokan promotion @lite @a', async () => { - await adminPage.dokanPromotion(); + test.skip('admin can set vendor shipping @pro @a', async () => { + await shippingPage.addShippingMethod(data.shipping.shippingMethods.vendorShipping); }); }); diff --git a/tests/pw/tests/e2e/noticeAndPromotion.spec.ts b/tests/pw/tests/e2e/noticeAndPromotion.spec.ts new file mode 100644 index 0000000000..e2b4fa4ae5 --- /dev/null +++ b/tests/pw/tests/e2e/noticeAndPromotion.spec.ts @@ -0,0 +1,30 @@ +import { test, Page } from '@playwright/test'; +import { NoticeAndPromotionPage } from '@pages/noticeAndPromotionPage'; +import { data } from '@utils/testData'; + +test.describe('Dokan pro feature promo test', () => { + let admin: NoticeAndPromotionPage; + let aPage: Page; + + test.beforeAll(async ({ browser }) => { + const adminContext = await browser.newContext(data.auth.adminAuth); + aPage = await adminContext.newPage(); + admin = new NoticeAndPromotionPage(aPage); + }); + + test.afterAll(async () => { + await aPage.close(); + }); + + test('dokan notice is rendering properly @lite @exp @a', async () => { + await admin.dokanNoticeRenderProperly(); + }); + + test('dokan promotion is rendering properly @lite @exp @a', async () => { + await admin.dokanPromotionRenderProperly(); + }); + + test('dokan pro features promotions are rendering properly @liteOnly @exp @a', async () => { + await admin.dokanProPromotionRenderProperly(); + }); +}); diff --git a/tests/pw/tests/e2e/proPromo.spec.ts b/tests/pw/tests/e2e/proPromo.spec.ts deleted file mode 100644 index 1149da1326..0000000000 --- a/tests/pw/tests/e2e/proPromo.spec.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { test, request, Page } from '@playwright/test'; -import { ProPromoPage } from '@pages/proPromoPage'; -import { ApiUtils } from '@utils/apiUtils'; -import { data } from '@utils/testData'; -// import { payloads } from '@utils/payloads'; - -test.describe('Dokan pro feature promo test', () => { - let admin: ProPromoPage; - let aPage: Page; - let apiUtils: ApiUtils; - - test.beforeAll(async ({ browser }) => { - const adminContext = await browser.newContext(data.auth.adminAuth); - aPage = await adminContext.newPage(); - admin = new ProPromoPage(aPage); - - apiUtils = new ApiUtils(await request.newContext()); - }); - - test.afterAll(async () => { - await aPage.close(); - await apiUtils.dispose(); - }); - - test('dokan pro features promo @liteOnly @a', async () => { - // await apiUtils.updatePlugin('dokan-pro/dokan-pro', { status:'inactive' }, payloads.adminAuth); - await admin.dokanProPromo(); - // await apiUtils.updatePlugin('dokan-pro/dokan-pro', { status:'active' }, payloads.adminAuth); - }); -}); diff --git a/tests/pw/tests/e2e/productAddons.spec.ts b/tests/pw/tests/e2e/productAddons.spec.ts index 9fae12df14..b11b964e54 100644 --- a/tests/pw/tests/e2e/productAddons.spec.ts +++ b/tests/pw/tests/e2e/productAddons.spec.ts @@ -10,7 +10,6 @@ const { VENDOR_ID } = process.env; test.describe('Product addon functionality test', () => { let vendor: ProductAddonsPage; let vPage: Page; - let addonId: string; let addonName: string; let addonFieldTitle: string; let apiUtils: ApiUtils; @@ -28,7 +27,7 @@ test.describe('Product addon functionality test', () => { vendor = new ProductAddonsPage(vPage); apiUtils = new ApiUtils(await request.newContext()); - [addonId, addonName, addonFieldTitle] = await createVendorProductAddon(); + [, addonName, addonFieldTitle] = await createVendorProductAddon(); }); test.afterAll(async () => { diff --git a/tests/pw/tests/e2e/productAdvertising.spec.ts b/tests/pw/tests/e2e/productAdvertising.spec.ts index 05cc8a2ea9..cf0c01ccf4 100644 --- a/tests/pw/tests/e2e/productAdvertising.spec.ts +++ b/tests/pw/tests/e2e/productAdvertising.spec.ts @@ -11,6 +11,7 @@ test.describe('Product Advertising test', () => { let aPage: Page, vPage: Page; let apiUtils: ApiUtils; let productName: string; + let advertisedProduct: string; test.beforeAll(async ({ browser }) => { const adminContext = await browser.newContext(data.auth.adminAuth); @@ -23,7 +24,7 @@ test.describe('Product Advertising test', () => { apiUtils = new ApiUtils(await request.newContext()); [, , productName] = await apiUtils.createProduct(payloads.createProduct(), payloads.vendorAuth); - await apiUtils.createProductAdvertisement(payloads.createProduct(), payloads.vendorAuth); + [, , advertisedProduct] = await apiUtils.createProductAdvertisement(payloads.createProduct(), payloads.vendorAuth); }); test.afterAll(async () => { @@ -32,6 +33,8 @@ test.describe('Product Advertising test', () => { await apiUtils.dispose(); }); + //admin + test('dokan product advertising menu page is rendering properly @pro @exp', async () => { await admin.adminProductAdvertisingRenderProperly(); }); @@ -41,7 +44,7 @@ test.describe('Product Advertising test', () => { }); test('admin can search advertised product @pro @a', async () => { - await admin.searchAdvertisedProduct(productName); + await admin.searchAdvertisedProduct(advertisedProduct); }); test('admin can filter advertised product by stores @pro @a', async () => { @@ -57,28 +60,33 @@ test.describe('Product Advertising test', () => { }); test('admin can delete advertised product @pro @a', async () => { - await admin.updateAdvertisedProduct(productName, 'delete'); + const [, , advertisedProduct] = await apiUtils.createProductAdvertisement(payloads.createProduct(), payloads.vendorAuth); + await admin.updateAdvertisedProduct(advertisedProduct, 'delete'); }); - test('admin can perform product advertising bulk action @pro @a', async () => { - // await apiUtils.createProductAdvertisement(payloads.createProduct(), payloads.vendorAuth); + test.skip('admin can perform product advertising bulk action @pro @a', async () => { + // todo: might cause other tests to fail in parallel await admin.productAdvertisingBulkAction('delete'); }); + // vendor + test('vendor can buy product advertising @pro @v', async () => { //todo: p1_v1 status gets pending review; need to resolve - [, , productName] = await apiUtils.createProduct(payloads.createProduct(), payloads.vendorAuth); + const [, , productName] = await apiUtils.createProduct(payloads.createProduct(), payloads.vendorAuth); const orderId = await vendor.buyProductAdvertising(productName); await apiUtils.updateOrderStatus(orderId, 'wc-completed', payloads.adminAuth); }); - // test('vendor can buy booking product advertising @pro @v', async ( ) => { // todo: - // const orderId = await vendor.buyProductAdvertising(data.productAdvertisement.advertisedProduct); - // await apiUtils.updateOrderStatus(orderId, 'wc-completed', payloads.adminAuth); - // }); + test.skip('vendor can buy booking product advertising @pro @v', async () => { + // todo: create booking product via api + const orderId = await vendor.buyProductAdvertising(data.productAdvertisement.advertisedProduct); + await apiUtils.updateOrderStatus(orderId, 'wc-completed', payloads.adminAuth); + }); - // test('vendor can buy auction product advertising @pro @v', async ( ) => { // todo: - // const orderId = await vendor.buyProductAdvertising(data.productAdvertisement.advertisedProduct); - // await apiUtils.updateOrderStatus(orderId, 'wc-completed', payloads.adminAuth); - // }); + test.skip('vendor can buy auction product advertising @pro @v', async () => { + // todo: create auction product via api + const orderId = await vendor.buyProductAdvertising(data.productAdvertisement.advertisedProduct); + await apiUtils.updateOrderStatus(orderId, 'wc-completed', payloads.adminAuth); + }); }); diff --git a/tests/pw/tests/e2e/productEnquiry.spec.ts b/tests/pw/tests/e2e/productEnquiry.spec.ts index 5d0f0d3aa5..73cfaaddbc 100644 --- a/tests/pw/tests/e2e/productEnquiry.spec.ts +++ b/tests/pw/tests/e2e/productEnquiry.spec.ts @@ -4,14 +4,14 @@ 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'; +// import { payloads } from '@utils/payloads'; -const { VENDOR_ID, CUSTOMER_ID } = process.env; +const { VENDOR_ID, CUSTOMER_ID, PRODUCT_ID } = process.env; test.describe('Product Enquiry test', () => { let customer: ProductEnquiryPage; let guest: ProductEnquiryPage; - let cPage: Page, gPage: Page; + let cPage: Page; let apiUtils: ApiUtils; test.beforeAll(async ({ browser }) => { @@ -19,18 +19,13 @@ test.describe('Product Enquiry test', () => { cPage = await customerContext.newPage(); customer = new ProductEnquiryPage(cPage); - const guestContext = await browser.newContext(data.auth.noAuth); - gPage = await guestContext.newPage(); - guest = new ProductEnquiryPage(gPage); - apiUtils = new ApiUtils(await request.newContext()); - const productId = await apiUtils.getProductId(data.predefined.simpleProduct.product1.name, payloads.vendorAuth); - await dbUtils.createAbuseReport(dbData.dokan.createAbuseReport, productId, VENDOR_ID, CUSTOMER_ID); + // const productId = await apiUtils.getProductId(data.predefined.simpleProduct.product1.name, payloads.vendorAuth); //todo: might not needed + await dbUtils.createAbuseReport(dbData.dokan.createAbuseReport, PRODUCT_ID, VENDOR_ID, CUSTOMER_ID); }); test.afterAll(async () => { await cPage.close(); - await gPage.close(); await apiUtils.dispose(); }); @@ -38,7 +33,8 @@ test.describe('Product Enquiry test', () => { await customer.enquireProduct(data.predefined.simpleProduct.product1.name, data.product.enquiry); }); - test('guest customer can enquire product @pro @g', async () => { + test('guest customer can enquire product @pro @g', async ({ page }) => { + guest = new ProductEnquiryPage(page); await guest.enquireProduct(data.predefined.simpleProduct.product1.name, data.product.enquiry); }); }); diff --git a/tests/pw/tests/e2e/productQA.spec.ts b/tests/pw/tests/e2e/productQA.spec.ts index f2444443dd..fb715b7bb6 100644 --- a/tests/pw/tests/e2e/productQA.spec.ts +++ b/tests/pw/tests/e2e/productQA.spec.ts @@ -12,7 +12,7 @@ test.describe('Product QA functionality test', () => { let vendor: ProductQAPage; let customer: ProductQAPage; let guest: ProductQAPage; - let aPage: Page, vPage: Page, cPage: Page, gPage: Page; + let aPage: Page, vPage: Page, cPage: Page; let apiUtils: ApiUtils; let questionId: string; let answerId: string; @@ -22,17 +22,13 @@ test.describe('Product QA functionality test', () => { aPage = await adminContext.newPage(); admin = new ProductQAPage(aPage); - // const vendorContext = await browser.newContext(data.auth.vendorAuth); - // vPage = await vendorContext.newPage(); - // vendor = new ProductQAPage(vPage); + const vendorContext = await browser.newContext(data.auth.vendorAuth); + vPage = await vendorContext.newPage(); + vendor = new ProductQAPage(vPage); - // const customerContext = await browser.newContext(data.auth.customerAuth); - // cPage = await customerContext.newPage(); - // customer = new ProductQAPage(cPage); - - // const guestContext = await browser.newContext(data.auth.noAuth); - // gPage = await guestContext.newPage(); - // guest = new ProductQAPage(gPage); + const customerContext = await browser.newContext(data.auth.customerAuth); + cPage = await customerContext.newPage(); + customer = new ProductQAPage(cPage); apiUtils = new ApiUtils(await request.newContext()); [, questionId] = await apiUtils.createProductQuestion({ ...payloads.createProductQuestion(), product_id: PRODUCT_ID }, payloads.customerAuth); @@ -41,9 +37,8 @@ test.describe('Product QA functionality test', () => { test.afterAll(async () => { await aPage.close(); - // await vPage.close(); - // await cPage.close(); - // await gPage.close(); + await vPage.close(); + await cPage.close(); await apiUtils.dispose(); }); @@ -60,9 +55,9 @@ test.describe('Product QA functionality test', () => { // todo: admin receive notification for new question - // test('unread count decrease after admin viewing a question @pro', async () => { - // await admin.decreaseUnreadQuestionCount(); - // }); + test.skip('unread count decrease after admin viewing a question @pro', async () => { + await admin.decreaseUnreadQuestionCount(); + }); test('admin can filter questions by vendor @pro @a', async () => { await admin.filterQuestions(data.questionAnswers.filter.byVendor, 'by-vendor'); @@ -120,9 +115,9 @@ test.describe('Product QA functionality test', () => { // todo: vendor receive notification for new question - // test('unread count decrease after admin viewing a question @pro @a', async () => { - // await admin.decreaseUnreadQuestionCount(); - // }); + test.skip('unread count decrease after vendor viewing a question @pro @a', async () => { + await admin.decreaseUnreadQuestionCount(); + }); test('vendor can filter questions @pro @v', async () => { await vendor.vendorFilterQuestions(data.predefined.simpleProduct.product1.name); @@ -157,7 +152,8 @@ test.describe('Product QA functionality test', () => { // guest - test('guest customer need to sign-in/signup post question @pro @g', async () => { + test('guest customer need to sign-in/signup post question @pro @g', async ({ page }) => { + guest = new ProductQAPage(page); await guest.postQuestion(data.predefined.simpleProduct.product1.name, data.questionAnswers); }); }); diff --git a/tests/pw/tests/e2e/productReviews.spec.ts b/tests/pw/tests/e2e/productReviews.spec.ts index eac6e3889c..4da88e9dac 100644 --- a/tests/pw/tests/e2e/productReviews.spec.ts +++ b/tests/pw/tests/e2e/productReviews.spec.ts @@ -35,6 +35,7 @@ test.describe('Product Reviews test', () => { }); test('vendor can unApprove product review @pro @v', async () => { + const [, , reviewMessage] = await apiUtils.createProductReview(PRODUCT_ID, payloads.createProductReview(), payloads.vendorAuth); await vendor.updateProductReview('unApprove', reviewMessage); }); @@ -63,7 +64,8 @@ test.describe('Product Reviews test', () => { await vendor.updateProductReview('permanently-delete', reviewMessage); }); - test('vendor can perform product reviews bulk action @pro @v', async () => { + test.skip('vendor can perform product reviews bulk action @pro @v', async () => { + // todo: might cause other tests to fail in parallel await vendor.productReviewsBulkActions('hold'); }); }); diff --git a/tests/pw/tests/e2e/products.spec.ts b/tests/pw/tests/e2e/products.spec.ts index a792f146a6..da1e23df22 100644 --- a/tests/pw/tests/e2e/products.spec.ts +++ b/tests/pw/tests/e2e/products.spec.ts @@ -30,6 +30,8 @@ test.describe('Product functionality test', () => { await apiUtils.dispose(); }); + //admin + test('admin can add product category @lite @a', async () => { await admin.addCategory(data.product.category.randomCategory()); }); @@ -42,17 +44,17 @@ test.describe('Product functionality test', () => { await admin.addSimpleProduct(data.product.simple); }); - // test('admin can add variable product @pro @a', async ( ) => { - // await admin.addVariableProduct(data.product.variable); - // }); + test.skip('admin can add variable product @pro @a', async () => { + await admin.addVariableProduct(data.product.variable); + }); - test('admin can add simple subscription @pro @a', async () => { + test('admin can add simple subscription product @pro @a', async () => { await admin.addSimpleSubscription(data.product.simpleSubscription); }); - // test('admin can add variable subscription @pro @a', async ( ) => { - // await admin.addVariableSubscription(data.product.variableSubscription); - // }); + test.skip('admin can add variable subscription product @pro @a', async () => { + await admin.addVariableSubscription(data.product.variableSubscription); + }); test('admin can add external product @lite @a', async () => { await admin.addExternalProduct(data.product.external); @@ -131,7 +133,7 @@ test.describe('Product functionality test', () => { }); test('vendor can view product @lite @v', async () => { - await vendor.viewProduct(data.predefined.simpleProduct.product1.name); + await vendor.viewProduct(productName); }); test("vendor can't buy own product @pro @v", async () => { @@ -150,9 +152,9 @@ test.describe('Product functionality test', () => { await vendor.addProductDescription(productName, data.product.productInfo.description); }); - // test('vendor can add product quantity discount @pro @v', async ( ) => { - // await vendor.addProductQuantityDiscount(data.predefined.simpleProduct.product1.name, data.product.productInfo.quantityDiscount); - // }); + test.skip('vendor can add product quantity discount @pro @v', async ( ) => { + await vendor.addProductQuantityDiscount(productName, data.product.productInfo.quantityDiscount); + }); test('vendor can add product rma options @pro @v', async () => { await vendor.addProductRmaOptions(productName, data.vendor.rma); diff --git a/tests/pw/utils/apiUtils.ts b/tests/pw/utils/apiUtils.ts index 1637b3c7fc..fac96ce1f4 100644 --- a/tests/pw/utils/apiUtils.ts +++ b/tests/pw/utils/apiUtils.ts @@ -840,12 +840,13 @@ export class ApiUtils { } // create a product advertisement - async createProductAdvertisement(product: object, auth?: auth): Promise<[responseBody, string]> { + async createProductAdvertisement(product: object, auth?: auth): Promise<[responseBody, string, string]> { const [body, productId] = await this.createProduct(product, auth); const sellerId = body.store.id; const [, responseBody] = await this.post(endPoints.createProductAdvertisement, { data: { vendor_id: sellerId, product_id: productId }, headers: payloads.adminAuth }); - const productAdvertisementId = String(responseBody?.id); - return [responseBody, productAdvertisementId]; + const advertisementId = String(responseBody?.id); + const advertisedProduct = responseBody?.product_title; + return [responseBody, advertisementId, advertisedProduct]; } /**