Skip to content

Conversation

@priethor
Copy link
Contributor

@priethor priethor commented Dec 31, 2025

What

Part of #315.

Expands E2E Playwright tests for Post Type admin screens.

Why

To test a real, complex worfklow across screens.

How

Adding 2 new tests to create-post-type.spec.ts:

Test Description
should trash and restore a post type Verifies bulk trash and untrash actions work correctly
should create hierarchical post type with taxonomy and field group Integration test creating linked entities and verifying they work together on the actual custom post type

Integration test workflow:

  1. Create taxonomy (e2estatus)
  2. Create hierarchical post type (e2eproject) linked to taxonomy
  3. Verify hierarchical setting persists after save
  4. Navigate to custom post type edit screen and verify taxonomy panel appears
  5. Create field group with location rule for the custom post type
  6. Verify field group metabox appears on custom post type edit screen
  7. Verify all entities appear in their respective admin lists
  8. Clean up all created entities

Testing Instructions

Run the E2E tests:

npm run test:e2e:playwright -- tests/e2e/create-post-type.spec.ts

@github-actions
Copy link

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props priethor.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@codecov
Copy link

codecov bot commented Dec 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 27.82%. Comparing base (fb6166e) to head (8e9b237).
⚠️ Report is 1 commits behind head on trunk.

Additional details and impacted files
@@             Coverage Diff              @@
##              trunk     #337      +/-   ##
============================================
- Coverage     27.92%   27.82%   -0.10%     
  Complexity     4410     4410              
============================================
  Files           291      291              
  Lines         36916    36916              
============================================
- Hits          10307    10271      -36     
- Misses        26609    26645      +36     
Flag Coverage Δ
e2e 42.91% <ø> (-0.51%) ⬇️
javascript 6.53% <ø> (ø)
phpunit 24.98% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@priethor priethor force-pushed the 9912-phase-4-pr-19-e2 branch from 2e91f0f to 57fa2d0 Compare December 31, 2025 13:29
@priethor priethor changed the title Tests: Add E2E tests for Admin Entity CRUD operations Tests: Expand E2E tests for Post Type admin screens Dec 31, 2025
@priethor priethor mentioned this pull request Dec 31, 2025
22 tasks
@priethor priethor force-pushed the 9912-phase-4-pr-19-e2 branch 2 times, most recently from 65c3d1f to 77bf420 Compare December 31, 2025 17:04
@priethor priethor changed the title Tests: Expand E2E tests for Post Type admin screens Tests: Expand E2E tests for admin screens Dec 31, 2025
@priethor priethor force-pushed the 9912-phase-4-pr-19-e2 branch from 77bf420 to 10930b8 Compare December 31, 2025 17:08
@priethor priethor force-pushed the 9912-phase-4-pr-19-e2 branch from 10930b8 to 8e9b237 Compare December 31, 2025 17:11
@priethor priethor added this to the 6.9.0 milestone Dec 31, 2025
@priethor priethor self-assigned this Dec 31, 2025
@priethor priethor merged commit abd5500 into trunk Dec 31, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants