Skip to content

Commit

Permalink
Add module tests (getdokan#2481)
Browse files Browse the repository at this point in the history
* Add colors tests

* Add auctions tests

* Add delivery time & eu compliance tests

* Add live chat tests

* Add live chat tests

* add live search tests

* Add printful tests

* Add rma tests

* Add active modules to all modules test

* Add vendor analytics test

* Add vendor verification tests

* add vendor subscription tests

* Add vendor booking tests

* Add vendor staff tests

* Add vendor product import export tests

* Add shipstation tests

* Add wholesale tests

* Update rma tests

* Add store support tests

* Add seller badge tests

* Add report abuse tests

* Add product subscription tests

* Add product QA tests

* Add payments test

* Update auction tests

* Update delivery time tests

* Add geolocation tests

* Add min max tests

* Update printful tests

* Add product addon tests

* Update product advertising tests

* Add product enquiry tests

* Update product qa tests

* Update product subscription tests

* Update report abuse tests

* Add rma tests

* Update seller badge tests

* Add seller vacation tests

* add spmv tests

* Update store support tests

* Update vendor analytics test

* Update vendor tools tests

* Update vendor staff tests

* Update vendor subscription test

* Update verification tests

* Update vendor bookings test

* Update wholesale tests

* Update wholesale test

* Update shipstation tests

* Update tests

* Update npm packages

* Update tests

* Fix booking product tests

* Update selectors

* Removed an obsolete test

* Fix failed tests

* Revert removal of tests

* Update store setup

* Fix pr reviews

* Fix a test issue

* Update db data

* Fix lint issues

* Fix a booking test

* Fix a rfq tests

* Remove test.only

* Fix pr reviews

* Fix locator issue
  • Loading branch information
shashwatahalder01 authored Dec 13, 2024
1 parent 98d3958 commit 02d4fe1
Show file tree
Hide file tree
Showing 83 changed files with 2,862 additions and 925 deletions.
79 changes: 46 additions & 33 deletions tests/pw/.env.example
Original file line number Diff line number Diff line change
@@ -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]
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]
79 changes: 46 additions & 33 deletions tests/pw/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

<br/>
Expand Down
Loading

0 comments on commit 02d4fe1

Please sign in to comment.