Skip to content

Add end-to-end tests for REST API and UI components#89

Merged
kzamanbd merged 48 commits into
developfrom
e2e/test-cases-for-texty
Jun 16, 2026
Merged

Add end-to-end tests for REST API and UI components#89
kzamanbd merged 48 commits into
developfrom
e2e/test-cases-for-texty

Conversation

@dev-shahed

@dev-shahed dev-shahed commented Jun 11, 2026

Copy link
Copy Markdown
Member
  • Implemented e2e tests for REST gateway connection and lifecycle, validating Twilio and Clickatell integrations.
  • Created tests for logs export functionality, ensuring CSV format and authentication checks.
  • Added contract tests for logs and metrics endpoints, verifying response structure and filtering capabilities.
  • Developed tests for notification settings, ensuring proper round-trip functionality and data sanitization.
  • Implemented UI tests for dashboard, gateway, logs, and notifications, validating user interactions and visibility of elements.

Summary by CodeRabbit

  • Tests

    • Added comprehensive end-to-end testing suite with Playwright covering REST API endpoints, UI interactions, and live gateway connections.
    • Includes tests for authentication, gateway lifecycle, SMS sending, logging, notifications, and dashboard functionality.
  • Documentation

    • Added test coverage documentation and execution reports detailing test scope and results.
  • Chores

    • Added GitHub Actions workflow for automated E2E test execution across WordPress versions.
    • Updated configuration files for testing environment setup.

mrabbani and others added 30 commits February 24, 2026 11:01
* feat(dashboard): add default dashboard with metrics, chart and quick send

* feat(dashboard): add default dashboard with metrics, chart and quick send

* feat(dashboard): add default dashboard with metrics, chart and quick send

* feat(dashboard): add default dashboard with metrics, chart and quick send

* feat(dashboard): add default dashboard with metrics, chart and quick send

* Composer.lock file added

* feat(settings): migrate settings page to plugin-ui schema-driven components

Replace the hand-rolled React settings UI with the schema-driven <Settings>
component from @wedevs/plugin-ui, backed by BaseSettingsRESTController from
wedevs/wp-kit. Preserves full backward compatibility with the existing
texty_settings wp_option structure and gateway credential validation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(settings): add filter for third-party gateways and order prop for sorting

- Add `texty_settings_schema` filter in get_settings_schema() to allow
  third-party plugins to register gateway sections and fields
- Add `order()` method to GatewayInterface (default 10, Fake returns 99)
- Add `priority` prop to all gateway sections in schema
- Sort gateway dropdown options by order, then alphabetically

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: make order() optional, only override in Fake gateway

Remove order() from GatewayInterface and default-10 gateways.
Only Fake overrides it (returns 99). get_gateway_options() already
falls back to 10 via method_exists() check.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(settings): set gateway_selection section priority to 9

Ensures the gateway selector section always appears above gateway
credential sections (priority 10) regardless of sort order.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Feat/revemp design layout (#75)

* feat(menu): enhance admin menu registration with capability checks and dynamic submenus

* feat(settings): update package dependencies and add TypeScript configuration

* feat: integrate Tailwind CSS and update styles

- Added Tailwind CSS as a dependency and configured PostCSS.
- Created a new base Tailwind CSS file for global styles.
- Removed legacy CSS styles from app.css and migrated to Tailwind utility classes.
- Updated Header component to utilize Tailwind for layout and styling.
- Adjusted index.js to import the new base Tailwind CSS file instead of plugin UI styles.
- Refactored SCSS styles to use Tailwind utilities and Sass color functions for better maintainability.
- Updated package.json to include new dependencies for Tailwind and PostCSS.

* feat: migrate to React Router v7 and refactor App structure

* refactor: update package dependencies and improve header component

- Changed dependency for @wedevs/plugin-ui from GitHub to local file reference.
- Enhanced base-tailwind.css with improved import statements and added button styles.
- Refactored Header component to utilize new icons and dropdown menu for help items.
- Updated TypeScript definitions to include support_url and feature_request_url.
- Added watch options in webpack.config.js to ignore dist folder during rebuilds.

* Add frontend development guidelines and update project documentation

- Introduced SKILL.md for frontend development rules and conventions, covering React, TypeScript, Tailwind, and more.
- Created CLAUDE.md to provide guidance for working with the Texty SMS notification plugin, detailing architecture, common commands, and feature addition processes.
- Updated .gitignore to exclude seed files.

* refactor: restructure dashboard components and remove unused files

- Deleted HelpResources, StatCard, VolumeChart, and Dashboard components.
- Introduced QuickSendCard and StatCards components for better modularity.
- Updated Dashboard to utilize new components and improved data fetching logic.
- Enhanced VolumeAnalytics for better data visualization.
- Refactored routing to point to new dashboard structure.
- Updated type definitions for better TypeScript support.
- Adjusted imports to use the new plugin UI components.

* docs: update code review and backend development guidelines to enforce class import standards

* feat: enhance layout components and improve routing structure with new hooks and skeletons

Co-authored-by: Copilot <copilot@github.com>

* feat: add backButtonLabel prop to layout components and update routing documentation

* feat: add error handling components with ErrorBoundary and NotFound pages

Co-authored-by: Copilot <copilot@github.com>

* feat: add ErrorBoundary and NotFound components for improved error handling

* feat: update verification commands guidance for frontend edits and clarify user-triggered actions

* feat: bridge plugin-ui theme tokens into Tailwind utility names for improved styling

* feat: update submenu item identifiers to use 'path' instead of 'id' for improved clarity

* feat: Update PHPCS configuration and enhance Tailwind CSS styles for improved layout consistency

Co-authored-by: Copilot <copilot@github.com>

* feat: Introduce GatewayStatus component and update dashboard to utilize new status display

* feat: Add PhoneField component and AppLayout for enhanced form functionality

* Update AppLayout.tsx

* feat: Implement dashboard components and hooks for enhanced user experience

* Use @wordpress/element for runtime React imports

* feat: Enhance routing with lazy loading and suspense for improved performance

* feat: Remove unused toastify styles to streamline CSS

* Defensive handling of null recipients/values

* feat: update API class registration and enhance version handling in Header component

* feat(Menu): update submenu path handling to support external URLs

---------

Co-authored-by: Copilot <copilot@github.com>

---------

Co-authored-by: SHAMIM <111671483+Shamim-97@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Kamruzzaman <kzamanbn@gmail.com>
Co-authored-by: Copilot <copilot@github.com>
* feat(dashboard): add default dashboard with metrics, chart and quick send

* feat(dashboard): add default dashboard with metrics, chart and quick send

* feat(dashboard): add default dashboard with metrics, chart and quick send

* feat(dashboard): add default dashboard with metrics, chart and quick send

* feat(dashboard): add default dashboard with metrics, chart and quick send

* Composer.lock file added

* feat(settings): migrate settings page to plugin-ui schema-driven components

Replace the hand-rolled React settings UI with the schema-driven <Settings>
component from @wedevs/plugin-ui, backed by BaseSettingsRESTController from
wedevs/wp-kit. Preserves full backward compatibility with the existing
texty_settings wp_option structure and gateway credential validation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(settings): add filter for third-party gateways and order prop for sorting

- Add `texty_settings_schema` filter in get_settings_schema() to allow
  third-party plugins to register gateway sections and fields
- Add `order()` method to GatewayInterface (default 10, Fake returns 99)
- Add `priority` prop to all gateway sections in schema
- Sort gateway dropdown options by order, then alphabetically

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: make order() optional, only override in Fake gateway

Remove order() from GatewayInterface and default-10 gateways.
Only Fake overrides it (returns 99). get_gateway_options() already
falls back to 10 via method_exists() check.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(settings): set gateway_selection section priority to 9

Ensures the gateway selector section always appears above gateway
credential sections (priority 10) regardless of sort order.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(menu): enhance admin menu registration with capability checks and dynamic submenus

* feat(settings): update package dependencies and add TypeScript configuration

* feat: integrate Tailwind CSS and update styles

- Added Tailwind CSS as a dependency and configured PostCSS.
- Created a new base Tailwind CSS file for global styles.
- Removed legacy CSS styles from app.css and migrated to Tailwind utility classes.
- Updated Header component to utilize Tailwind for layout and styling.
- Adjusted index.js to import the new base Tailwind CSS file instead of plugin UI styles.
- Refactored SCSS styles to use Tailwind utilities and Sass color functions for better maintainability.
- Updated package.json to include new dependencies for Tailwind and PostCSS.

* feat: migrate to React Router v7 and refactor App structure

* refactor: update package dependencies and improve header component

- Changed dependency for @wedevs/plugin-ui from GitHub to local file reference.
- Enhanced base-tailwind.css with improved import statements and added button styles.
- Refactored Header component to utilize new icons and dropdown menu for help items.
- Updated TypeScript definitions to include support_url and feature_request_url.
- Added watch options in webpack.config.js to ignore dist folder during rebuilds.

* Add frontend development guidelines and update project documentation

- Introduced SKILL.md for frontend development rules and conventions, covering React, TypeScript, Tailwind, and more.
- Created CLAUDE.md to provide guidance for working with the Texty SMS notification plugin, detailing architecture, common commands, and feature addition processes.
- Updated .gitignore to exclude seed files.

* refactor: restructure dashboard components and remove unused files

- Deleted HelpResources, StatCard, VolumeChart, and Dashboard components.
- Introduced QuickSendCard and StatCards components for better modularity.
- Updated Dashboard to utilize new components and improved data fetching logic.
- Enhanced VolumeAnalytics for better data visualization.
- Refactored routing to point to new dashboard structure.
- Updated type definitions for better TypeScript support.
- Adjusted imports to use the new plugin UI components.

* docs: update code review and backend development guidelines to enforce class import standards

* feat: enhance layout components and improve routing structure with new hooks and skeletons

Co-authored-by: Copilot <copilot@github.com>

* feat: add backButtonLabel prop to layout components and update routing documentation

* feat: add error handling components with ErrorBoundary and NotFound pages

Co-authored-by: Copilot <copilot@github.com>

* feat: add ErrorBoundary and NotFound components for improved error handling

* feat: update verification commands guidance for frontend edits and clarify user-triggered actions

* feat: bridge plugin-ui theme tokens into Tailwind utility names for improved styling

* feat: update submenu item identifiers to use 'path' instead of 'id' for improved clarity

* feat: Update PHPCS configuration and enhance Tailwind CSS styles for improved layout consistency

Co-authored-by: Copilot <copilot@github.com>

* feat: Introduce GatewayStatus component and update dashboard to utilize new status display

* feat: Add PhoneField component and AppLayout for enhanced form functionality

* Update AppLayout.tsx

* Refactor gateway settings management

- Removed the old SettingsPage component and replaced it with a new GatewayConfiguration component that handles gateway settings.
- Introduced new components for the gateway detail pane, sidebar, header, and section to improve modularity and readability.
- Implemented a loading skeleton for better user experience during data fetching.
- Updated routing to reflect the new structure, replacing the old settings page with the new gateway configuration page.

* feat: Implement dashboard components and hooks for enhanced user experience

* Use @wordpress/element for runtime React imports

* Use @wordpress/element for runtime React imports

* feat: Enhance routing with lazy loading and suspense for improved performance

* feat: Remove unused toastify styles to streamline CSS

* Defensive handling of null recipients/values

* feat: Notifications management UI (user events, integrations, settings) (#77)

* feat: Implement notifications management with user events, integrations, and settings components

* Use @wordpress/element for runtime React imports

* Feature notifications settings (#79)

* feature notifications settings

* feature notifications settings

* remove STOP settings

* STOP feature remove

* Feat/logs (#78)

* feat: add SMS logs feature with REST API and UI components

- Introduced a new Logs API endpoint for fetching SMS logs.
- Added Logs class to handle REST routes and data retrieval.
- Created UI components for displaying logs, including LogDetailDialog and StatusBadge.
- Implemented hooks for managing logs data and filters.
- Updated database schema to include notification context, message, and response fields.
- Registered new routes in the application for accessing logs.
- Enhanced SmsStat model to support new fields and methods for logs.
- Added migration scripts for database updates related to logs.

* Add migration notices and REST endpoints

Wire up wp-kit migration + admin-notice integration: register MigrationRESTController and NoticeRESTController under texty/v1, add a NoticeProvider (includes AJAX handler 'texty_run_migration') that surfaces a non-dismissible "Update database" admin notice, and register MigrationHooks to keep db_version in sync. Add a Notices React component and render it in AppLayout; expose rest_url, ajax_url and nonce in the localized script and update the Texty global TS types. Instantiate the migrations bootstrap during plugin init via a migrations() accessor (migrations are not auto-applied on boot; users must click the admin notice to trigger the upgrade). Error handling/logging retained for upgrade failures.

* feat: update default logs perPage to 30 for improved data display

* feat: log full notification context to SmsStat on send

Every `texty_after_send_sms` event now writes the new columns added in
the 2.0.0 migration (notification_id, notification_group, message,
response) so live rows match the structure the SMS Logs UI and the
seeder produce.

- Notifications registry gains a small set_active/get_active/clear_active
  stash. Notification::send and WC\\Base::send wrap their gateway send
  loop in set_active() + try/finally + clear_active() so the after-send
  hook can read which notification fired the SMS without threading
  context through the gateway pipeline.
- Dispatcher::log_sms reads the active notification, pulls get_id() /
  get_group(), and persists them alongside the final message body. The
  response column gets a normalized shape via encode_response(): WP_Error
  is unpacked into {code, message, data}; arrays/objects pass through.
- Plivo's message_uuid (which the SDK returns as ["uuid"]) is now
  flattened to its first element so reference_id stays scalar.
- log_sms bails early if DataLayerFactory::make_store returns null,
  preventing a fatal when the store isn't initialized.

* refactor(migrations): delegate V_2_0_0 schema sync to Install::create_tables

* feat(Menu): update submenu path handling to support external URLs

* feat: update API class registration and enhance version handling in Header component

* fix: restore parent signature compat for WC\Base::send()

Notification::send() declares ': bool' return type, but WC\Base
overrode it with no return type and bare 'return;' on early exits,
producing a fatal at autoload time. Align the override to ': bool'
and return true/false in each path. Also restore a missing '/**'
docblock opener above migrations() in texty.php that slipped through
the merge resolution and caused a parse error.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: SHAMIM <111671483+Shamim-97@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: SHAMIM <111671483+Shamim-97@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: SHAMIM <111671483+Shamim-97@users.noreply.github.com>
Co-authored-by: Md Mahbub Rabbani <mahbub.rucse@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Copilot <copilot@github.com>
- Changed the dependency for @wedevs/plugin-ui from a local file reference to a GitHub repository.
- Removed the pot2json script from package.json as it is no longer needed.
- Cleaned up the dependencies by removing the po2json package.
* feat: add Playwright end-to-end testing setup with configuration and initial tests

* feat: add TypeScript configuration for tests and update dependencies

* refactor: remove old notifications, settings, tools, and settings page components

* Add Playwright e2e tests for Texty admin

Add a suite of Playwright end-to-end tests for the Texty admin SPA and REST API: dashboard, gateway, logs, notifications, routing, and REST API smoke tests. Introduce test helpers (tests/e2e/helpers/texty.ts) for navigating hash routes, waiting for API responses and obtaining REST nonces. Update playwright.config.ts to disable fullyParallel, set workers to 2 and enable ignoreHTTPSErrors to improve stability in CI/local runs. Improve tests/e2e/texty-admin.spec.ts to capture console/page errors during SPA mount and provide clearer failure logging.

* style: improve CSS resets and clean up LogDetailDialog component

* ci: skip deleted and non-PHP files in phpcs workflow

Filter PR file list to existing *.php files before invoking phpcs.
Prevents "file does not exist" errors when a PR deletes files and
the resulting empty checkstyle output breaks cs2pr XML parsing.
…d SMS logs, expanded REST API, and compliance controls
…ast notifications and notification settings schema
kzamanbd and others added 5 commits June 10, 2026 13:17
…in gateway classes; enhance log date formatting in UI
- Implemented e2e tests for REST gateway connection and lifecycle, validating Twilio and Clickatell integrations.
- Created tests for logs export functionality, ensuring CSV format and authentication checks.
- Added contract tests for logs and metrics endpoints, verifying response structure and filtering capabilities.
- Developed tests for notification settings, ensuring proper round-trip functionality and data sanitization.
- Implemented UI tests for dashboard, gateway, logs, and notifications, validating user interactions and visibility of elements.
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6fd99f49-e270-44fa-843b-957239a186e0

📥 Commits

Reviewing files that changed from the base of the PR and between 8a01678 and 3d080ac.

📒 Files selected for processing (29)
  • .claude/skills/texty-e2e/SKILL.md
  • .cspell.json
  • .env.example
  • .github/workflows/e2e.yml
  • .wp-env.json
  • playwright.config.ts
  • tests/e2e/COVERAGE.md
  • tests/e2e/TEST-EXECUTION-REPORT.md
  • tests/e2e/console-health.spec.ts
  • tests/e2e/global.setup.ts
  • tests/e2e/helpers/texty.ts
  • tests/e2e/logs.spec.ts
  • tests/e2e/release-readiness.spec.ts
  • tests/e2e/rest-auth-matrix.spec.ts
  • tests/e2e/rest-gateway-connection.spec.ts
  • tests/e2e/rest-gateway-lifecycle.spec.ts
  • tests/e2e/rest-logs-export.spec.ts
  • tests/e2e/rest-logs.spec.ts
  • tests/e2e/rest-metrics.spec.ts
  • tests/e2e/rest-notification-settings.spec.ts
  • tests/e2e/rest-notifications.spec.ts
  • tests/e2e/rest-send-fake-gateway.spec.ts
  • tests/e2e/rest-send-tools-status.spec.ts
  • tests/e2e/rest-settings.spec.ts
  • tests/e2e/ui-dashboard.spec.ts
  • tests/e2e/ui-gateway.spec.ts
  • tests/e2e/ui-logs.spec.ts
  • tests/e2e/ui-notifications.spec.ts
  • tests/e2e/ui-quick-send.spec.ts

📝 Walkthrough

Walkthrough

Adds a complete Playwright E2E test suite for the Texty SMS WordPress plugin. Includes a GitHub Actions workflow with a WordPress version matrix, a shared helper client, global auth setup with interstitial handling, REST contract specs for all texty/v1 endpoints, UI interaction specs, and supporting SKILL/COVERAGE/TEST-EXECUTION-REPORT documentation.

Changes

Texty Playwright E2E suite

Layer / File(s) Summary
Playwright config, environment, and wp-env setup
playwright.config.ts, .wp-env.json, .env.example, .cspell.json
playwright.config.ts adds dual base URL support, multi-reporter output with CI detection, and HEADLESS env toggle; .wp-env.json pins PHP 8.1 with debug flags; .env.example adds optional Twilio/Clickatell credential stubs; .cspell.json adds custom word allowlist.
GitHub Actions E2E workflow
.github/workflows/e2e.yml
Full workflow: PHP/Node setup, Composer/Playwright cache, SSH-to-HTTPS URL rewrite, SPA build, wp-env start with optional WP core pin, Texty state seeding, test run, and artifact upload on success/failure.
Global auth setup and shared test helpers
tests/e2e/global.setup.ts, tests/e2e/helpers/texty.ts
global.setup.ts handles the WordPress email-verification interstitial; helpers/texty.ts adds ADMIN_STORAGE, REST_NS, bootstrapNonce, restCall, TwilioEnv/getTwilioEnv, and getClickatellKey.
REST auth matrix and release readiness specs
tests/e2e/rest-auth-matrix.spec.ts, tests/e2e/release-readiness.spec.ts
Auth matrix asserts all routes return 401/403 unauthenticated and without nonce; release readiness checks REST namespace completeness, admin menu links, no PHP fatals, window.texty bootstrap config, and SPA bundle HTTP 200.
REST settings and gateway lifecycle/connection specs
tests/e2e/rest-settings.spec.ts, tests/e2e/rest-gateway-lifecycle.spec.ts, tests/e2e/rest-gateway-connection.spec.ts
Settings spec validates /settings, /settings?context=edit, and /settings/schema; gateway lifecycle spec exercises activate/deactivate/disconnect error and success paths with per-test snapshot/restore; connection spec validates live Twilio/Clickatell credential flows and live-send→log-row pipeline (skipped when env absent).
REST send, tools/test, status, and fake-gateway pipeline specs
tests/e2e/rest-send-tools-status.spec.ts, tests/e2e/rest-send-fake-gateway.spec.ts
Envelope shape and 400 validation for POST /send, POST /tools/test, and GET /status; fake-gateway spec covers single/bulk/repeated sends, tools/test log, metrics volume consistency, and pause_all/append_company_name compliance settings with per-test restore.
REST logs, metrics, notifications, and notification-settings contract specs
tests/e2e/rest-logs.spec.ts, tests/e2e/rest-logs-export.spec.ts, tests/e2e/rest-metrics.spec.ts, tests/e2e/rest-notifications.spec.ts, tests/e2e/rest-notification-settings.spec.ts
Logs spec tests pagination, per_page clamping, status/sort validation, and 404 by ID; export spec validates CSV headers, status filter, and unauth rejection; metrics spec validates payload shape, accounting invariants, period echo/default/invalid, and DELETE 404/405; notifications and notification-settings specs cover schema group validation, GET shape, POST round-trips, partial update, and HTML sanitization.
UI specs: dashboard, gateway, logs, notifications, quick-send, console health
tests/e2e/ui-dashboard.spec.ts, tests/e2e/ui-gateway.spec.ts, tests/e2e/ui-logs.spec.ts, tests/e2e/logs.spec.ts, tests/e2e/ui-notifications.spec.ts, tests/e2e/ui-quick-send.spec.ts, tests/e2e/console-health.spec.ts
Dashboard tests stat cards, period selector→metrics call, send button disabled state, char counter, and Recharts chart; gateway tests sidebar selection, search empty state, and credential/action button rendering; logs tests table/empty state, export button, and details dialog; notifications tests tab visibility, settings persistence, user events toggles/templates, and integrations; quick-send tests full UI send→log+metrics and send→logs UI drill; console-health verifies SPA routes mount without plugin-owned errors.
E2E documentation
.claude/skills/texty-e2e/SKILL.md, tests/e2e/COVERAGE.md, tests/e2e/TEST-EXECUTION-REPORT.md
SKILL.md encodes E2E conventions, auth/nonce patterns, idempotency/restore rules, gateway constraints, UI selector guidance, and common pitfalls; COVERAGE.md provides a REST/UI/health coverage matrix with known gaps; TEST-EXECUTION-REPORT.md records pass/fail summary, defect list (D1–D5), capability map, and release recommendations.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • getdokan/texty#65: Introduced the SettingsController and /texty/v1/metrics REST endpoint whose contract shape is directly validated by rest-metrics.spec.ts and rest-settings.spec.ts.
  • getdokan/texty#57: Added structured SMS send→log behavior and the metrics route that rest-send-fake-gateway.spec.ts and ui-quick-send.spec.ts are built to verify end-to-end.

Suggested labels

Needs Dev Review

Suggested reviewers

  • kzamanbd

Poem

🐇 Hop, hop through each REST endpoint I go,
Checking 401s and 403s in a row,
The fake gateway sings, the logs all line up neat,
My Playwright paws make flaky tests retreat.
No ErrorBoundary, no PHP fatal in sight—
This bunny ships only when green lights are bright! ✅

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch e2e/test-cases-for-texty

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

dev-shahed and others added 10 commits June 11, 2026 12:57
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… local Docker env vars

- Add the list reporter so each test result streams to the terminal live;
  previously only the html reporter ran, leaving the console near-silent.
- Add the github reporter under CI for inline PR annotations.
- Read BASE_URL/HEADLESS (local Docker .env) with WP_BASE_URL fallback so
  local runs and the CI workflow both work.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
get_items() called $item->get_product()->get_name() directly, but
get_product() returns false for line items whose product has since been
deleted, throwing "Call to a member function get_name() on false" and
aborting the woocommerce_order_status_changed hook — so no order SMS
(admin or customer) was sent for affected orders.

Fall back to the line-item name stored on the order when the product is
unavailable.
Logs::get_item() passed an int to BaseDataStore::read(), whose signature
is read( ModelInterface &$model ) — a TypeError fataling (HTTP 500) on
every single-log request. read() also throws on not-found rather than
returning false, so the intended 404 branch was unreachable.

Query by the id column instead: it returns the same raw row shape
present_row() already consumes for the listing, and an empty set (not an
exception) on not-found, restoring the 404 path.
The CI run failed 6 Playwright tests that pass locally only because the
dev site already has state. On a fresh wp-env there is no active gateway
(so the dashboard renders its connect-a-gateway state instead of the stat
cards / quick-send card) and the logs table is empty, and WP shows the
Appsero opt-in admin notice whose <p class="description"> ("…environment
details…") satisfied broad page-wide getByText locators with a hidden node.

- e2e.yml: after wp-env start, seed the WP_DEBUG-only, credential-less
  `fake` gateway and one log row via the real send pipeline so the
  data-dependent UI specs run against a configured install. Also rewrite
  GitHub SSH git URLs to HTTPS before npm ci (defensive; the @wedevs/
  plugin-ui dep is pinned to git+ssh in the lockfile).
- logs.spec.ts / ui-logs.spec.ts: scope the table/empty-state and status
  filter locators to #texty-app so WP-admin chrome can't match them, and
  assert the real empty copy ("No logs yet") and column labels.

Verified against a fresh wp-env (WordPress latest): 125 passed, 2 skipped.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Base automatically changed from feature/dashboard to develop June 16, 2026 10:44
@kzamanbd kzamanbd merged commit 0bd504e into develop Jun 16, 2026
1 of 3 checks passed
@kzamanbd kzamanbd deleted the e2e/test-cases-for-texty branch June 16, 2026 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants