@@ -153,6 +153,7 @@ def test_sync_finds_changed_value_field(
153153 app , ["sync" , "--to" , str (project_b .path .parent )], input = "n\n "
154154 )
155155 assert "Value Changes in config" in result .stdout
156+ assert "_changelog" not in result .stdout
156157 assert "model.name" in result .stdout
157158 assert "foo" in result .stdout
158159 assert result .exit_code == 1
@@ -178,6 +179,7 @@ def test_sync_finds_changed_value_field_and_saves_after_confirm(
178179 app , ["sync" , "--to" , str (project_b .path .parent )], input = "y\n "
179180 )
180181 assert "Value Changes in config" in result .stdout
182+ assert "_changelog" not in result .stdout
181183 assert "model.name" in result .stdout
182184 assert "foo" in result .stdout
183185 assert "Success: All done!" in result .stdout
@@ -189,6 +191,32 @@ def test_sync_finds_changed_value_field_and_saves_after_confirm(
189191 assert project_b .config .load (force = True ).model .name == "foo" # type: ignore[union-attr]
190192
191193
194+ def test_sync_changelog_only_is_merged_without_being_displayed (
195+ two_fmu_revisions : tuple [Path , ProjectFMUDirectory , ProjectFMUDirectory ],
196+ monkeypatch : MonkeyPatch ,
197+ ) -> None :
198+ """Tests that changelog-only differences are synced but not rendered."""
199+ tmp_path , project_a , project_b = two_fmu_revisions
200+ monkeypatch .chdir (project_a .path .parent )
201+
202+ target_changelog_size = len (project_b .changelog .load ())
203+ project_a .changelog .log_copy_revision_to_changelog (project_a .base_path )
204+
205+ result = runner .invoke (
206+ app , ["sync" , "--to" , str (project_b .path .parent )], input = "y\n "
207+ )
208+
209+ assert "Value Changes in _changelog" not in result .stdout
210+ assert "Complex Changes in _changelog" not in result .stdout
211+ assert "Success: All done!" in result .stdout
212+ assert result .exit_code == 0
213+
214+ target_changelog = project_b .changelog .load (force = True )
215+ assert len (target_changelog ) == target_changelog_size + 2
216+ assert target_changelog [- 2 ].change_type == "copy"
217+ assert target_changelog [- 2 ].path == project_a .base_path
218+
219+
192220def test_sync_finds_changed_complex_field_and_saves_after_confirm (
193221 two_fmu_revisions : tuple [Path , ProjectFMUDirectory , ProjectFMUDirectory ],
194222 monkeypatch : MonkeyPatch ,
0 commit comments