Automattic / Automattic/safe-publish

Taxonomies diff headers are not covered by a test

Open Beginner friendly
#449 0 comments 0 reactions 0 assignees View on GitHub
Tests
Dominant language
PHP
Stars
3
Forks
1
Avg merge
1d 21h
Merged PRs (30d)
59

Description

## Summary

The test that locks the concise Post Details column headers covers three of the four tables. Taxonomies is left unasserted, preserving the gap that produced the original bug.

## Current state

All four Post Details tables render the same two column headers. Title, excerpt, and meta take them from the non-content diff generator; taxonomies takes them from the terms diff generator, which already used the concise form before the headers were collapsed.

The test added in #440 iterates title, excerpt, and meta only. Taxonomies is generated by a different method, from a separate pair of header strings, and nothing asserts what it renders. Taxonomies is correct today, so nothing is broken — but the reason three tables were missed in the first place was the absence of a test, and that absence still applies to the fourth.

Adding the section to the existing loop is not sufficient on its own. The mocked source response carries no terms, so both sides of the taxonomies comparison build empty text, the generator returns an empty string for an unchanged section, and there are no header cells to match.

## Desired state

The taxonomies table is asserted alongside the other three, so a change to either header source fails a test. The fixture supplies incoming terms that differ from the current post so the section actually renders.

Related: #452 changes the same header strings, so the two are best done together — the assertion added here should expect whatever form that issue settles on.

Contributor guide

Open the contributing guide

Research direction

Start with the existing test added in #440 and its loop over the title, excerpt, and meta tables. Inspect the mocked source response and add differing incoming terms so the taxonomies section renders, then assert its headers alongside the other tables. Run the existing test and use the header form settled by #452 as the expected result.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
testing
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.