diff --git a/tests/pw/.env.example b/tests/pw/.env.example index 86fd70496f..8c07f2f1b9 100644 --- a/tests/pw/.env.example +++ b/tests/pw/.env.example @@ -1,38 +1,51 @@ # Plugin Configuration -ADMIN=John_Doe [Admin username] -ADMIN_PASSWORD=AdminPass123 [Password for the admin account] -VENDOR=David_Johnson [Vendor username] -VENDOR2=jhonathon_Smith [Vendor username] -CUSTOMER=Michael_Williams [Customer username] -USER_PASSWORD=Passw0rd123 [Password for all other users] -DOKAN_PRO=true [Dokan pro active status] -LICENSE_KEY=license_key [Dokan License key] -GMAP=map_key [Google Maps API key] -MAPBOX=mapbox_key [Mapbox Maps API key] -TALKJS_APP_ID=talkjs_app_id [TalkJS App ID] -TALKJS_APP_SECRET=talkjs_app_secret [TalkJS App Secret] -VONAGE_API_KEY=vonage_key [Vonage SMS API key] -VONAGE_API_SECRET=vonage_secret [Vonage SMS API secret] -FB_APP_ID=facebook_app_id [Facebook App ID] -FB_APP_SECRET=facebook_app_secret [Facebook App secret] -PRINTFUL_APP_ID=printful_app_id [Printful App ID] -PRINTFUL_APP_SECRET=printful_app_secret [Printful App secret] -RECAPTCHA_SITE_KEY=recaptcha_site_key [reCAPTCHA site key] -RECAPTCHA_SECRET_KEY=recaptcha_secret_key [reCAPTCHA secret key] +ADMIN=John_Doe [Admin username] +ADMIN_PASSWORD=AdminPass123 [Password for the admin account] +VENDOR=David_Johnson [Vendor username] +VENDOR2=Jhonathon_Smith [Vendor username] +CUSTOMER=Michael_Williams [Customer username] +CUSTOMER2=Robert_Thomas [Customer username] +USER_PASSWORD=Passw0rd123 [Password for all other users] +DOKAN_PRO=true [Dokan pro active status] +LICENSE_KEY=license_key [Dokan License key] +GMAP=map_key [Google Maps API key] +MAPBOX=mapbox_key [Mapbox Maps API key] +TALKJS_APP_ID=talkjs_app_id [TalkJS App ID] +TALKJS_APP_SECRET=talkjs_app_secret [TalkJS App Secret] +VONAGE_API_KEY=vonage_key [Vonage SMS API key] +VONAGE_API_SECRET=vonage_secret [Vonage SMS API secret] +FB_APP_ID=facebook_app_id [Facebook App ID] +FB_APP_SECRET=facebook_app_secret [Facebook App secret] +PRINTFUL_APP_ID=printful_app_id [Printful App ID] +PRINTFUL_APP_SECRET=printful_app_secret [Printful App secret] +RECAPTCHA_SITE_KEY=recaptcha_site_key [reCAPTCHA site key] +RECAPTCHA_SECRET_KEY=recaptcha_secret_key [reCAPTCHA secret key] +TEST_PUBLISH_KEY_STRIPE=test_publish_key_stripe [Stripe publish key] +TEST_SECRET_KEY_STRIPE=test_secret_key_stripe [Stripe secret key] +TEST_CLIENT_ID_STRIPE=test_client_id_stripe [Stripe client ID] +SANDBOX_CLIENT_ID_MANGOPAY=sandbox_client_id_mangopay [Mangopay sandbox client ID] +SANDBOX_API_KEY_MANGOPAY=sandbox_api_key_mangopay [Mangopay sandbox API key] +TEST_KEY_ID_RAZORPAY=test_key_id_razorpay [Razorpay key ID] +TEST_KEY_SECRET_RAZORPAY=test_key_secret_razorpay [Razorpay key secret] +TEST_PUBLISH_KEY_STRIPE_EXPRESS=test_publish_key_stripe_express [Stripe Express publish key] +TEST_SECRET_KEY_STRIPE_EXPRESS=test_secret_key_stripe_express [Stripe Express secret key] +TEST_MERCHANT_ID_PAYPAL_MARKETPLACE=test_merchant_id [PayPal Merchant ID] +TEST_CLIENT_ID_PAYPAL_MARKETPLACE=test_client_id_paypal_marketplace [PayPal Marketplace Client ID] +TEST_CLIENT_SECRET_PAYPAL_MARKETPLACE=test_client_secret_paypal_marketplace [PayPal Marketplace Client Secret] # Playwright Configuration -BASE_URL=https://example.com [Base URL of the test site] -CI=true [CI/CD environment indicator] -SLOWMO=10 [Slow down test execution by provided seconds] [optional] -NO_SETUP=true [Whether not to run setup tests before actual tests] [optional] -LOCAL=true [Local testing indicator] [optional] -NON_HEADLESS=true [browser mode indicator] [optional] -SITE_PATH=/users/rk/sites/dokan [Path of the local test site][only for local testing] +BASE_URL=https://example.com [Base URL of the test site] +CI=true [CI/CD environment indicator] +SLOWMO=10 [Slow down test execution by provided seconds] [optional] +NO_SETUP=true [Whether not to run setup tests before actual tests] [optional] +LOCAL=true [Local testing indicator] [optional] +NON_HEADLESS=true [browser mode indicator] [optional] +SITE_PATH=/users/rk/sites/dokan [Path of the local test site][only for local testing] # Database Configuration -DB_HOST_NAME=localhost [Database server hostname or IP address] -DB_USER_NAME=dbuser [Database username] -DB_USER_PASSWORD=dbpassword [Database user password] -DATABASE=mywpdb [Database name] -DB_PORT=3306 [Database connection port] -DB_PREFIX=wp [Prefix for database tables] \ No newline at end of file +DB_HOST_NAME=localhost [Database server hostname or IP address] +DB_USER_NAME=dbuser [Database username] +DB_USER_PASSWORD=dbpassword [Database user password] +DATABASE=mywpdb [Database name] +DB_PORT=3306 [Database connection port] +DB_PREFIX=wp [Prefix for database tables] \ No newline at end of file diff --git a/tests/pw/README.MD b/tests/pw/README.MD index 70d18d450e..96793ce30c 100644 --- a/tests/pw/README.MD +++ b/tests/pw/README.MD @@ -121,43 +121,56 @@ Create .env file according to .env.example file ``` # Plugin Configuration -ADMIN=John_Doe [Admin username] -ADMIN_PASSWORD=AdminPass123 [Password for the admin account] -VENDOR=David_Johnson [Vendor username] -VENDOR2=Johnathon_Smith [Vendor username] -CUSTOMER=Michael_Williams [Customer username] -USER_PASSWORD=Passw0rd123 [Password for all other users] -DOKAN_PRO=true [Dokan pro active status] -LICENSE_KEY=license_key [Dokan License key] -GMAP=map_key [Google Maps API key] -MAPBOX=mapbox_key [Mapbox Maps API key] -TALKJS_APP_ID=talkjs_app_id [TalkJS App ID] -TALKJS_APP_SECRET=talkjs_app_secret [TalkJS App Secret] -VONAGE_API_KEY=vonage_key [Vonage SMS API key] -VONAGE_API_SECRET=vonage_secret [Vonage SMS API secret] -FB_APP_ID=facebook_app_id [Facebook App ID] -FB_APP_SECRET=facebook_app_secret [Facebook App secret] -PRINTFUL_APP_ID=printful_app_id [Printful App ID] -PRINTFUL_APP_SECRET=printful_app_secret [Printful App secret] -RECAPTCHA_SITE_KEY=recaptcha_site_key [reCAPTCHA site key] -RECAPTCHA_SECRET_KEY=recaptcha_secret_key [reCAPTCHA secret key] +ADMIN=John_Doe [Admin username] +ADMIN_PASSWORD=AdminPass123 [Password for the admin account] +VENDOR=David_Johnson [Vendor username] +VENDOR2=Jhonathon_Smith [Vendor username] +CUSTOMER=Michael_Williams [Customer username] +CUSTOMER2=Robert_Thomas [Customer username] +USER_PASSWORD=Passw0rd123 [Password for all other users] +DOKAN_PRO=true [Dokan pro active status] +LICENSE_KEY=license_key [Dokan License key] +GMAP=map_key [Google Maps API key] +MAPBOX=mapbox_key [Mapbox Maps API key] +TALKJS_APP_ID=talkjs_app_id [TalkJS App ID] +TALKJS_APP_SECRET=talkjs_app_secret [TalkJS App Secret] +VONAGE_API_KEY=vonage_key [Vonage SMS API key] +VONAGE_API_SECRET=vonage_secret [Vonage SMS API secret] +FB_APP_ID=facebook_app_id [Facebook App ID] +FB_APP_SECRET=facebook_app_secret [Facebook App secret] +PRINTFUL_APP_ID=printful_app_id [Printful App ID] +PRINTFUL_APP_SECRET=printful_app_secret [Printful App secret] +RECAPTCHA_SITE_KEY=recaptcha_site_key [reCAPTCHA site key] +RECAPTCHA_SECRET_KEY=recaptcha_secret_key [reCAPTCHA secret key] +TEST_PUBLISH_KEY_STRIPE=test_publish_key_stripe [Stripe publish key] +TEST_SECRET_KEY_STRIPE=test_secret_key_stripe [Stripe secret key] +TEST_CLIENT_ID_STRIPE=test_client_id_stripe [Stripe client ID] +SANDBOX_CLIENT_ID_MANGOPAY=sandbox_client_id_mangopay [Mangopay sandbox client ID] +SANDBOX_API_KEY_MANGOPAY=sandbox_api_key_mangopay [Mangopay sandbox API key] +TEST_KEY_ID_RAZORPAY=test_key_id_razorpay [Razorpay key ID] +TEST_KEY_SECRET_RAZORPAY=test_key_secret_razorpay [Razorpay key secret] +TEST_PUBLISH_KEY_STRIPE_EXPRESS=test_publish_key_stripe_express [Stripe Express publish key] +TEST_SECRET_KEY_STRIPE_EXPRESS=test_secret_key_stripe_express [Stripe Express secret key] +TEST_MERCHANT_ID_PAYPAL_MARKETPLACE=test_merchant_id [PayPal Merchant ID] +TEST_CLIENT_ID_PAYPAL_MARKETPLACE=test_client_id_paypal_marketplace [PayPal Marketplace Client ID] +TEST_CLIENT_SECRET_PAYPAL_MARKETPLACE=test_client_secret_paypal_marketplace [PayPal Marketplace Client Secret] # Playwright Configuration -BASE_URL=https://example.com [Base URL of the test site] -CI=true [CI/CD environment indicator] -SLOWMO=10 [Slow down test execution by provided seconds] [optional] -NO_SETUP=true [Whether not to run setup tests before actual tests] [optional] -LOCAL=true [Local testing indicator] [optional] -NON_HEADLESS=true [browser mode indicator] [optional] -SITE_PATH=/users/rk/sites/dokan [Path of the local test site][only for local testing] +BASE_URL=https://example.com [Base URL of the test site] +CI=true [CI/CD environment indicator] +SLOWMO=10 [Slow down test execution by provided seconds] [optional] +NO_SETUP=true [Whether not to run setup tests before actual tests] [optional] +LOCAL=true [Local testing indicator] [optional] +NON_HEADLESS=true [browser mode indicator] [optional] +SITE_PATH=/users/rk/sites/dokan [Path of the local test site][only for local testing] # Database Configuration -DB_HOST_NAME=localhost [Database server hostname or IP address] -DB_USER_NAME=dbuser [Database username] -DB_USER_PASSWORD=dbpassword [Database user password] -DATABASE=mywpdb [Database name] -DB_PORT=3306 [Database connection port] -DB_PREFIX=wp [Prefix for database tables] +DB_HOST_NAME=localhost [Database server hostname or IP address] +DB_USER_NAME=dbuser [Database username] +DB_USER_PASSWORD=dbpassword [Database user password] +DATABASE=mywpdb [Database name] +DB_PORT=3306 [Database connection port] +DB_PREFIX=wp ```
diff --git a/tests/pw/feature-map/feature-map.yml b/tests/pw/feature-map/feature-map.yml index 76cd0b4085..c608fc702e 100644 --- a/tests/pw/feature-map/feature-map.yml +++ b/tests/pw/feature-map/feature-map.yml @@ -406,7 +406,7 @@ admin: admin can view reverse withdrawal menu page [lite]: true admin can filter reverse withdrawal by store [lite]: true - # admin can filter reverse withdrawal by date [lite]: false + # admin can filter reverse withdrawal by date [lite]: false admin can clear reverse withdrawal filters: true admin can add reverse withdrawal [lite]: true vendor: @@ -602,7 +602,7 @@ admin can export all logs: true admin can filter all logs by store name: true admin can filter all logs by order status: true - # admin can filter all logs by calendar: true + # admin can filter all logs by calendar: true vendor: vendor can view reports menu page: true vendor can export statement: true @@ -700,8 +700,8 @@ - page: 'Auction Integration' features: admin: - admin can enable auction integration module: false - admin can disable auction integration module: false + admin can enable auction integration module: true + admin can disable auction integration module: true admin can enable auction for newly added vendor: false admin can disable auction for specific vendor: false admin can add auction product: true @@ -784,8 +784,8 @@ - page: 'Color Scheme Customizer' features: admin: - admin can enable color scheme customizer module: false - admin can disable color scheme customizer module: false + admin can enable color scheme customizer module: true + admin can disable color scheme customizer module: true admin can switch predefined color palette: true admin can add custom color palette: true admin can update custom color palette: true @@ -793,8 +793,8 @@ - page: 'Delivery Time' features: admin: - admin can enable delivery time module: false - admin can disable delivery time module: false + admin can enable delivery time module: true + admin can disable delivery time module: true admin can allow vendor to override delivery time settings: false admin can set delivery support options: false admin can set delivery date label: false @@ -831,8 +831,8 @@ - page: 'EU Compliance Fields' features: admin: - admin can enable eu compliance fields module: false - admin can disable eu compliance fields module: false + admin can enable EU compliance fields module: true + admin can disable EU compliance fields module: true admin can enable EU compliance fields for vendors: true admin can enable EU compliance fields on vendor registration: true admin can enable EU compliance fields for customers: true @@ -874,8 +874,8 @@ - page: 'Follow Store' features: admin: - admin can enable follow store module: false - admin can disable follow store module: false + admin can enable follow store module: true + admin can disable follow store module: true vendor: vendor can view followers menu page: true vendor can view followers: true @@ -890,9 +890,9 @@ - page: 'Geolocation' features: admin: - admin can enable geolocation module: false - admin can disable geolocation module: false - # admin can set Dokan geolocation settings [duplicate]: false + admin can enable geolocation module: true + admin can disable geolocation module: true + # admin can set Dokan geolocation settings [duplicate]: false admin can set map location position (top): true admin can set map location position (left): true admin can set map location position (right): true @@ -912,31 +912,31 @@ # admin can add geolocation widget (geolocation filter form) widget: false # admin can add geolocation filters shortcode [duplicate]: true # vendor: - # vendor can add location to store [duplicate]: false - # vendor can add location to product [duplicate]: false + # vendor can add location to store [duplicate]: false + # vendor can add location to product [duplicate]: false customer: customer can slide map radius bar: true - # customer can view map on shop page [duplicate]: false - # customer can view map on store list page [duplicate]: false - # customer can view map on single product page [duplicate]: false - # customer can view product location [duplicate]: false - # customer can view store location [duplicate]: false - # customer can use filters on shop page [duplicate]: false - # customer can use filters on store list page [duplicate]: false + # customer can view map on shop page [duplicate]: false + # customer can view map on store list page [duplicate]: false + # customer can view map on single product page [duplicate]: false + # customer can view product location [duplicate]: false + # customer can view store location [duplicate]: false + # customer can use filters on shop page [duplicate]: false + # customer can use filters on store list page [duplicate]: false - page: 'Live Chat' features: admin: - admin can enable live chat module: false - admin can disable live chat module: false - # admin can set Dokan live chat settings [duplicate]: true + admin can enable live chat module: true + admin can disable live chat module: true + # admin can set Dokan live chat settings [duplicate]: true admin can enable chat button on vendor page: true admin can disable chat button on vendor page: true admin can enable chat button on product page (above_tab): true admin can enable chat button on product page (inside_tab): true admin can disable chat button on product page: true vendor: - # vendor can set live chat settings [duplicate]: true + # vendor can set live chat settings [duplicate]: true vendor can view inbox menu page: true vendor can reply to customer message: true customer: @@ -945,8 +945,8 @@ - page: 'Live Search' features: admin: - admin can enable live search module: false - admin can disable live search module: false + admin can enable live search module: true + admin can disable live search module: true # admin can set Dokan live search settings [duplicate]: true customer: customer can search product using live search (suggestion box): true @@ -957,8 +957,8 @@ - page: 'MangoPay' features: admin: - admin can enable MangoPay module: false - admin can disable MangoPay module: false + admin can enable MangoPay module: true + admin can disable MangoPay module: true admin can add MangoPay payment method: true admin can remove MangoPay payment method: false admin can view MangoPay notes on order details: false @@ -973,8 +973,8 @@ - page: 'Min Max Quantities' features: admin: - admin can enable min max quantities module: false - admin can disable min max quantities module: false + admin can enable min max quantities module: true + admin can disable min max quantities module: true vendor: vendor can add product min-max options: true vendor can set min-max settings: true @@ -985,8 +985,8 @@ - page: 'PayPal Marketplace' features: admin: - admin can enable PayPal Marketplace module: false - admin can disable PayPal Marketplace module: false + admin can enable PayPal Marketplace module: true + admin can disable PayPal Marketplace module: true admin can add PayPal Marketplace payment method: true admin can remove PayPal Marketplace payment method: false admin can view PayPal Marketplace notes on order details: false @@ -1001,8 +1001,8 @@ - page: 'Printful' features: admin: - admin can enable Printful module: false - admin can disable Printful module: false + admin can enable Printful module: true + admin can disable Printful module: true # admin can set Dokan Printful settings: true [duplicate]: true vendor: vendor can view printful menu page: true @@ -1019,8 +1019,8 @@ - page: 'Product Addon' features: admin: - admin can enable product addon module: false - admin can disable product addon module: false + admin can enable product addon module: true + admin can disable product addon module: true vendor: vendor can view product addons menu page: true vendor can add global product addon: true @@ -1040,9 +1040,9 @@ - page: 'Product Advertising' features: admin: - admin can enable product advertising module: false - admin can disable product advertising module: false - # admin can set Dokan product advertising settings [duplicate]: true + admin can enable product advertising module: true + admin can disable product advertising module: true + # admin can set Dokan product advertising settings [duplicate]: true admin can set product advertising slot: false admin can set product advertising expiry days: false admin can enable vendor product advertising purchase permission: false @@ -1052,14 +1052,14 @@ admin can set advertised product display preference: false admin can hide out of stock advertised product: false admin can add product advertising widget: false - # admin can add product advertising shortcode [duplicate]: false + # admin can add product advertising shortcode [duplicate]: false admin can view product advertising menu page: true admin can add product advertisement: true admin can search advertised product by product: true admin can search advertised product by order: false admin can filter advertised product by stores: true admin can filter advertised product by creation process: true - # admin can filter advertised product by calendar: false + # admin can filter advertised product by calendar: false admin can expire advertised product: true admin can delete advertised product: true admin can perform bulk action on product advertisements: true @@ -1074,8 +1074,8 @@ - page: 'Product Enquiry' features: admin: - admin can enable product enquiry module: false - admin can disable product enquiry module: false + admin can enable product enquiry module: true + admin can disable product enquiry module: true customer: customer can enquire product: true guest: @@ -1084,8 +1084,8 @@ - page: 'Product Q&A' features: admin: - admin can enable product Q&A module: false - admin can disable product Q&A module: false + admin can enable product Q&A module: true + admin can disable product Q&A module: true admin can view product QA menu page: true admin can view product question details: true admin can filter questions by vendor: true @@ -1115,8 +1115,8 @@ - page: 'Product Subscription' features: admin: - admin can enable product subscription module: false - admin can disable product subscription module: false + admin can enable product subscription module: true + admin can disable product subscription module: true vendor: vendor can view user subscriptions menu page: true vendor can view product subscription details: true @@ -1143,8 +1143,8 @@ - page: 'Razorpay' features: admin: - admin can enable Razorpay module: false - admin can disable Razorpay module: false + admin can enable Razorpay module: true + admin can disable Razorpay module: true admin can add Razorpay payment method: true admin can remove Razorpay payment method: false admin can view Razorpay notes on order details: false @@ -1159,8 +1159,8 @@ - page: 'Report Abuse' features: admin: - admin can enable report abuse module: false - admin can disable report abuse module: false + admin can enable report abuse module: true + admin can disable report abuse module: true admin can view abuse reports menu page: true admin can view abuse report details: true admin can filter abuse reports by abuse reason: true @@ -1241,8 +1241,8 @@ - page: 'Return and Warranty Request' features: admin: - admin can enable RMA module: false - admin can disable RMA module: false + admin can enable RMA module: true + admin can disable RMA module: true vendor: vendor can view return request menu page: true vendor can view return request details: true @@ -1259,8 +1259,8 @@ - page: 'Seller Badge' features: admin: - admin can enable seller badge module: false - admin can disable seller badge module: false + admin can enable seller badge module: true + admin can disable seller badge module: true admin can view seller badge menu page: true admin can preview seller badge: true admin can view seller badge details: true @@ -1282,8 +1282,8 @@ - page: 'Seller Vacation' features: admin: - admin can enable seller vacation module: false - admin can disable seller vacation module: false + admin can enable seller vacation module: true + admin can disable seller vacation module: true vendor: vendor can add vacation (instant): false vendor can add vacation (datewise): false @@ -1291,10 +1291,10 @@ - page: 'ShipStation Integration' features: admin: - admin can enable ShipStation Integration module: false - admin can disable ShipStation Integration module: false + admin can enable ShipStation integration module: true + admin can disable ShipStation integration module: true vendor: - # vendor can view ShipStation settings menu page: true + # vendor can view ShipStation settings menu page: true vendor can generate ShipStation credentials: true vendor can revoke ShipStation credentials: true vendor can set ShipStation settings: true @@ -1302,8 +1302,8 @@ - page: 'Single Product Multiple Vendor (SPMV)' features: admin: - admin can enable SPMV module: false - admin can disable SPMV module: false + admin can enable SPMV module: true + admin can disable SPMV module: true admin can assign SPMV product to other vendor: true vendor: vendor can view SPMV menu page: true @@ -1344,8 +1344,8 @@ - page: 'Store Support' features: admin: - admin can enable store support module: false - admin can disable store support module: false + admin can enable store support module: true + admin can disable store support module: true admin can view store support menu page: true unread count decrease after admin viewing a support ticket: true admin can view support ticket details: true @@ -1353,7 +1353,7 @@ admin can search support ticket by ticket title: true admin can filter support tickets by vendor: true admin can filter support tickets by customer: true - # admin can filter support tickets by calendar: false + # admin can filter support tickets by calendar: false admin can reply to support ticket as admin: true admin can reply to support ticket as vendor: true admin can disable support ticket email notification: true @@ -1390,8 +1390,8 @@ - page: 'Stripe Connect' features: admin: - admin can enable Stripe Connect module: false - admin can disable Stripe Connect module: false + admin can enable Stripe Connect module: true + admin can disable Stripe Connect module: true admin can add Stripe Connect payment method: true admin can remove Stripe Connect payment method: false admin can view Stripe Connect notes on order details: false @@ -1406,8 +1406,8 @@ - page: 'Stripe Express' features: admin: - admin can enable Stripe Express module: false - admin can disable Stripe Express module: false + admin can enable Stripe Express module: true + admin can disable Stripe Express module: true admin can add Stripe Express payment method: true admin can remove Stripe Express payment method: false admin can view Stripe Express notes on order details: false @@ -1436,16 +1436,16 @@ - page: 'Vendor Analytics' features: admin: - admin can enable vendor analytics module: false - admin can disable vendor analytics module: false + admin can enable vendor analytics module: true + admin can disable vendor analytics module: true vendor: vendor can view analytics menu page: true - page: 'Vendor Product Importer and Exporter' features: admin: - admin can enable product importer and exporter module: false - admin can disable product importer and exporter module: false + admin can enable product importer and exporter module: true + admin can disable product importer and exporter module: true vendor: vendor can view tools menu page: true vendor can export product as xml: true @@ -1456,8 +1456,8 @@ - page: 'Vendor Staff Manager' features: admin: - admin can enable vendor staff manager module: false - admin can disable vendor staff manager module: false + admin can enable vendor staff manager module: true + admin can disable vendor staff manager module: true vendor: vendor can view staff menu page: true vendor can add new staff: true @@ -1470,8 +1470,8 @@ - page: 'Vendor Subscription' features: admin: - admin can enable vendor subscription module: false - admin can disable vendor subscription module: false + admin can enable vendor subscription module: true + admin can disable vendor subscription module: true admin can view subscriptions menu page: true admin can filter subscribed vendors by vendor: true admin can filter subscribed vendors by subscription pack: true @@ -1492,8 +1492,8 @@ - page: 'Vendor Verification' features: admin: - admin can enable vendor verification module: false - admin can disable vendor verification module: false + admin can enable vendor verification module: true + admin can disable vendor verification module: true admin can change verified icon: true admin can add vendor verification method: true admin can edit vendor verification method: true @@ -1533,8 +1533,8 @@ - page: 'Wholesale' features: admin: - admin can enable wholesale module: false - admin can disable wholesale module: false + admin can enable wholesale module: true + admin can disable wholesale module: true admin can view wholesale customers menu page: true admin can search wholesale customer: true admin can disable customer's wholesale capability: true @@ -1557,8 +1557,8 @@ - page: 'WooCommerce Booking Integration' features: admin: - admin can enable woocommerce booking integration module: false - admin can disable woocommerce booking integration module: false + admin can enable woocommerce booking integration module: true + admin can disable woocommerce booking integration module: true admin can add booking product: true vendor: vendor can view booking menu page: true diff --git a/tests/pw/package-lock.json b/tests/pw/package-lock.json index 45b16ccd09..0983b847ef 100644 --- a/tests/pw/package-lock.json +++ b/tests/pw/package-lock.json @@ -9,27 +9,27 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "@faker-js/faker": "^9.2.0", - "@playwright/test": "1.48", - "@wordpress/env": "^10.11.0", - "dotenv": "^16.4.5", - "mysql2": "^3.11.4", + "@faker-js/faker": "^9.3.0", + "@playwright/test": "1.49", + "@wordpress/env": "^10.13.0", + "dotenv": "^16.4.7", + "mysql2": "^3.11.5", "php-serialize": "^5.0.1", "zod": "^3.23.8" }, "devDependencies": { "@types/js-yaml": "^4.0.9", - "@types/node": "^22.9.0", - "@typescript-eslint/eslint-plugin": "^8.13.0", - "@typescript-eslint/parser": "^8.13.0", - "eslint": "8.57", + "@types/node": "^22.10.1", + "@typescript-eslint/eslint-plugin": "^8.17.0", + "@typescript-eslint/parser": "^8.17.0", + "eslint": "9.16", "eslint-config-prettier": "^9.1.0", - "eslint-plugin-playwright": "^2.0.1", + "eslint-plugin-playwright": "^2.1.0", "js-yaml": "^4.1.0", - "npm-check-updates": "^17.1.10", - "prettier": "^3.3.3", + "npm-check-updates": "^17.1.11", + "prettier": "^3.4.2", "tslib": "^2.8.1", - "typescript": "^5.6.3" + "typescript": "^5.7.2" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -65,16 +65,42 @@ "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, + "node_modules/@eslint/config-array": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.1.tgz", + "integrity": "sha512-fo6Mtm5mWyKjA/Chy1BYTdn5mGJoDNjC7C64ug20ADsRDGrA85bN3uK3MaKbeRkRuuIEAR5N33Jr1pbm411/PA==", + "dev": true, + "dependencies": { + "@eslint/object-schema": "^2.1.5", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.9.1.tgz", + "integrity": "sha512-GuUdqkyyzQI5RMIWkHhvTWLCyLo1jNK3vzkSyaExH5kHPDHcuL2VOpHjmMY+y3+NC69qAKToBqldTBgYeLSr9Q==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.2.0.tgz", + "integrity": "sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", + "espree": "^10.0.1", + "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -82,25 +108,58 @@ "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@eslint/js": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", - "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", + "version": "9.16.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.16.0.tgz", + "integrity": "sha512-tw2HxzQkrbeuvyj1tG2Yqq+0H9wGoI2IMk4EOsQeX+vmd75FtJAzf+gTA69WF+baUKRYQ3x2kbLE08js5OsTVg==", "dev": true, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.5.tgz", + "integrity": "sha512-o0bhxnL89h5Bae5T318nFoFzGy+YE5i/gGkoPAgkmTVdRKTiv3p8JHevPiPaMwoloKfEiiaHlawCqaZMqRm+XQ==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.4.tgz", + "integrity": "sha512-zSkKow6H5Kdm0ZUQUB2kV5JIXqoG0+uH5YADhaEHswm664N9Db8dXSi0nMJpacpMf+MyyglF1vnZohpEg5yUtg==", + "dev": true, + "dependencies": { + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@faker-js/faker": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/@faker-js/faker/-/faker-9.2.0.tgz", - "integrity": "sha512-ulqQu4KMr1/sTFIYvqSdegHT8NIkt66tFAkugGnHA+1WAfEn6hMzNR+svjXGFRVLnapxvej67Z/LwchFrnLBUg==", + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/@faker-js/faker/-/faker-9.3.0.tgz", + "integrity": "sha512-r0tJ3ZOkMd9xsu3VRfqlFR6cz0V/jFYRswAIpC+m/DIfAUXq7g8N7wTAlhSANySXYGKzGryfDXwtwsY8TxEIDw==", "funding": [ { "type": "opencollective", @@ -112,19 +171,39 @@ "npm": ">=9.0.0" } }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", - "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", - "deprecated": "Use @eslint/config-array instead", + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", + "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^2.0.3", - "debug": "^4.3.1", - "minimatch": "^3.0.5" + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.3.0" }, "engines": { - "node": ">=10.10.0" + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "dev": true, + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" } }, "node_modules/@humanwhocodes/module-importer": { @@ -140,12 +219,18 @@ "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", - "deprecated": "Use @eslint/object-schema instead", - "dev": true + "node_modules/@humanwhocodes/retry": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.1.tgz", + "integrity": "sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==", + "dev": true, + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } }, "node_modules/@kwsites/file-exists": { "version": "1.1.1", @@ -196,11 +281,11 @@ } }, "node_modules/@playwright/test": { - "version": "1.48.0", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.48.0.tgz", - "integrity": "sha512-W5lhqPUVPqhtc/ySvZI5Q8X2ztBOUgZ8LbAFy0JQgrXZs2xaILrUcNO3rQjwbLPfGK13+rZsDa1FpG+tqYkT5w==", + "version": "1.49.0", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.49.0.tgz", + "integrity": "sha512-DMulbwQURa8rNIQrf94+jPJQ4FmOVdpE5ZppRNvWVjvhC+6sOeo28r8MgIpQRYouXRtt/FCCXU7zn20jnHR4Qw==", "dependencies": { - "playwright": "1.48.0" + "playwright": "1.49.0" }, "bin": { "playwright": "cli.js" @@ -242,6 +327,12 @@ "@types/responselike": "^1.0.0" } }, + "node_modules/@types/estree": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "dev": true + }, "node_modules/@types/http-cache-semantics": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", @@ -253,6 +344,12 @@ "integrity": "sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==", "dev": true }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, "node_modules/@types/keyv": { "version": "3.1.4", "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", @@ -262,11 +359,11 @@ } }, "node_modules/@types/node": { - "version": "22.9.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.0.tgz", - "integrity": "sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==", + "version": "22.10.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.1.tgz", + "integrity": "sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==", "dependencies": { - "undici-types": "~6.19.8" + "undici-types": "~6.20.0" } }, "node_modules/@types/responselike": { @@ -278,16 +375,16 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.13.0.tgz", - "integrity": "sha512-nQtBLiZYMUPkclSeC3id+x4uVd1SGtHuElTxL++SfP47jR0zfkZBJHc+gL4qPsgTuypz0k8Y2GheaDYn6Gy3rg==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.17.0.tgz", + "integrity": "sha512-HU1KAdW3Tt8zQkdvNoIijfWDMvdSweFYm4hWh+KwhPstv+sCmWb89hCIP8msFm9N1R/ooh9honpSuvqKWlYy3w==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.13.0", - "@typescript-eslint/type-utils": "8.13.0", - "@typescript-eslint/utils": "8.13.0", - "@typescript-eslint/visitor-keys": "8.13.0", + "@typescript-eslint/scope-manager": "8.17.0", + "@typescript-eslint/type-utils": "8.17.0", + "@typescript-eslint/utils": "8.17.0", + "@typescript-eslint/visitor-keys": "8.17.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -311,15 +408,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.13.0.tgz", - "integrity": "sha512-w0xp+xGg8u/nONcGw1UXAr6cjCPU1w0XVyBs6Zqaj5eLmxkKQAByTdV/uGgNN5tVvN/kKpoQlP2cL7R+ajZZIQ==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.17.0.tgz", + "integrity": "sha512-Drp39TXuUlD49F7ilHHCG7TTg8IkA+hxCuULdmzWYICxGXvDXmDmWEjJYZQYgf6l/TFfYNE167m7isnc3xlIEg==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "8.13.0", - "@typescript-eslint/types": "8.13.0", - "@typescript-eslint/typescript-estree": "8.13.0", - "@typescript-eslint/visitor-keys": "8.13.0", + "@typescript-eslint/scope-manager": "8.17.0", + "@typescript-eslint/types": "8.17.0", + "@typescript-eslint/typescript-estree": "8.17.0", + "@typescript-eslint/visitor-keys": "8.17.0", "debug": "^4.3.4" }, "engines": { @@ -339,13 +436,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.13.0.tgz", - "integrity": "sha512-XsGWww0odcUT0gJoBZ1DeulY1+jkaHUciUq4jKNv4cpInbvvrtDoyBH9rE/n2V29wQJPk8iCH1wipra9BhmiMA==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.17.0.tgz", + "integrity": "sha512-/ewp4XjvnxaREtqsZjF4Mfn078RD/9GmiEAtTeLQ7yFdKnqwTOgRMSvFz4et9U5RiJQ15WTGXPLj89zGusvxBg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.13.0", - "@typescript-eslint/visitor-keys": "8.13.0" + "@typescript-eslint/types": "8.17.0", + "@typescript-eslint/visitor-keys": "8.17.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -356,13 +453,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.13.0.tgz", - "integrity": "sha512-Rqnn6xXTR316fP4D2pohZenJnp+NwQ1mo7/JM+J1LWZENSLkJI8ID8QNtlvFeb0HnFSK94D6q0cnMX6SbE5/vA==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.17.0.tgz", + "integrity": "sha512-q38llWJYPd63rRnJ6wY/ZQqIzPrBCkPdpIsaCfkR3Q4t3p6sb422zougfad4TFW9+ElIFLVDzWGiGAfbb/v2qw==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "8.13.0", - "@typescript-eslint/utils": "8.13.0", + "@typescript-eslint/typescript-estree": "8.17.0", + "@typescript-eslint/utils": "8.17.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -373,6 +470,9 @@ "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0" + }, "peerDependenciesMeta": { "typescript": { "optional": true @@ -380,9 +480,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.13.0.tgz", - "integrity": "sha512-4cyFErJetFLckcThRUFdReWJjVsPCqyBlJTi6IDEpc1GWCIIZRFxVppjWLIMcQhNGhdWJJRYFHpHoDWvMlDzng==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.17.0.tgz", + "integrity": "sha512-gY2TVzeve3z6crqh2Ic7Cr+CAv6pfb0Egee7J5UAVWCpVvDI/F71wNfolIim4FE6hT15EbpZFVUj9j5i38jYXA==", "dev": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -393,13 +493,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.13.0.tgz", - "integrity": "sha512-v7SCIGmVsRK2Cy/LTLGN22uea6SaUIlpBcO/gnMGT/7zPtxp90bphcGf4fyrCQl3ZtiBKqVTG32hb668oIYy1g==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.17.0.tgz", + "integrity": "sha512-JqkOopc1nRKZpX+opvKqnM3XUlM7LpFMD0lYxTqOTKQfCWAmxw45e3qlOCsEqEB2yuacujivudOFpCnqkBDNMw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.13.0", - "@typescript-eslint/visitor-keys": "8.13.0", + "@typescript-eslint/types": "8.17.0", + "@typescript-eslint/visitor-keys": "8.17.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -445,15 +545,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.13.0.tgz", - "integrity": "sha512-A1EeYOND6Uv250nybnLZapeXpYMl8tkzYUxqmoKAWnI4sei3ihf2XdZVd+vVOmHGcp3t+P7yRrNsyyiXTvShFQ==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.17.0.tgz", + "integrity": "sha512-bQC8BnEkxqG8HBGKwG9wXlZqg37RKSMY7v/X8VEWD8JG2JuTHuNK0VFvMPMUKQcbk6B+tf05k+4AShAEtCtJ/w==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.13.0", - "@typescript-eslint/types": "8.13.0", - "@typescript-eslint/typescript-estree": "8.13.0" + "@typescript-eslint/scope-manager": "8.17.0", + "@typescript-eslint/types": "8.17.0", + "@typescript-eslint/typescript-estree": "8.17.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -464,16 +564,21 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.13.0.tgz", - "integrity": "sha512-7N/+lztJqH4Mrf0lb10R/CbI1EaAMMGyF5y0oJvFoAhafwgiRA7TXyd8TFn8FC8k5y2dTsYogg238qavRGNnlw==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.17.0.tgz", + "integrity": "sha512-1Hm7THLpO6ww5QU6H/Qp+AusUUl+z/CAm3cNZZ0jQvon9yicgO7Rwd+/WWRpMKLYV6p2UvdbR27c86rzCPpreg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.13.0", - "eslint-visitor-keys": "^3.4.3" + "@typescript-eslint/types": "8.17.0", + "eslint-visitor-keys": "^4.2.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -483,16 +588,22 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@ungap/structured-clone": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", - "dev": true + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } }, "node_modules/@wordpress/env": { - "version": "10.11.0", - "resolved": "https://registry.npmjs.org/@wordpress/env/-/env-10.11.0.tgz", - "integrity": "sha512-Sd31oiYxy9/pNMfYw7XgtCBoD4PpvcK1UQ/FVFP+DsTTuo55Ma4UAHMKfg2NhnZWqhJTgPC6XXzicGpr/lK4RQ==", + "version": "10.13.0", + "resolved": "https://registry.npmjs.org/@wordpress/env/-/env-10.13.0.tgz", + "integrity": "sha512-Q7ay+/jZ+O/Pkc65LDJ5BzoqTT/B0+gDgvYnWMyySPiMpFz+iQ+XoQibrj3VneiQDH7nJjtk/ZuyPHu7wGdlBg==", "dependencies": { "chalk": "^4.0.0", "copy-dir": "^1.3.0", @@ -850,9 +961,9 @@ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "dependencies": { "path-key": "^3.1.0", @@ -948,22 +1059,10 @@ "node": ">= 6.0.0" } }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/dotenv": { - "version": "16.4.5", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", - "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", + "version": "16.4.7", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", + "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==", "engines": { "node": ">=12" }, @@ -1005,59 +1104,62 @@ } }, "node_modules/eslint": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", - "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", - "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", + "version": "9.16.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.16.0.tgz", + "integrity": "sha512-whp8mSQI4C8VXd+fLgSM0lh3UlmcFtVwUQjyKCFfsp+2ItAIYhlq/hqGahGqHE6cv9unM41VlqKk2VtKYR2TaA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.1", - "@humanwhocodes/config-array": "^0.13.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.19.0", + "@eslint/core": "^0.9.0", + "@eslint/eslintrc": "^3.2.0", + "@eslint/js": "9.16.0", + "@eslint/plugin-kit": "^0.2.3", + "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", + "@humanwhocodes/retry": "^0.4.1", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", + "cross-spawn": "^7.0.5", "debug": "^4.3.2", - "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", + "eslint-scope": "^8.2.0", + "eslint-visitor-keys": "^4.2.0", + "espree": "^10.3.0", + "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", + "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" + "optionator": "^0.9.3" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://opencollective.com/eslint" + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } } }, "node_modules/eslint-config-prettier": { @@ -1073,9 +1175,9 @@ } }, "node_modules/eslint-plugin-playwright": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-playwright/-/eslint-plugin-playwright-2.0.1.tgz", - "integrity": "sha512-f4a73xgCOK5Ug/5dtC82BVvND62lLqlMqgGkZn42teyvk6ccSyybHZXRHkpE7vKZSCjV57bnbR+3ucwItOhXlA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-playwright/-/eslint-plugin-playwright-2.1.0.tgz", + "integrity": "sha512-wMbHOehofSB1cBdzz2CLaCYaKNLeTQ0YnOW+7AHa281TJqlpEJUBgTHbRUYOUxiXphfWwOyTPvgr6vvEmArbSA==", "dev": true, "workspaces": [ "examples" @@ -1091,16 +1193,16 @@ } }, "node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", + "integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==", "dev": true, "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -1118,18 +1220,42 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", + "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", "dev": true, "dependencies": { - "acorn": "^8.9.0", + "acorn": "^8.14.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" + "eslint-visitor-keys": "^4.2.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -1315,15 +1441,15 @@ } }, "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, "dependencies": { - "flat-cache": "^3.0.4" + "flat-cache": "^4.0.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16.0.0" } }, "node_modules/fill-range": { @@ -1355,23 +1481,22 @@ } }, "node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, "dependencies": { "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" + "keyv": "^4.5.4" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16" } }, "node_modules/flatted": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", - "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz", + "integrity": "sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==", "dev": true }, "node_modules/fs.realpath": { @@ -1632,15 +1757,6 @@ "node": ">=0.12.0" } }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/is-property": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", @@ -1922,9 +2038,9 @@ "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==" }, "node_modules/mysql2": { - "version": "3.11.4", - "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.11.4.tgz", - "integrity": "sha512-Z2o3tY4Z8EvSRDwknaC40MdZ3+m0sKbpnXrShQLdxPrAvcNli7jLrD2Zd2IzsRMw4eK9Yle500FDmlkIqp+krg==", + "version": "3.11.5", + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.11.5.tgz", + "integrity": "sha512-0XFu8rUmFN9vC0ME36iBvCUObftiMHItrYFhlCRvFWbLgpNqtC4Br/NmZX1HNCszxT0GGy5QtP+k3Q3eCJPaYA==", "dependencies": { "aws-ssl-profiles": "^1.1.1", "denque": "^2.1.0", @@ -1988,9 +2104,9 @@ } }, "node_modules/npm-check-updates": { - "version": "17.1.10", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-17.1.10.tgz", - "integrity": "sha512-GnN6KbUzC8BpwsRYJntuumgCiagZ0+xxorvUJM9m06d7AlyK9lm3iFsAsnXF3VAZZzpD5QjZvWBwNze61Vywkw==", + "version": "17.1.11", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-17.1.11.tgz", + "integrity": "sha512-TR2RuGIH7P3Qrb0jfdC/nT7JWqXPKjDlxuNQt3kx4oNVf1Pn5SBRB7KLypgYZhruivJthgTtfkkyK4mz342VjA==", "dev": true, "bin": { "ncu": "build/cli.js", @@ -2183,11 +2299,11 @@ } }, "node_modules/playwright": { - "version": "1.48.0", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.48.0.tgz", - "integrity": "sha512-qPqFaMEHuY/ug8o0uteYJSRfMGFikhUysk8ZvAtfKmUK3kc/6oNl/y3EczF8OFGYIi/Ex2HspMfzYArk6+XQSA==", + "version": "1.49.0", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.49.0.tgz", + "integrity": "sha512-eKpmys0UFDnfNb3vfsf8Vx2LEOtflgRebl0Im2eQQnYMA4Aqd+Zw8bEOB+7ZKvN76901mRnqdsiOGKxzVTbi7A==", "dependencies": { - "playwright-core": "1.48.0" + "playwright-core": "1.49.0" }, "bin": { "playwright": "cli.js" @@ -2200,9 +2316,9 @@ } }, "node_modules/playwright-core": { - "version": "1.48.0", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.48.0.tgz", - "integrity": "sha512-RBvzjM9rdpP7UUFrQzRwR8L/xR4HyC1QXMzGYTbf1vjw25/ya9NRAVnXi/0fvFopjebvyPzsmoK58xxeEOaVvA==", + "version": "1.49.0", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.49.0.tgz", + "integrity": "sha512-R+3KKTQF3npy5GTiKH/T+kdhoJfJojjHESR1YEWhYuEKRVfVaxH3+4+GvXE5xyCngCxhxnykk0Vlah9v8fs3jA==", "bin": { "playwright-core": "cli.js" }, @@ -2220,9 +2336,9 @@ } }, "node_modules/prettier": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", - "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz", + "integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" @@ -2591,12 +2707,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true - }, "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -2673,9 +2783,9 @@ "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==" }, "node_modules/typescript": { - "version": "5.6.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", - "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", + "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -2686,9 +2796,9 @@ } }, "node_modules/undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==" + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==" }, "node_modules/uri-js": { "version": "4.4.1", @@ -2825,43 +2935,99 @@ "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", "dev": true }, + "@eslint/config-array": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.1.tgz", + "integrity": "sha512-fo6Mtm5mWyKjA/Chy1BYTdn5mGJoDNjC7C64ug20ADsRDGrA85bN3uK3MaKbeRkRuuIEAR5N33Jr1pbm411/PA==", + "dev": true, + "requires": { + "@eslint/object-schema": "^2.1.5", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + } + }, + "@eslint/core": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.9.1.tgz", + "integrity": "sha512-GuUdqkyyzQI5RMIWkHhvTWLCyLo1jNK3vzkSyaExH5kHPDHcuL2VOpHjmMY+y3+NC69qAKToBqldTBgYeLSr9Q==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.15" + } + }, "@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.2.0.tgz", + "integrity": "sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", + "espree": "^10.0.1", + "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", "minimatch": "^3.1.2", "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true + } } }, "@eslint/js": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", - "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", + "version": "9.16.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.16.0.tgz", + "integrity": "sha512-tw2HxzQkrbeuvyj1tG2Yqq+0H9wGoI2IMk4EOsQeX+vmd75FtJAzf+gTA69WF+baUKRYQ3x2kbLE08js5OsTVg==", "dev": true }, + "@eslint/object-schema": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.5.tgz", + "integrity": "sha512-o0bhxnL89h5Bae5T318nFoFzGy+YE5i/gGkoPAgkmTVdRKTiv3p8JHevPiPaMwoloKfEiiaHlawCqaZMqRm+XQ==", + "dev": true + }, + "@eslint/plugin-kit": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.4.tgz", + "integrity": "sha512-zSkKow6H5Kdm0ZUQUB2kV5JIXqoG0+uH5YADhaEHswm664N9Db8dXSi0nMJpacpMf+MyyglF1vnZohpEg5yUtg==", + "dev": true, + "requires": { + "levn": "^0.4.1" + } + }, "@faker-js/faker": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/@faker-js/faker/-/faker-9.2.0.tgz", - "integrity": "sha512-ulqQu4KMr1/sTFIYvqSdegHT8NIkt66tFAkugGnHA+1WAfEn6hMzNR+svjXGFRVLnapxvej67Z/LwchFrnLBUg==" + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/@faker-js/faker/-/faker-9.3.0.tgz", + "integrity": "sha512-r0tJ3ZOkMd9xsu3VRfqlFR6cz0V/jFYRswAIpC+m/DIfAUXq7g8N7wTAlhSANySXYGKzGryfDXwtwsY8TxEIDw==" + }, + "@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true }, - "@humanwhocodes/config-array": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", - "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", + "@humanfs/node": { + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", + "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", "dev": true, "requires": { - "@humanwhocodes/object-schema": "^2.0.3", - "debug": "^4.3.1", - "minimatch": "^3.0.5" + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.3.0" + }, + "dependencies": { + "@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "dev": true + } } }, "@humanwhocodes/module-importer": { @@ -2870,10 +3036,10 @@ "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true }, - "@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "@humanwhocodes/retry": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.1.tgz", + "integrity": "sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==", "dev": true }, "@kwsites/file-exists": { @@ -2916,11 +3082,11 @@ } }, "@playwright/test": { - "version": "1.48.0", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.48.0.tgz", - "integrity": "sha512-W5lhqPUVPqhtc/ySvZI5Q8X2ztBOUgZ8LbAFy0JQgrXZs2xaILrUcNO3rQjwbLPfGK13+rZsDa1FpG+tqYkT5w==", + "version": "1.49.0", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.49.0.tgz", + "integrity": "sha512-DMulbwQURa8rNIQrf94+jPJQ4FmOVdpE5ZppRNvWVjvhC+6sOeo28r8MgIpQRYouXRtt/FCCXU7zn20jnHR4Qw==", "requires": { - "playwright": "1.48.0" + "playwright": "1.49.0" } }, "@sindresorhus/is": { @@ -2947,6 +3113,12 @@ "@types/responselike": "^1.0.0" } }, + "@types/estree": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "dev": true + }, "@types/http-cache-semantics": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", @@ -2958,6 +3130,12 @@ "integrity": "sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==", "dev": true }, + "@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, "@types/keyv": { "version": "3.1.4", "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", @@ -2967,11 +3145,11 @@ } }, "@types/node": { - "version": "22.9.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.0.tgz", - "integrity": "sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==", + "version": "22.10.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.1.tgz", + "integrity": "sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==", "requires": { - "undici-types": "~6.19.8" + "undici-types": "~6.20.0" } }, "@types/responselike": { @@ -2983,16 +3161,16 @@ } }, "@typescript-eslint/eslint-plugin": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.13.0.tgz", - "integrity": "sha512-nQtBLiZYMUPkclSeC3id+x4uVd1SGtHuElTxL++SfP47jR0zfkZBJHc+gL4qPsgTuypz0k8Y2GheaDYn6Gy3rg==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.17.0.tgz", + "integrity": "sha512-HU1KAdW3Tt8zQkdvNoIijfWDMvdSweFYm4hWh+KwhPstv+sCmWb89hCIP8msFm9N1R/ooh9honpSuvqKWlYy3w==", "dev": true, "requires": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.13.0", - "@typescript-eslint/type-utils": "8.13.0", - "@typescript-eslint/utils": "8.13.0", - "@typescript-eslint/visitor-keys": "8.13.0", + "@typescript-eslint/scope-manager": "8.17.0", + "@typescript-eslint/type-utils": "8.17.0", + "@typescript-eslint/utils": "8.17.0", + "@typescript-eslint/visitor-keys": "8.17.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -3000,54 +3178,54 @@ } }, "@typescript-eslint/parser": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.13.0.tgz", - "integrity": "sha512-w0xp+xGg8u/nONcGw1UXAr6cjCPU1w0XVyBs6Zqaj5eLmxkKQAByTdV/uGgNN5tVvN/kKpoQlP2cL7R+ajZZIQ==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.17.0.tgz", + "integrity": "sha512-Drp39TXuUlD49F7ilHHCG7TTg8IkA+hxCuULdmzWYICxGXvDXmDmWEjJYZQYgf6l/TFfYNE167m7isnc3xlIEg==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "8.13.0", - "@typescript-eslint/types": "8.13.0", - "@typescript-eslint/typescript-estree": "8.13.0", - "@typescript-eslint/visitor-keys": "8.13.0", + "@typescript-eslint/scope-manager": "8.17.0", + "@typescript-eslint/types": "8.17.0", + "@typescript-eslint/typescript-estree": "8.17.0", + "@typescript-eslint/visitor-keys": "8.17.0", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.13.0.tgz", - "integrity": "sha512-XsGWww0odcUT0gJoBZ1DeulY1+jkaHUciUq4jKNv4cpInbvvrtDoyBH9rE/n2V29wQJPk8iCH1wipra9BhmiMA==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.17.0.tgz", + "integrity": "sha512-/ewp4XjvnxaREtqsZjF4Mfn078RD/9GmiEAtTeLQ7yFdKnqwTOgRMSvFz4et9U5RiJQ15WTGXPLj89zGusvxBg==", "dev": true, "requires": { - "@typescript-eslint/types": "8.13.0", - "@typescript-eslint/visitor-keys": "8.13.0" + "@typescript-eslint/types": "8.17.0", + "@typescript-eslint/visitor-keys": "8.17.0" } }, "@typescript-eslint/type-utils": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.13.0.tgz", - "integrity": "sha512-Rqnn6xXTR316fP4D2pohZenJnp+NwQ1mo7/JM+J1LWZENSLkJI8ID8QNtlvFeb0HnFSK94D6q0cnMX6SbE5/vA==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.17.0.tgz", + "integrity": "sha512-q38llWJYPd63rRnJ6wY/ZQqIzPrBCkPdpIsaCfkR3Q4t3p6sb422zougfad4TFW9+ElIFLVDzWGiGAfbb/v2qw==", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "8.13.0", - "@typescript-eslint/utils": "8.13.0", + "@typescript-eslint/typescript-estree": "8.17.0", + "@typescript-eslint/utils": "8.17.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" } }, "@typescript-eslint/types": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.13.0.tgz", - "integrity": "sha512-4cyFErJetFLckcThRUFdReWJjVsPCqyBlJTi6IDEpc1GWCIIZRFxVppjWLIMcQhNGhdWJJRYFHpHoDWvMlDzng==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.17.0.tgz", + "integrity": "sha512-gY2TVzeve3z6crqh2Ic7Cr+CAv6pfb0Egee7J5UAVWCpVvDI/F71wNfolIim4FE6hT15EbpZFVUj9j5i38jYXA==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.13.0.tgz", - "integrity": "sha512-v7SCIGmVsRK2Cy/LTLGN22uea6SaUIlpBcO/gnMGT/7zPtxp90bphcGf4fyrCQl3ZtiBKqVTG32hb668oIYy1g==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.17.0.tgz", + "integrity": "sha512-JqkOopc1nRKZpX+opvKqnM3XUlM7LpFMD0lYxTqOTKQfCWAmxw45e3qlOCsEqEB2yuacujivudOFpCnqkBDNMw==", "dev": true, "requires": { - "@typescript-eslint/types": "8.13.0", - "@typescript-eslint/visitor-keys": "8.13.0", + "@typescript-eslint/types": "8.17.0", + "@typescript-eslint/visitor-keys": "8.17.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -3077,37 +3255,39 @@ } }, "@typescript-eslint/utils": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.13.0.tgz", - "integrity": "sha512-A1EeYOND6Uv250nybnLZapeXpYMl8tkzYUxqmoKAWnI4sei3ihf2XdZVd+vVOmHGcp3t+P7yRrNsyyiXTvShFQ==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.17.0.tgz", + "integrity": "sha512-bQC8BnEkxqG8HBGKwG9wXlZqg37RKSMY7v/X8VEWD8JG2JuTHuNK0VFvMPMUKQcbk6B+tf05k+4AShAEtCtJ/w==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.13.0", - "@typescript-eslint/types": "8.13.0", - "@typescript-eslint/typescript-estree": "8.13.0" + "@typescript-eslint/scope-manager": "8.17.0", + "@typescript-eslint/types": "8.17.0", + "@typescript-eslint/typescript-estree": "8.17.0" } }, "@typescript-eslint/visitor-keys": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.13.0.tgz", - "integrity": "sha512-7N/+lztJqH4Mrf0lb10R/CbI1EaAMMGyF5y0oJvFoAhafwgiRA7TXyd8TFn8FC8k5y2dTsYogg238qavRGNnlw==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.17.0.tgz", + "integrity": "sha512-1Hm7THLpO6ww5QU6H/Qp+AusUUl+z/CAm3cNZZ0jQvon9yicgO7Rwd+/WWRpMKLYV6p2UvdbR27c86rzCPpreg==", "dev": true, "requires": { - "@typescript-eslint/types": "8.13.0", - "eslint-visitor-keys": "^3.4.3" + "@typescript-eslint/types": "8.17.0", + "eslint-visitor-keys": "^4.2.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true + } } }, - "@ungap/structured-clone": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", - "dev": true - }, "@wordpress/env": { - "version": "10.11.0", - "resolved": "https://registry.npmjs.org/@wordpress/env/-/env-10.11.0.tgz", - "integrity": "sha512-Sd31oiYxy9/pNMfYw7XgtCBoD4PpvcK1UQ/FVFP+DsTTuo55Ma4UAHMKfg2NhnZWqhJTgPC6XXzicGpr/lK4RQ==", + "version": "10.13.0", + "resolved": "https://registry.npmjs.org/@wordpress/env/-/env-10.13.0.tgz", + "integrity": "sha512-Q7ay+/jZ+O/Pkc65LDJ5BzoqTT/B0+gDgvYnWMyySPiMpFz+iQ+XoQibrj3VneiQDH7nJjtk/ZuyPHu7wGdlBg==", "requires": { "chalk": "^4.0.0", "copy-dir": "^1.3.0", @@ -3371,9 +3551,9 @@ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "requires": { "path-key": "^3.1.0", @@ -3436,19 +3616,10 @@ "yaml": "^2.2.2" } }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, "dotenv": { - "version": "16.4.5", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", - "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==" + "version": "16.4.7", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", + "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==" }, "emoji-regex": { "version": "8.0.0", @@ -3475,49 +3646,53 @@ "dev": true }, "eslint": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", - "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", + "version": "9.16.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.16.0.tgz", + "integrity": "sha512-whp8mSQI4C8VXd+fLgSM0lh3UlmcFtVwUQjyKCFfsp+2ItAIYhlq/hqGahGqHE6cv9unM41VlqKk2VtKYR2TaA==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.1", - "@humanwhocodes/config-array": "^0.13.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.19.0", + "@eslint/core": "^0.9.0", + "@eslint/eslintrc": "^3.2.0", + "@eslint/js": "9.16.0", + "@eslint/plugin-kit": "^0.2.3", + "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", + "@humanwhocodes/retry": "^0.4.1", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", + "cross-spawn": "^7.0.5", "debug": "^4.3.2", - "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", + "eslint-scope": "^8.2.0", + "eslint-visitor-keys": "^4.2.0", + "espree": "^10.3.0", + "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", + "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" + "optionator": "^0.9.3" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true + } } }, "eslint-config-prettier": { @@ -3528,18 +3703,18 @@ "requires": {} }, "eslint-plugin-playwright": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-playwright/-/eslint-plugin-playwright-2.0.1.tgz", - "integrity": "sha512-f4a73xgCOK5Ug/5dtC82BVvND62lLqlMqgGkZn42teyvk6ccSyybHZXRHkpE7vKZSCjV57bnbR+3ucwItOhXlA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-playwright/-/eslint-plugin-playwright-2.1.0.tgz", + "integrity": "sha512-wMbHOehofSB1cBdzz2CLaCYaKNLeTQ0YnOW+7AHa281TJqlpEJUBgTHbRUYOUxiXphfWwOyTPvgr6vvEmArbSA==", "dev": true, "requires": { "globals": "^13.23.0" } }, "eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", + "integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==", "dev": true, "requires": { "esrecurse": "^4.3.0", @@ -3553,14 +3728,22 @@ "dev": true }, "espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", + "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", "dev": true, "requires": { - "acorn": "^8.9.0", + "acorn": "^8.14.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" + "eslint-visitor-keys": "^4.2.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true + } } }, "esprima": { @@ -3709,12 +3892,12 @@ } }, "file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, "requires": { - "flat-cache": "^3.0.4" + "flat-cache": "^4.0.0" } }, "fill-range": { @@ -3737,20 +3920,19 @@ } }, "flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, "requires": { "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" + "keyv": "^4.5.4" } }, "flatted": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", - "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz", + "integrity": "sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==", "dev": true }, "fs.realpath": { @@ -3941,12 +4123,6 @@ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, - "is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true - }, "is-property": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", @@ -4164,9 +4340,9 @@ "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==" }, "mysql2": { - "version": "3.11.4", - "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.11.4.tgz", - "integrity": "sha512-Z2o3tY4Z8EvSRDwknaC40MdZ3+m0sKbpnXrShQLdxPrAvcNli7jLrD2Zd2IzsRMw4eK9Yle500FDmlkIqp+krg==", + "version": "3.11.5", + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.11.5.tgz", + "integrity": "sha512-0XFu8rUmFN9vC0ME36iBvCUObftiMHItrYFhlCRvFWbLgpNqtC4Br/NmZX1HNCszxT0GGy5QtP+k3Q3eCJPaYA==", "requires": { "aws-ssl-profiles": "^1.1.1", "denque": "^2.1.0", @@ -4214,9 +4390,9 @@ "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==" }, "npm-check-updates": { - "version": "17.1.10", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-17.1.10.tgz", - "integrity": "sha512-GnN6KbUzC8BpwsRYJntuumgCiagZ0+xxorvUJM9m06d7AlyK9lm3iFsAsnXF3VAZZzpD5QjZvWBwNze61Vywkw==", + "version": "17.1.11", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-17.1.11.tgz", + "integrity": "sha512-TR2RuGIH7P3Qrb0jfdC/nT7JWqXPKjDlxuNQt3kx4oNVf1Pn5SBRB7KLypgYZhruivJthgTtfkkyK4mz342VjA==", "dev": true }, "once": { @@ -4346,18 +4522,18 @@ "dev": true }, "playwright": { - "version": "1.48.0", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.48.0.tgz", - "integrity": "sha512-qPqFaMEHuY/ug8o0uteYJSRfMGFikhUysk8ZvAtfKmUK3kc/6oNl/y3EczF8OFGYIi/Ex2HspMfzYArk6+XQSA==", + "version": "1.49.0", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.49.0.tgz", + "integrity": "sha512-eKpmys0UFDnfNb3vfsf8Vx2LEOtflgRebl0Im2eQQnYMA4Aqd+Zw8bEOB+7ZKvN76901mRnqdsiOGKxzVTbi7A==", "requires": { "fsevents": "2.3.2", - "playwright-core": "1.48.0" + "playwright-core": "1.49.0" } }, "playwright-core": { - "version": "1.48.0", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.48.0.tgz", - "integrity": "sha512-RBvzjM9rdpP7UUFrQzRwR8L/xR4HyC1QXMzGYTbf1vjw25/ya9NRAVnXi/0fvFopjebvyPzsmoK58xxeEOaVvA==" + "version": "1.49.0", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.49.0.tgz", + "integrity": "sha512-R+3KKTQF3npy5GTiKH/T+kdhoJfJojjHESR1YEWhYuEKRVfVaxH3+4+GvXE5xyCngCxhxnykk0Vlah9v8fs3jA==" }, "prelude-ls": { "version": "1.2.1", @@ -4366,9 +4542,9 @@ "dev": true }, "prettier": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", - "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz", + "integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==", "dev": true }, "process-nextick-args": { @@ -4623,12 +4799,6 @@ "supports-hyperlinks": "^2.0.0" } }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true - }, "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -4685,15 +4855,15 @@ "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==" }, "typescript": { - "version": "5.6.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", - "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", + "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", "dev": true }, "undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==" + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==" }, "uri-js": { "version": "4.4.1", diff --git a/tests/pw/package.json b/tests/pw/package.json index f7b2cc3e47..11ba9e9cf7 100644 --- a/tests/pw/package.json +++ b/tests/pw/package.json @@ -50,24 +50,24 @@ "license": "ISC", "devDependencies": { "@types/js-yaml": "^4.0.9", - "@types/node": "^22.9.0", - "@typescript-eslint/eslint-plugin": "^8.13.0", - "@typescript-eslint/parser": "^8.13.0", - "eslint": "8.57", + "@types/node": "^22.10.1", + "@typescript-eslint/eslint-plugin": "^8.17.0", + "@typescript-eslint/parser": "^8.17.0", + "eslint": "9.16", "eslint-config-prettier": "^9.1.0", - "eslint-plugin-playwright": "^2.0.1", + "eslint-plugin-playwright": "^2.1.0", "js-yaml": "^4.1.0", - "npm-check-updates": "^17.1.10", - "prettier": "^3.3.3", + "npm-check-updates": "^17.1.11", + "prettier": "^3.4.2", "tslib": "^2.8.1", - "typescript": "^5.6.3" + "typescript": "^5.7.2" }, "dependencies": { - "@faker-js/faker": "^9.2.0", - "@playwright/test": "1.48", - "@wordpress/env": "^10.11.0", - "dotenv": "^16.4.5", - "mysql2": "^3.11.4", + "@faker-js/faker": "^9.3.0", + "@playwright/test": "1.49", + "@wordpress/env": "^10.13.0", + "dotenv": "^16.4.7", + "mysql2": "^3.11.5", "php-serialize": "^5.0.1", "zod": "^3.23.8" } diff --git a/tests/pw/pages/abuseReportsPage.ts b/tests/pw/pages/abuseReportsPage.ts index 356682bb6f..4fd22c4160 100644 --- a/tests/pw/pages/abuseReportsPage.ts +++ b/tests/pw/pages/abuseReportsPage.ts @@ -16,6 +16,40 @@ export class AbuseReportsPage extends AdminPage { // abuse reports + // enable report abuse module + async enableReportAbuseModule(productName: string) { + // dokan menu + await this.goto(data.subUrls.backend.dokan.dokan); + await this.toBeVisible(selector.admin.dokan.menus.abuseReports); + + // dokan settings + await this.goto(data.subUrls.backend.dokan.settings); + await this.toBeVisible(selector.admin.dokan.settings.menus.productReportAbuse); + + // single product page + await this.goto(data.subUrls.frontend.productDetails(helpers.slugify(productName))); + await this.toBeVisible(abuseReportCustomer.reportAbuse); + } + + // disable report abuse module + async disableReportAbuseModule(productName: string) { + // dokan menu + await this.goto(data.subUrls.backend.dokan.dokan, { waitUntil: 'domcontentloaded' }, true); + await this.notToBeVisible(selector.admin.dokan.menus.abuseReports); + + // dokan settings + await this.goto(data.subUrls.backend.dokan.settings); + await this.notToBeVisible(selector.admin.dokan.settings.menus.productReportAbuse); + + // dokan menu page + await this.goto(data.subUrls.backend.dokan.abuseReports); + await this.notToBeVisible(abuseReportAdmin.abuseReportsText); + + // single product page + await this.goto(data.subUrls.frontend.productDetails(helpers.slugify(productName))); + await this.notToBeVisible(abuseReportCustomer.reportAbuse); + } + // abuse report render properly async adminAbuseReportRenderProperly() { await this.goIfNotThere(data.subUrls.backend.dokan.abuseReports); diff --git a/tests/pw/pages/catalogModePage.ts b/tests/pw/pages/catalogModePage.ts index d3b3527cef..3d95e36f53 100644 --- a/tests/pw/pages/catalogModePage.ts +++ b/tests/pw/pages/catalogModePage.ts @@ -38,7 +38,7 @@ export class CatalogModePage extends AdminPage { // vendor can't access catalog mode settings async accessCatalogModeSettings() { await this.goIfNotThere(data.subUrls.frontend.vDashboard.settingsStore); - await this.notToBeVisible(settingsVendor.hideProductPrice); + await this.notToBeVisible(settingsVendor.catalogMode.hideProductPrice); } // customer diff --git a/tests/pw/pages/colorsPage.ts b/tests/pw/pages/colorsPage.ts index 312d15f6b9..93b726ac5d 100644 --- a/tests/pw/pages/colorsPage.ts +++ b/tests/pw/pages/colorsPage.ts @@ -15,6 +15,20 @@ export class ColorsPage extends AdminPage { super(page); } + // enable color scheme customizer + async enableColorSchemeCustomizerModule() { + // dokan settings + await this.goto(data.subUrls.backend.dokan.settings); + await this.toBeVisible(settingsAdmin.menus.colors); + } + + // disable color scheme customizer + async disableColorSchemeCustomizerModule() { + // dokan settings + await this.goto(data.subUrls.backend.dokan.settings, { waitUntil: 'domcontentloaded' }, true); + await this.notToBeVisible(settingsAdmin.menus.colors); + } + // add color palette async addColorPalette(paletteName: string, paletteValues: paletteValues, paletteChoice: string = 'predefined') { await this.goToDokanSettings(); diff --git a/tests/pw/pages/customerPage.ts b/tests/pw/pages/customerPage.ts index 45c02b8958..7d6c5fa22b 100644 --- a/tests/pw/pages/customerPage.ts +++ b/tests/pw/pages/customerPage.ts @@ -164,10 +164,10 @@ export class CustomerPage extends BasePage { await this.clearAndType(customerAddress.billing.lastName, billingInfo.lastName); await this.clearAndType(customerAddress.billing.companyName, billingInfo.companyName); if (DOKAN_PRO) { - await this.clearAndType(customerAddress.billing.companyID, billingInfo.companyId); - await this.clearAndType(customerAddress.billing.vatOrTaxNumber, billingInfo.vatNumber); - await this.clearAndType(customerAddress.billing.nameOfBank, billingInfo.bankName); - await this.clearAndType(customerAddress.billing.bankIban, billingInfo.bankIban); + await this.clearAndType(customerAddress.billing.euFields.companyID, billingInfo.companyId); + await this.clearAndType(customerAddress.billing.euFields.vatOrTaxNumber, billingInfo.vatNumber); + await this.clearAndType(customerAddress.billing.euFields.nameOfBank, billingInfo.bankName); + await this.clearAndType(customerAddress.billing.euFields.bankIban, billingInfo.bankIban); } await this.click(customerAddress.billing.countryOrRegion); await this.clearAndType(customerAddress.billing.countryOrRegionInput, billingInfo.country); diff --git a/tests/pw/pages/euCompliancePage.ts b/tests/pw/pages/euCompliancePage.ts index 8323926603..efe07e5a17 100644 --- a/tests/pw/pages/euCompliancePage.ts +++ b/tests/pw/pages/euCompliancePage.ts @@ -23,6 +23,36 @@ export class EuCompliancePage extends AdminPage { // admin + // enable eu compliance fields module + async enableEuComplianceFieldsModule() { + // dokan settings + await this.goto(data.subUrls.backend.dokan.settings); + await this.toBeVisible(selector.admin.dokan.settings.menus.euComplianceFields); + + // vendor dashboard settings + await this.goto(data.subUrls.frontend.vDashboard.settingsStore); + await this.multipleElementVisible(selector.vendor.vStoreSettings.euFields); + + // my account + await this.goto(data.subUrls.frontend.billingAddress); + await this.multipleElementVisible(customerAddress.billing.euFields); + } + + // disable eu compliance fields module + async disableEuComplianceFieldsModule() { + // dokan settings + await this.goto(data.subUrls.backend.dokan.settings); + await this.notToBeVisible(selector.admin.dokan.settings.menus.euComplianceFields); + + // vendor dashboard settings + await this.goto(data.subUrls.frontend.vDashboard.settingsStore); + await this.multipleElementNotVisible(selector.vendor.vStoreSettings.euFields); + + // my account + await this.goto(data.subUrls.frontend.billingAddress); + await this.multipleElementNotVisible(customerAddress.billing.euFields); + } + async setDokanEuComplianceSettings(option: string) { await this.goToDokanSettings(); await this.click(settingsAdmin.menus.euComplianceFields); @@ -96,20 +126,20 @@ export class EuCompliancePage extends AdminPage { async addUserEuCompliance(userId: string, euData: eUComplianceData) { await this.goIfNotThere(data.subUrls.backend.editUser(userId)); await this.clearAndType(userInfo.billingAddress.company, euData.companyName!); - await this.clearAndType(userInfo.billingAddress.companyIdOrEuidNumber, euData.companyId); - await this.clearAndType(userInfo.billingAddress.vatOrTaxNumber, euData.vatNumber); - await this.clearAndType(userInfo.billingAddress.bank, euData.bankName); - await this.clearAndType(userInfo.billingAddress.bankIban, euData.bankIban); + await this.clearAndType(userInfo.billingAddress.euFields.companyIdOrEuidNumber, euData.companyId); + await this.clearAndType(userInfo.billingAddress.euFields.vatOrTaxNumber, euData.vatNumber); + await this.clearAndType(userInfo.billingAddress.euFields.bank, euData.bankName); + await this.clearAndType(userInfo.billingAddress.euFields.bankIban, euData.bankIban); // update user await this.clickAndWaitForResponse(data.subUrls.backend.user, selector.admin.users.updateUser, 302); await this.toContainText(selector.admin.users.updateSuccessMessage, 'User updated.'); await this.toHaveValue(userInfo.billingAddress.company, euData.companyName!); - await this.toHaveValue(userInfo.billingAddress.companyIdOrEuidNumber, euData.companyId); - await this.toHaveValue(userInfo.billingAddress.vatOrTaxNumber, euData.vatNumber); - await this.toHaveValue(userInfo.billingAddress.bank, euData.bankName); - await this.toHaveValue(userInfo.billingAddress.bankIban, euData.bankIban); + await this.toHaveValue(userInfo.billingAddress.euFields.companyIdOrEuidNumber, euData.companyId); + await this.toHaveValue(userInfo.billingAddress.euFields.vatOrTaxNumber, euData.vatNumber); + await this.toHaveValue(userInfo.billingAddress.euFields.bank, euData.bankName); + await this.toHaveValue(userInfo.billingAddress.euFields.bankIban, euData.bankIban); } // edit vendor @@ -147,18 +177,18 @@ export class EuCompliancePage extends AdminPage { // add or update EU compliance data async customerAddEuComplianceData(euData: eUComplianceData): Promise { await this.goIfNotThere(data.subUrls.frontend.billingAddress); - await this.clearAndType(customerAddress.billing.companyID, euData.companyId); - await this.clearAndType(customerAddress.billing.vatOrTaxNumber, euData.vatNumber); - await this.clearAndType(customerAddress.billing.nameOfBank, euData.bankName); - await this.clearAndType(customerAddress.billing.bankIban, euData.bankIban); + await this.clearAndType(customerAddress.billing.euFields.companyID, euData.companyId); + await this.clearAndType(customerAddress.billing.euFields.vatOrTaxNumber, euData.vatNumber); + await this.clearAndType(customerAddress.billing.euFields.nameOfBank, euData.bankName); + await this.clearAndType(customerAddress.billing.euFields.bankIban, euData.bankIban); await this.clickAndWaitForResponseAndLoadState(data.subUrls.frontend.billingAddress, customerAddress.billing.saveAddress, 302); await this.goIfNotThere(data.subUrls.frontend.billingAddress); - await this.toHaveValue(customerAddress.billing.companyID, euData.companyId); - await this.toHaveValue(customerAddress.billing.vatOrTaxNumber, euData.vatNumber); - await this.toHaveValue(customerAddress.billing.nameOfBank, euData.bankName); - await this.toHaveValue(customerAddress.billing.bankIban, euData.bankIban); + await this.toHaveValue(customerAddress.billing.euFields.companyID, euData.companyId); + await this.toHaveValue(customerAddress.billing.euFields.vatOrTaxNumber, euData.vatNumber); + await this.toHaveValue(customerAddress.billing.euFields.nameOfBank, euData.bankName); + await this.toHaveValue(customerAddress.billing.euFields.bankIban, euData.bankIban); } // view vendor EU compliance data diff --git a/tests/pw/pages/followStorePage.ts b/tests/pw/pages/followStorePage.ts index a0ac762f58..b820401212 100644 --- a/tests/pw/pages/followStorePage.ts +++ b/tests/pw/pages/followStorePage.ts @@ -9,6 +9,36 @@ export class FollowStorePage extends CustomerPage { super(page); } + // enable follow store module + async enableFollowStoreModule() { + // vendor dashboard menu + await this.goto(data.subUrls.frontend.vDashboard.dashboard); + await this.toBeVisible(selector.vendor.vDashboard.menus.primary.followers); + + // my account menu + await this.goto(data.subUrls.frontend.myAccount); + await this.toBeVisible(selector.customer.cMyAccount.menus.vendors); + } + + // disable follow store module + async disableFollowStoreModule() { + // vendor dashboard menu + await this.goto(data.subUrls.frontend.vDashboard.dashboard); + await this.notToBeVisible(selector.vendor.vDashboard.menus.primary.followers); + + // vendor dashboard menu page + await this.goto(data.subUrls.frontend.vDashboard.followers); + await this.toBeVisible(selector.frontend.pageNotFound); + + // my account menu + await this.goto(data.subUrls.frontend.myAccount); + await this.notToBeVisible(selector.customer.cMyAccount.menus.vendors); + + // my account menu page + await this.goto(data.subUrls.frontend.followingStores); + await this.toBeVisible(selector.frontend.pageNotFound); + } + // vendor Followers // vendor followers render properly diff --git a/tests/pw/pages/geolocationPage.ts b/tests/pw/pages/geolocationPage.ts index 31b1b52ba1..6ce5eb3b49 100644 --- a/tests/pw/pages/geolocationPage.ts +++ b/tests/pw/pages/geolocationPage.ts @@ -13,6 +13,36 @@ export class GeolocationPage extends AdminPage { await this.gotoUntilNetworkidle(data.subUrls.frontend.productDetails(helpers.slugify(productName))); } + // enable geolocation module + async enableGeolocationModule() { + // dokan settings + await this.goto(data.subUrls.backend.dokan.settings); + await this.toBeVisible(selector.admin.dokan.settings.menus.geolocation); + + // shop page + await this.goto(data.subUrls.frontend.shop); + await this.toBeVisible(selector.customer.cShop.map.locationMap); + + // store listing page + await this.goto(data.subUrls.frontend.storeListing); + await this.toBeVisible(selector.customer.cStoreList.map.locationMap); + } + + // disable geolocation module + async disableGeolocationModule() { + // dokan settings + await this.goto(data.subUrls.backend.dokan.settings); + await this.notToBeVisible(selector.admin.dokan.settings.menus.geolocation); + + // shop page + await this.goto(data.subUrls.frontend.shop); + await this.notToBeVisible(selector.customer.cShop.map.locationMap); + + // store listing page + await this.goto(data.subUrls.frontend.storeListing); + await this.notToBeVisible(selector.customer.cStoreList.map.locationMap); + } + // view map position async viewMapPosition(position: 'top' | 'left' | 'right'): Promise { await this.gotoUntilNetworkidle(data.subUrls.frontend.storeListing); diff --git a/tests/pw/pages/liveChatPage.ts b/tests/pw/pages/liveChatPage.ts index 040bc8abbd..a90eefbd4f 100644 --- a/tests/pw/pages/liveChatPage.ts +++ b/tests/pw/pages/liveChatPage.ts @@ -23,6 +23,22 @@ export class LiveChatPage extends BasePage { await this.goIfNotThere(data.subUrls.frontend.productDetails(helpers.slugify(productName)), 'domcontentloaded', force); } + // admin + + // enable live chat module + async enableLiveChatModule() { + // dokan settings + await this.goto(data.subUrls.backend.dokan.settings); + await this.toBeVisible(selector.admin.dokan.settings.menus.liveChat); + } + + // disable live chat module + async disableLiveChatModule() { + // dokan settings + await this.goto(data.subUrls.backend.dokan.settings, { waitUntil: 'domcontentloaded' }, true); + await this.notToBeVisible(selector.admin.dokan.settings.menus.liveChat); + } + // vendor // vendor inbox render properly diff --git a/tests/pw/pages/liveSearchPage.ts b/tests/pw/pages/liveSearchPage.ts index 9023b979fd..88cb1a8963 100644 --- a/tests/pw/pages/liveSearchPage.ts +++ b/tests/pw/pages/liveSearchPage.ts @@ -11,6 +11,28 @@ export class LiveSearch extends BasePage { super(page); } + // enable live search module + async enableLiveSearchModule() { + // dokan settings + await this.goto(data.subUrls.backend.dokan.settings); + await this.toBeVisible(selector.admin.dokan.settings.menus.liveSearch); + + // my account + await this.goto(data.subUrls.frontend.myAccount); + await this.toBeVisible(liveSearchCustomer.liveSearchDiv); + } + + // disable live search module + async disableLiveSearchModule() { + // dokan settings + await this.goto(data.subUrls.backend.dokan.settings); + await this.notToBeVisible(selector.admin.dokan.settings.menus.liveSearch); + + // my account + await this.goto(data.subUrls.frontend.myAccount); + await this.notToBeVisible(liveSearchCustomer.liveSearchDiv); + } + async searchByLiveSearch(productName: string, autoload = false, categoryName?: string) { await this.gotoUntilNetworkidle(data.subUrls.frontend.myAccount); diff --git a/tests/pw/pages/minMaxQuantitiesPage.ts b/tests/pw/pages/minMaxQuantitiesPage.ts new file mode 100644 index 0000000000..017fbee42e --- /dev/null +++ b/tests/pw/pages/minMaxQuantitiesPage.ts @@ -0,0 +1,37 @@ +import { Page } from '@playwright/test'; +import { BasePage } from '@pages/basePage'; +import { selector } from '@pages/selectors'; +import { data } from '@utils/testData'; + +// selectors +const settingsVendor = selector.vendor.vStoreSettings; +const productsVendor = selector.vendor.product; +export class MinMaxQuantitiesPage extends BasePage { + constructor(page: Page) { + super(page); + } + + // enable enable min max quantities module + async enableMinMaxQuantitiesModule() { + // vendor dashboard settings + await this.goto(data.subUrls.frontend.vDashboard.settingsStore); + await this.multipleElementVisible(settingsVendor.minMax); + + // vendor dashboard + await this.goIfNotThere(data.subUrls.frontend.vDashboard.products); + await this.clickAndWaitForLoadState(productsVendor.addNewProduct); + await this.multipleElementVisible(productsVendor.minMax); + } + + // disable enable min max quantities module + async disableMinMaxQuantitiesModule() { + // vendor dashboard settings + await this.goto(data.subUrls.frontend.vDashboard.settingsStore); + await this.multipleElementNotVisible(settingsVendor.minMax); + + // vendor dashboard + await this.goIfNotThere(data.subUrls.frontend.vDashboard.products); + await this.clickAndWaitForLoadState(productsVendor.addNewProduct); + await this.multipleElementNotVisible(productsVendor.minMax); + } +} diff --git a/tests/pw/pages/paymentsPage.ts b/tests/pw/pages/paymentsPage.ts index c8e92ecb03..86c918bb70 100644 --- a/tests/pw/pages/paymentsPage.ts +++ b/tests/pw/pages/paymentsPage.ts @@ -36,11 +36,85 @@ export class PaymentsPage extends AdminPage { await this.toContainText(woocommerceSettings.updatedSuccessMessage, payment.saveSuccessMessage); } - // admin setup stripe sonnect + // enable MangoPay module + async enableMangoPayModule() { + await this.goto(data.subUrls.backend.wc.paymentSettings); + await this.toBeVisible(paymentSettingsAdmin.setupDokanMangoPay); + } + + // enable PayPal Marketplace module + async enablePayPalMarketplaceModule() { + await this.goto(data.subUrls.backend.wc.paymentSettings); + await this.toBeVisible(paymentSettingsAdmin.setupDokanPayPalMarketplace); + } + + // enable Razorpay module + async enableRazorpayModule() { + await this.goto(data.subUrls.backend.wc.paymentSettings); + await this.toBeVisible(paymentSettingsAdmin.setupDokanRazorpay); + } + + // enable Stripe Connect module + async enableStripeConnectModule() { + await this.goto(data.subUrls.backend.wc.paymentSettings); + await this.toBeVisible(paymentSettingsAdmin.setupDokanStripeConnect); + } + + // enable Stripe Express module + async enableStripeExpressModule() { + await this.goto(data.subUrls.backend.wc.paymentSettings); + await this.toBeVisible(paymentSettingsAdmin.setupDokanStripeExpress); + } + + // disable MangoPay module + async disableMangoPayModule() { + await this.goto(data.subUrls.backend.wc.paymentSettings, { waitUntil: 'domcontentloaded' }, true); + await this.notToBeVisible(paymentSettingsAdmin.setupDokanMangoPay); + + await this.goto(data.subUrls.backend.wc.mangoPaySettings); + await this.notToBeVisible(paymentSettingsAdmin.dokanMangoPay.mangoPayText); + } + + // disable PayPal Marketplace module + async disablePayPalMarketplaceModule() { + await this.goto(data.subUrls.backend.wc.paymentSettings, { waitUntil: 'domcontentloaded' }, true); + await this.notToBeVisible(paymentSettingsAdmin.setupDokanPayPalMarketplace); + + await this.goto(data.subUrls.backend.wc.paypalMarketplaceSettings); + await this.notToBeVisible(paymentSettingsAdmin.paypalMarketPlace.paypalMarketPlaceText); + } + + // disable Razorpay module + async disableRazorpayModule() { + await this.goto(data.subUrls.backend.wc.paymentSettings, { waitUntil: 'domcontentloaded' }, true); + await this.notToBeVisible(paymentSettingsAdmin.setupDokanRazorpay); + + await this.goto(data.subUrls.backend.wc.razorPaySettings); + await this.notToBeVisible(paymentSettingsAdmin.dokanRazorpay.razorpayText); + } + + // disable Stripe Connect module + async disableStripeConnectModule() { + await this.goto(data.subUrls.backend.wc.paymentSettings, { waitUntil: 'domcontentloaded' }, true); + await this.notToBeVisible(paymentSettingsAdmin.setupDokanStripeConnect); + + await this.goto(data.subUrls.backend.wc.stripeConnectSettings); + await this.notToBeVisible(paymentSettingsAdmin.stripe.stripeConnectText); + } + + // disable Stripe Express module + async disableStripeExpressModule() { + await this.goto(data.subUrls.backend.wc.paymentSettings, { waitUntil: 'domcontentloaded' }, true); + await this.notToBeVisible(paymentSettingsAdmin.setupDokanStripeExpress); + + await this.goto(data.subUrls.backend.wc.stripeExpressSettings); + await this.notToBeVisible(paymentSettingsAdmin.stripeExpress.stripeExpressText); + } + + // admin setup stripe connect async setupStripeConnect(payment: payment) { - await this.goToWcPaymentSettings(); + await this.goto(data.subUrls.backend.wc.stripeConnectSettings); - await this.click(paymentSettingsAdmin.setupDokanStripeConnect); // setup strip connect await this.check(paymentSettingsAdmin.stripe.enableDisableStripe); await this.clearAndType(paymentSettingsAdmin.stripe.title, payment.stripeConnect.title); @@ -56,16 +130,16 @@ export class PaymentsPage extends AdminPage { await this.clearAndType(paymentSettingsAdmin.stripe.testPublishableKey, payment.stripeConnect.testPublishableKey); await this.clearAndType(paymentSettingsAdmin.stripe.testSecretKey, payment.stripeConnect.testSecretKey); await this.clearAndType(paymentSettingsAdmin.stripe.testClientId, payment.stripeConnect.testClientId); - await this.click(paymentSettingsAdmin.stripe.stripeSaveChanges); + await this.removeAttribute(paymentSettingsAdmin.dokanMangoPay.dokanMangopaySaveChanges, 'disabled'); + await this.clickAndWaitForResponseAndLoadState(data.subUrls.backend.wc.stripeConnectSettings, paymentSettingsAdmin.stripe.stripeSaveChanges); await this.toContainText(woocommerceSettings.updatedSuccessMessage, payment.saveSuccessMessage); } // admin setup dokan paypal marketplace async setupPaypalMarketPlace(payment: payment) { - await this.goToWcPaymentSettings(); + await this.goto(data.subUrls.backend.wc.paypalMarketplaceSettings); - await this.click(paymentSettingsAdmin.setupDokanPayPalMarketplace); // setup paypal marketplace await this.check(paymentSettingsAdmin.paypalMarketPlace.enableDisablePayPalMarketplace); await this.clearAndType(paymentSettingsAdmin.paypalMarketPlace.title, payment.paypalMarketPlace.title); @@ -84,16 +158,16 @@ export class PaymentsPage extends AdminPage { await this.check(paymentSettingsAdmin.paypalMarketPlace.displayNoticeToConnectSeller); await this.check(paymentSettingsAdmin.paypalMarketPlace.sendAnnouncementToConnectSeller); await this.clearAndType(paymentSettingsAdmin.paypalMarketPlace.sendAnnouncementInterval, payment.paypalMarketPlace.announcementInterval); - await this.click(paymentSettingsAdmin.paypalMarketPlace.paypalMarketPlaceSaveChanges); + await this.removeAttribute(paymentSettingsAdmin.dokanMangoPay.dokanMangopaySaveChanges, 'disabled'); + await this.clickAndWaitForResponseAndLoadState(data.subUrls.backend.wc.paypalMarketplaceSettings, paymentSettingsAdmin.paypalMarketPlace.paypalMarketPlaceSaveChanges); await this.toContainText(woocommerceSettings.updatedSuccessMessage, payment.saveSuccessMessage); } // admin setup mangopay async setupMangoPay(payment: payment) { - await this.goToWcPaymentSettings(); + await this.goto(data.subUrls.backend.wc.mangoPaySettings); - await this.click(paymentSettingsAdmin.setupDokanMangoPay); // setup mangopay await this.check(paymentSettingsAdmin.dokanMangoPay.enableDisableMangoPayPayment); await this.clearAndType(paymentSettingsAdmin.dokanMangoPay.title, payment.mangoPay.title); @@ -131,16 +205,17 @@ export class PaymentsPage extends AdminPage { await this.check(paymentSettingsAdmin.dokanMangoPay.displayNoticeToNonConnectedSellers); await this.check(paymentSettingsAdmin.dokanMangoPay.sendAnnouncementToNonConnectedSellers); await this.clearAndType(paymentSettingsAdmin.dokanMangoPay.announcementInterval, payment.mangoPay.announcementInterval); - await this.click(paymentSettingsAdmin.dokanMangoPay.dokanMangopaySaveChanges); + + await this.removeAttribute(paymentSettingsAdmin.dokanMangoPay.dokanMangopaySaveChanges, 'disabled'); + await this.clickAndWaitForResponseAndLoadState(data.subUrls.backend.wc.mangoPaySettings, paymentSettingsAdmin.dokanMangoPay.dokanMangopaySaveChanges); await this.toContainText(woocommerceSettings.updatedSuccessMessage, payment.saveSuccessMessage); } // admin setup razorpay async setupRazorpay(payment: payment) { - await this.goToWcPaymentSettings(); + await this.goto(data.subUrls.backend.wc.razorPaySettings); - await this.click(paymentSettingsAdmin.setupDokanRazorpay); // setup razorpay await this.check(paymentSettingsAdmin.dokanRazorpay.enableDisableDokanRazorpay); await this.clearAndType(paymentSettingsAdmin.dokanRazorpay.title, payment.razorPay.title); @@ -155,16 +230,15 @@ export class PaymentsPage extends AdminPage { await this.check(paymentSettingsAdmin.dokanRazorpay.displayNoticeToConnectSeller); await this.check(paymentSettingsAdmin.dokanRazorpay.sendAnnouncementToConnectSeller); await this.clearAndType(paymentSettingsAdmin.dokanRazorpay.sendAnnouncementInterval, payment.razorPay.announcementInterval); - await this.click(paymentSettingsAdmin.dokanRazorpay.dokanRazorpaySaveChanges); + await this.removeAttribute(paymentSettingsAdmin.dokanMangoPay.dokanMangopaySaveChanges, 'disabled'); + await this.clickAndWaitForResponseAndLoadState(data.subUrls.backend.wc.razorPaySettings, paymentSettingsAdmin.dokanRazorpay.dokanRazorpaySaveChanges); await this.toContainText(woocommerceSettings.updatedSuccessMessage, payment.saveSuccessMessage); } // admin setup stripe express async setupStripeExpress(payment: payment) { - await this.goToWcPaymentSettings(); - - await this.click(paymentSettingsAdmin.setupDokanStripeExpress); + await this.goto(data.subUrls.backend.wc.stripeExpressSettings); // stripe express await this.check(paymentSettingsAdmin.stripeExpress.enableOrDisableStripeExpress); @@ -197,8 +271,10 @@ export class PaymentsPage extends AdminPage { // advanced settings await this.check(paymentSettingsAdmin.stripeExpress.displayNoticeToNonConnectedSellers); await this.check(paymentSettingsAdmin.stripeExpress.sendAnnouncementToNonConnectedSellers); - await this.clearAndType(paymentSettingsAdmin.stripeExpress.announcementInterval, payment.stripeExpress.announcementInterval); - await this.click(paymentSettingsAdmin.stripeExpress.stripeExpressSaveChanges); + await this.type(paymentSettingsAdmin.stripeExpress.announcementInterval, payment.stripeExpress.announcementInterval); + await this.check(paymentSettingsAdmin.stripeExpress.debugLog); + await this.removeAttribute(paymentSettingsAdmin.dokanMangoPay.dokanMangopaySaveChanges, 'disabled'); + await this.clickAndWaitForResponseAndLoadState(data.subUrls.backend.wc.stripeExpressSettings, paymentSettingsAdmin.stripeExpress.stripeExpressSaveChanges); await this.toContainText(woocommerceSettings.updatedSuccessMessage, payment.saveSuccessMessage); } diff --git a/tests/pw/pages/printfulPage.ts b/tests/pw/pages/printfulPage.ts index c62cd07fd4..eb74186c4a 100644 --- a/tests/pw/pages/printfulPage.ts +++ b/tests/pw/pages/printfulPage.ts @@ -11,6 +11,34 @@ export class PrintfulPage extends VendorPage { super(page); } + // enable printful module + async enablePrintfulModule() { + // dokan settings + await this.goto(data.subUrls.backend.dokan.settings); + await this.toBeVisible(selector.admin.dokan.settings.menus.printful); + + // vendor dashboard menu + await this.goto(data.subUrls.frontend.vDashboard.dashboard); + await this.hover(selector.vendor.vDashboard.menus.primary.settings); + await this.toBeVisible(selector.vendor.vDashboard.menus.subMenus.printful); + } + + // disable printful module + async disablePrintfulModule() { + // dokan settings + await this.goto(data.subUrls.backend.dokan.settings); + await this.notToBeVisible(selector.admin.dokan.settings.menus.printful); + + // vendor dashboard menu + await this.goto(data.subUrls.frontend.vDashboard.dashboard); + await this.hover(selector.vendor.vDashboard.menus.primary.settings); + await this.notToBeVisible(selector.vendor.vDashboard.menus.subMenus.printful); + + // vendor dashboard settings menu + await this.goto(data.subUrls.frontend.vDashboard.settingsPrintful); + await this.notToBeVisible(vendorPrintful.printfulSettingsDiv); + } + // printful render properly async vendorPrintfulSettingsRenderProperly(): Promise { await this.goIfNotThere(data.subUrls.frontend.vDashboard.settingsPrintful); diff --git a/tests/pw/pages/productAddonsPage.ts b/tests/pw/pages/productAddonsPage.ts index 59c2e1ce77..c25f0636a6 100644 --- a/tests/pw/pages/productAddonsPage.ts +++ b/tests/pw/pages/productAddonsPage.ts @@ -7,12 +7,43 @@ import { unserialize } from 'php-serialize'; // selectors const addonsVendor = selector.vendor.vAddonSettings; +const productsVendor = selector.vendor.product; export class ProductAddonsPage extends VendorPage { constructor(page: Page) { super(page); } + // enable product addon module + async enableProductAddonModule() { + // vendor dashboard settings menu + await this.goto(data.subUrls.frontend.vDashboard.dashboard); + await this.hover(selector.vendor.vDashboard.menus.primary.settings); + await this.toBeVisible(selector.vendor.vDashboard.menus.subMenus.addons); + + // vendor dashboard + await this.goto(data.subUrls.frontend.vDashboard.products); + await this.clickAndWaitForLoadState(productsVendor.addNewProduct); + await this.toBeVisible(productsVendor.addon.addonSection); + } + + // disable product addon module + async disableProductAddonModule() { + // vendor dashboard settings menu + await this.goto(data.subUrls.frontend.vDashboard.dashboard); + await this.hover(selector.vendor.vDashboard.menus.primary.settings); + await this.notToBeVisible(selector.vendor.vDashboard.menus.subMenus.addons); + + // vendor dashboard settings menu page + await this.goto(data.subUrls.frontend.vDashboard.settingsAddon); + await this.notToBeVisible(addonsVendor.productAddonsDiv); + + // vendor dashboard + await this.goto(data.subUrls.frontend.vDashboard.products); + await this.clickAndWaitForLoadState(productsVendor.addNewProduct); + await this.notToBeVisible(productsVendor.addon.addonSection); + } + // product addons render properly async vendorProductAddonsSettingsRenderProperly(): Promise { await this.goIfNotThere(data.subUrls.frontend.vDashboard.settingsAddon); diff --git a/tests/pw/pages/productAdvertisingPage.ts b/tests/pw/pages/productAdvertisingPage.ts index aa90a9dde7..b55c3bca97 100644 --- a/tests/pw/pages/productAdvertisingPage.ts +++ b/tests/pw/pages/productAdvertisingPage.ts @@ -6,6 +6,7 @@ import { productAdvertisement } from '@utils/interfaces'; // selectors const productAdvertisingAdmin = selector.admin.dokan.productAdvertising; +const productsVendor = selector.vendor.product; export class ProductAdvertisingPage extends AdminPage { constructor(page: Page) { @@ -22,6 +23,44 @@ export class ProductAdvertisingPage extends AdminPage { await this.toContainText(selector.admin.dokan.settings.dokanUpdateSuccessMessage, 'Setting has been saved successfully.'); } + // enable product advertising module + async enableProductAdvertisingModule() { + // dokan menu + await this.goto(data.subUrls.backend.dokan.dokan); + await this.toBeVisible(selector.admin.dokan.menus.advertising); + + // dokan settings + await this.goto(data.subUrls.backend.dokan.settings); + await this.toBeVisible(selector.admin.dokan.settings.menus.productAdvertising); + + // vendor dashboard + await this.goto(data.subUrls.frontend.vDashboard.products); + await this.toBeVisible(productsVendor.table.productAdvertisementColumn); + await this.clickAndWaitForLoadState(productsVendor.addNewProduct); + await this.toBeVisible(productsVendor.advertisement.advertisementSection); + } + + // disable product advertising module + async disableProductAdvertisingModule() { + // dokan menu + await this.goto(data.subUrls.backend.dokan.dokan); + await this.notToBeVisible(selector.admin.dokan.menus.advertising); + + // dokan menu page + await this.goto(data.subUrls.backend.dokan.productAdvertising); + await this.notToBeVisible(productAdvertisingAdmin.productAdvertisingDiv); + + // dokan settings + await this.goto(data.subUrls.backend.dokan.settings); + await this.notToBeVisible(selector.admin.dokan.settings.menus.productAdvertising); + + // vendor dashboard + await this.goto(data.subUrls.frontend.vDashboard.products); + await this.notToBeVisible(productsVendor.table.productAdvertisementColumn); + await this.clickAndWaitForLoadState(productsVendor.addNewProduct); + await this.notToBeVisible(productsVendor.advertisement.advertisementSection); + } + // product advertising render properly async adminProductAdvertisingRenderProperly() { await this.goIfNotThere(data.subUrls.backend.dokan.productAdvertising); diff --git a/tests/pw/pages/productEnquiryPage.ts b/tests/pw/pages/productEnquiryPage.ts index 3cd80e9fba..7ff233072a 100644 --- a/tests/pw/pages/productEnquiryPage.ts +++ b/tests/pw/pages/productEnquiryPage.ts @@ -14,6 +14,30 @@ export class ProductEnquiryPage extends CustomerPage { // product enquiry + // enable product enquiry module + async enableProductEnquiryModule(productName: string) { + // dokan settings + await this.goto(data.subUrls.backend.dokan.settings); + await this.click(selector.admin.dokan.settings.menus.sellingOptions); + await this.toBeVisible(selector.admin.dokan.settings.selling.guestProductEnquiry); + + // single product page + await this.goToProductDetails(productName); + await this.toBeVisible(selector.customer.cSingleProduct.menus.productEnquiry); + } + + // disable product enquiry module + async disableProductEnquiryModule(productName: string) { + // dokan settings + await this.goto(data.subUrls.backend.dokan.settings); + await this.click(selector.admin.dokan.settings.menus.sellingOptions); + await this.notToBeVisible(selector.admin.dokan.settings.selling.guestProductEnquiry); + + // single product page + await this.goToProductDetails(productName); + await this.notToBeVisible(selector.customer.cSingleProduct.menus.productEnquiry); + } + // enquire product async enquireProduct(productName: string, enquiry: product['enquiry']): Promise { await this.goToProductDetails(productName); diff --git a/tests/pw/pages/productQAPage.ts b/tests/pw/pages/productQAPage.ts index 022f736e52..4998baf8fc 100644 --- a/tests/pw/pages/productQAPage.ts +++ b/tests/pw/pages/productQAPage.ts @@ -6,7 +6,7 @@ import { questionsAnswers } from '@utils/interfaces'; import { BasePage } from '@pages/basePage'; // selectors -const productQAAdmin = selector.admin.dokan.productQA; +const productQAAdmin = selector.admin.dokan.productQa; const productQAVendor = selector.vendor.vProductQA; const productQACustomer = selector.customer.cSingleProduct.questionsAnswers; @@ -29,6 +29,44 @@ export class ProductQAPage extends BasePage { // admin + // enable product QA module + async enableProductQaModule(productName: string) { + // dokan menu + await this.goto(data.subUrls.backend.dokan.dokan); + await this.toBeVisible(selector.admin.dokan.menus.productQA); + + // vendor dashboard menu + await this.goto(data.subUrls.frontend.vDashboard.dashboard); + await this.toBeVisible(selector.vendor.vDashboard.menus.primary.productQa); + + // single product page + await this.goto(data.subUrls.frontend.productDetails(helpers.slugify(productName))); + await this.toBeVisible(selector.customer.cSingleProduct.menus.questionsAnswers); + } + + // disable product QA module + async disableProductQaModule(productName: string) { + // dokan menu + await this.goto(data.subUrls.backend.dokan.dokan); + await this.notToBeVisible(selector.admin.dokan.menus.productQA); + + // dokan menu page + await this.goto(data.subUrls.backend.dokan.productQA); + await this.notToBeVisible(productQAAdmin.productQaDiv); + + // vendor dashboard menu + await this.goto(data.subUrls.frontend.vDashboard.dashboard); + await this.notToBeVisible(selector.vendor.vDashboard.menus.primary.productQa); + + // vendor dashboard menu page + await this.goto(data.subUrls.frontend.vDashboard.productQa); + await this.notToBeVisible(selector.vendor.vDashboard.dashboardDiv); + + // single product page + await this.goto(data.subUrls.frontend.productDetails(helpers.slugify(productName))); + await this.notToBeVisible(selector.customer.cSingleProduct.menus.questionsAnswers); + } + // product question answers render properly async adminProductQARenderProperly() { await this.goToProductQA(); @@ -193,7 +231,7 @@ export class ProductQAPage extends BasePage { // product question answers render properly async vendorProductQARenderProperly() { - await this.goIfNotThere(data.subUrls.frontend.vDashboard.productQA); + await this.goIfNotThere(data.subUrls.frontend.vDashboard.productQa); // product question answers text is visible await this.toBeVisible(productQAVendor.productQuestionAnswersText); @@ -226,13 +264,13 @@ export class ProductQAPage extends BasePage { // filter questions async vendorFilterQuestions(productName: string): Promise { - await this.goIfNotThere(data.subUrls.frontend.vDashboard.productQA); + await this.goIfNotThere(data.subUrls.frontend.vDashboard.productQa); await this.click(productQAVendor.filters.filterByProducts); await this.typeAndWaitForResponse(data.subUrls.ajax, productQAVendor.filters.filterInput, productName); await this.toContainText(productQAVendor.filters.result, productName); await this.press(data.key.arrowDown); await this.press(data.key.enter); - await this.clickAndWaitForResponse(data.subUrls.frontend.vDashboard.productQA, productQAVendor.filters.filter); + await this.clickAndWaitForResponse(data.subUrls.frontend.vDashboard.productQa, productQAVendor.filters.filter); } // answer question diff --git a/tests/pw/pages/selectors.ts b/tests/pw/pages/selectors.ts index 9e54cdfafe..88e0398297 100644 --- a/tests/pw/pages/selectors.ts +++ b/tests/pw/pages/selectors.ts @@ -203,17 +203,22 @@ export const selector = { menus: { dashboard: '//li[contains(@class,"toplevel_page_dokan")]//a[text()="Dashboard"]', withdraw: '//li[contains(@class,"toplevel_page_dokan")]//a[text()="Withdraw"]', + reverseWithdrawal: '//li[contains(@class,"toplevel_page_dokan")]//a[text()="Reverse Withdrawal"]', vendors: '//li[contains(@class,"toplevel_page_dokan")]//a[text()="Vendors"]', abuseReports: '//li[contains(@class,"toplevel_page_dokan")]//a[text()="Abuse Reports"]', + rfq: '//li[contains(@class,"toplevel_page_dokan")]//a[text()="RFQ"]', + sellerBadge: '//li[contains(@class,"toplevel_page_dokan")]//a[text()="Seller Badge"]', storeReviews: '//li[contains(@class,"toplevel_page_dokan")]//a[text()="Store Reviews"]', - storeSupport: '//li[contains(@class,"toplevel_page_dokan")]//a[text()="Store Support"]', + storeSupport: '//li[contains(@class,"toplevel_page_dokan")]//a[contains(.,"Store Support")]', announcements: '//li[contains(@class,"toplevel_page_dokan")]//a[text()="Announcements"]', refunds: '//li[contains(@class,"toplevel_page_dokan")]//a[contains(text(),"Refunds")]', reports: '//li[contains(@class,"toplevel_page_dokan")]//a[text()="Reports"]', modules: '//li[contains(@class,"toplevel_page_dokan")]//a[text()="Modules"]', proFeature: '//li[contains(@class,"toplevel_page_dokan")]//a[text()="PRO Features"]', tools: '//li[contains(@class,"toplevel_page_dokan")]//a[text()="Tools"]', + productQA: '//li[contains(@class,"toplevel_page_dokan")]//a[text()="Product Q&A"]', verifications: '//li[contains(@class,"toplevel_page_dokan")]//a[text()="Verifications"]', + subscriptions: '//li[contains(@class,"toplevel_page_dokan")]//a[text()="Subscriptions"]', advertising: '//li[contains(@class,"toplevel_page_dokan")]//a[text()="Advertising"]', wholesaleCustomer: '//li[contains(@class,"toplevel_page_dokan")]//a[text()="Wholesale Customer"]', help: '//li[contains(@class,"toplevel_page_dokan")]//span[text()="Help"]/..', @@ -859,6 +864,7 @@ export const selector = { // Store Support storeSupport: { + storeSupportDiv: 'div.admin-store-support-tickets', storeSupportText: '.admin-store-support-tickets h1', unreadTicketCount: 'span.pending-count.dokan-unread-ticket-count-badge-in-list', @@ -1118,6 +1124,7 @@ export const selector = { // Seller Badge sellerBadge: { + sellerBadgeDiv: 'div.seller-badge-list', sellerBadgeText: '.seller-badge-list h1', createBadge: '//a[normalize-space()="+ Create Badge"]', @@ -1621,7 +1628,8 @@ export const selector = { }, // Product QA - productQA: { + productQa: { + productQaDiv: 'div.product-questions-answers', productQuestionAnswersText: '.product-questions-answers h1', unreadQuestionCount: '//a[contains(text(),"Product Q&A")]/..//span[@class="pending-count"]', @@ -1760,6 +1768,7 @@ export const selector = { // Verifications verifications: { + verificationsDiv: 'div.verification-requests', verificationRequestsText: '//h1[normalize-space()="Verification Requests"]', // Nav Tabs @@ -1820,6 +1829,7 @@ export const selector = { // Advertising productAdvertising: { + productAdvertisingDiv: 'div.product-advertisement-list', productAdvertisingText: '.product-advertisement-list h1', addNewProductAdvertising: '//button[normalize-space()="Add New Advertisement"]', @@ -1889,6 +1899,7 @@ export const selector = { // Wholesale Customer wholesaleCustomer: { + wholesaleCustomerDiv: 'div.wholesale-customer-list', wholesaleCustomerText: '.wholesale-customer-list h1', // Nav Tabs @@ -1964,7 +1975,7 @@ export const selector = { // SPMV spmv: { - spmvDiv: '#dokan-spmv-products-admin', + spmvDiv: 'div#dokansellerdiv', searchVendor: '#dokan-spmv-products-admin input.select2-search__field', searchedResult: (storeName: string) => `//div[contains(text(),"${storeName}") and @class="dokan-spmv-vendor-dropdown-results__title"]`, highlightedResult: '.select2-results__option.select2-results__option--highlighted', @@ -2226,7 +2237,7 @@ export const selector = { menuNameInput: '//div[@class="first-part"]//input', menuNameConfirm: '//div[@class="menu-item"]//div[@class="action-icon-wrapper check-icon-wrapper"]', menuNameCancel: '//div[@class="menu-item"]//div[@class="action-icon-wrapper cancel-icon-wrapper"]', - menuSwitcher: (menuName: string) => `//span[text()='${menuName}']/../..//label[@class="switch tips"]`, + menuSwitcher: (menuName: string) => `(//div[@class="tabs-details"]//div[not(@style="display: none;")])[1]//span[text()='${menuName}']/../..//label[@class="switch tips"]`, noPermissionNotice: '//strong[text()="You have no permission to view this page"]', }, @@ -2652,6 +2663,7 @@ export const selector = { orderStatusForWithdrawProcessing: '//label[@for="withdraw_order_status[wc-processing]"]', // Recommended + recommendedHeading: '//h1[normalize-space()="Recommended for All Dokan Marketplaces"]', wooCommerceConversionTracking: '//label[@for="dokan_recommended_wc_conversion_tracking"]', weMail: '//label[@for="dokan_recommended_wemail"]', texty: '//label[@for="dokan_recommended_texty"]', @@ -2827,16 +2839,17 @@ export const selector = { setupCashOnDelivery: '//a[contains(text(),"Cash on delivery")]/../..//td[@class="action"]//a', setupDokanWireCardConnect: '//a[contains(text(),"Dokan Wirecard Connect")]/../..//td[@class="action"]//a', setupDokanPayPalAdaptivePayments: '//a[contains(text(),"Dokan PayPal Adaptive Payments")]/../..//td[@class="action"]//a', - setupDokanPayPalMarketplace: '//a[contains(text(),"Dokan PayPal Marketplace")]/../..//td[@class="action"]//a', - setupDokanStripeConnect: '//a[contains(text(),"Dokan Stripe Connect")]/../..//td[@class="action"]//a', - setupDokanMangoPay: '//a[contains(text(),"Dokan MangoPay")]/../..//td[@class="action"]//a', - setupDokanRazorpay: '//a[contains(text(),"Dokan Razorpay")]/../..//td[@class="action"]//a', - setupDokanStripeExpress: '//a[contains(text(),"Dokan Stripe Express")]/../..//td[@class="action"]//a', + setupDokanPayPalMarketplace: '//tr[@data-gateway_id="dokan_paypal_marketplace"]//td[@class="action"]//a', + setupDokanStripeConnect: '//tr[@data-gateway_id="dokan-stripe-connect"]//td[@class="action"]//a', + setupDokanMangoPay: '//tr[@data-gateway_id="dokan_mangopay"]//td[@class="action"]//a', + setupDokanRazorpay: '//tr[@data-gateway_id="dokan_razorpay"]//td[@class="action"]//a', + setupDokanStripeExpress: '//tr[@data-gateway_id="dokan_stripe_express"]//td[@class="action"]//a', paymentMethodsSaveChanges: '.woocommerce-save-button', // Stripe stripe: { // Stripe Connect + stripeConnectText: '//h3[normalize-space()="Stripe Connect"]', enableDisableStripe: '#woocommerce_dokan-stripe-connect_enabled', title: '#woocommerce_dokan-stripe-connect_title', description: '#woocommerce_dokan-stripe-connect_description', @@ -2857,6 +2870,7 @@ export const selector = { // Paypal Marketplace paypalMarketPlace: { + paypalMarketPlaceText: '//h2[contains(.,"Dokan PayPal Marketplace")]', enableDisablePayPalMarketplace: '#woocommerce_dokan_paypal_marketplace_enabled', title: '#woocommerce_dokan_paypal_marketplace_title', description: '#woocommerce_dokan_paypal_marketplace_description', @@ -2881,6 +2895,7 @@ export const selector = { // Dokan Mangopay dokanMangoPay: { + mangoPayText: '//h2[contains(.,"Dokan MangoPay")]', enableDisableMangoPayPayment: '#woocommerce_dokan_mangopay_enabled', title: '#woocommerce_dokan_mangopay_title', description: '#woocommerce_dokan_mangopay_description', @@ -2915,6 +2930,7 @@ export const selector = { }, dokanRazorpay: { + razorpayText: '//h2[contains(.,"Dokan MangoPay")]', enableDisableDokanRazorpay: '#woocommerce_dokan_razorpay_enabled', title: '#woocommerce_dokan_razorpay_title', description: '#woocommerce_dokan_razorpay_description', @@ -2933,6 +2949,7 @@ export const selector = { stripeExpress: { // Stripe Express + stripeExpressText: '//h2[contains(.,"Stripe Express")]', enableOrDisableStripeExpress: '#woocommerce_dokan_stripe_express_enabled', title: '#woocommerce_dokan_stripe_express_title', description: '#woocommerce_dokan_stripe_express_description', @@ -2960,7 +2977,7 @@ export const selector = { // Advanced Settings displayNoticeToNonConnectedSellers: '#woocommerce_dokan_stripe_express_notice_on_vendor_dashboard', sendAnnouncementToNonConnectedSellers: '#woocommerce_dokan_stripe_express_announcement_to_sellers', - announcementInterval: '#woocommerce_dokan_stripe_express_notice_interval', + announcementInterval: 'input#woocommerce_dokan_stripe_express_notice_interval', debugLog: '#woocommerce_dokan_stripe_express_debug', stripeExpressSaveChanges: '.woocommerce-save-button', }, @@ -3451,10 +3468,12 @@ export const selector = { stateInput: '.select2-search.select2-search--dropdown .select2-search__field', phone: '#billing_phone', email: '#billing_email', - companyIdOrEuidNumber: '#billing_dokan_company_id_number', - vatOrTaxNumber: '#billing_dokan_vat_number', - bank: '#billing_dokan_bank_name', - bankIban: '#billing_dokan_bank_iban', + euFields: { + companyIdOrEuidNumber: '#billing_dokan_company_id_number', + vatOrTaxNumber: '#billing_dokan_vat_number', + bank: '#billing_dokan_bank_name', + bankIban: '#billing_dokan_bank_iban', + }, }, // Customer Shipping Address @@ -3673,6 +3692,10 @@ export const selector = { vDashboard: { dokanNotice: 'div.dokan-alert.dokan-alert-warning', + dashboardDiv: 'div.dokan-dashboard-wrap', + dashboardSidebar: 'div.dokan-dash-sidebar', + dashboardContent: 'div.dokan-dashboard-content', + // Dashboard Menus menuParent: '#dokan-navigation ul.dokan-dashboard-menu', menus: { @@ -3693,11 +3716,12 @@ export const selector = { withdraw: 'ul.dokan-dashboard-menu li.withdraw a', reverseWithdrawal: 'ul.dokan-dashboard-menu li.reverse-withdrawal a', badges: 'ul.dokan-dashboard-menu li.seller-badge a', - productQA: 'ul.dokan-dashboard-menu li.product-questions-answers a', + productQa: 'ul.dokan-dashboard-menu li.product-questions-answers a', returnRequest: 'ul.dokan-dashboard-menu li.return-request a', staff: 'ul.dokan-dashboard-menu li.staffs a', followers: 'ul.dokan-dashboard-menu li.followers a', booking: 'ul.dokan-dashboard-menu li.booking a', + printful: 'ul.dokan-dashboard-menu li.printful a', announcements: 'ul.dokan-dashboard-menu li.announcement a', analytics: 'ul.dokan-dashboard-menu li.analytics a', tools: 'ul.dokan-dashboard-menu li.tools a', @@ -3717,11 +3741,13 @@ export const selector = { addons: '.submenu-item.product-addon', payment: '.submenu-item.payment', verification: '.submenu-item.verification', + deliveryTime: '.submenu-item.delivery-time', shipping: '.submenu-item.shipping', shipStation: '.submenu-item.shipstation', social: '.submenu-item.social', rma: '.submenu-item.rma', seo: '.submenu-item.seo', + printful: '.submenu-item.printful', }, }, @@ -4054,6 +4080,7 @@ export const selector = { // addon addon: { + addonSection: 'div#dokan-product-addons-options', addonForm: 'div.wc-pao-addon.open', addField: 'button.wc-pao-add-field', type: 'select#wc-pao-addon-content-type-0', @@ -4188,6 +4215,7 @@ export const selector = { // wholesale options wholesale: { + wholesaleSection: 'div.dokan-wholesale-options', enableWholesale: '#wholesale\\[enable_wholesale\\]', wholesalePrice: '#dokan-wholesale-price', minimumQuantity: '#dokan-wholesale-qty', @@ -4209,6 +4237,7 @@ export const selector = { // advertise product advertisement: { + advertisementSection: 'div.dokan-proudct-advertisement', needsPublishNotice: '//p[normalize-space(text())="You can not advertise this product. Product needs to be published before you can advertise."]', advertiseThisProduct: 'input#dokan_advertise_single_product', confirmAdvertiseThisProduct: '.swal2-confirm', @@ -5699,11 +5728,11 @@ export const selector = { chooseCsv: '#upload', updateExistingProducts: '#woocommerce-importer-update-existing', - continue: '.button', - runTheImporter: '.button', - viewImportLog: '.woocommerce-importer-done-view-errors', - viewProducts: '.button', - completionMessage: '.woocommerce-importer-done', + continue: '//button[@value="Continue"]', + runTheImporter: '//button[@value="Run the importer"]', + viewImportLog: 'a.woocommerce-importer-done-view-errors', + viewProducts: '//a[normalize-space()="View products"]', + completionMessage: 'section.woocommerce-importer-done', }, }, @@ -6011,11 +6040,13 @@ export const selector = { saveSuccessMessage: 'Account details changed successfully.', }, - // Search Similar Product + // search similar product vSpmv: { - // Search similar product spmv + spmvDetailsDiv: 'article.dokan-spmv-products-search-result-area', + + // search similar product spmv search: { - searchDiv: '.dokan-spmv-add-new-product-search-box-area', + searchDiv: 'div.dokan-spmv-add-new-product-search-box-area', subHeader: '//p[@class="sub-header"]', toggleBtn: '#dokan-spmv-area-toggle-button', // toggleBtn: '#dokan-spmv-area-toggle-button i.fa-caret-down', @@ -6127,8 +6158,8 @@ export const selector = { deleteSaveLocation: '.store-pickup-location-delete-btn', }, - // company info - companyInfo: { + // eu compliance info + euFields: { companyName: '#settings_dokan_company_name', companyId: '#settings_dokan_company_id_number', vatOrTaxNumber: '#setting_vat_number', @@ -6143,72 +6174,88 @@ export const selector = { map: '#dokan-map-add', // terms and conditions - termsAndConditions: '//label[contains(text(), "Terms and Conditions")]/..//input[@type="checkbox"]', - termsAndConditionsIframe: '#dokan_tnc_text iframe', - termsAndConditionsHtmlBody: '#tinymce', - - // store opening closing time - storeOpeningClosingTime: '#dokan-store-time-enable', - - // lite locators - lite: { - openingClosingTimeEnable: (day: string) => `select[name="${day}[working_status]"]`, - openingTimeInput: (day: string) => `input#opening-time\\[${day}\\]`, - closingTimeInput: (day: string) => `input#closing-time\\[${day}\\]`, - }, - // openingTime: (day: string) => `#opening-time-${day}`, - // closingTime: (day: string) => `#closing-time-${day}`, - // addNewRow: (day: string) => `#store-tab-${day} .added-store-opening-time > .fa`, - // deleteOneRow: '.remove-store-closing-time > .fa', - openingClosingTimeSwitch: (day: string) => `//label[@for='${day}-working-status']/p[@class='switch tips']`, - openingTime: (day: string) => `input#opening-time-${day}`, - openingTimeHiddenInput: (day: string) => `//input[@name='opening_time[${day}][]']`, - closingTime: (day: string) => `input#closing-time-${day}`, - closingTimeHiddenInput: (day: string) => `//input[@name='closing_time[${day}][]']`, - storeOpenNotice: '//input[@name="dokan_store_open_notice"]', - storeCloseNotice: '//input[@name="dokan_store_close_notice"]', + toc: { + termsAndConditions: '//label[contains(text(), "Terms and Conditions")]/..//input[@type="checkbox"]', + termsAndConditionsIframe: '#dokan_tnc_text iframe', + termsAndConditionsHtmlBody: '#tinymce', + }, + + storeOpeningClosingTime: { + // store opening closing time + storeOpeningClosingTime: 'input#dokan-store-time-enable', + + // lite locators + lite: { + openingClosingTimeEnable: (day: string) => `select[name="${day}[working_status]"]`, + openingTimeInput: (day: string) => `input#opening-time\\[${day}\\]`, + closingTimeInput: (day: string) => `input#closing-time\\[${day}\\]`, + }, + // openingTime: (day: string) => `#opening-time-${day}`, + // closingTime: (day: string) => `#closing-time-${day}`, + // addNewRow: (day: string) => `#store-tab-${day} .added-store-opening-time > .fa`, + // deleteOneRow: '.remove-store-closing-time > .fa', + openingClosingTimeSwitch: (day: string) => `//label[@for='${day}-working-status']/p[@class='switch tips']`, + openingTime: (day: string) => `input#opening-time-${day}`, + openingTimeHiddenInput: (day: string) => `//input[@name='opening_time[${day}][]']`, + closingTime: (day: string) => `input#closing-time-${day}`, + closingTimeHiddenInput: (day: string) => `//input[@name='closing_time[${day}][]']`, + storeOpenNotice: '//input[@name="dokan_store_open_notice"]', + storeCloseNotice: '//input[@name="dokan_store_close_notice"]', + }, // vacation - goToVacation: '#dokan-seller-vacation-activate', - closingStyle: 'label .form-control', - setVacationMessageInstantly: '//textarea[@id="dokan-seller-vacation-message" and @name="setting_vacation_message"]', - setVacationMessageDatewise: '//textarea[@id="dokan-seller-vacation-message" and @name="dokan_seller_vacation_datewise_message"]', - vacationDateRange: '#dokan-seller-vacation-date-from-range', - vacationDateRangeFrom: 'input#dokan-seller-vacation-date-from', - vacationDateRangeTo: 'input#dokan-seller-vacation-date-to', - saveVacationEdit: '#dokan-seller-vacation-save-edit', - cancelVacationEdit: '#dokan-seller-vacation-cancel-edit', - noVacationIsSet: '//td[contains( text(),"No vacation is set")]', - vacationRow: '//td[@class="dokan-seller-vacation-list-action"]/..', - editSavedVacationSchedule: '.dokan-seller-vacation-list-action .fas', - deleteSavedVacationSchedule: '.dokan-seller-vacation-remove-schedule', - confirmDeleteSavedVacationSchedule: '.swal2-confirm', - cancelDeleteSavedVacationSchedule: '.swal2-cancel', + vacation: { + vacationDiv: 'fieldset#dokan-seller-vacation-settings', + goToVacation: '#dokan-seller-vacation-activate', + closingStyle: 'label .form-control', + setVacationMessageInstantly: '//textarea[@id="dokan-seller-vacation-message" and @name="setting_vacation_message"]', + setVacationMessageDatewise: '//textarea[@id="dokan-seller-vacation-message" and @name="dokan_seller_vacation_datewise_message"]', + vacationDateRange: '#dokan-seller-vacation-date-from-range', + vacationDateRangeFrom: 'input#dokan-seller-vacation-date-from', + vacationDateRangeTo: 'input#dokan-seller-vacation-date-to', + saveVacationEdit: '#dokan-seller-vacation-save-edit', + cancelVacationEdit: '#dokan-seller-vacation-cancel-edit', + noVacationIsSet: '//td[contains( text(),"No vacation is set")]', + vacationRow: '//td[@class="dokan-seller-vacation-list-action"]/..', + editSavedVacationSchedule: '.dokan-seller-vacation-list-action .fas', + deleteSavedVacationSchedule: '.dokan-seller-vacation-remove-schedule', + confirmDeleteSavedVacationSchedule: '.swal2-confirm', + cancelDeleteSavedVacationSchedule: '.swal2-cancel', + }, // catalog mode - removeAddToCartButton: 'input#catalog_mode_hide_add_to_cart_button', - hideProductPrice: 'input#catalog_mode_hide_product_price', - enableRequestQuoteSupport: 'input#catalog_mode_request_a_quote_support', + catalogMode: { + removeAddToCartButton: 'input#catalog_mode_hide_add_to_cart_button', + hideProductPrice: 'input#catalog_mode_hide_product_price', + enableRequestQuoteSupport: 'input#catalog_mode_request_a_quote_support', + }, // discount - enableStoreWideDiscount: '#lbl_setting_minimum_quantity', - minimumOrderAmount: '#setting_minimum_order_amount', - percentage: '#setting_order_percentage', + discount: { + enableStoreWideDiscount: '#lbl_setting_minimum_quantity', + minimumOrderAmount: '#setting_minimum_order_amount', + percentage: '#setting_order_percentage', + }, // biography - biographyIframe: '#wp-vendor_biography-wrap iframe', - biographyHtmlBody: '#tinymce', + biography: { + biographyIframe: '#wp-vendor_biography-wrap iframe', + biographyHtmlBody: '#tinymce', + }, // store support - showSupportButtonInStore: '#support_checkbox', - showSupportButtonInSingleProduct: '#support_checkbox_product', - supportButtonText: '#dokan_support_btn_name', + storeSupport: { + showSupportButtonInStore: '#support_checkbox', + showSupportButtonInSingleProduct: '#support_checkbox_product', + supportButtonText: '#dokan_support_btn_name', + }, // live chat liveChat: 'input#live_chat', // min-max minMax: { + minMaxDiv: 'fieldset#min_max_amount', minimumAmountToPlaceAnOrder: 'input#min_amount_to_order', maximumAmountToPlaceAnOrder: 'input#max_amount_to_order', }, @@ -6221,6 +6268,7 @@ export const selector = { // addon settings vAddonSettings: { + productAddonsDiv: 'div.dokan-pa-all-addons', productAddonsText: '.dokan-settings-content h1', visitStore: '//a[normalize-space()="Visit Store"]', @@ -6438,6 +6486,7 @@ export const selector = { // Verification Settings vVerificationSettings: { + verificationSettingsDiv: 'div.dokan-verification-content', verificationText: '.dokan-settings-content h1', visitStore: '//a[normalize-space()="Visit Store"]', @@ -6472,6 +6521,7 @@ export const selector = { // Delivery Time Settings vDeliveryTimeSettings: { + deliveryTimeSettingsDiv: 'div.dokan-delivery-time-wrapper', settingsText: '.dokan-settings-content h1', visitStore: '//a[normalize-space()="Visit Store"]', @@ -6610,12 +6660,14 @@ export const selector = { // shipStation settings vShipStationSettings: { + shipStationSettingsDiv: 'div#dokan-shipstation-vendor-settings', shipStationText: '.dokan-settings-content h1', visitStore: '//a[normalize-space()="Visit Store"]', generateCredentials: 'button#dokan-shipstation-generate-credentials-btn', generateSuccessMessage: '//div[@id="swal2-html-container" and normalize-space()="API credentials generated successfully."]', revokeCredentials: 'button#dokan-shipstation-revoke-credentials-btn', + confirmGeneration: 'button.swal2-confirm', confirmRevoke: 'button.swal2-confirm', revokeSuccessMessage: '//div[@id="swal2-html-container" and normalize-space()="API credentials revoked successfully."]', @@ -6624,6 +6676,7 @@ export const selector = { consumerKey: '//label[normalize-space()="Consumer Key"]/..//code', consumerSecret: '//label[normalize-space()="Consumer Secret"]/..//code', }, + secretKeyHideWarning: '//p[normalize-space(text())="Note: Once this page is refreshed, the consumer secret will no longer be available."]', selectedStatus: '//label[@for="dokan-shipstation-export-statuses"]/..//li[@class="select2-selection__choice"]', exportOrderStatusesInput: '//label[normalize-space()="Export Order Statuses"]/..//span[@class="select2-selection select2-selection--multiple"]//input[@class="select2-search__field"]', @@ -6660,6 +6713,7 @@ export const selector = { // rma settings vRmaSettings: { + rmaSettingsDiv: 'div.dokan-rma-wrapper', returnAndWarrantyText: '.dokan-settings-content h1', visitStore: '//a[normalize-space()="Visit Store"]', @@ -6681,6 +6735,7 @@ export const selector = { // Printful settings vPrintfulSettings: { + printfulSettingsDiv: 'div#dokan-pro-printful-vendor-settings', connectToPrintful: 'button#dokan-pro-connect-printful-btn', authorize: '//a[normalize-space()="Authorize"]', disconnectToPrintful: 'button#dokan-pro-disconnect-printful-btn', @@ -6749,19 +6804,21 @@ export const selector = { // Customer My Account cMyAccount: { - dashboard: '.woocommerce-MyAccount-navigation-link--dashboard a', - orders: '.woocommerce-MyAccount-navigation-link--orders a', - subscriptions: '.woocommerce-MyAccount-navigation-link--subscriptions a', - downloads: '.woocommerce-MyAccount-navigation-link--downloads a', - addresses: '.woocommerce-MyAccount-navigation-link--edit-address a', - paymentMethods: '.woocommerce-MyAccount-navigation-link--payment-methods a', - rmaRequests: '.woocommerce-MyAccount-navigation-link--rma-requests a', - accountDetails: '.woocommerce-MyAccount-navigation-link--edit-account a', - vendors: 'woocommerce-MyAccount-navigation-link--following a', - sellerSupportTickets: '.woocommerce-MyAccount-navigation-link--support-tickets a', - bookings: '.woocommerce-MyAccount-navigation-link--bookings a', - auctions: '.woocommerce-MyAccount-navigation-link--auctions-endpoint a', - logout: '.woocommerce-MyAccount-navigation-link--customer-logout a', + menus: { + dashboard: '.woocommerce-MyAccount-navigation-link--dashboard a', + orders: '.woocommerce-MyAccount-navigation-link--orders a', + subscriptions: '.woocommerce-MyAccount-navigation-link--subscriptions a', + downloads: '.woocommerce-MyAccount-navigation-link--downloads a', + addresses: '.woocommerce-MyAccount-navigation-link--edit-address a', + paymentMethods: '.woocommerce-MyAccount-navigation-link--payment-methods a', + rmaRequests: '.woocommerce-MyAccount-navigation-link--rma-requests a', + accountDetails: '.woocommerce-MyAccount-navigation-link--edit-account a', + vendors: '.woocommerce-MyAccount-navigation-link--following a', + sellerSupportTickets: '.woocommerce-MyAccount-navigation-link--support-tickets a', + bookings: '.woocommerce-MyAccount-navigation-link--bookings a', + auctions: '.woocommerce-MyAccount-navigation-link--auctions-endpoint a', + logout: '.woocommerce-MyAccount-navigation-link--customer-logout a', + }, }, // Customer Dashboard @@ -6857,10 +6914,12 @@ export const selector = { firstName: '#billing_first_name', lastName: '#billing_last_name', companyName: '#billing_company', - companyID: '#billing_dokan_company_id_number', - vatOrTaxNumber: '#billing_dokan_vat_number', - nameOfBank: '#billing_dokan_bank_name', - bankIban: '#billing_dokan_bank_iban', + euFields: { + companyID: '#billing_dokan_company_id_number', + vatOrTaxNumber: '#billing_dokan_vat_number', + nameOfBank: '#billing_dokan_bank_name', + bankIban: '#billing_dokan_bank_iban', + }, countryOrRegion: '(//span[@class="select2-selection__arrow"])[1]', countryOrRegionInput: '.select2-search.select2-search--dropdown .select2-search__field', countryOrRegionValues: '.select2-results ul li', @@ -6985,6 +7044,8 @@ export const selector = { // customer support tickets cSupportTickets: { + supportTicketDiv: 'div.dokan-support-customer-listing', + // menus menus: { allTickets: '//ul[contains(@class,"subsubsub")]//a[contains(text(),"All Tickets")]', @@ -7989,7 +8050,7 @@ export const selector = { }, cLiveSearch: { - liveSearchWidget: 'div.widget_dokna_product_search', + liveSearchDiv: 'div.dokan-product-search', liveSearchInput: 'div.dokan-product-search input[name="s"]', liveSearchCategory: 'div.dokan-product-search select#cat', searchedResult: (productName: string) => `//div[@id="dokan-ajax-search-suggestion-result"]//h3[normalize-space(text())='${productName}']`, diff --git a/tests/pw/pages/sellerBadgesPage.ts b/tests/pw/pages/sellerBadgesPage.ts index a9f79a66f2..59e1913210 100644 --- a/tests/pw/pages/sellerBadgesPage.ts +++ b/tests/pw/pages/sellerBadgesPage.ts @@ -18,6 +18,36 @@ export class SellerBadgesPage extends AdminPage { // seller badge + // enable seller badge module + async enableSellerBadgeModule() { + // dokan menu + await this.goto(data.subUrls.backend.dokan.dokan); + await this.toBeVisible(selector.admin.dokan.menus.sellerBadge); + + // vendor dashboard menu + await this.goto(data.subUrls.frontend.vDashboard.dashboard); + await this.toBeVisible(selector.vendor.vDashboard.menus.primary.badges); + } + + // disable seller badge module + async disableSellerBadgeModule() { + // dokan menu + await this.goto(data.subUrls.backend.dokan.dokan, { waitUntil: 'domcontentloaded' }, true); + await this.notToBeVisible(selector.admin.dokan.menus.sellerBadge); + + // dokan menu page + await this.goto(data.subUrls.backend.dokan.sellerBadge); + await this.notToBeVisible(sellerBadgeAdmin.sellerBadgeDiv); + + // vendor dashboard menu + await this.goto(data.subUrls.frontend.vDashboard.dashboard); + await this.notToBeVisible(selector.vendor.vDashboard.menus.primary.badges); + + // vendor dashboard menu page + await this.goto(data.subUrls.frontend.vDashboard.badges); + await this.notToBeVisible(selector.vendor.vDashboard.dashboardDiv); + } + // seller badge render properly async adminSellerBadgeRenderProperly() { await this.goIfNotThere(data.subUrls.backend.dokan.sellerBadge); diff --git a/tests/pw/pages/sellerVacationPage.ts b/tests/pw/pages/sellerVacationPage.ts new file mode 100644 index 0000000000..5d4ba181ae --- /dev/null +++ b/tests/pw/pages/sellerVacationPage.ts @@ -0,0 +1,29 @@ +import { Page } from '@playwright/test'; +import { VendorPage } from '@pages/vendorPage'; +import { selector } from '@pages/selectors'; +import { data } from '@utils/testData'; + +// selectors +const settingsVendor = selector.vendor.vStoreSettings; + +export class SellerVacationPage extends VendorPage { + constructor(page: Page) { + super(page); + } + + // seller vacation + + // enable seller vacation module + async enableSellerVacationModule() { + // vendor dashboard settings + await this.goto(data.subUrls.frontend.vDashboard.settingsStore); + await this.toBeVisible(settingsVendor.vacation.vacationDiv); + } + + // disable seller vacation module + async disableSellerVacationModule() { + // vendor dashboard settings + await this.goto(data.subUrls.frontend.vDashboard.settingsStore); + await this.notToBeVisible(settingsVendor.vacation.vacationDiv); + } +} diff --git a/tests/pw/pages/settingPage.ts b/tests/pw/pages/settingPage.ts index ee8a1e05e2..5baadc3f41 100644 --- a/tests/pw/pages/settingPage.ts +++ b/tests/pw/pages/settingPage.ts @@ -52,11 +52,11 @@ export class SettingPage extends AdminPage { async setStoreTermsAndConditions(status: string) { await this.goto(data.subUrls.frontend.vDashboard.settingsStore); if (status == 'on') { - await this.toBeVisible(selector.vendor.vStoreSettings.termsAndConditions); - await this.toBeVisible(selector.vendor.vStoreSettings.termsAndConditionsIframe); + await this.toBeVisible(selector.vendor.vStoreSettings.toc.termsAndConditions); + await this.toBeVisible(selector.vendor.vStoreSettings.toc.termsAndConditionsIframe); } else { - await this.notToBeVisible(selector.vendor.vStoreSettings.termsAndConditions); - await this.notToBeVisible(selector.vendor.vStoreSettings.termsAndConditionsIframe); + await this.notToBeVisible(selector.vendor.vStoreSettings.toc.termsAndConditions); + await this.notToBeVisible(selector.vendor.vStoreSettings.toc.termsAndConditionsIframe); } } diff --git a/tests/pw/pages/shipStationPage.ts b/tests/pw/pages/shipStationPage.ts index b6051810f6..f3ab2834a6 100644 --- a/tests/pw/pages/shipStationPage.ts +++ b/tests/pw/pages/shipStationPage.ts @@ -11,14 +11,36 @@ export class ShipStationPage extends VendorPage { super(page); } + // enable ShipStation module + async enableShipStationModule() { + // vendor dashboard settings menu + await this.goto(data.subUrls.frontend.vDashboard.dashboard); + await this.hover(selector.vendor.vDashboard.menus.primary.settings); + await this.toBeVisible(selector.vendor.vDashboard.menus.subMenus.shipStation); + } + + // disable ShipStation module + async disableShipStationModule() { + // vendor dashboard settings menu + await this.goto(data.subUrls.frontend.vDashboard.dashboard); + await this.hover(selector.vendor.vDashboard.menus.primary.settings); + await this.notToBeVisible(selector.vendor.vDashboard.menus.subMenus.shipStation); + + // vendor dashboard settings menu page + await this.goto(data.subUrls.frontend.vDashboard.settingsShipStation); + await this.notToBeVisible(settingsShipStation.shipStationSettingsDiv); + } + // generate shipStation credentials async generateShipStationCredentials() { await this.goIfNotThere(data.subUrls.frontend.vDashboard.settingsShipStation); - await this.clickAndAcceptAndWaitForResponse(data.subUrls.api.dokan.shipStation, settingsShipStation.generateCredentials, 201); - await this.toBeVisible(settingsShipStation.generateSuccessMessage); + await this.click(settingsShipStation.generateCredentials); + await this.clickAndAcceptAndWaitForResponse(data.subUrls.frontend.vDashboard.settingsShipStation, settingsShipStation.confirmGeneration); + // await this.toBeVisible(settingsShipStation.generateSuccessMessage); //todo: success message is removed await this.toBeVisible(settingsShipStation.revokeCredentials); await this.multipleElementVisible(settingsShipStation.credentials); + await this.toBeVisible(settingsShipStation.secretKeyHideWarning); } // revoke shipStation credentials diff --git a/tests/pw/pages/spmvPage.ts b/tests/pw/pages/spmvPage.ts index 625a61e712..141a144b6f 100644 --- a/tests/pw/pages/spmvPage.ts +++ b/tests/pw/pages/spmvPage.ts @@ -8,6 +8,7 @@ import { helpers } from '@utils/helpers'; const spmvAdmin = selector.admin.dokan.spmv; const spmvVendor = selector.vendor.vSpmv; const spmvCustomer = selector.customer.cSpmv; +const productsVendor = selector.vendor.product; export class SpmvPage extends VendorPage { constructor(page: Page) { @@ -16,6 +17,46 @@ export class SpmvPage extends VendorPage { // admin + // enable SPMV module + async enableSpmvModule() { + // dokan settings + await this.goto(data.subUrls.backend.dokan.settings); + await this.toBeVisible(selector.admin.dokan.settings.menus.singleProductMultiVendor); + + // admin dashboard + await this.goto(data.subUrls.backend.wc.addNewProducts); + await this.toBeVisible(spmvAdmin.spmvDiv); + + // vendor dashboard + await this.goto(data.subUrls.frontend.vDashboard.products); + await this.clickAndWaitForLoadState(productsVendor.addNewProduct); + await this.toBeVisible(spmvVendor.search.searchDiv); + + // vendor dashboard menu page + await this.goto(data.subUrls.frontend.vDashboard.spmv); + await this.multipleElementVisible([spmvVendor.search.searchDiv, spmvVendor.spmvDetailsDiv]); + } + + // disable SPMV module + async disableSpmvModule() { + // dokan settings + await this.goto(data.subUrls.backend.dokan.settings); + await this.notToBeVisible(selector.admin.dokan.settings.menus.singleProductMultiVendor); + + // admin dashboard + await this.goto(data.subUrls.backend.wc.addNewProducts); + await this.notToBeVisible(spmvAdmin.spmvDiv); + + // vendor dashboard + await this.goto(data.subUrls.frontend.vDashboard.products); + await this.clickAndWaitForLoadState(productsVendor.addNewProduct); + await this.notToBeVisible(spmvVendor.search.searchDiv); + + // vendor dashboard menu page + await this.goto(data.subUrls.frontend.vDashboard.spmv); + await this.notToBeVisible(selector.vendor.vDashboard.dashboardDiv); + } + async assignSpmvProduct(productId: string, storeName: string) { await this.goIfNotThere(data.subUrls.backend.wc.productDetails(productId)); diff --git a/tests/pw/pages/storeReviewsPage.ts b/tests/pw/pages/storeReviewsPage.ts index 65d3a0ce8f..0537c40f42 100644 --- a/tests/pw/pages/storeReviewsPage.ts +++ b/tests/pw/pages/storeReviewsPage.ts @@ -19,25 +19,28 @@ export class StoreReviewsPage extends AdminPage { // enable store reviews async enableStoreReviewsModule(storeName: string) { + // dokan menu await this.goto(data.subUrls.backend.dokan.dokan); await this.toBeVisible(dokanAdmin.menus.storeReviews); + // single store page await this.goIfNotThere(data.subUrls.frontend.vendorDetails(helpers.slugify(storeName)), 'networkidle'); await this.toBeVisible(selector.customer.cSingleStore.storeTabs.reviews); } // disable store reviews async disableStoreReviewsModule(storeName: string) { + // dokan menu await this.goto(data.subUrls.backend.dokan.dokan, { waitUntil: 'domcontentloaded' }, true); await this.notToBeVisible(dokanAdmin.menus.storeReviews); - // no reviews table is visible - await this.goIfNotThere(data.subUrls.backend.dokan.storeReviews); + // dokan menu page + await this.goto(data.subUrls.backend.dokan.storeReviews); await this.notToBeVisible(dokanAdmin.storeReviews.storeReviewsDiv); - // reviews is visible + // single store page await this.goIfNotThere(data.subUrls.frontend.storeReviews(helpers.slugify(storeName))); - await this.toBeVisible(selector.customer.cSingleStore.reviews.noReviewsFound); + await this.toBeVisible(selector.customer.cSingleStore.storeTabs.reviews); } // store reviews render properly diff --git a/tests/pw/pages/storeSupportsPage.ts b/tests/pw/pages/storeSupportsPage.ts index 968d13970f..0252b0f3ec 100644 --- a/tests/pw/pages/storeSupportsPage.ts +++ b/tests/pw/pages/storeSupportsPage.ts @@ -21,6 +21,64 @@ export class StoreSupportsPage extends AdminPage { // store support + // enable store support module + async enableStoreSupportModule(storeName: string) { + // dokan menu + await this.goto(data.subUrls.backend.dokan.dokan); + await this.toBeVisible(selector.admin.dokan.menus.storeSupport); + + // dokan settings + await this.goto(data.subUrls.backend.dokan.settings); + await this.toBeVisible(selector.admin.dokan.settings.menus.storeSupport); + + // vendor dashboard menu + await this.goto(data.subUrls.frontend.vDashboard.dashboard); + await this.toBeVisible(selector.vendor.vDashboard.menus.primary.support); + + // customer dashboard menu + await this.goto(data.subUrls.frontend.myAccount); + await this.toBeVisible(selector.customer.cMyAccount.menus.sellerSupportTickets); + + // single store page + await this.goIfNotThere(data.subUrls.frontend.vendorDetails(helpers.slugify(storeName)), 'networkidle'); + await this.toBeVisible(selector.customer.cSingleStore.storeTabs.getSupport); + } + + // disable store support module + async disableStoreSupportModule(storeName: string) { + // dokan menu + await this.goto(data.subUrls.backend.dokan.dokan); + await this.notToBeVisible(selector.admin.dokan.menus.storeSupport); + + // dokan settings + await this.goto(data.subUrls.backend.dokan.settings); + await this.notToBeVisible(selector.admin.dokan.settings.menus.storeSupport); + + // dokan menu page + await this.goto(data.subUrls.backend.dokan.storeSupport); + await this.notToBeVisible(storeSupportsAdmin.storeSupportDiv); + + // vendor dashboard menu + await this.goto(data.subUrls.frontend.vDashboard.dashboard); + await this.notToBeVisible(selector.vendor.vDashboard.menus.primary.support); + + // vendor dashboard page + await this.goto(data.subUrls.frontend.vDashboard.storeSupport); + await this.notToBeVisible(selector.vendor.vDashboard.dashboardDiv); + + // customer dashboard menu + await this.goto(data.subUrls.frontend.myAccount); + await this.notToBeVisible(selector.customer.cMyAccount.menus.sellerSupportTickets); + + // customer dashboard menu page + await this.goto(data.subUrls.frontend.supportTickets); + await this.notToBeVisible(supportsTicketsCustomer.supportTicketDiv); + + // single store page + await this.goIfNotThere(data.subUrls.frontend.vendorDetails(helpers.slugify(storeName)), 'networkidle'); + await this.notToBeVisible(selector.customer.cSingleStore.storeTabs.getSupport); + } + // store support render properly async adminStoreSupportRenderProperly() { await this.goIfNotThere(data.subUrls.backend.dokan.storeSupport); diff --git a/tests/pw/pages/vendorAnalyticsPage.ts b/tests/pw/pages/vendorAnalyticsPage.ts index d66175d607..5f4993b879 100644 --- a/tests/pw/pages/vendorAnalyticsPage.ts +++ b/tests/pw/pages/vendorAnalyticsPage.ts @@ -13,6 +13,32 @@ export class VendorAnalyticsPage extends VendorPage { // vendor analytics + // enable vendor analytics module + async enableVendorAnalyticsModule() { + // dokan settings + await this.goto(data.subUrls.backend.dokan.settings); + await this.toBeVisible(selector.admin.dokan.settings.menus.vendorAnalytics); + + // vendor dashboard menu + await this.goto(data.subUrls.frontend.vDashboard.dashboard); + await this.toBeVisible(selector.vendor.vDashboard.menus.primary.analytics); + } + + // disable vendor analytics module + async disableVendorAnalyticsModule() { + // dokan settings + await this.goto(data.subUrls.backend.dokan.settings); + await this.notToBeVisible(selector.admin.dokan.settings.menus.vendorAnalytics); + + // vendor dashboard menu + await this.goto(data.subUrls.frontend.vDashboard.dashboard); + await this.notToBeVisible(selector.vendor.vDashboard.menus.primary.analytics); + + // vendor dashboard menu page + await this.goto(data.subUrls.frontend.vDashboard.analytics); + await this.notToBeVisible(selector.vendor.vDashboard.dashboardDiv); + } + // vendor analytics render properly async vendorAnalyticsRenderProperly() { await this.goIfNotThere(data.subUrls.frontend.vDashboard.analytics); diff --git a/tests/pw/pages/vendorAuctionsPage.ts b/tests/pw/pages/vendorAuctionsPage.ts index 97d72de070..e2c56be1b6 100644 --- a/tests/pw/pages/vendorAuctionsPage.ts +++ b/tests/pw/pages/vendorAuctionsPage.ts @@ -22,6 +22,42 @@ export class AuctionsPage extends VendorPage { // auctions + // enable auction integration module + async enableAuctionIntegrationModule() { + // dokan settings + await this.goto(data.subUrls.backend.dokan.settings); + await this.click(selector.admin.dokan.settings.menus.sellingOptions); + await this.toBeVisible(selector.admin.dokan.settings.selling.newVendorEnableAuction); + + // vendor dashboard menu + await this.goto(data.subUrls.frontend.vDashboard.dashboard); + await this.toBeVisible(selector.vendor.vDashboard.menus.primary.auction); + + // customer dashboard menu + await this.goto(data.subUrls.frontend.myAccount); + await this.toBeVisible(selector.customer.cMyAccount.menus.auctions); + } + + // disable auction integration module + async disableAuctionIntegrationModule() { + // admin dashboard + await this.goto(data.subUrls.backend.dokan.settings); + await this.click(selector.admin.dokan.settings.menus.sellingOptions); + await this.notToBeVisible(selector.admin.dokan.settings.selling.newVendorEnableAuction); + + // vendor dashboard menu + await this.goto(data.subUrls.frontend.vDashboard.dashboard); + await this.notToBeVisible(selector.vendor.vDashboard.menus.primary.auction); + + // vendor dashboard menu page + await this.goto(data.subUrls.frontend.vDashboard.auction); + await this.notToBeVisible(selector.vendor.vDashboard.dashboardDiv); + + // customer dashboard menu + await this.goto(data.subUrls.frontend.myAccount); + await this.toBeVisible(selector.customer.cMyAccount.menus.auctions); + } + // Admin Add Auction Product async adminAddAuctionProduct(product: product['auction']) { await this.goIfNotThere(data.subUrls.backend.wc.addNewProducts); diff --git a/tests/pw/pages/vendorBookingPage.ts b/tests/pw/pages/vendorBookingPage.ts index 0fa8ba0cdc..d32e957fd7 100644 --- a/tests/pw/pages/vendorBookingPage.ts +++ b/tests/pw/pages/vendorBookingPage.ts @@ -22,6 +22,32 @@ export class BookingPage extends VendorPage { // booking + // enable booking module + async enableBookingModule() { + // vendor dashboard menu + await this.goto(data.subUrls.frontend.vDashboard.dashboard); + await this.toBeVisible(selector.vendor.vDashboard.menus.primary.booking); + + // customer dashboard menu + await this.goto(data.subUrls.frontend.myAccount); + await this.toBeVisible(selector.customer.cMyAccount.menus.bookings); + } + + // disable booking module + async disableBookingModule() { + // vendor dashboard menu + await this.goto(data.subUrls.frontend.vDashboard.dashboard); + await this.notToBeVisible(selector.vendor.vDashboard.menus.primary.booking); + + // vendor dashboard menu page + await this.goto(data.subUrls.frontend.vDashboard.booking); + await this.notToBeVisible(selector.vendor.vDashboard.dashboardDiv); + + // customer dashboard menu + await this.goto(data.subUrls.frontend.myAccount); + await this.toBeVisible(selector.customer.cMyAccount.menus.bookings); + } + // Admin Add Booking Product async adminAddBookingProduct(product: product['booking']) { await this.goIfNotThere(data.subUrls.backend.wc.addNewProducts); @@ -358,8 +384,8 @@ export class BookingPage extends VendorPage { await this.saveProduct(); await this.notToBeChecked(bookingProductsVendor.booking.accommodationBooking); - await this.notToBeVisible(bookingProductsVendor.booking.minimumNumberOfNightsAllowed); - await this.notToBeVisible(bookingProductsVendor.booking.maximumNumberOfNightsAllowed); + // await this.notToBeVisible(bookingProductsVendor.booking.minimumNumberOfNightsAllowed); // todo: has dokan issue, after saving it becomes customer defined blocks instead of fixed block types + // await this.notToBeVisible(bookingProductsVendor.booking.maximumNumberOfNightsAllowed); await this.notToBeVisible(bookingProductsVendor.booking.checkInTime); await this.notToBeVisible(bookingProductsVendor.booking.checkOutTime); } diff --git a/tests/pw/pages/vendorDeliveryTimePage.ts b/tests/pw/pages/vendorDeliveryTimePage.ts index 6421be9f7b..042dfbb7cd 100644 --- a/tests/pw/pages/vendorDeliveryTimePage.ts +++ b/tests/pw/pages/vendorDeliveryTimePage.ts @@ -17,6 +17,44 @@ export class VendorDeliveryTimePage extends CustomerPage { // delivery time + // enable delivery time module + async enableDeliveryTimeModule() { + // dokan settings + await this.goto(data.subUrls.backend.dokan.settings); + await this.toBeVisible(selector.admin.dokan.settings.menus.deliveryTime); + + // vendor dashboard menu + await this.goto(data.subUrls.frontend.vDashboard.dashboard); + await this.toBeVisible(selector.vendor.vDashboard.menus.primary.deliveryTime); + + // vendor dashboard settings menu + await this.hover(selector.vendor.vDashboard.menus.primary.settings); + await this.toBeVisible(selector.vendor.vDashboard.menus.subMenus.deliveryTime); + } + + // disable delivery time module + async disableDeliveryTimeModule() { + // dokan settings + await this.goto(data.subUrls.backend.dokan.settings); + await this.notToBeVisible(selector.admin.dokan.settings.menus.deliveryTime); + + // vendor dashboard menu + await this.goto(data.subUrls.frontend.vDashboard.dashboard); + await this.notToBeVisible(selector.vendor.vDashboard.menus.primary.deliveryTime); + + // vendor dashboard settings menu + await this.hover(selector.vendor.vDashboard.menus.primary.settings); + await this.notToBeVisible(selector.vendor.vDashboard.menus.subMenus.deliveryTime); + + // vendor dashboard menu page + await this.goto(data.subUrls.frontend.vDashboard.deliveryTime); + await this.notToBeVisible(selector.vendor.vDashboard.dashboardDiv); + + // vendor dashboard settings menu page + await this.goto(data.subUrls.frontend.vDashboard.settingsDeliveryTime); + await this.notToBeVisible(deliveryTimeSettingsVendor.deliveryTimeSettingsDiv); + } + // vendor delivery time render properly async vendorDeliveryTimeRenderProperly() { await this.goIfNotThere(data.subUrls.frontend.vDashboard.deliveryTime); diff --git a/tests/pw/pages/vendorProductSubscriptionPage.ts b/tests/pw/pages/vendorProductSubscriptionPage.ts index 5e0e488241..81c69ef48b 100644 --- a/tests/pw/pages/vendorProductSubscriptionPage.ts +++ b/tests/pw/pages/vendorProductSubscriptionPage.ts @@ -18,6 +18,32 @@ export class VendorProductSubscriptionPage extends VendorPage { // product subscription + // enable product subscription module + async enableProductSubscriptionModule() { + // vendor dashboard menu + await this.goto(data.subUrls.frontend.vDashboard.dashboard); + await this.toBeVisible(selector.vendor.vDashboard.menus.primary.userSubscriptions); + + // my account menu + await this.goto(data.subUrls.frontend.myAccount); + await this.toBeVisible(selector.customer.cMyAccount.menus.subscriptions); + } + + // disable product subscription module + async disableProductSubscriptionModule() { + // vendor dashboard menu + await this.goto(data.subUrls.frontend.vDashboard.dashboard); + await this.notToBeVisible(selector.vendor.vDashboard.menus.primary.userSubscriptions); + + // vendor dashboard menu page + await this.goto(data.subUrls.frontend.vDashboard.userSubscriptions); + await this.notToBeVisible(selector.vendor.vDashboard.dashboardDiv); + + // my account menu + await this.goto(data.subUrls.frontend.myAccount); + await this.toBeVisible(selector.customer.cMyAccount.menus.subscriptions); + } + // vendor return request render properly async vendorUserSubscriptionsRenderProperly() { await this.goIfNotThere(data.subUrls.frontend.vDashboard.userSubscriptions); diff --git a/tests/pw/pages/vendorReturnRequestPage.ts b/tests/pw/pages/vendorReturnRequestPage.ts index 497de946a0..0aef083de9 100644 --- a/tests/pw/pages/vendorReturnRequestPage.ts +++ b/tests/pw/pages/vendorReturnRequestPage.ts @@ -6,7 +6,8 @@ import { order } from '@utils/interfaces'; import { helpers } from '@utils/helpers'; // selectors -const vendorReturnRequest = selector.vendor.vReturnRequest; +const returnRequestVendor = selector.vendor.vReturnRequest; +const returnRequestSettingsVendor = selector.vendor.vRmaSettings; export class VendorReturnRequestPage extends VendorPage { constructor(page: Page) { @@ -15,52 +16,110 @@ export class VendorReturnRequestPage extends VendorPage { // return request + // enable rma module + async enableRmaModule() { + // dokan settings + await this.goto(data.subUrls.backend.dokan.settings); + await this.toBeVisible(selector.admin.dokan.settings.menus.rma); + + // vendor dashboard menu + await this.goto(data.subUrls.frontend.vDashboard.dashboard); + await this.toBeVisible(selector.vendor.vDashboard.menus.primary.returnRequest); + + // vendor dashboard settings menu + await this.hover(selector.vendor.vDashboard.menus.primary.settings); + await this.toBeVisible(selector.vendor.vDashboard.menus.subMenus.rma); + } + + // disable rma module + async disableRmaModule() { + // dokan settings + await this.goto(data.subUrls.backend.dokan.settings); + await this.notToBeVisible(selector.admin.dokan.settings.menus.rma); + + // vendor dashboard menu + await this.goto(data.subUrls.frontend.vDashboard.dashboard); + await this.notToBeVisible(selector.vendor.vDashboard.menus.primary.returnRequest); + + // vendor dashboard menu page + await this.goto(data.subUrls.frontend.vDashboard.returnRequest); + await this.notToBeVisible(selector.vendor.vDashboard.dashboardDiv); + + // vendor dashboard settings menu + await this.hover(selector.vendor.vDashboard.menus.primary.settings); + await this.notToBeVisible(selector.vendor.vDashboard.menus.subMenus.rma); + + // vendor dashboard settings menu page + await this.goto(data.subUrls.frontend.vDashboard.settingsRma); + await this.notToBeVisible(returnRequestSettingsVendor.rmaSettingsDiv); + } + // vendor return request render properly async vendorReturnRequestRenderProperly() { await this.goIfNotThere(data.subUrls.frontend.vDashboard.returnRequest); // return request menu elements are visible - await this.toBeVisible(vendorReturnRequest.menus.all); + await this.toBeVisible(returnRequestVendor.menus.all); // return request table elements are visible - await this.multipleElementVisible(vendorReturnRequest.table); + await this.multipleElementVisible(returnRequestVendor.table); - const noRequestsFound = await this.isVisible(vendorReturnRequest.noRowsFound); + const noRequestsFound = await this.isVisible(returnRequestVendor.noRowsFound); if (noRequestsFound) { return; } - await this.notToHaveCount(vendorReturnRequest.numberOfRowsFound, 0); + await this.notToHaveCount(returnRequestVendor.numberOfRowsFound, 0); + } + + // vendor rma settings render properly + async vendorRmaSettingsRenderProperly() { + await this.goIfNotThere(data.subUrls.frontend.vDashboard.settingsRma); + + // settings text is visible + await this.toBeVisible(returnRequestSettingsVendor.returnAndWarrantyText); + + // visit store link is visible + await this.toBeVisible(returnRequestSettingsVendor.visitStore); + + // rma elements are visible + await this.toBeVisible(returnRequestSettingsVendor.label); + await this.toBeVisible(returnRequestSettingsVendor.type); + await this.notToHaveCount(returnRequestSettingsVendor.refundReasons, 0); + await this.toBeVisible(returnRequestSettingsVendor.rmaPolicyIframe); + + // save changes is visible + await this.toBeVisible(returnRequestSettingsVendor.saveChanges); } // vendor view rma details async vendorViewRmaDetails(orderNumber: string): Promise { await this.goIfNotThere(data.subUrls.frontend.vDashboard.returnRequest); - await this.clickAndWaitForResponseAndLoadState(data.subUrls.frontend.vDashboard.returnRequest, vendorReturnRequest.view(orderNumber)); + await this.clickAndWaitForResponseAndLoadState(data.subUrls.frontend.vDashboard.returnRequest, returnRequestVendor.view(orderNumber)); // back to list is visible - await this.toBeVisible(vendorReturnRequest.returnRequestDetails.backToList); + await this.toBeVisible(returnRequestVendor.returnRequestDetails.backToList); // basic details elements are visible - await this.multipleElementVisible(vendorReturnRequest.returnRequestDetails.basicDetails); + await this.multipleElementVisible(returnRequestVendor.returnRequestDetails.basicDetails); // additional details elements are visible - await this.multipleElementVisible(vendorReturnRequest.returnRequestDetails.additionalDetails); + await this.multipleElementVisible(returnRequestVendor.returnRequestDetails.additionalDetails); // status elements are visible - const { sendRefund, ...status } = vendorReturnRequest.returnRequestDetails.status; + const { sendRefund, ...status } = returnRequestVendor.returnRequestDetails.status; await this.multipleElementVisible(status); // conversations elements are visible - await this.multipleElementVisible(vendorReturnRequest.returnRequestDetails.conversations); + await this.multipleElementVisible(returnRequestVendor.returnRequestDetails.conversations); } // vendor send rma message async vendorSendRmaMessage(orderNumber: string, message: string): Promise { await this.goIfNotThere(data.subUrls.frontend.vDashboard.returnRequest); - await this.clickAndWaitForResponseAndLoadState(data.subUrls.frontend.vDashboard.returnRequest, vendorReturnRequest.view(orderNumber)); - await this.clearAndType(vendorReturnRequest.returnRequestDetails.conversations.message, message); - await this.clickAndWaitForResponseAndLoadState(data.subUrls.frontend.vDashboard.returnRequest, vendorReturnRequest.returnRequestDetails.conversations.sendMessage, 302); + await this.clickAndWaitForResponseAndLoadState(data.subUrls.frontend.vDashboard.returnRequest, returnRequestVendor.view(orderNumber)); + await this.clearAndType(returnRequestVendor.returnRequestDetails.conversations.message, message); + await this.clickAndWaitForResponseAndLoadState(data.subUrls.frontend.vDashboard.returnRequest, returnRequestVendor.returnRequestDetails.conversations.sendMessage, 302); await this.toBeVisible(selector.customer.cWooSelector.wooCommerceSuccessMessage); await this.toContainText(selector.customer.cWooSelector.wooCommerceSuccessMessage, data.customer.rma.sendMessage); } @@ -68,38 +127,38 @@ export class VendorReturnRequestPage extends VendorPage { // vendor update rma status async vendorUpdateRmaStatus(orderNumber: string, status: string) { await this.goIfNotThere(data.subUrls.frontend.vDashboard.returnRequest); - await this.clickAndWaitForResponseAndLoadState(data.subUrls.frontend.vDashboard.returnRequest, vendorReturnRequest.view(orderNumber)); - await this.selectByValue(vendorReturnRequest.returnRequestDetails.status.changeStatus, status); - await this.clickAndWaitForResponse(data.subUrls.ajax, vendorReturnRequest.returnRequestDetails.status.update); + await this.clickAndWaitForResponseAndLoadState(data.subUrls.frontend.vDashboard.returnRequest, returnRequestVendor.view(orderNumber)); + await this.selectByValue(returnRequestVendor.returnRequestDetails.status.changeStatus, status); + await this.clickAndWaitForResponse(data.subUrls.ajax, returnRequestVendor.returnRequestDetails.status.update); } // vendor send rma refund async vendorRmaRefund(orderNumber: string, productName: string, status: string) { - // await this.goIfNotThere(data.subUrls.frontend.vDashboard.returnRequest); // todo: + // await this.goIfNotThere(data.subUrls.frontend.vDashboard.returnRequest); // todo: resolve this await this.goto(data.subUrls.frontend.vDashboard.returnRequest); - await this.clickAndWaitForResponseAndLoadState(data.subUrls.frontend.vDashboard.returnRequest, vendorReturnRequest.view(orderNumber)); - const sendRefundIsVisible = await this.isVisible(vendorReturnRequest.returnRequestDetails.status.sendRefund); + await this.clickAndWaitForResponseAndLoadState(data.subUrls.frontend.vDashboard.returnRequest, returnRequestVendor.view(orderNumber)); + const sendRefundIsVisible = await this.isVisible(returnRequestVendor.returnRequestDetails.status.sendRefund); if (!sendRefundIsVisible) { await this.vendorUpdateRmaStatus(orderNumber, status); } - await this.clickAndWaitForResponse(data.subUrls.ajax, vendorReturnRequest.returnRequestDetails.status.sendRefund); - const taxIsVisible = await this.isVisible(vendorReturnRequest.returnRequestDetails.modal.taxRefundColumn); + await this.clickAndWaitForResponse(data.subUrls.ajax, returnRequestVendor.returnRequestDetails.status.sendRefund); + const taxIsVisible = await this.isVisible(returnRequestVendor.returnRequestDetails.modal.taxRefundColumn); if (taxIsVisible) { - const tax = (await this.getElementText(vendorReturnRequest.returnRequestDetails.modal.taxAmount(productName))) as string; - await this.type(vendorReturnRequest.returnRequestDetails.modal.taxRefund(productName), helpers.removeCurrencySign(tax)); + const tax = (await this.getElementText(returnRequestVendor.returnRequestDetails.modal.taxAmount(productName))) as string; + await this.type(returnRequestVendor.returnRequestDetails.modal.taxRefund(productName), helpers.removeCurrencySign(tax)); } - const subtotal = (await this.getElementText(vendorReturnRequest.returnRequestDetails.modal.subTotal(productName))) as string; - await this.type(vendorReturnRequest.returnRequestDetails.modal.subTotalRefund(productName), helpers.removeCurrencySign(subtotal)); - await this.clickAndWaitForResponseAndLoadState(data.subUrls.ajax, vendorReturnRequest.returnRequestDetails.modal.sendRequest); - await this.toContainText(vendorReturnRequest.returnRequestDetails.modal.sendRequestSuccessMessage, 'Already send refund request. Wait for admin approval'); + const subtotal = (await this.getElementText(returnRequestVendor.returnRequestDetails.modal.subTotal(productName))) as string; + await this.type(returnRequestVendor.returnRequestDetails.modal.subTotalRefund(productName), helpers.removeCurrencySign(subtotal)); + await this.clickAndWaitForResponseAndLoadState(data.subUrls.ajax, returnRequestVendor.returnRequestDetails.modal.sendRequest); + await this.toContainText(returnRequestVendor.returnRequestDetails.modal.sendRequestSuccessMessage, 'Already send refund request. Wait for admin approval'); } // vendor delete rma request async vendorDeleteRmaRequest(orderNumber: string) { - // await this.goIfNotThere(data.subUrls.frontend.vDashboard.returnRequest); // todo: + // await this.goIfNotThere(data.subUrls.frontend.vDashboard.returnRequest); // todo: resolve this await this.goto(data.subUrls.frontend.vDashboard.returnRequest); - await this.hover(vendorReturnRequest.returnRequestCell(orderNumber)); - await this.clickAndWaitForResponseAndLoadState(data.subUrls.frontend.vDashboard.returnRequest, vendorReturnRequest.delete(orderNumber)); + await this.hover(returnRequestVendor.returnRequestCell(orderNumber)); + await this.clickAndWaitForResponseAndLoadState(data.subUrls.frontend.vDashboard.returnRequest, returnRequestVendor.delete(orderNumber)); await this.toBeVisible(selector.customer.cWooSelector.wooCommerceSuccessMessage); await this.toContainText(selector.customer.cWooSelector.wooCommerceSuccessMessage, 'Return Request has been deleted successfully'); } diff --git a/tests/pw/pages/vendorSettingsPage.ts b/tests/pw/pages/vendorSettingsPage.ts index 35bd303841..1501887239 100644 --- a/tests/pw/pages/vendorSettingsPage.ts +++ b/tests/pw/pages/vendorSettingsPage.ts @@ -46,24 +46,42 @@ export class VendorSettingsPage extends VendorPage { await this.toBeVisible(saveLocation); } - // company info elements are visible + // eu compliance elements are visible if (DOKAN_PRO) { - await this.multipleElementVisible(settingsVendor.companyInfo); + await this.multipleElementVisible(settingsVendor.euFields); } await this.toBeVisible(settingsVendor.email); // map is visible - // await this.toBeVisible(settingsVendor.map); // TODO: g_map value not found + // await this.toBeVisible(settingsVendor.map); // todo: api key not fount in ci fix it - // todo: catalog, discount, vacation, open close, store category - - // biography is visible + // dokan pro options are visible if (DOKAN_PRO) { - await this.toBeVisible(settingsVendor.biographyIframe); - } + // catalog is visible + await this.toBeVisible(settingsVendor.catalogMode.removeAddToCartButton); + + // toc is visible + // await this.toBeVisible(settingsVendor.toc.termsAndConditions); // todo: noc gets rest by previous tests + + // open close is visible + await this.toBeVisible(settingsVendor.storeOpeningClosingTime.storeOpeningClosingTime); + + // vacation is visible + await this.toBeVisible(settingsVendor.vacation.vacationDiv); - // todo: min-max, store-support + // discount is visible + await this.toBeVisible(settingsVendor.discount.enableStoreWideDiscount); + + // biography is visible + await this.toBeVisible(settingsVendor.biography.biographyIframe); + + // store support elements are visible + await this.multipleElementVisible(settingsVendor.storeSupport); + + // min max elements are visible + await this.multipleElementVisible(settingsVendor.minMax); + } // update settings are visible await this.toBeVisible(settingsVendor.updateSettingsTop); @@ -206,7 +224,7 @@ export class VendorSettingsPage extends VendorPage { break; case 'euCompliance': - await this.setCompanyInfo(vendorInfo); + await this.setEuComplianceInfo(vendorInfo); break; case 'map': @@ -291,13 +309,13 @@ export class VendorSettingsPage extends VendorPage { await this.selectByValue(settingsVendor.address.state, vendorInfo.stateSelectValue); } - // vendor set company info - async setCompanyInfo(vendorInfo: vendor['vendorInfo']): Promise { - await this.clearAndType(settingsVendor.companyInfo.companyName, vendorInfo.companyName); - await this.clearAndType(settingsVendor.companyInfo.companyId, vendorInfo.companyId); - await this.clearAndType(settingsVendor.companyInfo.vatOrTaxNumber, vendorInfo.vatNumber); - await this.clearAndType(settingsVendor.companyInfo.nameOfBank, vendorInfo.bankName); - await this.clearAndType(settingsVendor.companyInfo.bankIban, vendorInfo.bankIban); + // vendor set eu compliance info + async setEuComplianceInfo(vendorInfo: vendor['vendorInfo']): Promise { + await this.clearAndType(settingsVendor.euFields.companyName, vendorInfo.companyName); + await this.clearAndType(settingsVendor.euFields.companyId, vendorInfo.companyId); + await this.clearAndType(settingsVendor.euFields.vatOrTaxNumber, vendorInfo.vatNumber); + await this.clearAndType(settingsVendor.euFields.nameOfBank, vendorInfo.bankName); + await this.clearAndType(settingsVendor.euFields.bankIban, vendorInfo.bankIban); } // vendor set map settings @@ -312,59 +330,59 @@ export class VendorSettingsPage extends VendorPage { // vendor set terms and conditions settings async termsAndConditionsSettings(termsAndConditions: string): Promise { - const tocEnabled = await this.isVisible(settingsVendor.termsAndConditions); + const tocEnabled = await this.isVisible(settingsVendor.toc.termsAndConditions); if (tocEnabled) { - await this.check(settingsVendor.termsAndConditions); - await this.typeFrameSelector(settingsVendor.termsAndConditionsIframe, settingsVendor.termsAndConditionsHtmlBody, termsAndConditions); + await this.check(settingsVendor.toc.termsAndConditions); + await this.typeFrameSelector(settingsVendor.toc.termsAndConditionsIframe, settingsVendor.toc.termsAndConditionsHtmlBody, termsAndConditions); } } // vendor set opening closing time settings async openingClosingTimeSettings(openingClosingTime: vendor['vendorInfo']['openingClosingTime']): Promise { - const openCloseTimeEnabled = await this.isVisible(settingsVendor.storeOpeningClosingTime); + const openCloseTimeEnabled = await this.isVisible(settingsVendor.storeOpeningClosingTime.storeOpeningClosingTime); if (openCloseTimeEnabled) { - await this.check(settingsVendor.storeOpeningClosingTime); + await this.check(settingsVendor.storeOpeningClosingTime.storeOpeningClosingTime); for (const day of openingClosingTime.days) { if (DOKAN_PRO) { - await this.enableSwitcherDeliveryTime(settingsVendor.openingClosingTimeSwitch(day)); - await this.setAttributeValue(settingsVendor.openingTime(day), 'value', openingClosingTime.openingTime); - await this.setAttributeValue(settingsVendor.openingTimeHiddenInput(day), 'value', openingClosingTime.openingTime); - await this.setAttributeValue(settingsVendor.closingTime(day), 'value', openingClosingTime.closingTime); - await this.setAttributeValue(settingsVendor.closingTimeHiddenInput(day), 'value', openingClosingTime.closingTime); + await this.enableSwitcherDeliveryTime(settingsVendor.storeOpeningClosingTime.openingClosingTimeSwitch(day)); + await this.setAttributeValue(settingsVendor.storeOpeningClosingTime.openingTime(day), 'value', openingClosingTime.openingTime); + await this.setAttributeValue(settingsVendor.storeOpeningClosingTime.openingTimeHiddenInput(day), 'value', openingClosingTime.openingTime); + await this.setAttributeValue(settingsVendor.storeOpeningClosingTime.closingTime(day), 'value', openingClosingTime.closingTime); + await this.setAttributeValue(settingsVendor.storeOpeningClosingTime.closingTimeHiddenInput(day), 'value', openingClosingTime.closingTime); } else { // lite - await this.selectByValue(settingsVendor.lite.openingClosingTimeEnable(day), openingClosingTime.statusLite); - await this.clearAndType(settingsVendor.lite.openingTimeInput(day), openingClosingTime.openingTime); - await this.clearAndType(settingsVendor.lite.closingTimeInput(day), openingClosingTime.closingTime); + await this.selectByValue(settingsVendor.storeOpeningClosingTime.lite.openingClosingTimeEnable(day), openingClosingTime.statusLite); + await this.clearAndType(settingsVendor.storeOpeningClosingTime.lite.openingTimeInput(day), openingClosingTime.openingTime); + await this.clearAndType(settingsVendor.storeOpeningClosingTime.lite.closingTimeInput(day), openingClosingTime.closingTime); } } - await this.clearAndType(settingsVendor.storeOpenNotice, openingClosingTime.storeOpenNotice); - await this.clearAndType(settingsVendor.storeCloseNotice, openingClosingTime.storeCloseNotice); + await this.clearAndType(settingsVendor.storeOpeningClosingTime.storeOpenNotice, openingClosingTime.storeOpenNotice); + await this.clearAndType(settingsVendor.storeOpeningClosingTime.storeCloseNotice, openingClosingTime.storeCloseNotice); } } // vendor set vacation settings async vacationSettings(vacation: vendor['vendorInfo']['vacation']): Promise { - const vacationModeEnabled = await this.isVisible(settingsVendor.goToVacation); + const vacationModeEnabled = await this.isVisible(settingsVendor.vacation.goToVacation); if (vacationModeEnabled) { - await this.check(settingsVendor.goToVacation); - await this.selectByValue(settingsVendor.closingStyle, vacation.closingStyle); + await this.check(settingsVendor.vacation.goToVacation); + await this.selectByValue(settingsVendor.vacation.closingStyle, vacation.closingStyle); switch (vacation.closingStyle) { // instantly close case 'instantly': - await this.clearAndType(settingsVendor.setVacationMessageInstantly, vacation.instantly.vacationMessage); + await this.clearAndType(settingsVendor.vacation.setVacationMessageInstantly, vacation.instantly.vacationMessage); break; // datewise close case 'datewise': { const vacationDayFrom = vacation.datewise.vacationDayFrom(); const vacationDayTo = vacation.datewise.vacationDayTo(vacationDayFrom); - await this.setAttributeValue(settingsVendor.vacationDateRange, 'value', `${helpers.dateFormatFYJ(vacationDayFrom)} - ${helpers.dateFormatFYJ(vacationDayTo)}`); - await this.setAttributeValue(settingsVendor.vacationDateRangeFrom, 'value', vacationDayFrom); - await this.setAttributeValue(settingsVendor.vacationDateRangeTo, 'value', vacationDayTo); - await this.clearAndType(settingsVendor.setVacationMessageDatewise, vacation.datewise.vacationMessage); - await this.clickAndWaitForResponse(data.subUrls.ajax, settingsVendor.saveVacationEdit); + await this.setAttributeValue(settingsVendor.vacation.vacationDateRange, 'value', `${helpers.dateFormatFYJ(vacationDayFrom)} - ${helpers.dateFormatFYJ(vacationDayTo)}`); + await this.setAttributeValue(settingsVendor.vacation.vacationDateRangeFrom, 'value', vacationDayFrom); + await this.setAttributeValue(settingsVendor.vacation.vacationDateRangeTo, 'value', vacationDayTo); + await this.clearAndType(settingsVendor.vacation.setVacationMessageDatewise, vacation.datewise.vacationMessage); + await this.clickAndWaitForResponse(data.subUrls.ajax, settingsVendor.vacation.saveVacationEdit); break; } @@ -377,11 +395,11 @@ export class VendorSettingsPage extends VendorPage { // vendor delete pervious datewise vacation settings if any async deletePreviousDatewiseVacation() { await this.goIfNotThere(data.subUrls.frontend.vDashboard.settingsStore); - const noVacationIsSetIsVisible = await this.isVisible(settingsVendor.noVacationIsSet); + const noVacationIsSetIsVisible = await this.isVisible(settingsVendor.vacation.noVacationIsSet); if (!noVacationIsSetIsVisible) { - await this.hover(settingsVendor.vacationRow); - await this.click(settingsVendor.deleteSavedVacationSchedule); - await this.clickAndWaitForResponse(data.subUrls.ajax, settingsVendor.confirmDeleteSavedVacationSchedule); + await this.hover(settingsVendor.vacation.vacationRow); + await this.click(settingsVendor.vacation.deleteSavedVacationSchedule); + await this.clickAndWaitForResponse(data.subUrls.ajax, settingsVendor.vacation.confirmDeleteSavedVacationSchedule); } // update settings @@ -391,17 +409,17 @@ export class VendorSettingsPage extends VendorPage { // vendor set catalog mode settings async catalogModeSettings(): Promise { - const catalogModeEnabled = await this.isVisible(settingsVendor.removeAddToCartButton); + const catalogModeEnabled = await this.isVisible(settingsVendor.catalogMode.removeAddToCartButton); if (catalogModeEnabled) { - await this.check(settingsVendor.removeAddToCartButton); - await this.checkIfVisible(settingsVendor.hideProductPrice); - await this.checkIfVisible(settingsVendor.enableRequestQuoteSupport); + await this.check(settingsVendor.catalogMode.removeAddToCartButton); + await this.checkIfVisible(settingsVendor.catalogMode.hideProductPrice); + await this.checkIfVisible(settingsVendor.catalogMode.enableRequestQuoteSupport); } } // reset catalog async resetCatalog(): Promise { - await this.uncheck(settingsVendor.removeAddToCartButton); + await this.uncheck(settingsVendor.catalogMode.removeAddToCartButton); // update settings await this.clickAndWaitForResponseAndLoadState(data.subUrls.ajax, settingsVendor.updateSettings); await this.toContainText(settingsVendor.updateSettingsSuccessMessage, data.vendor.vendorInfo.storeSettingsSaveSuccessMessage); @@ -409,30 +427,27 @@ export class VendorSettingsPage extends VendorPage { // vendor set discount settings async discountSettings(amountDiscount: vendor['vendorInfo']['amountDiscount']): Promise { - const discountEnabled = await this.isVisible(settingsVendor.enableStoreWideDiscount); + const discountEnabled = await this.isVisible(settingsVendor.discount.enableStoreWideDiscount); if (discountEnabled) { - await this.check(settingsVendor.enableStoreWideDiscount); - await this.clearAndType(settingsVendor.minimumOrderAmount, amountDiscount.minimumOrderAmount); - await this.clearAndType(settingsVendor.percentage, amountDiscount.discountPercentage); + await this.check(settingsVendor.discount.enableStoreWideDiscount); + await this.clearAndType(settingsVendor.discount.minimumOrderAmount, amountDiscount.minimumOrderAmount); + await this.clearAndType(settingsVendor.discount.percentage, amountDiscount.discountPercentage); } } // vendor set biography settings async biographySettings(biography: string): Promise { - await this.typeFrameSelector(settingsVendor.biographyIframe, settingsVendor.biographyHtmlBody, biography); + await this.typeFrameSelector(settingsVendor.biography.biographyIframe, settingsVendor.biography.biographyHtmlBody, biography); } // vendor set store support settings async storeSupportSettings(supportButtonText: string): Promise { - const storeSupportEnabled = await this.isVisible(settingsVendor.removeAddToCartButton); - if (storeSupportEnabled) { - await this.check(settingsVendor.showSupportButtonInStore); - await this.check(settingsVendor.showSupportButtonInSingleProduct); - await this.clearAndType(settingsVendor.supportButtonText, supportButtonText); - } + await this.check(settingsVendor.storeSupport.showSupportButtonInStore); + await this.check(settingsVendor.storeSupport.showSupportButtonInSingleProduct); + await this.clearAndType(settingsVendor.storeSupport.supportButtonText, supportButtonText); } - // vendor set liveChat settings + // vendor set live chat settings async liveChatSettings(): Promise { await this.check(settingsVendor.liveChat); } diff --git a/tests/pw/pages/vendorStaffPage.ts b/tests/pw/pages/vendorStaffPage.ts index 152f05dbb3..e35dbf9ef9 100644 --- a/tests/pw/pages/vendorStaffPage.ts +++ b/tests/pw/pages/vendorStaffPage.ts @@ -15,6 +15,24 @@ export class VendorStaffPage extends VendorPage { // vendor staff + // enable vendor staff module + async enableVendorStaffModule() { + // vendor dashboard menu + await this.goto(data.subUrls.frontend.vDashboard.dashboard); + await this.toBeVisible(selector.vendor.vDashboard.menus.primary.staff); + } + + // disable vendor staff module + async disableVendorStaffModule() { + // vendor dashboard menu + await this.goto(data.subUrls.frontend.vDashboard.dashboard); + await this.notToBeVisible(selector.vendor.vDashboard.menus.primary.staff); + + // vendor dashboard menu page + await this.goto(data.subUrls.frontend.vDashboard.staff); + await this.notToBeVisible(selector.vendor.vDashboard.dashboardDiv); + } + // vendor staff render properly async vendorStaffRenderProperly() { await this.goIfNotThere(data.subUrls.frontend.vDashboard.staff); diff --git a/tests/pw/pages/vendorSubscriptionsPage.ts b/tests/pw/pages/vendorSubscriptionsPage.ts index c7b3a56c02..11f7fd6c19 100644 --- a/tests/pw/pages/vendorSubscriptionsPage.ts +++ b/tests/pw/pages/vendorSubscriptionsPage.ts @@ -22,6 +22,32 @@ export class VendorSubscriptionsPage extends VendorPage { // admin + // enable vendor subscription module + async enableVendorSubscriptionModule() { + // dokan settings + await this.goto(data.subUrls.backend.dokan.settings); + await this.toBeVisible(selector.admin.dokan.settings.menus.vendorSubscription); + + // vendor dashboard menu + await this.goto(data.subUrls.frontend.vDashboard.dashboard); + await this.toBeVisible(selector.vendor.vDashboard.menus.primary.subscription); + } + + // disable vendor subscription module + async disableVendorSubscriptionModule() { + // dokan settings + await this.goto(data.subUrls.backend.dokan.settings); + await this.notToBeVisible(selector.admin.dokan.settings.menus.vendorSubscription); + + // vendor dashboard menu + await this.goto(data.subUrls.frontend.vDashboard.dashboard); + await this.notToBeVisible(selector.vendor.vDashboard.menus.primary.subscription); + + // vendor dashboard menu page + await this.goto(data.subUrls.frontend.vDashboard.subscriptions); + await this.notToBeVisible(selector.vendor.vDashboard.dashboardDiv); + } + // subscriptions render properly async subscriptionsRenderProperly() { await this.goIfNotThere(data.subUrls.backend.dokan.subscriptions); diff --git a/tests/pw/pages/vendorToolsPage.ts b/tests/pw/pages/vendorToolsPage.ts index d469ec5091..d9e0c9dcd5 100644 --- a/tests/pw/pages/vendorToolsPage.ts +++ b/tests/pw/pages/vendorToolsPage.ts @@ -13,6 +13,24 @@ export class VendorToolsPage extends VendorPage { // tools + // enable vendor product importer and exporter module + async enableProductImporterExporterModule() { + // vendor dashboard menu + await this.goto(data.subUrls.frontend.vDashboard.dashboard); + await this.toBeVisible(selector.vendor.vDashboard.menus.primary.tools); + } + + // disable vendor product importer and exporter module + async disableProductImporterExporterModule() { + // vendor dashboard menu + await this.goto(data.subUrls.frontend.vDashboard.dashboard); + await this.notToBeVisible(selector.vendor.vDashboard.menus.primary.tools); + + // vendor dashboard menu page + await this.goto(data.subUrls.frontend.vDashboard.tools); + await this.notToBeVisible(selector.vendor.vDashboard.dashboardDiv); + } + // vendor tools render properly async vendorToolsRenderProperly() { await this.goIfNotThere(data.subUrls.frontend.vDashboard.tools); diff --git a/tests/pw/pages/vendorVerificationsPage.ts b/tests/pw/pages/vendorVerificationsPage.ts index 32dc62e64d..294591e0ea 100644 --- a/tests/pw/pages/vendorVerificationsPage.ts +++ b/tests/pw/pages/vendorVerificationsPage.ts @@ -21,6 +21,46 @@ export class VendorVerificationsPage extends AdminPage { customerPage = new CustomerPage(this.page); + // enable vendor verification module + async enableVendorVerificationModule() { + // dokan menu + await this.goto(data.subUrls.backend.dokan.dokan); + await this.notToBeVisible(selector.admin.dokan.menus.verifications); + + // dokan settings + await this.goto(data.subUrls.backend.dokan.settings); + await this.toBeVisible(selector.admin.dokan.settings.menus.vendorVerification); + + // vendor dashboard menu + await this.goto(data.subUrls.frontend.vDashboard.dashboard); + await this.hover(selector.vendor.vDashboard.menus.primary.settings); + await this.toBeVisible(selector.vendor.vDashboard.menus.subMenus.verification); + } + + // disable vendor verification module + async disableVendorVerificationModule() { + // dokan menu + await this.goto(data.subUrls.backend.dokan.dokan, { waitUntil: 'domcontentloaded' }, true); + await this.notToBeVisible(selector.admin.dokan.menus.verifications); + + // dokan menu page + await this.goto(data.subUrls.backend.dokan.verifications, { waitUntil: 'domcontentloaded' }, true); + await this.notToBeVisible(verificationsAdmin.verificationsDiv); + + // dokan settings + await this.goto(data.subUrls.backend.dokan.settings); + await this.notToBeVisible(selector.admin.dokan.settings.menus.vendorVerification); + + // vendor dashboard menu + await this.goto(data.subUrls.frontend.vDashboard.dashboard); + await this.hover(selector.vendor.vDashboard.menus.primary.settings); + await this.notToBeVisible(selector.vendor.vDashboard.menus.subMenus.verification); + + // vendor dashboard menu page + await this.goto(data.subUrls.frontend.vDashboard.settingsVerification); + await this.notToBeVisible(verificationsVendor.verificationSettingsDiv); + } + // verification methods async changeVerifiedIcon(icon: string, storeName: string) { @@ -349,9 +389,6 @@ export class VendorVerificationsPage extends AdminPage { await this.toBeVisible(verificationsVendor.verificationMethodDiv(requiredMethod)); await this.notToBeVisible(verificationsVendor.verificationMethodDiv(nonRequiredMethod)); - - const count = await this.getElementCount(verificationsVendor.verificationMethodAllDiv); - await this.toHaveCount(verificationsVendor.requiredText, count); } async completeAddressStep(setupWizardData: vendorSetupWizard) { diff --git a/tests/pw/pages/wholesalePage.ts b/tests/pw/pages/wholesalePage.ts index 8bdb049090..307d0137ff 100644 --- a/tests/pw/pages/wholesalePage.ts +++ b/tests/pw/pages/wholesalePage.ts @@ -10,6 +10,7 @@ import { customer } from '@utils/interfaces'; // selectors const wholesaleAdmin = selector.admin.dokan.wholesaleCustomer; const userInfo = selector.admin.users.userInfo; +const productsVendor = selector.vendor.product; export class WholesalePage extends AdminPage { constructor(page: Page) { @@ -21,6 +22,50 @@ export class WholesalePage extends AdminPage { // wholesale customers + // enable wholesale module + async enableWholesaleModule() { + // dokan menu + await this.goto(data.subUrls.backend.dokan.dokan); + await this.toBeVisible(selector.admin.dokan.menus.wholesaleCustomer); + + // dokan settings + await this.goto(data.subUrls.backend.dokan.settings); + await this.toBeVisible(selector.admin.dokan.settings.menus.wholesale); + + // vendor dashboard + await this.goIfNotThere(data.subUrls.frontend.vDashboard.products); + await this.clickAndWaitForLoadState(productsVendor.addNewProduct); + await this.toBeVisible(productsVendor.wholesale.wholesaleSection); + + // customer dashboard menu + await this.goto(data.subUrls.frontend.myAccount); + await this.toBeVisible(selector.customer.cDashboard.becomeWholesaleCustomer); + } + + // disable wholesale module + async disableWholesaleModule() { + // dokan menu + await this.goto(data.subUrls.backend.dokan.dokan); + await this.notToBeVisible(selector.admin.dokan.menus.wholesaleCustomer); + + // dokan menu page + await this.goto(data.subUrls.backend.dokan.wholeSaleCustomer); + await this.notToBeVisible(wholesaleAdmin.wholesaleCustomerDiv); + + // dokan settings + await this.goto(data.subUrls.backend.dokan.settings); + await this.notToBeVisible(selector.admin.dokan.settings.menus.wholesale); + + // vendor dashboard + await this.goIfNotThere(data.subUrls.frontend.vDashboard.products); + await this.clickAndWaitForLoadState(productsVendor.addNewProduct); + await this.notToBeVisible(productsVendor.wholesale.wholesaleSection); + + // customer dashboard menu + await this.goto(data.subUrls.frontend.myAccount); + await this.notToBeVisible(selector.customer.cDashboard.becomeWholesaleCustomer); + } + // wholesale customers render properly async adminWholesaleCustomersRenderProperly() { await this.goIfNotThere(data.subUrls.backend.dokan.wholeSaleCustomer); diff --git a/tests/pw/tests/api/_env.setup.ts b/tests/pw/tests/api/_env.setup.ts index d569a2e325..05f1b69e1a 100644 --- a/tests/pw/tests/api/_env.setup.ts +++ b/tests/pw/tests/api/_env.setup.ts @@ -227,7 +227,7 @@ setup.describe('setup dokan settings', () => { }); setup('admin set dokan product report abuse settings', { tag: ['@pro'] }, async () => { - await dbUtils.setOptionValue(dbData.dokan.optionName.productReportAbuse, dbData.dokan.productReportAbuseSettings); + await dbUtils.setOptionValue(dbData.dokan.optionName.reportAbuse, dbData.dokan.productReportAbuseSettings); }); setup('admin set dokan spmv settings', { tag: ['@pro'] }, async () => { diff --git a/tests/pw/tests/e2e/_auth.setup.ts b/tests/pw/tests/e2e/_auth.setup.ts index 411e533de1..7add6d768d 100644 --- a/tests/pw/tests/e2e/_auth.setup.ts +++ b/tests/pw/tests/e2e/_auth.setup.ts @@ -3,7 +3,7 @@ import { LoginPage } from '@pages/loginPage'; import { ApiUtils } from '@utils/apiUtils'; import { payloads } from '@utils/payloads'; import { data } from '@utils/testData'; -import { dbUtils } from '@utils/dbUtils'; +// import { dbUtils } from '@utils/dbUtils'; import { helpers } from '@utils/helpers'; const { DOKAN_PRO } = process.env; @@ -43,10 +43,7 @@ setup.describe('add & authenticate users', () => { await apiUtils.createStoreReview(sellerId, { ...payloads.createStoreReview, rating: 5 }, payloads.customerAuth); } // add map location - await dbUtils.setUserMeta(sellerId, 'dokan_geo_latitude', '40.7127753', false); - await dbUtils.setUserMeta(sellerId, 'dokan_geo_longitude', '-74.0059728', false); - await dbUtils.setUserMeta(sellerId, 'dokan_geo_public', '1', false); - await dbUtils.setUserMeta(sellerId, 'dokan_geo_address', 'New York, NY, USA', false); + // await dbUtils.addStoreMapLocation(sellerId); helpers.createEnvVar('VENDOR_ID', sellerId); }); @@ -59,16 +56,13 @@ setup.describe('add & authenticate users', () => { setup('add vendor2', { tag: ['@lite'] }, async () => { const [, sellerId] = await apiUtils.createStore(payloads.createStore2, payloads.adminAuth, true); // add open-close time - await apiUtils.updateStore(sellerId, payloads.createStore2, payloads.adminAuth); + await apiUtils.updateStore(sellerId, { ...payloads.storeResetFields, ...payloads.storeOpenClose }, payloads.adminAuth); // add review if (DOKAN_PRO) { await apiUtils.createStoreReview(sellerId, { ...payloads.createStoreReview, rating: 5 }, payloads.customerAuth); } // add map location - await dbUtils.setUserMeta(sellerId, 'dokan_geo_latitude', '40.7127753', false); - await dbUtils.setUserMeta(sellerId, 'dokan_geo_longitude', '-74.0059728', false); - await dbUtils.setUserMeta(sellerId, 'dokan_geo_public', '1', false); - await dbUtils.setUserMeta(sellerId, 'dokan_geo_address', 'New York, NY, USA', false); + // await dbUtils.addStoreMapLocation(sellerId); helpers.createEnvVar('VENDOR2_ID', sellerId); }); diff --git a/tests/pw/tests/e2e/_env.setup.ts b/tests/pw/tests/e2e/_env.setup.ts index 247ffac16e..0007ca2671 100644 --- a/tests/pw/tests/e2e/_env.setup.ts +++ b/tests/pw/tests/e2e/_env.setup.ts @@ -253,7 +253,7 @@ setup.describe('setup dokan settings', () => { await dbUtils.setOptionValue(dbData.dokan.optionName.euCompliance, dbData.dokan.euComplianceSettings); }); - setup.skip('admin set dokan delivery time settings', { tag: ['@pro'] }, async () => { + setup('admin set dokan delivery time settings', { tag: ['@pro'] }, async () => { await dbUtils.setOptionValue(dbData.dokan.optionName.deliveryTime, dbData.dokan.deliveryTimeSettings); }); @@ -266,7 +266,7 @@ setup.describe('setup dokan settings', () => { }); setup('admin set dokan product report abuse settings', { tag: ['@pro'] }, async () => { - await dbUtils.setOptionValue(dbData.dokan.optionName.productReportAbuse, dbData.dokan.productReportAbuseSettings); + await dbUtils.setOptionValue(dbData.dokan.optionName.reportAbuse, dbData.dokan.productReportAbuseSettings); }); setup('admin set dokan spmv settings', { tag: ['@pro'] }, async () => { diff --git a/tests/pw/tests/e2e/abuseReports.spec.ts b/tests/pw/tests/e2e/abuseReports.spec.ts index 32bb7e08da..16b46bbcd1 100644 --- a/tests/pw/tests/e2e/abuseReports.spec.ts +++ b/tests/pw/tests/e2e/abuseReports.spec.ts @@ -4,6 +4,7 @@ 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'; const { PRODUCT_ID, VENDOR_ID, CUSTOMER_ID } = process.env; @@ -27,6 +28,8 @@ test.describe('Abuse report test', () => { }); test.afterAll(async () => { + await dbUtils.setOptionValue(dbData.dokan.optionName.reportAbuse, dbData.dokan.geolocationSettings); + await apiUtils.activateModules(payloads.moduleIds.reportAbuse, payloads.adminAuth); await aPage.close(); await cPage.close(); await apiUtils.dispose(); @@ -34,6 +37,10 @@ test.describe('Abuse report test', () => { // admin + test('admin can enable report abuse module', { tag: ['@pro', '@admin'] }, async () => { + await admin.enableReportAbuseModule(data.predefined.simpleProduct.product1.name); + }); + test('admin can view abuse reports menu page', { tag: ['@pro', '@exploratory', '@admin'] }, async () => { await admin.adminAbuseReportRenderProperly(); }); @@ -71,8 +78,15 @@ test.describe('Abuse report test', () => { test('guest customer need to log-in to report product', { tag: ['@pro', '@guest'] }, async ({ page }) => { const guest = new AbuseReportsPage(page); - await dbUtils.updateOptionValue(dbData.dokan.optionName.productReportAbuse, { reported_by_logged_in_users_only: 'on' }); + await dbUtils.updateOptionValue(dbData.dokan.optionName.reportAbuse, { reported_by_logged_in_users_only: 'on' }); await guest.reportProduct(data.predefined.simpleProduct.product1.name, data.product.report, true); - await dbUtils.updateOptionValue(dbData.dokan.optionName.productReportAbuse, { reported_by_logged_in_users_only: 'off' }); + await dbUtils.updateOptionValue(dbData.dokan.optionName.reportAbuse, { reported_by_logged_in_users_only: 'off' }); + }); + + // admin + + test('admin can disable report abuse module', { tag: ['@pro', '@admin'] }, async () => { + await apiUtils.deactivateModules(payloads.moduleIds.reportAbuse, payloads.adminAuth); + await admin.disableReportAbuseModule(data.predefined.simpleProduct.product1.name); }); }); diff --git a/tests/pw/tests/e2e/colors.spec.ts b/tests/pw/tests/e2e/colors.spec.ts index 5f381d3d6d..56d80e3bc8 100644 --- a/tests/pw/tests/e2e/colors.spec.ts +++ b/tests/pw/tests/e2e/colors.spec.ts @@ -1,24 +1,34 @@ -import { test, Page } from '@playwright/test'; +import { test, Page, request } from '@playwright/test'; import { ColorsPage } from '@pages/colorsPage'; +import { ApiUtils } from '@utils/apiUtils'; import { dbUtils } from '@utils/dbUtils'; import { data } from '@utils/testData'; import { dbData } from '@utils/dbData'; +import { payloads } from '@utils/payloads'; test.describe('Color scheme customizer test', () => { let admin: ColorsPage; let aPage: Page; + let apiUtils: ApiUtils; test.beforeAll(async ({ browser }) => { const adminContext = await browser.newContext(data.auth.adminAuth); aPage = await adminContext.newPage(); admin = new ColorsPage(aPage); + + apiUtils = new ApiUtils(await request.newContext()); }); test.afterAll(async () => { await dbUtils.setOptionValue(dbData.dokan.optionName.colors, dbData.dokan.colorsSettings); + await apiUtils.activateModules(payloads.moduleIds.colorSchemeCustomizer, payloads.adminAuth); await aPage.close(); }); + test('admin can enable color scheme customizer module', { tag: ['@pro', '@admin'] }, async () => { + await admin.enableColorSchemeCustomizerModule(); + }); + test('admin can switch predefined color palette', { tag: ['@pro', '@admin'] }, async () => { test.skip(true, 'need to fix'); await admin.addColorPalette(data.dokanSettings.colors.predefinedPalette.tree, data.dokanSettings.colors.paletteValues.tree, 'predefined'); @@ -31,4 +41,9 @@ test.describe('Color scheme customizer test', () => { test('admin can update custom color palette', { tag: ['@pro', '@admin'] }, async () => { await admin.addColorPalette('custom', data.dokanSettings.colors.paletteValues.custom2, 'custom'); }); + + test('admin can disable color scheme customizer module', { tag: ['@pro', '@admin'] }, async () => { + await apiUtils.deactivateModules(payloads.moduleIds.colorSchemeCustomizer, payloads.adminAuth); + await admin.disableColorSchemeCustomizerModule(); + }); }); diff --git a/tests/pw/tests/e2e/euCompliance.spec.ts b/tests/pw/tests/e2e/euCompliance.spec.ts index db45bdddf1..86b17777b6 100644 --- a/tests/pw/tests/e2e/euCompliance.spec.ts +++ b/tests/pw/tests/e2e/euCompliance.spec.ts @@ -43,6 +43,7 @@ test.describe('EU Compliance test', () => { }); test.afterAll(async () => { + await apiUtils.activateModules(payloads.moduleIds.euCompliance, payloads.adminAuth); await aPage.close(); await vPage.close(); await cPage.close(); @@ -51,6 +52,10 @@ test.describe('EU Compliance test', () => { //admin + test('admin can enable EU compliance fields module', { tag: ['@pro', '@admin'] }, async () => { + await admin.enableEuComplianceFieldsModule(); + }); + test('admin can enable EU compliance fields for vendors', { tag: ['@pro', '@admin'] }, async () => { await admin.setDokanEuComplianceSettings('euVendor'); }); @@ -161,4 +166,11 @@ test.describe('EU Compliance test', () => { }); // todo: has more tests with product eu compliance data + + // admin + + test('admin can disable EU compliance fields module', { tag: ['@pro', '@admin'] }, async () => { + await apiUtils.deactivateModules(payloads.moduleIds.euCompliance, payloads.adminAuth); + await admin.disableEuComplianceFieldsModule(); + }); }); diff --git a/tests/pw/tests/e2e/followStore.spec.ts b/tests/pw/tests/e2e/followStore.spec.ts index 110a1eda2b..0beaa6971a 100644 --- a/tests/pw/tests/e2e/followStore.spec.ts +++ b/tests/pw/tests/e2e/followStore.spec.ts @@ -8,12 +8,17 @@ import { dbUtils } from '@utils/dbUtils'; const { CUSTOMER_ID, VENDOR_ID, VENDOR2_ID } = process.env; test.describe('Follow stores functionality test', () => { + let admin: FollowStorePage; let vendor: FollowStorePage; let customer: FollowStorePage; - let vPage: Page, cPage: Page; + let aPage: Page, vPage: Page, cPage: Page; let apiUtils: ApiUtils; test.beforeAll(async ({ browser }) => { + const adminContext = await browser.newContext(data.auth.adminAuth); + aPage = await adminContext.newPage(); + admin = new FollowStorePage(aPage); + const vendorContext = await browser.newContext(data.auth.vendorAuth); vPage = await vendorContext.newPage(); vendor = new FollowStorePage(vPage); @@ -26,12 +31,17 @@ test.describe('Follow stores functionality test', () => { }); test.afterAll(async () => { + await apiUtils.activateModules(payloads.moduleIds.followStore, payloads.adminAuth); await vPage.close(); await cPage.close(); await apiUtils.dispose(); }); - // follow store + //admin + + test('admin can enable follow store module', { tag: ['@pro', '@admin'] }, async () => { + await admin.enableFollowStoreModule(); + }); // customer @@ -64,7 +74,7 @@ test.describe('Follow stores functionality test', () => { await customer.followUnfollowStore(data.predefined.vendorStores.vendor2, 'Follow', data.predefined.vendorStores.followFromSingleStore); }); - // todo: parameterize above tests also update feature-map + // todo: parameterize above tests and also update feature-map //vendor @@ -76,4 +86,11 @@ test.describe('Follow stores functionality test', () => { await apiUtils.followStore(VENDOR_ID, payloads.customerAuth); await vendor.vendorViewFollowers(); }); + + // admin + + test('admin can disable follow store module', { tag: ['@pro', '@admin'] }, async () => { + await apiUtils.deactivateModules(payloads.moduleIds.followStore, payloads.adminAuth); + await admin.disableFollowStoreModule(); + }); }); diff --git a/tests/pw/tests/e2e/geolocation.spec.ts b/tests/pw/tests/e2e/geolocation.spec.ts index 8b2af3822c..3fa26bb40e 100644 --- a/tests/pw/tests/e2e/geolocation.spec.ts +++ b/tests/pw/tests/e2e/geolocation.spec.ts @@ -1,17 +1,22 @@ -import { test, Page } from '@playwright/test'; +import { test, Page, request } from '@playwright/test'; import { GeolocationPage } from '@pages/geolocationPage'; import { dbData } from '@utils/dbData'; +import { ApiUtils } from '@utils/apiUtils'; import { dbUtils } from '@utils/dbUtils'; import { data } from '@utils/testData'; +import { payloads } from '@utils/payloads'; test.describe('Geolocation test', () => { let admin: GeolocationPage; let aPage: Page; + let apiUtils: ApiUtils; test.beforeAll(async ({ browser }) => { const adminContext = await browser.newContext(data.auth.adminAuth); aPage = await adminContext.newPage(); admin = new GeolocationPage(aPage); + + apiUtils = new ApiUtils(await request.newContext()); }); test.beforeEach(async () => { @@ -20,9 +25,16 @@ test.describe('Geolocation test', () => { test.afterAll(async () => { await dbUtils.setOptionValue(dbData.dokan.optionName.geolocation, dbData.dokan.geolocationSettings); + await apiUtils.activateModules(payloads.moduleIds.geolocation, payloads.adminAuth); await aPage.close(); }); + //admin + + test('admin can enable geolocation module', { tag: ['@pro', '@admin'] }, async () => { + await admin.enableGeolocationModule(); + }); + ['top', 'left', 'right'].forEach((position: string) => { test(`admin can set map position (${position})`, { tag: ['@pro', '@admin'] }, async () => { await dbUtils.updateOptionValue(dbData.dokan.optionName.geolocation, { show_locations_map: position }); @@ -61,4 +73,11 @@ test.describe('Geolocation test', () => { test('customer can slide map radius bar', { tag: ['@pro', '@customer'] }, async () => { await admin.slideMapRadiusBar('5'); }); + + // admin + + test('admin can disable geolocation module', { tag: ['@pro', '@admin'] }, async () => { + await apiUtils.deactivateModules(payloads.moduleIds.geolocation, payloads.adminAuth); + await admin.disableGeolocationModule(); + }); }); diff --git a/tests/pw/tests/e2e/liveChat.spec.ts b/tests/pw/tests/e2e/liveChat.spec.ts index c8530dc3e4..2545ff3bcc 100644 --- a/tests/pw/tests/e2e/liveChat.spec.ts +++ b/tests/pw/tests/e2e/liveChat.spec.ts @@ -1,18 +1,26 @@ -import { test, Page } from '@playwright/test'; +import { test, Page, request } from '@playwright/test'; import { LiveChatPage } from '@pages/liveChatPage'; +import { ApiUtils } from '@utils/apiUtils'; import { dbUtils } from '@utils/dbUtils'; import { data } from '@utils/testData'; +import { payloads } from '@utils/payloads'; import { dbData } from '@utils/dbData'; import { helpers } from '@utils/helpers'; const { VENDOR_ID } = process.env; test.describe('Live chat test', () => { + let admin: LiveChatPage; let vendor: LiveChatPage; let customer: LiveChatPage; - let vPage: Page, cPage: Page; + let aPage: Page, vPage: Page, cPage: Page; + let apiUtils: ApiUtils; test.beforeAll(async ({ browser }) => { + const adminContext = await browser.newContext(data.auth.adminAuth); + aPage = await adminContext.newPage(); + admin = new LiveChatPage(aPage); + const vendorContext = await browser.newContext(data.auth.vendorAuth); vPage = await vendorContext.newPage(); vendor = new LiveChatPage(vPage); @@ -21,17 +29,25 @@ test.describe('Live chat test', () => { cPage = await customerContext.newPage(); customer = new LiveChatPage(cPage); + apiUtils = new ApiUtils(await request.newContext()); + await dbUtils.updateUserMeta(VENDOR_ID, 'dokan_profile_settings', { live_chat: 'yes' }); await helpers.exeCommandWpcli(data.commands.wpcli.rewritePermalink); }); test.afterAll(async () => { await dbUtils.setOptionValue(dbData.dokan.optionName.liveChat, dbData.dokan.liveChatSettings); + await apiUtils.activateModules(payloads.moduleIds.liveChat, payloads.adminAuth); + await aPage.close(); await vPage.close(); await cPage.close(); }); - // admin + //admin + + test('admin can enable live chat module', { tag: ['@pro', '@admin'] }, async () => { + await admin.enableLiveChatModule(); + }); test('admin can enable chat button on vendor page', { tag: ['@pro', '@admin'] }, async () => { await dbUtils.updateOptionValue(dbData.dokan.optionName.liveChat, { chat_button_seller_page: 'on' }); @@ -77,4 +93,10 @@ test.describe('Live chat test', () => { test('customer can send message to vendor', { tag: ['@pro', '@customer'] }, async () => { await customer.sendMessageToVendor(data.predefined.vendorInfo.shopName, data.uniqueId.nanoIdRandom()); }); + + // admin + test('admin can disable live chat module', { tag: ['@pro', '@admin'] }, async () => { + await apiUtils.deactivateModules(payloads.moduleIds.liveChat, payloads.adminAuth); + await admin.disableLiveChatModule(); + }); }); diff --git a/tests/pw/tests/e2e/liveSearch.spec.ts b/tests/pw/tests/e2e/liveSearch.spec.ts index 6f1ce17431..781c710962 100644 --- a/tests/pw/tests/e2e/liveSearch.spec.ts +++ b/tests/pw/tests/e2e/liveSearch.spec.ts @@ -1,25 +1,43 @@ -import { test, Page } from '@playwright/test'; +import { test, Page, request } from '@playwright/test'; import { LiveSearch } from '@pages/liveSearchPage'; +import { ApiUtils } from '@utils/apiUtils'; import { dbUtils } from '@utils/dbUtils'; import { data } from '@utils/testData'; import { dbData } from '@utils/dbData'; +import { payloads } from '@utils/payloads'; test.describe('Live search test', () => { + let admin: LiveSearch; let customer: LiveSearch; - let cPage: Page; + let aPage: Page, cPage: Page; + let apiUtils: ApiUtils; test.beforeAll(async ({ browser }) => { + const adminContext = await browser.newContext(data.auth.adminAuth); + aPage = await adminContext.newPage(); + admin = new LiveSearch(aPage); + const customerContext = await browser.newContext(data.auth.customerAuth); cPage = await customerContext.newPage(); customer = new LiveSearch(cPage); + apiUtils = new ApiUtils(await request.newContext()); + await dbUtils.updateOptionValue(dbData.dokanWidgets.names.liveSearch, dbData.dokanWidgets.values.liveSearchWidget); await dbUtils.updateOptionValue('sidebars_widgets', { ...dbData.sidebarWidgets, 'sidebar-1': [dbData.dokanWidgets.widgets.liveSearch] }); await dbUtils.setOptionValue(dbData.dokan.optionName.liveSearch, dbData.dokan.liveSearchSettings); }); test.afterAll(async () => { + await apiUtils.activateModules(payloads.moduleIds.liveSearch, payloads.adminAuth); await cPage.close(); + await apiUtils.dispose(); + }); + + // admin + + test('admin can enable live search module', { tag: ['@pro', '@admin'] }, async () => { + await admin.enableLiveSearchModule(); }); // customer @@ -41,4 +59,11 @@ test.describe('Live search test', () => { await dbUtils.updateOptionValue(dbData.dokan.optionName.liveSearch, { live_search_option: 'old_live_search' }); await customer.searchByLiveSearch(data.predefined.simpleProduct.product1.name, true, data.predefined.categories.uncategorized); }); + + // admin + + test('admin can disable live search module', { tag: ['@pro', '@admin'] }, async () => { + await apiUtils.deactivateModules(payloads.moduleIds.liveSearch, payloads.adminAuth); + await admin.disableLiveSearchModule(); + }); }); diff --git a/tests/pw/tests/e2e/minMaxQuantities.spec.ts b/tests/pw/tests/e2e/minMaxQuantities.spec.ts new file mode 100644 index 0000000000..1cc1293215 --- /dev/null +++ b/tests/pw/tests/e2e/minMaxQuantities.spec.ts @@ -0,0 +1,35 @@ +import { test, Page, request } from '@playwright/test'; +import { MinMaxQuantitiesPage } from '@pages/minMaxQuantitiesPage'; +import { ApiUtils } from '@utils/apiUtils'; +import { data } from '@utils/testData'; +import { payloads } from '@utils/payloads'; + +test.describe('Min max quantities test', () => { + let admin: MinMaxQuantitiesPage; + let aPage: Page; + let apiUtils: ApiUtils; + + test.beforeAll(async ({ browser }) => { + const adminContext = await browser.newContext(data.auth.adminAuth); + aPage = await adminContext.newPage(); + admin = new MinMaxQuantitiesPage(aPage); + + apiUtils = new ApiUtils(await request.newContext()); + }); + + test.afterAll(async () => { + await apiUtils.activateModules(payloads.moduleIds.minMaxQuantities, payloads.adminAuth); + await aPage.close(); + }); + + //admin + + test('admin can enable min max quantities module', { tag: ['@pro', '@admin'] }, async () => { + await admin.enableMinMaxQuantitiesModule(); + }); + + test('admin can disable min max quantities module', { tag: ['@pro', '@admin'] }, async () => { + await apiUtils.deactivateModules(payloads.moduleIds.minMaxQuantities, payloads.adminAuth); + await admin.disableMinMaxQuantitiesModule(); + }); +}); diff --git a/tests/pw/tests/e2e/payments.spec.ts b/tests/pw/tests/e2e/payments.spec.ts index 5d9b288816..c02e5a23f7 100644 --- a/tests/pw/tests/e2e/payments.spec.ts +++ b/tests/pw/tests/e2e/payments.spec.ts @@ -7,7 +7,7 @@ import { dbUtils } from '@utils/dbUtils'; import { dbData } from '@utils/dbData'; import { helpers } from '@utils/helpers'; -const { VENDOR_ID } = process.env; +const { DOKAN_PRO, VENDOR_ID } = process.env; test.describe('Payments test', () => { let admin: PaymentsPage; @@ -26,12 +26,26 @@ test.describe('Payments test', () => { apiUtils = new ApiUtils(await request.newContext()); // await dbUtils.updateUserMeta(VENDOR_ID, 'dokan_profile_settings', { payment: [] }); + if (DOKAN_PRO) { + await apiUtils.activateModules(payloads.moduleIds.mangopay, payloads.adminAuth); + await apiUtils.activateModules(payloads.moduleIds.paypalMarketplace, payloads.adminAuth); + await apiUtils.activateModules(payloads.moduleIds.razorpay, payloads.adminAuth); + await apiUtils.activateModules(payloads.moduleIds.stripe, payloads.adminAuth); + await apiUtils.activateModules(payloads.moduleIds.stripeExpress, payloads.adminAuth); + } }); test.afterAll(async () => { await apiUtils.updateBatchWcSettingsOptions('general', payloads.currency, payloads.adminAuth); await dbUtils.updateUserMeta(VENDOR_ID, 'dokan_profile_settings', dbData.testData.dokan.paymentSettings); // await apiUtils.setStoreSettings(payloads.defaultStoreSettings, payloads.vendorAuth); + if (DOKAN_PRO) { + await apiUtils.activateModules(payloads.moduleIds.mangopay, payloads.adminAuth); + await apiUtils.activateModules(payloads.moduleIds.paypalMarketplace, payloads.adminAuth); + await apiUtils.activateModules(payloads.moduleIds.razorpay, payloads.adminAuth); + await apiUtils.activateModules(payloads.moduleIds.stripe, payloads.adminAuth); + await apiUtils.activateModules(payloads.moduleIds.stripeExpress, payloads.adminAuth); + } await aPage.close(); await vPage.close(); await apiUtils.dispose(); @@ -48,27 +62,48 @@ test.describe('Payments test', () => { await admin.setupBasicPaymentMethods(data.payment); }); - test.skip('admin can add stripe payment method', { tag: ['@pro', '@admin'] }, async () => { + test('admin can enable MangoPay module', { tag: ['@pro', '@admin'] }, async () => { + await admin.enableMangoPayModule(); + }); + + test('admin can enable PayPal Marketplace module', { tag: ['@pro', '@admin'] }, async () => { + await admin.enablePayPalMarketplaceModule(); + }); + + test('admin can enable Razorpay module', { tag: ['@pro', '@admin'] }, async () => { + await admin.enableRazorpayModule(); + }); + + test('admin can enable Stripe Connect module', { tag: ['@pro', '@admin'] }, async () => { + await admin.enableStripeConnectModule(); + }); + + test('admin can enable Stripe Express module', { tag: ['@pro', '@admin'] }, async () => { + await admin.enableStripeExpressModule(); + }); + + test('admin can add stripe payment method', { tag: ['@pro', '@admin'] }, async () => { await apiUtils.updateBatchWcSettingsOptions('general', payloads.currency, payloads.adminAuth); await admin.setupStripeConnect(data.payment); }); - test.skip('admin can add Paypal Marketplace payment method', { tag: ['@pro', '@admin'] }, async () => { + test('admin can add Paypal Marketplace payment method', { tag: ['@pro', '@admin'] }, async () => { await apiUtils.updateBatchWcSettingsOptions('general', payloads.currency, payloads.adminAuth); await admin.setupPaypalMarketPlace(data.payment); }); - test.skip('admin can add Mangopay payment method', { tag: ['@pro', '@admin'] }, async () => { + test('admin can add Mangopay payment method', { tag: ['@pro', '@admin'] }, async () => { + test.slow(); await apiUtils.updateBatchWcSettingsOptions('general', payloads.currency, payloads.adminAuth); await admin.setupMangoPay(data.payment); }); - test.skip('admin can add Razorpay payment method', { tag: ['@pro', '@admin'] }, async () => { + test('admin can add Razorpay payment method', { tag: ['@pro', '@admin'] }, async () => { await apiUtils.updateBatchWcSettingsOptions('general', { update: [{ id: 'woocommerce_currency', value: 'INR' }] }, payloads.adminAuth); await admin.setupRazorpay(data.payment); }); - test.skip('admin can add Strip Express payment method', { tag: ['@pro', '@admin'] }, async () => { + test('admin can add Strip Express payment method', { tag: ['@pro', '@admin'] }, async () => { await admin.setupStripeExpress(data.payment); }); @@ -138,4 +173,31 @@ test.describe('Payments test', () => { await dbUtils.updateUserMeta(VENDOR_ID, 'dokan_profile_settings', { payment: { dokan_custom: { value: '0123456789' } } }); await vendor.removeBasicPayment({ ...data.vendor.payment, methodName: 'custom' }); }); + + // admin + + test('admin can disable MangoPay module', { tag: ['@pro', '@admin'] }, async () => { + await apiUtils.deactivateModules(payloads.moduleIds.mangopay, payloads.adminAuth); + await admin.disableMangoPayModule(); + }); + + test('admin can disable PayPal Marketplace module', { tag: ['@pro', '@admin'] }, async () => { + await apiUtils.deactivateModules(payloads.moduleIds.paypalMarketplace, payloads.adminAuth); + await admin.disablePayPalMarketplaceModule(); + }); + + test('admin can disable Razorpay module', { tag: ['@pro', '@admin'] }, async () => { + await apiUtils.deactivateModules(payloads.moduleIds.razorpay, payloads.adminAuth); + await admin.disableRazorpayModule(); + }); + + test('admin can disable Stripe Connect module', { tag: ['@pro', '@admin'] }, async () => { + await apiUtils.deactivateModules(payloads.moduleIds.stripe, payloads.adminAuth); + await admin.disableStripeConnectModule(); + }); + + test('admin can disable Stripe Express module', { tag: ['@pro', '@admin'] }, async () => { + await apiUtils.deactivateModules(payloads.moduleIds.stripeExpress, payloads.adminAuth); + await admin.disableStripeExpressModule(); + }); }); diff --git a/tests/pw/tests/e2e/printful.spec.ts b/tests/pw/tests/e2e/printful.spec.ts index a001ffcc85..ce3c61708a 100644 --- a/tests/pw/tests/e2e/printful.spec.ts +++ b/tests/pw/tests/e2e/printful.spec.ts @@ -2,33 +2,46 @@ import { test, request, Page } from '@playwright/test'; import { PrintfulPage } from '@pages/printfulPage'; import { ApiUtils } from '@utils/apiUtils'; import { data } from '@utils/testData'; +import { payloads } from '@utils/payloads'; -test.describe.skip('Printful test', () => { +test.describe('Printful test', () => { + let admin: PrintfulPage; let vendor: PrintfulPage; - 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 PrintfulPage(aPage); + const customerContext = await browser.newContext(data.auth.vendorAuth); vPage = await customerContext.newPage(); vendor = new PrintfulPage(vPage); + apiUtils = new ApiUtils(await request.newContext()); + await apiUtils.activateModules(payloads.moduleIds.printful, payloads.adminAuth); }); test.afterAll(async () => { + await apiUtils.activateModules(payloads.moduleIds.printful, payloads.adminAuth); await vPage.close(); await apiUtils.dispose(); }); + test('admin can enable printful module', { tag: ['@pro', '@admin'] }, async () => { + await admin.enablePrintfulModule(); + }); + test('vendor can view printful menu page', { tag: ['@pro', '@vendor'] }, async () => { await vendor.vendorPrintfulSettingsRenderProperly(); }); - test('vendor can connect printful account', { tag: ['@pro', '@vendor'] }, async () => { + test.skip('vendor can connect printful account', { tag: ['@pro', '@vendor'] }, async () => { await vendor.connectPrintful(); }); - test('vendor can disconnect printful account', { tag: ['@pro', '@vendor'] }, async () => { + test.skip('vendor can disconnect printful account', { tag: ['@pro', '@vendor'] }, async () => { await vendor.disconnectPrintful(); }); @@ -43,4 +56,11 @@ test.describe.skip('Printful test', () => { test('vendor can enable both printful and marketplace shipping', { tag: ['@pro', '@vendor'] }, async () => { await vendor.enableShipping('both'); }); + + // admin + + test('admin can disable printful module', { tag: ['@pro', '@admin'] }, async () => { + await apiUtils.deactivateModules(payloads.moduleIds.printful, payloads.adminAuth); + await admin.disablePrintfulModule(); + }); }); diff --git a/tests/pw/tests/e2e/productAddons.spec.ts b/tests/pw/tests/e2e/productAddons.spec.ts index de7a1f0441..0936efae68 100644 --- a/tests/pw/tests/e2e/productAddons.spec.ts +++ b/tests/pw/tests/e2e/productAddons.spec.ts @@ -41,10 +41,17 @@ test.describe('Product addon functionality test', () => { test.afterAll(async () => { await apiUtils.deleteAllProductAddons(payloads.adminAuth); + await apiUtils.activateModules(payloads.moduleIds.productAddon, payloads.adminAuth); await vPage.close(); await apiUtils.dispose(); }); + // admin + + test('admin can enable product addon module', { tag: ['@pro', '@admin'] }, async () => { + await vendor.enableProductAddonModule(); + }); + // vendor test('vendor can view product addons menu page', { tag: ['@pro', '@exploratory', '@vendor'] }, async () => { @@ -102,4 +109,11 @@ test.describe('Product addon functionality test', () => { const [, , productName, addonName] = await apiUtils.createProductWithAddon(payloads.createProduct(), [payloads.createProductAddon()], payloads.vendorAuth); await vendor1.removeAddon(productName, addonName[0] as string); }); + + // admin + + test('admin can disable product addon module', { tag: ['@pro', '@admin'] }, async () => { + await apiUtils.deactivateModules(payloads.moduleIds.productAddon, payloads.adminAuth); + await vendor.disableProductAddonModule(); + }); }); diff --git a/tests/pw/tests/e2e/productAdvertising.spec.ts b/tests/pw/tests/e2e/productAdvertising.spec.ts index 4ab451c506..b1facdab88 100644 --- a/tests/pw/tests/e2e/productAdvertising.spec.ts +++ b/tests/pw/tests/e2e/productAdvertising.spec.ts @@ -23,12 +23,17 @@ test.describe('Product Advertising test (admin)', () => { }); test.afterAll(async () => { + await apiUtils.activateModules(payloads.moduleIds.productAdvertising, payloads.adminAuth); await aPage.close(); await apiUtils.dispose(); }); //admin + test('admin can enable product advertising module', { tag: ['@pro', '@admin'] }, async () => { + await admin.enableProductAdvertisingModule(); + }); + test('admin can view product advertising menu page', { tag: ['@pro', '@exploratory', '@admin'] }, async () => { await admin.adminProductAdvertisingRenderProperly(); }); @@ -66,11 +71,16 @@ test.describe('Product Advertising test (admin)', () => { }); test.describe('Product Advertising test (vendor)', () => { + let admin: ProductAdvertisingPage; let vendor: VendorPage; - 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 ProductAdvertisingPage(aPage); + const vendorContext = await browser.newContext(data.auth.vendorAuth); vPage = await vendorContext.newPage(); vendor = new VendorPage(vPage); @@ -79,6 +89,7 @@ test.describe('Product Advertising test (vendor)', () => { }); test.afterAll(async () => { + await apiUtils.activateModules(payloads.moduleIds.productAdvertising, payloads.adminAuth); await vPage.close(); await apiUtils.dispose(); }); @@ -108,4 +119,9 @@ test.describe('Product Advertising test (vendor)', () => { await apiUtils.updateOrderStatus(orderId, 'wc-completed', payloads.adminAuth); await vendor.assertProductAdvertisementIsBought(productName, 'auction', AuctionsPage); }); + + test('admin can disable product advertising module', { tag: ['@pro', '@admin'] }, async () => { + await apiUtils.deactivateModules(payloads.moduleIds.productAdvertising, payloads.adminAuth); + await admin.disableProductAdvertisingModule(); + }); }); diff --git a/tests/pw/tests/e2e/productEnquiry.spec.ts b/tests/pw/tests/e2e/productEnquiry.spec.ts index e0f09bc931..fe2fb168b6 100644 --- a/tests/pw/tests/e2e/productEnquiry.spec.ts +++ b/tests/pw/tests/e2e/productEnquiry.spec.ts @@ -4,16 +4,22 @@ 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'; const { VENDOR_ID, CUSTOMER_ID, PRODUCT_ID } = process.env; test.describe('Product Enquiry test', () => { + let admin: ProductEnquiryPage; let customer: ProductEnquiryPage; let guest: ProductEnquiryPage; - let cPage: Page; + let aPage: Page, cPage: 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); @@ -23,10 +29,19 @@ test.describe('Product Enquiry test', () => { }); test.afterAll(async () => { + await apiUtils.activateModules(payloads.moduleIds.productEnquiry, payloads.adminAuth); await cPage.close(); await apiUtils.dispose(); }); + // admin + + test('admin can enable product enquiry module', { tag: ['@pro', '@admin'] }, async () => { + await admin.enableProductEnquiryModule(data.predefined.simpleProduct.product1.name); + }); + + // customer + test('customer can enquire product', { tag: ['@pro', '@customer'] }, async () => { await customer.enquireProduct(data.predefined.simpleProduct.product1.name, data.product.enquiry); }); @@ -35,4 +50,11 @@ test.describe('Product Enquiry test', () => { guest = new ProductEnquiryPage(page); await guest.enquireProduct(data.predefined.simpleProduct.product1.name, data.product.enquiry); }); + + // admin + + test('admin can disable product enquiry module', { tag: ['@pro', '@admin'] }, async () => { + await apiUtils.deactivateModules(payloads.moduleIds.productEnquiry, payloads.adminAuth); + await admin.disableProductEnquiryModule(data.predefined.simpleProduct.product1.name); + }); }); diff --git a/tests/pw/tests/e2e/productQA.spec.ts b/tests/pw/tests/e2e/productQA.spec.ts index 9408df573d..a63657567b 100644 --- a/tests/pw/tests/e2e/productQA.spec.ts +++ b/tests/pw/tests/e2e/productQA.spec.ts @@ -34,6 +34,7 @@ test.describe('Product QA functionality test', () => { test.afterAll(async () => { // await apiUtils.deleteAllProductQuestions(payloads.adminAuth); + await apiUtils.activateModules(payloads.moduleIds.productQa, payloads.adminAuth); await aPage.close(); await vPage.close(); await cPage.close(); @@ -42,6 +43,10 @@ test.describe('Product QA functionality test', () => { // admin + test('admin can enable product Q&A module', { tag: ['@pro', '@admin'] }, async () => { + await admin.enableProductQaModule(data.predefined.simpleProduct.product1.name); + }); + test('admin product QA menu page renders properly', { tag: ['@pro', '@exploratory', '@admin'] }, async () => { await admin.adminProductQARenderProperly(); }); @@ -147,4 +152,11 @@ test.describe('Product QA functionality test', () => { const guest = new ProductQAPage(page); await guest.postQuestion(data.predefined.simpleProduct.product1.name, data.questionAnswers(), true); }); + + // admin + + test('admin can disable product Q&A module', { tag: ['@pro', '@admin'] }, async () => { + await apiUtils.deactivateModules(payloads.moduleIds.productQa, payloads.adminAuth); + await admin.disableProductQaModule(data.predefined.simpleProduct.product1.name); + }); }); diff --git a/tests/pw/tests/e2e/productsDetailsBookings.spec.ts b/tests/pw/tests/e2e/productsDetailsBookings.spec.ts index de220422ee..901022739e 100644 --- a/tests/pw/tests/e2e/productsDetailsBookings.spec.ts +++ b/tests/pw/tests/e2e/productsDetailsBookings.spec.ts @@ -46,20 +46,19 @@ test.describe('Booking Product details functionality test', () => { }); // product virtual options - test('vendor can add booking product accommodation booking option', { tag: ['@pro', '@vendor'] }, async () => { - const [, productId] = await apiUtils.createProduct(payloads.createBookableProductRequiredFields(), payloads.vendorAuth); + const [, productId] = await apiUtils.createBookableProduct(payloads.createBookableProductRequiredFields(), payloads.vendorAuth); await vendor.addProductAccommodationBookingOptions(productId, data.product.booking.accommodationBookingOptions); }); test('vendor can update booking product accommodation booking option', { tag: ['@pro', '@vendor'] }, async () => { test.skip(true, 'need min & max duration'); // todo: need to add min & max duration - const [, productId] = await apiUtils.createProduct({ ...payloads.createBookableProductWithAccommodation() }, payloads.vendorAuth); + const [, productId] = await apiUtils.createBookableProduct({ ...payloads.createBookableProductWithAccommodation() }, payloads.vendorAuth); await vendor.addProductAccommodationBookingOptions(productId, { minimumNumberOfNightsAllowed: '1', maximumNumberOfNightsAllowed: '5', checkInTime: '1:00 am', checkOutTime: '1:00 am' }); }); test('vendor can remove booking product accommodation booking option', { tag: ['@pro', '@vendor'] }, async () => { - const [, productId] = await apiUtils.createProduct({ ...payloads.createBookableProductWithAccommodation() }, payloads.vendorAuth); + const [, productId] = await apiUtils.createBookableProduct({ ...payloads.createBookableProductWithAccommodation() }, payloads.vendorAuth); await vendor.removeProductAccommodationBookingOptions(productId); }); @@ -77,7 +76,7 @@ test.describe('Booking Product details functionality test', () => { test('vendor can remove booking product category (multiple)', { tag: ['@pro', '@vendor'] }, async () => { await dbUtils.updateOptionValue(dbData.dokan.optionName.selling, { product_category_style: 'multiple' }); const uncategorizedId = await apiUtils.getCategoryId('Uncategorized', payloads.adminAuth); - const [, productId] = await apiUtils.createProduct({ ...payloads.createBookableProduct(), categories: [{ id: uncategorizedId }, { id: CATEGORY_ID }] }, payloads.vendorAuth); // need multiple categories + const [, productId] = await apiUtils.createBookableProduct({ ...payloads.createBookableProduct(), categories: [{ id: uncategorizedId }, { id: CATEGORY_ID }] }, payloads.vendorAuth); // need multiple categories await vendor.removeProductCategory(productId, [data.product.category.clothings]); }); @@ -169,12 +168,12 @@ test.describe('Booking Product details functionality test', () => { // product virtual options test('vendor can add booking product virtual option', { tag: ['@pro', '@vendor'] }, async () => { - const [, productId] = await apiUtils.createProduct(payloads.createBookableProductRequiredFields(), payloads.vendorAuth); + const [, productId] = await apiUtils.createBookableProduct(payloads.createBookableProductRequiredFields(), payloads.vendorAuth); await vendor.addProductVirtualOption(productId, true); }); test('vendor can remove booking product virtual option', { tag: ['@pro', '@vendor'] }, async () => { - const [, productId] = await apiUtils.createProduct({ ...payloads.createBookableProductRequiredFields(), virtual: true }, payloads.vendorAuth); + const [, productId] = await apiUtils.createBookableProduct({ ...payloads.createBookableProductRequiredFields(), virtual: true }, payloads.vendorAuth); await vendor.addProductVirtualOption(productId, false); }); @@ -349,14 +348,14 @@ test.describe('Booking Product details functionality test', () => { test('vendor can create booking product attribute term', { tag: ['@pro', '@vendor'] }, async () => { const [, , , attributeName] = await apiUtils.createAttributeTerm(payloads.createAttribute(), payloads.createAttributeTerm(), payloads.adminAuth); - const [, productId] = await apiUtils.createProduct(payloads.createBookableProductRequiredFields(), payloads.vendorAuth); + const [, productId] = await apiUtils.createBookableProduct(payloads.createBookableProductRequiredFields(), payloads.vendorAuth); await vendor.addProductAttribute(productId, { ...data.product.productInfo.attribute, attributeName: attributeName }, true); }); test('vendor can remove booking product attribute', { tag: ['@pro', '@vendor'] }, async () => { const [, attributeId, , attributeName, attributeTerm] = await apiUtils.createAttributeTerm(payloads.createAttribute(), payloads.createAttributeTerm(), payloads.adminAuth); const attributes = { id: attributeId, name: attributeName, options: [attributeTerm] }; - const [, productId] = await apiUtils.createProduct({ ...payloads.createBookableProduct(), attributes: [attributes] }, payloads.vendorAuth); + const [, productId] = await apiUtils.createBookableProduct({ ...payloads.createBookableProduct(), attributes: [attributes] }, payloads.vendorAuth); await vendor.removeProductAttribute(productId, attributeName); }); @@ -364,7 +363,7 @@ test.describe('Booking Product details functionality test', () => { const [, attributeId, , attributeName, attributeTerm] = await apiUtils.createAttributeTerm(payloads.createAttribute(), payloads.createAttributeTerm(), payloads.adminAuth); const [, , , , attributeTerm2] = await apiUtils.createAttributeTerm(payloads.createAttribute(), payloads.createAttributeTerm(), payloads.adminAuth); const attributes = { id: attributeId, name: attributeName, options: [attributeTerm, attributeTerm2] }; - const [, productId] = await apiUtils.createProduct({ ...payloads.createBookableProduct(), attributes: [attributes] }, payloads.vendorAuth); + const [, productId] = await apiUtils.createBookableProduct({ ...payloads.createBookableProduct(), attributes: [attributes] }, payloads.vendorAuth); await vendor.removeProductAttributeTerm(productId, attributeName, attributeTerm2); }); @@ -395,12 +394,12 @@ test.describe('Booking Product details functionality test', () => { }); test('vendor can export booking product addon', { tag: ['@pro', '@vendor'] }, async () => { - const [responseBody, productId] = await apiUtils.createProductWithAddon(payloads.createBookableProduct(), [payloads.createProductAddon()], payloads.vendorAuth); + const [responseBody, productId] = await apiUtils.createBookingProductWithAddon(payloads.createBookableProduct(), [payloads.createProductAddon()], payloads.vendorAuth); await vendor.exportAddon(productId, serialize(apiUtils.getMetaDataValue(responseBody.meta_data, '_product_addons'))); }); test('vendor can remove booking product addon', { tag: ['@pro', '@vendor'] }, async () => { - const [, productId, , addonNames] = await apiUtils.createProductWithAddon(payloads.createBookableProduct(), [payloads.createProductAddon()], payloads.vendorAuth); + const [, productId, , addonNames] = await apiUtils.createBookingProductWithAddon(payloads.createBookableProduct(), [payloads.createProductAddon()], payloads.vendorAuth); await vendor.removeAddon(productId, addonNames[0] as string); }); }); diff --git a/tests/pw/tests/e2e/requestForQuotes.spec.ts b/tests/pw/tests/e2e/requestForQuotes.spec.ts index e097065ec1..ef9a3bd75f 100644 --- a/tests/pw/tests/e2e/requestForQuotes.spec.ts +++ b/tests/pw/tests/e2e/requestForQuotes.spec.ts @@ -136,7 +136,6 @@ test.describe('Request for quotation test customer', () => { customer = new RequestForQuotationsPage(cPage); apiUtils = new ApiUtils(await request.newContext()); - [, productId[0], productName] = await apiUtils.createProduct(payloads.createProduct(), payloads.vendorAuth); const [, quoteRuleId] = await apiUtils.createQuoteRule({ ...payloads.createQuoteRule(), product_ids: productId }, payloads.adminAuth); await dbUtils.updateQuoteRuleContent(quoteRuleId, { switches: { product_switch: 'true' } }); // todo: remove after api fix @@ -167,6 +166,13 @@ test.describe('Request for quotation test customer', () => { }); test('customer can pay for order converted from quote request', { tag: ['@pro', '@customer'] }, async () => { + test.slow(); + // todo: remove payment gateway disable methods when this issue is fixed https://github.com/getdokan/dokan-pro/issues/4015 + await apiUtils.updatePaymentGateway('dokan-stripe-connect', { ...payloads.stripeConnect, enabled: false }, payloads.adminAuth); + await apiUtils.updatePaymentGateway('dokan_paypal_marketplace', { ...payloads.payPal, enabled: false }, payloads.adminAuth); + await apiUtils.updatePaymentGateway('dokan_mangopay', { ...payloads.mangoPay, enabled: false }, payloads.adminAuth); + await apiUtils.updatePaymentGateway('dokan_razorpay', { ...payloads.razorpay, enabled: false }, payloads.adminAuth); + await apiUtils.updatePaymentGateway('dokan_stripe_express', { ...payloads.stripeExpress, enabled: false }, payloads.adminAuth); await apiUtils.convertQuoteToOrder(quoteId, payloads.adminAuth); await customer.payConvertedQuote(quoteId); }); diff --git a/tests/pw/tests/e2e/sellerBadges.spec.ts b/tests/pw/tests/e2e/sellerBadges.spec.ts index c3c4bd030d..709621ee00 100644 --- a/tests/pw/tests/e2e/sellerBadges.spec.ts +++ b/tests/pw/tests/e2e/sellerBadges.spec.ts @@ -24,6 +24,7 @@ test.describe('Seller badge test', () => { }); test.afterAll(async () => { + await apiUtils.activateModules(payloads.moduleIds.sellerBadge, payloads.adminAuth); await aPage.close(); await vPage.close(); await apiUtils.dispose(); @@ -31,6 +32,10 @@ test.describe('Seller badge test', () => { // admin + test('admin can enable seller badge module', { tag: ['@pro', '@admin'] }, async () => { + await admin.enableSellerBadgeModule(); + }); + test('admin can view seller badge menu page', { tag: ['@pro', '@exploratory', '@admin'] }, async () => { await admin.adminSellerBadgeRenderProperly(); }); @@ -103,4 +108,9 @@ test.describe('Seller badge test', () => { test('vendor can filter seller badges', { tag: ['@pro', '@vendor'] }, async () => { await vendor.filterSellerBadges('available_badges'); }); + + test('admin can disable seller badge module', { tag: ['@pro', '@admin'] }, async () => { + await apiUtils.deactivateModules(payloads.moduleIds.sellerBadge, payloads.adminAuth); + await admin.disableSellerBadgeModule(); + }); }); diff --git a/tests/pw/tests/e2e/sellerVacation.spec.ts b/tests/pw/tests/e2e/sellerVacation.spec.ts new file mode 100644 index 0000000000..189a04dc4a --- /dev/null +++ b/tests/pw/tests/e2e/sellerVacation.spec.ts @@ -0,0 +1,36 @@ +import { test, request, Page } from '@playwright/test'; +import { SellerVacationPage } from '@pages/sellerVacationPage'; +import { ApiUtils } from '@utils/apiUtils'; +import { data } from '@utils/testData'; +import { payloads } from '@utils/payloads'; + +test.describe('Seller vacation test', () => { + let admin: SellerVacationPage; + let aPage: Page; + let apiUtils: ApiUtils; + + test.beforeAll(async ({ browser }) => { + const adminContext = await browser.newContext(data.auth.adminAuth); + aPage = await adminContext.newPage(); + admin = new SellerVacationPage(aPage); + + apiUtils = new ApiUtils(await request.newContext()); + }); + + test.afterAll(async () => { + await apiUtils.activateModules(payloads.moduleIds.sellerVacation, payloads.adminAuth); + await aPage.close(); + await apiUtils.dispose(); + }); + + //admin + + test('admin can enable seller vacation module', { tag: ['@pro', '@admin'] }, async () => { + await admin.enableSellerVacationModule(); + }); + + test('admin can disable seller vacation module', { tag: ['@pro', '@admin'] }, async () => { + await apiUtils.deactivateModules(payloads.moduleIds.sellerVacation, payloads.adminAuth); + await admin.disableSellerVacationModule(); + }); +}); diff --git a/tests/pw/tests/e2e/shipstation.spec.ts b/tests/pw/tests/e2e/shipstation.spec.ts index 32d3bc57ba..3241cc59a7 100644 --- a/tests/pw/tests/e2e/shipstation.spec.ts +++ b/tests/pw/tests/e2e/shipstation.spec.ts @@ -1,29 +1,55 @@ -import { test, Page } from '@playwright/test'; +import { test, Page, request } from '@playwright/test'; import { ShipStationPage } from '@pages/shipStationPage'; +import { ApiUtils } from '@utils/apiUtils'; import { data } from '@utils/testData'; +import { payloads } from '@utils/payloads'; + +const { VENDOR_ID } = process.env; test.describe('ShipStation test', () => { test.skip(true, 'remove after pr is merged'); + let admin: ShipStationPage; let vendor: ShipStationPage; - 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 ShipStationPage(aPage); + const vendorContext = await browser.newContext(data.auth.vendorAuth); vPage = await vendorContext.newPage(); vendor = new ShipStationPage(vPage); + + apiUtils = new ApiUtils(await request.newContext()); }); test.afterAll(async () => { + await apiUtils.activateModules(payloads.moduleIds.shipStation, payloads.adminAuth); await vPage.close(); }); + // admin + + test('admin can enable ShipStation integration module', { tag: ['@pro', '@admin'] }, async () => { + await admin.enableShipStationModule(); + }); + // vendor test('vendor can generate ShipStation credentials', { tag: ['@pro', '@exploratory', '@vendor'] }, async () => { + await apiUtils.deleteShipStationCredential(VENDOR_ID, payloads.vendorAuth); //todo: handle test re-run issue await vendor.generateShipStationCredentials(); }); test('vendor can revoke ShipStation credentials', { tag: ['@pro', '@exploratory', '@vendor'] }, async () => { + await apiUtils.createShipStationCredential(VENDOR_ID, payloads.vendorAuth); //todo: handle test re-run issue await vendor.revokeShipStationCredentials(); }); + + test('admin can disable ShipStation integration module', { tag: ['@pro', '@admin'] }, async () => { + await apiUtils.deactivateModules(payloads.moduleIds.shipStation, payloads.adminAuth); + await admin.disableShipStationModule(); + }); }); diff --git a/tests/pw/tests/e2e/spmv.spec.ts b/tests/pw/tests/e2e/spmv.spec.ts index bb75ca089b..f1e08042a3 100644 --- a/tests/pw/tests/e2e/spmv.spec.ts +++ b/tests/pw/tests/e2e/spmv.spec.ts @@ -38,12 +38,17 @@ test.describe('Vendor SPMV test', () => { test.afterAll(async () => { await dbUtils.setOptionValue(dbData.dokan.optionName.selling, dbData.dokan.sellingSettings); + await apiUtils.activateModules(payloads.moduleIds.spmv, payloads.adminAuth); await aPage.close(); await vPage.close(); await cPage.close(); await apiUtils.dispose(); }); + test('admin can enable SPMV module', { tag: ['@pro', '@admin'] }, async () => { + await admin.enableSpmvModule(); + }); + test('admin can assign SPMV product to other vendor', { tag: ['@pro', '@admin'] }, async () => { const [, productId] = await apiUtils.createProduct({ ...payloads.createProduct(), name: data.predefined.spmv.productName() }, payloads.vendor2Auth); await admin.assignSpmvProduct(productId, data.predefined.vendorStores.vendor1); @@ -107,4 +112,11 @@ test.describe('Vendor SPMV test', () => { test('customer can add to cart other available vendor product', { tag: ['@pro', '@customer'] }, async () => { await customer.addToCartOtherAvailableVendorsProduct(productName2, data.predefined.vendorStores.vendor1); }); + + // admin + + test('admin can disable SPMV module', { tag: ['@pro', '@admin'] }, async () => { + await apiUtils.deactivateModules(payloads.moduleIds.spmv, payloads.adminAuth); + await admin.disableSpmvModule(); + }); }); diff --git a/tests/pw/tests/e2e/storeSupports.spec.ts b/tests/pw/tests/e2e/storeSupports.spec.ts index 31012f8b96..3df203b42a 100644 --- a/tests/pw/tests/e2e/storeSupports.spec.ts +++ b/tests/pw/tests/e2e/storeSupports.spec.ts @@ -19,16 +19,22 @@ test.describe('Store Support test (admin)', () => { admin = new StoreSupportsPage(aPage); apiUtils = new ApiUtils(await request.newContext()); + await apiUtils.activateModules(payloads.moduleIds.storeSupport, payloads.adminAuth); [, supportTicketId] = await apiUtils.createSupportTicket({ ...payloads.createSupportTicket, author: CUSTOMER_ID, meta: { store_id: VENDOR_ID } }); }); test.afterAll(async () => { + await apiUtils.activateModules(payloads.moduleIds.storeSupport, payloads.adminAuth); await aPage.close(); await apiUtils.dispose(); }); //admin + test('admin can store support module', { tag: ['@pro', '@admin'] }, async () => { + await admin.enableStoreSupportModule(data.predefined.vendorStores.vendor1); + }); + test('admin can view store support menu page', { tag: ['@pro', '@exploratory', '@admin'] }, async () => { await admin.adminStoreSupportRenderProperly(); }); @@ -163,12 +169,17 @@ test.describe('Store Support test (customer)', () => { }); test.describe('Store Support test (vendor)', () => { + let admin: StoreSupportsPage; let vendor: StoreSupportsPage; - let vPage: Page; + let aPage: Page, vPage: Page; let apiUtils: ApiUtils; let supportTicketId: string; test.beforeAll(async ({ browser }) => { + const adminContext = await browser.newContext(data.auth.adminAuth); + aPage = await adminContext.newPage(); + admin = new StoreSupportsPage(aPage); + const vendorContext = await browser.newContext(data.auth.vendorAuth); vPage = await vendorContext.newPage(); vendor = new StoreSupportsPage(vPage); @@ -179,6 +190,7 @@ test.describe('Store Support test (vendor)', () => { }); test.afterAll(async () => { + await apiUtils.activateModules(payloads.moduleIds.storeSupport, payloads.adminAuth); await vPage.close(); await apiUtils.dispose(); }); @@ -231,4 +243,9 @@ test.describe('Store Support test (vendor)', () => { const [, closedSupportTicketId] = await apiUtils.createSupportTicket({ ...payloads.createSupportTicket, status: 'closed', author: CUSTOMER_ID, meta: { store_id: VENDOR_ID } }); await vendor.vendorReopenSupportTicketWithReply(closedSupportTicketId, 'reopening this ticket'); }); + + test('admin can disable store support module', { tag: ['@pro', '@admin'] }, async () => { + await apiUtils.deactivateModules(payloads.moduleIds.storeSupport, payloads.adminAuth); + await admin.disableStoreSupportModule(data.predefined.vendorStores.vendor1); + }); }); diff --git a/tests/pw/tests/e2e/vendorAnalytics.spec.ts b/tests/pw/tests/e2e/vendorAnalytics.spec.ts index 1528078f8e..a1a3844166 100644 --- a/tests/pw/tests/e2e/vendorAnalytics.spec.ts +++ b/tests/pw/tests/e2e/vendorAnalytics.spec.ts @@ -1,19 +1,38 @@ -import { test, Page } from '@playwright/test'; +import { test, Page, request } from '@playwright/test'; import { VendorAnalyticsPage } from '@pages/vendorAnalyticsPage'; +import { ApiUtils } from '@utils/apiUtils'; import { data } from '@utils/testData'; +import { payloads } from '@utils/payloads'; test.describe('Vendor analytics test', () => { + let admin: VendorAnalyticsPage; let vendor: VendorAnalyticsPage; - 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 VendorAnalyticsPage(aPage); + const vendorContext = await browser.newContext(data.auth.vendorAuth); vPage = await vendorContext.newPage(); vendor = new VendorAnalyticsPage(vPage); + + apiUtils = new ApiUtils(await request.newContext()); }); test.afterAll(async () => { + await apiUtils.activateModules(payloads.moduleIds.vendorAnalytics, payloads.adminAuth); + await aPage.close(); await vPage.close(); + await apiUtils.dispose(); + }); + + // admin + + test('admin can enable vendor analytics module', { tag: ['@pro', '@admin'] }, async () => { + await admin.enableVendorAnalyticsModule(); }); // vendor @@ -21,4 +40,11 @@ test.describe('Vendor analytics test', () => { test('vendor can view analytics menu page', { tag: ['@pro', '@exploratory', '@vendor'] }, async () => { await vendor.vendorAnalyticsRenderProperly(); }); + + // admin + + test('admin can disable vendor analytics module', { tag: ['@pro', '@admin'] }, async () => { + await apiUtils.deactivateModules(payloads.moduleIds.vendorAnalytics, payloads.adminAuth); + await admin.disableVendorAnalyticsModule(); + }); }); diff --git a/tests/pw/tests/e2e/vendorAuction.spec.ts b/tests/pw/tests/e2e/vendorAuction.spec.ts index d8f319c61b..19a5270ccf 100644 --- a/tests/pw/tests/e2e/vendorAuction.spec.ts +++ b/tests/pw/tests/e2e/vendorAuction.spec.ts @@ -31,6 +31,7 @@ test.describe('Auction Product test', () => { }); test.afterAll(async () => { + await apiUtils.activateModules(payloads.moduleIds.auction, payloads.adminAuth); await aPage.close(); await vPage.close(); await cPage.close(); @@ -39,6 +40,10 @@ test.describe('Auction Product test', () => { // admin + test('admin can enable auction integration module', { tag: ['@pro', '@admin'] }, async () => { + await admin.enableAuctionIntegrationModule(); + }); + test('admin can add auction product', { tag: ['@pro', '@admin'] }, async () => { await admin.adminAddAuctionProduct(data.product.auction); }); @@ -100,4 +105,11 @@ test.describe('Auction Product test', () => { const [, , auctionProductName] = await apiUtils.createProduct(payloads.createAuctionProduct(), payloads.vendorAuth); await customer.buyAuctionProduct(auctionProductName); }); + + // admin + + test('admin can disable auction integration module', { tag: ['@pro', '@admin'] }, async () => { + await apiUtils.deactivateModules(payloads.moduleIds.auction, payloads.adminAuth); + await admin.disableAuctionIntegrationModule(); + }); }); diff --git a/tests/pw/tests/e2e/vendorBooking.spec.ts b/tests/pw/tests/e2e/vendorBooking.spec.ts index f8761054d8..555efb7718 100644 --- a/tests/pw/tests/e2e/vendorBooking.spec.ts +++ b/tests/pw/tests/e2e/vendorBooking.spec.ts @@ -37,6 +37,7 @@ test.describe('Booking Product test', () => { }); test.afterAll(async () => { + await apiUtils.activateModules(payloads.moduleIds.booking, payloads.adminAuth); await aPage.close(); await vPage.close(); await cPage.close(); @@ -45,6 +46,10 @@ test.describe('Booking Product test', () => { // admin + test('admin can enable woocommerce booking integration module', { tag: ['@pro', '@admin'] }, async () => { + await admin.enableBookingModule(); + }); + test('admin can add booking product', { tag: ['@pro', '@admin'] }, async () => { await admin.adminAddBookingProduct(data.product.booking); }); @@ -135,4 +140,11 @@ test.describe('Booking Product test', () => { test('customer can buy bookable product', { tag: ['@pro', '@customer'] }, async () => { await customer.buyBookableProduct(bookableProductName, data.bookings); //todo: failed on git action if ran after 12 am local time }); + + // admin + + test('admin can disable woocommerce booking integration module', { tag: ['@pro', '@admin'] }, async () => { + await apiUtils.deactivateModules(payloads.moduleIds.booking, payloads.adminAuth); + await admin.disableBookingModule(); + }); }); diff --git a/tests/pw/tests/e2e/vendorDeliveryTime.spec.ts b/tests/pw/tests/e2e/vendorDeliveryTime.spec.ts index f3c1b59717..158c8fe9ae 100644 --- a/tests/pw/tests/e2e/vendorDeliveryTime.spec.ts +++ b/tests/pw/tests/e2e/vendorDeliveryTime.spec.ts @@ -1,15 +1,23 @@ -import { test, Page } from '@playwright/test'; +import { test, Page, request } from '@playwright/test'; import { VendorDeliveryTimePage } from '@pages/vendorDeliveryTimePage'; -import { dbData } from '@utils/dbData'; +import { ApiUtils } from '@utils/apiUtils'; +import { payloads } from '@utils/payloads'; import { dbUtils } from '@utils/dbUtils'; +import { dbData } from '@utils/dbData'; import { data } from '@utils/testData'; test.describe('Vendor delivery time test', () => { + let admin: VendorDeliveryTimePage; let vendor: VendorDeliveryTimePage; let customer: VendorDeliveryTimePage; - let vPage: Page, cPage: Page; + let aPage: Page, vPage: Page, cPage: Page; + let apiUtils: ApiUtils; test.beforeAll(async ({ browser }) => { + const adminContext = await browser.newContext(data.auth.adminAuth); + aPage = await adminContext.newPage(); + admin = new VendorDeliveryTimePage(aPage); + const vendorContext = await browser.newContext(data.auth.vendorAuth); vPage = await vendorContext.newPage(); vendor = new VendorDeliveryTimePage(vPage); @@ -17,13 +25,22 @@ test.describe('Vendor delivery time test', () => { const customerContext = await browser.newContext(data.auth.customerAuth); cPage = await customerContext.newPage(); customer = new VendorDeliveryTimePage(cPage); + + apiUtils = new ApiUtils(await request.newContext()); }); test.afterAll(async () => { + await apiUtils.activateModules(payloads.moduleIds.deliveryTime, payloads.adminAuth); await vPage.close(); await cPage.close(); }); + // admin + + test('admin can enable delivery time module', { tag: ['@pro', '@admin'] }, async () => { + await admin.enableDeliveryTimeModule(); + }); + //vendor test('vendor can view delivery time menu page', { tag: ['@pro', '@exploratory', '@vendor'] }, async () => { @@ -46,6 +63,8 @@ test.describe('Vendor delivery time test', () => { await vendor.updateCalendarView('week'); }); + // customer + test('customer can buy product with delivery time', { tag: ['@pro', '@customer'] }, async () => { test.skip(true, 'run when chart & checkout block pr is merged'); await customer.addProductToCart(data.predefined.simpleProduct.product1.name, 'single-product'); @@ -58,4 +77,11 @@ test.describe('Vendor delivery time test', () => { await customer.addProductToCart(data.predefined.simpleProduct.product1.name, 'single-product'); await customer.placeOrderWithDeliverTimeStorePickup('store-pickup', data.deliveryTime); }); + + // admin + + test('admin can disable delivery time module', { tag: ['@pro', '@admin'] }, async () => { + await apiUtils.deactivateModules(payloads.moduleIds.deliveryTime, payloads.adminAuth); + await admin.disableDeliveryTimeModule(); + }); }); diff --git a/tests/pw/tests/e2e/vendorProductSubscription.spec.ts b/tests/pw/tests/e2e/vendorProductSubscription.spec.ts index 74a5e04170..32da9de77c 100644 --- a/tests/pw/tests/e2e/vendorProductSubscription.spec.ts +++ b/tests/pw/tests/e2e/vendorProductSubscription.spec.ts @@ -5,13 +5,18 @@ import { data } from '@utils/testData'; import { payloads } from '@utils/payloads'; test.describe('Product subscriptions test', () => { + let admin: VendorProductSubscriptionPage; let vendor: VendorProductSubscriptionPage; let customer: VendorProductSubscriptionPage; - let vPage: Page, cPage: Page; + let aPage: Page, vPage: Page, cPage: Page; let apiUtils: ApiUtils; let subscriptionId: string = '1'; test.beforeAll(async ({ browser }) => { + const adminContext = await browser.newContext(data.auth.adminAuth); + aPage = await adminContext.newPage(); + admin = new VendorProductSubscriptionPage(aPage); + const vendorContext = await browser.newContext(data.auth.vendorAuth); vPage = await vendorContext.newPage(); vendor = new VendorProductSubscriptionPage(vPage); @@ -25,11 +30,18 @@ test.describe('Product subscriptions test', () => { }); test.afterAll(async () => { + await apiUtils.activateModules(payloads.moduleIds.productSubscription, payloads.adminAuth); await vPage.close(); await cPage.close(); await apiUtils.dispose(); }); + // admin + + test('admin can enable product subscription module', { tag: ['@pro', '@admin'] }, async () => { + await admin.enableProductSubscriptionModule(); + }); + //vendor test('vendor can view user subscriptions menu page', { tag: ['@pro', '@exploratory', '@vendor'] }, async () => { @@ -81,4 +93,9 @@ test.describe('Product subscriptions test', () => { test.skip('customer can buy product subscription', { tag: ['@pro', '@customer'] }, async () => { await customer.buyProductSubscription(data.predefined.simpleSubscription.product1); }); + + test('admin can disable product subscription module', { tag: ['@pro', '@admin'] }, async () => { + await apiUtils.deactivateModules(payloads.moduleIds.productSubscription, payloads.adminAuth); + await admin.disableProductSubscriptionModule(); + }); }); diff --git a/tests/pw/tests/e2e/vendorReturnRequest.spec.ts b/tests/pw/tests/e2e/vendorReturnRequest.spec.ts index a52b479c9d..132919ed9b 100644 --- a/tests/pw/tests/e2e/vendorReturnRequest.spec.ts +++ b/tests/pw/tests/e2e/vendorReturnRequest.spec.ts @@ -1,23 +1,28 @@ -import { test, Page } from '@playwright/test'; +import { test, Page, request } from '@playwright/test'; import { VendorReturnRequestPage } from '@pages/vendorReturnRequestPage'; import { CustomerPage } from '@pages/customerPage'; import { OrdersPage } from '@pages/ordersPage'; -// 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 { CUSTOMER_ID, PRODUCT_ID } = process.env; -test.describe.skip('Vendor RMA test', () => { +test.describe('Vendor RMA test', () => { + let admin: VendorReturnRequestPage; let vendor: VendorReturnRequestPage; let vendor1: OrdersPage; let customer: VendorReturnRequestPage; let customer1: CustomerPage; - let vPage: Page, cPage: Page; - // let apiUtils: ApiUtils; + let aPage: Page, vPage: Page, cPage: Page; + let apiUtils: ApiUtils; let orderId: string; test.beforeAll(async ({ browser }) => { + const adminContext = await browser.newContext(data.auth.adminAuth); + aPage = await adminContext.newPage(); + admin = new VendorReturnRequestPage(aPage); + const vendorContext = await browser.newContext(data.auth.vendorAuth); vPage = await vendorContext.newPage(); vendor = new VendorReturnRequestPage(vPage); @@ -35,16 +40,22 @@ test.describe.skip('Vendor RMA test', () => { await vendor1.updateOrderStatusOnTable(orderId, 'processing'); await customer.customerRequestWarranty(orderId, data.predefined.simpleProduct.product1.name, data.rma.requestWarranty); - // apiUtils = new ApiUtils(await request.newContext()); + apiUtils = new ApiUtils(await request.newContext()); // [,, orderId, ] = await apiUtils.createOrderWithStatus(PRODUCT_ID, { ...payloads.createOrder, customer_id: CUSTOMER_ID }, data.order.orderStatus.processing, payloads.vendorAuth); // [,, orderId, ] = await apiUtils.createOrderWithStatus(payloads.createProduct(), { ...payloads.createOrder, customer_id: CUSTOMER_ID }, data.order.orderStatus.processing, payloads.vendorAuth); }); test.afterAll(async () => { + await apiUtils.activateModules(payloads.moduleIds.rma, payloads.adminAuth); + await aPage.close(); await vPage.close(); await cPage.close(); - // await apiUtils.dispose(); + await apiUtils.dispose(); + }); + + test('admin can RMA module', { tag: ['@pro', '@admin'] }, async () => { + await admin.enableRmaModule(); }); //vendor @@ -53,6 +64,10 @@ test.describe.skip('Vendor RMA test', () => { await vendor.vendorReturnRequestRenderProperly(); }); + test('vendor can view return request settings menu page', { tag: ['@pro', '@exploratory', '@vendor'] }, async () => { + await vendor.vendorRmaSettingsRenderProperly(); + }); + test('vendor can view return request details', { tag: ['@pro', '@exploratory', '@vendor'] }, async () => { await vendor.vendorViewRmaDetails(orderId); }); @@ -92,4 +107,11 @@ test.describe.skip('Vendor RMA test', () => { await vendor1.updateOrderStatusOnTable(orderId, 'processing'); await customer.customerRequestWarranty(orderId, data.predefined.simpleProduct.product1.name, data.rma.requestWarranty); }); + + // admin + + test.skip('admin can disable RMA module', { tag: ['@pro', '@admin'] }, async () => { + await apiUtils.deactivateModules(payloads.moduleIds.rma, payloads.adminAuth); + await admin.disableRmaModule(); + }); }); diff --git a/tests/pw/tests/e2e/vendorStaff.spec.ts b/tests/pw/tests/e2e/vendorStaff.spec.ts index 9d9f3bc8d2..2047e10016 100644 --- a/tests/pw/tests/e2e/vendorStaff.spec.ts +++ b/tests/pw/tests/e2e/vendorStaff.spec.ts @@ -5,12 +5,17 @@ import { data } from '@utils/testData'; import { payloads } from '@utils/payloads'; test.describe('Vendor staff test (vendor)', () => { + let admin: VendorStaffPage; let vendor: VendorStaffPage; - let vPage: Page; + let aPage: Page, vPage: Page; let apiUtils: ApiUtils; const staff = data.staff(); test.beforeAll(async ({ browser }) => { + const adminContext = await browser.newContext(data.auth.adminAuth); + aPage = await adminContext.newPage(); + admin = new VendorStaffPage(aPage); + const vendorContext = await browser.newContext(data.auth.vendorAuth); vPage = await vendorContext.newPage(); vendor = new VendorStaffPage(vPage); @@ -20,10 +25,15 @@ test.describe('Vendor staff test (vendor)', () => { }); test.afterAll(async () => { + await apiUtils.activateModules(payloads.moduleIds.vendorStaff, payloads.adminAuth); await vPage.close(); await apiUtils.dispose(); }); + test('admin can enable vendor staff manager module', { tag: ['@pro', '@admin'] }, async () => { + await admin.enableVendorStaffModule(); + }); + test('vendor can view staff menu page', { tag: ['@pro', '@exploratory', '@vendor'] }, async () => { await vendor.vendorStaffRenderProperly(); }); @@ -46,11 +56,16 @@ test.describe('Vendor staff test (vendor)', () => { }); test.describe('Vendor staff test (vendorStaff)', () => { + let admin: VendorStaffPage; let staff: VendorStaffPage; - let sPage: Page; + let aPage: Page, sPage: Page; let apiUtils: ApiUtils; test.beforeAll(async ({ browser }) => { + const adminContext = await browser.newContext(data.auth.adminAuth); + aPage = await adminContext.newPage(); + admin = new VendorStaffPage(aPage); + apiUtils = new ApiUtils(await request.newContext()); const [, staffId, staffName] = await apiUtils.createVendorStaff(payloads.createStaff(), payloads.vendorAuth); @@ -69,6 +84,11 @@ test.describe('Vendor staff test (vendorStaff)', () => { test('VendorStaff can view allowed menus', { tag: ['@pro', '@staff'] }, async () => { await staff.viewPermittedMenus(data.vendorStaff.basicMenuNames); }); + + test('admin can disable vendor staff manager module', { tag: ['@pro', '@admin'] }, async () => { + await apiUtils.deactivateModules(payloads.moduleIds.vendorStaff, payloads.adminAuth); + await admin.disableVendorStaffModule(); + }); }); function createPayload(capabilitiesArray: string[], access = true) { diff --git a/tests/pw/tests/e2e/vendorSubscriptions.spec.ts b/tests/pw/tests/e2e/vendorSubscriptions.spec.ts index 1dbdabad29..8e75b8d8ae 100644 --- a/tests/pw/tests/e2e/vendorSubscriptions.spec.ts +++ b/tests/pw/tests/e2e/vendorSubscriptions.spec.ts @@ -5,6 +5,7 @@ import { ApiUtils } from '@utils/apiUtils'; import { data } from '@utils/testData'; import { payloads } from '@utils/payloads'; import { dbUtils } from '@utils/dbUtils'; +import { dbData } from '@utils/dbData'; test.describe('Vendor subscription test', () => { test.skip(true, ' need to update create dokan subscription product'); @@ -40,16 +41,23 @@ test.describe('Vendor subscription test', () => { }); test.afterAll(async () => { + await apiUtils.activateModules(payloads.moduleIds.vendorSubscription, payloads.adminAuth); await aPage.close(); await vPage.close(); await apiUtils.dispose(); }); - // admin - // todo: add dokan subscription settings tests // todo: add dokan subscription product tests + // admin + + test('admin can enable vendor subscription module', { tag: ['@pro', '@admin'] }, async () => { + await dbUtils.setOptionValue(dbData.dokan.optionName.vendorSubscription, { ...dbData.dokan.vendorSubscriptionSettings, enable_pricing: 'on' }); + await admin.enableVendorSubscriptionModule(); + await dbUtils.setOptionValue(dbData.dokan.optionName.vendorSubscription, { ...dbData.dokan.vendorSubscriptionSettings, enable_pricing: 'off' }); + }); + test('admin can view subscriptions menu page', { tag: ['@pro', '@exploratory', '@admin'] }, async () => { await admin.subscriptionsRenderProperly(); }); @@ -120,4 +128,11 @@ test.describe('Vendor subscription test', () => { const vendor = new VendorSubscriptionsPage(page); await vendor.vendorCancelSubscription(vendorName); }); + + // admin + + test('admin can disable vendor subscription module', { tag: ['@pro', '@admin'] }, async () => { + await apiUtils.deactivateModules(payloads.moduleIds.vendorSubscription, payloads.adminAuth); + await admin.disableVendorSubscriptionModule(); + }); }); diff --git a/tests/pw/tests/e2e/vendorTools.spec.ts b/tests/pw/tests/e2e/vendorTools.spec.ts index f9a1454e51..8fff48b0fc 100644 --- a/tests/pw/tests/e2e/vendorTools.spec.ts +++ b/tests/pw/tests/e2e/vendorTools.spec.ts @@ -5,11 +5,16 @@ import { data } from '@utils/testData'; import { payloads } from '@utils/payloads'; test.describe('Vendor tools test', () => { + let admin: VendorToolsPage; let vendor: VendorToolsPage; - 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 VendorToolsPage(aPage); + const vendorContext = await browser.newContext(data.auth.vendorAuth); vPage = await vendorContext.newPage(); vendor = new VendorToolsPage(vPage); @@ -19,7 +24,15 @@ test.describe('Vendor tools test', () => { }); test.afterAll(async () => { + await apiUtils.activateModules(payloads.moduleIds.vendorImportExport, payloads.adminAuth); await vPage.close(); + await apiUtils.dispose(); + }); + + // admin + + test('admin can enable product importer and exporter module', { tag: ['@pro', '@admin'] }, async () => { + await admin.enableProductImporterExporterModule(); }); //vendor @@ -43,4 +56,11 @@ test.describe('Vendor tools test', () => { test('vendor can import product as csv', { tag: ['@pro', '@vendor'] }, async () => { await vendor.importProduct('csv', 'utils/sampleData/products.csv'); }); + + // admin + + test('admin can disable product importer and exporter module', { tag: ['@pro', '@admin'] }, async () => { + await apiUtils.deactivateModules(payloads.moduleIds.vendorImportExport, payloads.adminAuth); + await admin.disableProductImporterExporterModule(); + }); }); diff --git a/tests/pw/tests/e2e/vendorVerifications.spec.ts b/tests/pw/tests/e2e/vendorVerifications.spec.ts index ca95eb5edf..0defd7b040 100644 --- a/tests/pw/tests/e2e/vendorVerifications.spec.ts +++ b/tests/pw/tests/e2e/vendorVerifications.spec.ts @@ -32,6 +32,7 @@ test.describe('Verifications test', () => { customer = new VendorVerificationsPage(cPage); apiUtils = new ApiUtils(await request.newContext()); + [, methodId, methodName] = await apiUtils.createVerificationMethod(payloads.createVerificationMethod(), payloads.adminAuth); [, mediaId] = await apiUtils.uploadMedia(data.image.avatar, payloads.mimeTypes.png, payloads.adminAuth); [, requestId] = await apiUtils.createVerificationRequest({ ...payloads.createVerificationRequest(), vendor_id: VENDOR_ID, method_id: methodId, documents: [mediaId] }, payloads.adminAuth); @@ -40,13 +41,19 @@ test.describe('Verifications test', () => { test.afterAll(async () => { // await apiUtils.deleteAllVerificationMethods(payloads.adminAuth); // await apiUtils.deleteAllVerificationRequests(payloads.adminAuth); + await apiUtils.activateModules(payloads.moduleIds.vendorVerification, payloads.adminAuth); await aPage.close(); await vPage.close(); await cPage.close(); + await apiUtils.dispose(); }); //admin + test('admin can enable vendor verification module', { tag: ['@pro', '@admin'] }, async () => { + await admin.enableVendorVerificationModule(); + }); + // verification methods test('admin can change verified icon', { tag: ['@pro', '@admin'] }, async () => { @@ -210,4 +217,11 @@ test.describe('Verifications test', () => { const [, methodId] = await apiUtils.getVerificationMethodId('address', payloads.adminAuth); await apiUtils.createVerificationRequest({ ...payloads.createVerificationRequest(), vendor_id: VENDOR_ID, method_id: methodId, documents: [mediaId], status: 'approved' }, payloads.adminAuth); }); + + // admin + + test('admin can disable vendor verification module', { tag: ['@pro', '@admin'] }, async () => { + await apiUtils.deactivateModules(payloads.moduleIds.vendorVerification, payloads.adminAuth); + await admin.disableVendorVerificationModule(); + }); }); diff --git a/tests/pw/tests/e2e/wholesale.spec.ts b/tests/pw/tests/e2e/wholesale.spec.ts index d0da1b7b2d..362997cb12 100644 --- a/tests/pw/tests/e2e/wholesale.spec.ts +++ b/tests/pw/tests/e2e/wholesale.spec.ts @@ -34,6 +34,7 @@ test.describe('Wholesale test (admin)', () => { test.afterAll(async () => { await dbUtils.setOptionValue(dbData.dokan.optionName.wholesale, dbData.dokan.wholesaleSettings); + await apiUtils.activateModules(payloads.moduleIds.wholesale, payloads.adminAuth); await aPage.close(); await cPage.close(); await apiUtils.dispose(); @@ -41,6 +42,10 @@ test.describe('Wholesale test (admin)', () => { // admin + test('admin can enable wholesale module', { tag: ['@pro', '@admin'] }, async () => { + await admin.enableWholesaleModule(); + }); + test('admin can view wholesale customers menu page', { tag: ['@pro', '@exploratory', '@admin'] }, async () => { await admin.adminWholesaleCustomersRenderProperly(); }); @@ -144,9 +149,11 @@ test.describe('Wholesale test (customer)', () => { }); test.afterAll(async () => { + await apiUtils.activateModules(payloads.moduleIds.wholesale, payloads.adminAuth); await dbUtils.setOptionValue(dbData.dokan.optionName.wholesale, dbData.dokan.wholesaleSettings); await aPage.close(); await cPage.close(); + await apiUtils.dispose(); }); test('all users can see wholesale price', { tag: ['@pro', '@customer'] }, async () => { @@ -178,4 +185,9 @@ test.describe('Wholesale test (customer)', () => { await customerPage.goToCheckout(); await customerPage.paymentOrder(); }); + + test('admin can disable wholesale module', { tag: ['@pro', '@admin'] }, async () => { + await apiUtils.deactivateModules(payloads.moduleIds.wholesale, payloads.adminAuth); + await admin.disableWholesaleModule(); + }); }); diff --git a/tests/pw/types/environment.d.ts b/tests/pw/types/environment.d.ts index 80df42a725..163022b71c 100644 --- a/tests/pw/types/environment.d.ts +++ b/tests/pw/types/environment.d.ts @@ -36,6 +36,18 @@ declare global { PRINTFUL_APP_SECRET: string; RECAPTCHA_SITE_KEY: string; RECAPTCHA_SECRET_KEY: string; + TEST_PUBLISH_KEY_STRIPE: string; + TEST_SECRET_KEY_STRIPE: string; + TEST_CLIENT_ID_STRIPE: string; + SANDBOX_CLIENT_ID_MANGOPAY: string; + SANDBOX_API_KEY_MANGOPAY: string; + TEST_KEY_ID_RAZORPAY: string; + TEST_KEY_SECRET_RAZORPAY: string; + TEST_PUBLISH_KEY_STRIPE_EXPRESS: string; + TEST_SECRET_KEY_STRIPE_EXPRESS: string; + TEST_MERCHANT_ID_PAYPAL_MARKETPLACE: string; + TEST_CLIENT_ID_PAYPAL_MARKETPLACE: string; + TEST_CLIENT_SECRET_PAYPAL_MARKETPLACE: string; DOKAN_PRO: boolean; SITE_LANGUAGE: string; SITE_TITLE: string; diff --git a/tests/pw/utils/apiUtils.ts b/tests/pw/utils/apiUtils.ts index fb13ea045f..db55df071a 100644 --- a/tests/pw/utils/apiUtils.ts +++ b/tests/pw/utils/apiUtils.ts @@ -2367,6 +2367,14 @@ export class ApiUtils { return [responseBody, productId, productName, addonNames]; } + async createBookingProductWithAddon(productPayload: string | object, addonPayload: object[], auth?: auth): Promise<[responseBody, string, string, string[]]> { + const productId = typeof productPayload === 'object' ? (await this.createBookableProduct(productPayload, auth))[1] : productPayload; + const responseBody = await this.updateProduct(productId, { meta_data: [{ key: '_product_addons', value: addonPayload }] }, auth); + const productName = String(responseBody?.name); + const addonNames = addonPayload.map((item: any) => item.name); + return [responseBody, productId, productName, addonNames]; + } + /** * miscellaneous methods */ diff --git a/tests/pw/utils/dbData.ts b/tests/pw/utils/dbData.ts index 8e2bd3aa04..c3b54419d4 100644 --- a/tests/pw/utils/dbData.ts +++ b/tests/pw/utils/dbData.ts @@ -14,10 +14,10 @@ export const dbData = { colors: 'dokan_colors', liveSearch: 'dokan_live_search_setting', storeSupport: 'dokan_store_support_setting', - // sellerVerification: 'dokan_verification', - // verificationSMSGateways: 'dokan_verification_sms_gateways', + vendorVerification: 'dokan_verification', + verificationSMSGateways: 'dokan_verification_sms_gateways', emailVerification: 'dokan_email_verification', - // socialApi: 'dokan_social_api', + socialApi: 'dokan_social_api', shippingStatus: 'dokan_shipping_status_setting', quote: 'dokan_quote_settings', liveChat: 'dokan_live_chat', @@ -27,7 +27,7 @@ export const dbData = { deliveryTime: 'dokan_delivery_time', productAdvertising: 'dokan_product_advertisement', geolocation: 'dokan_geolocation', - productReportAbuse: 'dokan_report_abuse', + reportAbuse: 'dokan_report_abuse', spmv: 'dokan_spmv', printful: 'dokan_printful', vendorSubscription: 'dokan_product_subscription', @@ -35,8 +35,13 @@ export const dbData = { dokanActiveModules: 'dokan_pro_active_modules', // dokanPro + dokanProVersion: 'dokan_pro_version', + dokanProAllowTracking: 'dokan-pro_allow_tracking', + dokanProTrackingNotice: 'dokan-pro_tracking_notice', dokanProLicense: 'dokan_pro_license', dokanProActiveModules: 'dokan_pro_active_modules', + dokanDeliverySlotSettings: '_dokan_delivery_slot_settings', + dokanVendorVerificationInitialMethodIds: 'dokan_vendor_verification_initial_method_ids', }, generalSettings: { @@ -64,6 +69,7 @@ export const dbData = { product_page_options: '', show_vendor_info: 'on', enabled_more_products_tab: 'on', + dashboard_menu_manager: [], }, sellingSettings: { @@ -124,6 +130,7 @@ export const dbData = { catalog_mode_settings: '', catalog_mode_hide_add_to_cart_button: 'on', catalog_mode_hide_product_price: 'on', + dashboard_menu_manager: [], }, withdrawSettings: { @@ -191,6 +198,7 @@ export const dbData = { weekly_schedule: 'monday', send_announcement_for_payment_change: 'false', send_announcement_for_disbursement_schedule_change: 'false', + dashboard_menu_manager: [], }, reverseWithdrawSettings: { @@ -209,6 +217,7 @@ export const dbData = { }, display_notice: 'on', send_announcement: 'on', + dashboard_menu_manager: [], }, pageSettings: { @@ -216,6 +225,7 @@ export const dbData = { store_listing: '5', my_orders: '6', reg_tc_page: '2', + dashboard_menu_manager: [], }, appearanceSettings: { @@ -780,6 +790,7 @@ export const dbData = { enable_privacy: 'on', privacy_page: '', privacy_policy: '

Your personal data will be used to support your experience throughout this website, to manage access to your account, and for other purposes described in our [dokan_privacy_policy]

', + dashboard_menu_manager: [], }, colorsSettings: { @@ -803,6 +814,7 @@ export const dbData = { 'color-4': '#DD3B0F', }, }, + dashboard_menu_manager: [], }, liveSearchSettings: { @@ -810,13 +822,33 @@ export const dbData = { dashboard_menu_manager: [], }, + printful: { + app: '', + size_guide_sub_section: '', + popup_title: 'Size Guide', + popup_text_color: '#000000', + popup_bg_color: '#FFFFFF', + tab_bg_color: '#EEEEEE', + active_tab_bg_color: '#DDDDDD', + size_guide_button_text: 'Size Guide', + button_text_color: '#1064A9', + primary_measurement_unit: 'inches', + app_id: PRINTFUL_APP_ID ?? '', + app_secret: PRINTFUL_APP_SECRET ?? '', + dashboard_menu_manager: [], + }, + storeSupportSettings: { enabled_for_customer_order: 'on', store_support_product_page: 'above_tab', support_button_label: 'Get Support', + dashboard_menu_manager: [], }, - sellerVerificationSettings: { + vendorVerificationSettings: { + verified_icon: 'check_circle_solid', + vendor_verification_methods: '', + vendor_verification_social_section: '', facebook_app_details: '', twitter_app_details: '', google_details: '', @@ -827,6 +859,17 @@ export const dbData = { twitter_app_secret: '', google_app_id: '', google_app_secret: '', + linkedin_app_id: '', + linkedin_app_secret: '', + dashboard_menu_manager: [], + }, + + VendorVerificationsInitialMethodIds: { + passport: 1, + national_id: 2, + driving_license: 3, + address: 4, + company: 5, }, verificationSMSGatewaysSettings: { @@ -843,12 +886,14 @@ export const dbData = { // twilio details twilio_details: '', + dashboard_menu_manager: [], }, emailVerificationSettings: { enabled: 'off', registration_notice: 'Please check your email and complete email verification to login.', login_notice: 'Please check your email and complete email verification to login.', + dashboard_menu_manager: [], }, socialAPISettings: { @@ -863,6 +908,7 @@ export const dbData = { fb_app_secret: '', twitter_app_id: '', twitter_app_secret: '', + dashboard_menu_manager: [], }, shippingStatusSettings: { @@ -906,6 +952,7 @@ export const dbData = { value: 'On the way', }, ], + dashboard_menu_manager: [], }, quoteSettings: { @@ -920,6 +967,7 @@ export const dbData = { decrease_offered_price: '0', enable_convert_to_order: 'off', enable_quote_converter_display: 'off', + dashboard_menu_manager: [], }, liveChatSettings: { @@ -954,12 +1002,14 @@ export const dbData = { }, ], rma_policy: '

Refund Policy

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