test: cover the new content models and stop duplicate terms

Seeding guarded with term_exists(), which reads a cache that is not
always warm during activation and let a second activation insert
gaming-2, literature-2 and silicon-ranch-2. It asks the taxonomy
directly now, by slug and by name.

Fixtures gain projects and tracks, and the suites follow the assets to
their generated derivatives. Also widens the Site Editor poll, which
threw instead of retrying while the editor was still booting.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
chrnxandClaude Opus 5 committed 2026-08-13 19:42:07 -05:00
1 parent df117e67bb
commit cb491adae6
7 files changed
+125 -30

No files matched your search

+14 -1
View File
@@ -134,9 +134,22 @@ foreach ( $chrnx_seed_posts as $chrnx_seed_index => $chrnx_seed_post ) {
wp_set_object_terms( $chrnx_seed_post_id, array(), 'chrnx_show', false );
}
foreach ( array( 'chrnx_episode_number', 'chrnx_episode_duration', 'canonical_episode_url' ) as $chrnx_seed_meta_key ) {
if ( isset( $chrnx_seed_post['release'] ) ) {
wp_set_object_terms( $chrnx_seed_post_id, sanitize_key( $chrnx_seed_post['release'] ), 'chrnx_release', false );
} else {
wp_set_object_terms( $chrnx_seed_post_id, array(), 'chrnx_release', false );
}
foreach ( array( 'chrnx_episode_number', 'chrnx_episode_duration', 'canonical_episode_url', 'chrnx_project_featured' ) as $chrnx_seed_meta_key ) {
delete_post_meta( $chrnx_seed_post_id, $chrnx_seed_meta_key );
}
if ( ! empty( $chrnx_seed_post['projectFeatured'] ) ) {
update_post_meta( $chrnx_seed_post_id, 'chrnx_project_featured', true );
}
delete_post_meta( $chrnx_seed_post_id, 'chrnx_track_number' );
if ( isset( $chrnx_seed_post['trackNumber'] ) ) {
update_post_meta( $chrnx_seed_post_id, 'chrnx_track_number', absint( $chrnx_seed_post['trackNumber'] ) );
}
if ( isset( $chrnx_seed_post['episodeNumber'] ) ) {
update_post_meta( $chrnx_seed_post_id, 'chrnx_episode_number', absint( $chrnx_seed_post['episodeNumber'] ) );
}