Skip to content

Feature/tests#451

Closed
scottblackburn wants to merge 6 commits intoAutomattic:developfrom
bigbite:feature/tests
Closed

Feature/tests#451
scottblackburn wants to merge 6 commits intoAutomattic:developfrom
bigbite:feature/tests

Conversation

@scottblackburn
Copy link
Copy Markdown

As tests have been mentioned in #449, we thought it would be worth sharing these tests that were added for 1.7 and could be a good base for extending in the future.

@cain
Copy link
Copy Markdown
Contributor

cain commented May 13, 2018

Thanks @scottblackburn ill take a look at this! 😄

@GaryJones GaryJones added type: maintenance Routine maintenance and code quality improvements Priority: medium and removed Tests Priority: high labels Jun 7, 2024
@GaryJones GaryJones changed the base branch from master to develop November 5, 2025 18:23
GaryJones added a commit that referenced this pull request Dec 2, 2025
Introduces comprehensive test coverage for the React-based liveblog interface, addressing a long-standing gap in the codebase's testing infrastructure. These tests validate the core state management logic that powers the real-time entry updates, pagination, and event handling.

The test suite covers six reducers (api, config, events, pagination, polling, user) and three utility modules (timeUtils, updateUtilities, utils), with accompanying mock data fixtures to simulate API responses and entry updates. All 32 tests pass successfully and are now executed via a GitHub Actions workflow on pull requests.

Whilst the tests were originally authored by @scottblackburn in 2018 (PR #451), they remained unmerged until now. This commit adopts that work with minimal modifications to integrate with the current codebase structure.

Co-authored-by: Scott Blackburn <scott@scottblackburn.com>
@GaryJones
Copy link
Copy Markdown
Contributor

Thank you for this contribution @scottblackburn! 🎉

After 7 years, we're finally adopting your JavaScript unit tests. The reducer and utility tests you wrote have been extracted and integrated into the current codebase in #741.

What was adopted:

  • All 6 reducer tests (api, config, events, pagination, polling, user)
  • All 3 utility tests (timeUtils, updateUtilities, utils)
  • All mock data fixtures

What was not adopted:

  • The Puppeteer E2E tests (hardcoded credentials, and WP ecosystem now prefers Playwright)
  • Build asset changes (outdated)

The tests still pass without modification - a testament to the stable API design of the reducers and utilities. We've added a CI workflow to run these tests on every PR.

Closing this in favour of #741, which credits you as co-author. Thanks again for the valuable contribution!

@GaryJones GaryJones closed this Dec 2, 2025
@github-project-automation github-project-automation Bot moved this from To do to Done in Liveblog: Tests Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: needs testing type: enhancement New feature or request type: maintenance Routine maintenance and code quality improvements

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants