Skip to content

Refactor E2E test suite with enhanced infrastructure and documentation#2960

Open
shohan0120 wants to merge 199 commits intodevelopfrom
all/e2e-fix
Open

Refactor E2E test suite with enhanced infrastructure and documentation#2960
shohan0120 wants to merge 199 commits intodevelopfrom
all/e2e-fix

Conversation

@shohan0120
Copy link
Copy Markdown
Contributor

@shohan0120 shohan0120 commented Nov 3, 2025

All Submissions:

  • My code follow the WordPress' coding standards
  • My code satisfies feature requirements
  • My code is tested
  • My code passes the PHPCS tests
  • My code has proper inline documentation
  • I've included related pull request(s) (optional)
  • I've included developer documentation (optional)
  • I've added proper labels to this pull request

Changes proposed in this Pull Request:

Related Pull Request(s)

  • Full PR Link

Closes

  • Closes #

How to test the changes in this Pull Request:

  • Steps or issue link

Changelog entry

Refactored test suite documentation with professional README, deployment guide, security fixes, and cleanup of redundant files

Detailed Description of the pull request. What was previous behaviour
and what will be changed in this PR.

Before Changes

Describe the issue before changes with screenshots(s).

After Changes

Describe the issue after changes with screenshot(s).

Feature Video (optional)

Link of detailed video if this PR is for a feature.

PR Self Review Checklist:

  • Code is not following code style guidelines
  • Bad naming: make sure you would understand your code if you read it a few months from now.
  • KISS: Keep it simple, Sweetie (not stupid!).
  • DRY: Don't Repeat Yourself.
  • Code that is not readable: too many nested 'if's are a bad sign.
  • Performance issues
  • Complicated constructions that need refactoring or comments: code should almost always be self-explanatory.
  • Grammar errors.

FOR PR REVIEWER ONLY:

As a reviewer, your feedback should be focused on the idea, not the person. Seek to understand, be respectful, and focus on constructive dialog.

As a contributor, your responsibility is to learn from suggestions and iterate your pull request should it be needed based on feedback. Seek to collaborate and produce the best possible contribution to the greater whole.

  • Correct — Does the change do what it’s supposed to? ie: code 100% fulfilling the requirements?
  • Secure — Would a nefarious party find some way to exploit this change? ie: everything is sanitized/escaped appropriately for any SQL or XSS injection possibilities?
  • Readable — Will your future self be able to understand this change months down the road?
  • Elegant — Does the change fit aesthetically within the overall style and architecture?

Summary by CodeRabbit

  • Tests

    • Added many e2e suites and helpers (manual orders, vendor reports, Stripe Express, booking, coupons); improved resilience and fallbacks; several flaky suites/tests skipped.
  • New Features

    • End-to-end flows for Stripe Express, unified coupon workflows, comprehensive vendor reports, and manual order scenarios.
  • Refactor

    • Consolidated navigation and wait helpers for more reliable UI interactions.
  • Documentation

    • Major README and test-run guide overhaul with Docker, quick start, and troubleshooting.
  • Chores

    • Test tooling, env defaults, manifest and ignore updates, and dependency/tooling adjustments.

dev-shahed and others added 30 commits August 21, 2025 17:53
- Improved error handling in the AbuseReportsPage to continue execution despite AJAX failures, providing fallback options for selecting filters and handling bulk actions.
- Updated selectors in the selectors.ts file for better flexibility in identifying report elements.
- Added comprehensive checks in VendorReportsPage for rendering, navigation, and data validation, including responsiveness and accessibility tests.
- Introduced new methods for filtering and exporting reports, ensuring robust interaction with the analytics dashboard.
- Adjusted test cases to use safer actions and improved logging for better traceability during test execution.
- Updated `clickAndWaitForResponseAndLoadState` method to specify 'load' state for better synchronization.
- Modified `viewBookingProduct` method to directly click without waiting for load state.
- Enhanced test timeout to 45 seconds for faster execution.
- Implemented exponential backoff for API product creation retries and added error handling for critical setup operations.
- Streamlined cleanup operations with error handling to ensure test stability.
- Organized tests into parallel and sequential categories for improved execution flow.
* fix: Shortcode templates fields not exists issue.

* fix: update coupon section text for consistency.
…dation. (#2872)

* fix: Coupon creation execution by ensuring proper load state and validation.

* fix: update coupon selector text for consistency in the marketplace
refactor: enhance abuse reports and vendor reports functionality
fix: update env:setup script in package.json to include NO_SETUP flag…
…ity checks

- Changed visibility check for admin notices container to a more specific selector.
- Updated the dashboard text selector to use a normalized space query for consistency.
- Modified the expectTotalNotices method to remove the count parameter and focus on visibility of a specific notice.
- Skipped the vendor analytics test suite for future implementation.
refactor: update admin notice page and selectors for improved visibil…
test: skip Product AI test suite and add tag to product title test
… tests

- Refactored CouponsPage class to improve structure and readability.
- Added new methods for navigating and managing coupons, including creating, searching, and verifying coupons.
- Updated e2e tests to utilize the refactored CouponsPage class, ensuring better organization and clarity in test cases for admin, vendor, and customer coupon functionalities.
…ure and data handling

- Refactored coupon management tests to utilize a centralized test data structure for better maintainability.
- Implemented cleanup logic to remove test coupons after all tests are completed.
- Updated test cases for admin and vendor coupon functionalities to improve clarity and organization.
- Ensured consistent usage of Playwright's page interactions across all test scenarios.
- Updated the CouponsPage class to include additional locators and methods for better organization and maintainability.
- Refactored test cases to utilize the new CouponsPage methods, improving clarity and reducing redundancy.
- Ensured consistent handling of coupon creation, verification, and management across admin and vendor functionalities.
- Improved test data structure for easier updates and maintenance.
refactor: restructure CouponsPage class and enhance coupon management…
feat: enhance environment variable typing in testData.ts for better t…
- Restored and organized selectors for category selection, radius slider, and search button in the selectors.ts file.
- Removed outdated merge conflict markers to ensure clean code.
- Temporarily disabled the background color assertion for the menu switcher to address potential test flakiness.
- Temporarily commented out the upgradePlan selector to improve code readability and maintainability.
dev-shahed and others added 8 commits March 12, 2026 12:00
- Reduced wait time before clicking the submit button to improve test efficiency.
- Restored the wait for load state to ensure proper page rendering after submission, enhancing reliability of the test flow.
…ionPage

- Introduced a new test case in commission.spec.ts for configuring category-based commission settings, enhancing test coverage for commission management.
- Updated CommissionPage class with new methods for setting category-based percentage and fixed values, improving interaction with commission settings.
- Added new selectors for category-based commission inputs to streamline test execution and maintainability.
- Introduced a new test case in commission.spec.ts for creating a product with specific commission settings, enhancing test coverage for product management.
- Updated CommissionPage class with new methods for navigating to the new product page and setting product details, improving interaction with product creation.
- Added new selectors for product input fields to streamline test execution and maintainability.
- Introduced customer.spec.ts with initial test cases for customer flows, utilizing session storage for admin and customer contexts.
- Created CustomerPage class in customerPage.ts to encapsulate selectors, test data, and helper methods for navigating and interacting with customer-related pages.
- Enhanced test organization and maintainability by implementing a dedicated page object for customer functionalities.
…ructure

- Commented out existing test cases in customer.spec.ts to streamline the test suite while retaining the structure for future implementation.
- Introduced new test cases in customer/customer.spec.ts for customer registration, login, logout, and vendor functionality, improving test coverage and organization.
- Expanded the CustomerPage class in customerPage.ts with additional test data and methods for handling customer interactions, enhancing maintainability and readability of the test code.
- Deleted the CustomerPage class in customerPage.ts, which contained methods and selectors for customer interactions, as it is no longer needed.
- Removed customer.spec.ts and orders.spec.ts test files to streamline the test suite and eliminate redundancy.
- Introduced a new orders.spec.ts file with updated order functionality tests, enhancing the organization and maintainability of the test suite.
@dev-shahed dev-shahed force-pushed the all/e2e-fix branch 2 times, most recently from d18f5f8 to 837f55d Compare April 6, 2026 06:19
dev-shahed and others added 17 commits April 6, 2026 12:25
- Implemented tests for adding new products, including simple, downloadable, and virtual products.
- Added validation checks for required fields in the product form.
- Created a dedicated AddProductPage class to encapsulate product form interactions and selectors.
- Utilized Playwright for browser automation and testing.

These changes enhance the test coverage for the vendor product management feature.
…3121)

* feat: manage update notification dot visibility for Dokan Lite/Pro

* feat: manage update notification dot visibility for Dokan Lite/Pro
* fix(store-listing): add banner alt fallback for seller list banner image

* fix(store-listing): remove unreachable banner URL branch and use esc_url for src

* fix: correct store banner alt text handling in store listing templates

---------

Co-authored-by: Midu Mojumder <midumojumder@Mac.localdomain>
Co-authored-by: Md Asif Hossain Nadim <devianadim@gmail.com>
…alance (#3123)

* fix: show warning modal when approving withdrawal with insufficient balance

* fix: show warning modal when approving withdrawal with insufficient balance

* fix: show warning modal when approving withdrawal with insufficient balance
* Added confirmation modal for vendor order status action

* updated confirmation modal
* Update "Pro Features" menu color

* updated 'pro-features' menu color'
…alance (#3123)

* fix: show warning modal when approving withdrawal with insufficient balance

* fix: show warning modal when approving withdrawal with insufficient balance

* fix: show warning modal when approving withdrawal with insufficient balance
- Removed old dashboard test file and replaced it with a new structure for dashboard tests.
- Created a new dashboard page object to encapsulate dashboard-related actions and selectors.
- Added diagnostic notice tests with a dedicated page object for handling diagnostic notice interactions.
- Implemented database utilities for managing test data related to email verification and diagnostic notices.
- Enhanced email verification tests with field validation and improved structure for better readability and maintainability.
- Implement geolocation tests in geolocation.spec.ts and geolocationPage.ts
- Create help tests in help.spec.ts and helpPage.ts
- Add license management tests in license.spec.ts and licensePage.ts
- Introduce database utilities for managing options in tests
- Enhance API utilities for activating and deactivating modules
- Ensure proper session handling and cleanup in all test files
…alities

- Created visual tests for various Dokan admin functionalities including dashboard, withdraws, vendors, and settings.
- Implemented a new VisualPage class to handle interactions with the Dokan admin interface.
- Added data and selector structures for managing URLs and selectors used in tests.

feat: implement wholesale tests for admin, vendor, and customer interactions

- Developed comprehensive tests for wholesale functionalities including customer management, product creation, and order processing.
- Introduced a WholesalePage class to encapsulate wholesale-related actions and API utilities.
- Added tests for enabling/disabling wholesale modules, managing customer requests, and handling product pricing.

feat: create withdraw tests for admin and vendor operations

- Established tests for withdrawal functionalities including viewing, filtering, and managing withdrawal requests.
- Implemented a WithdrawsPage class to manage withdrawal-related actions and API interactions.
- Added tests for vendor withdrawal requests and payment method management.
- Deleted VisualPage, WholesalePage, WithdrawsPage, WpPage classes as they were no longer needed.
- Inlined admin and frontend login functions previously in LoginPage and ProductsPage for better maintainability.
- Updated tests to utilize the new inline login functions.
- Removed deprecated payloads related to RMA settings from payloads.ts.
- Adjusted tsconfig.json to clean up paths for better clarity.
- Updated test setup comment for clarity in addProduct.spec.ts.
- Replaced waitForLoadState with a custom waitForPageReady method in addProductPage.ts for better page readiness handling.
- Added a delay to the search button click action to improve interaction reliability.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs: Dev Review It requires a developer review and approval

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants