#2669 Adds System & Site columns to Now Playing, hidden by default (#2670)

Co-authored-by: denny <dennis.sheirer@gmail.com>
This commit is contained in:
Denny Sheirer
2026-11-16 03:34:58 -05:00
committed by GitHub
parent 5fd469c402
commit 6dd06288ac
3 changed files with 70 additions and 2 deletions

View File

@@ -212,6 +212,27 @@ public class TableColumnMonitorTest
});
}
@Test
public void newHiddenByDefaultColumnStaysHidden() throws Exception
{
onFx(() -> {
//Stored by a version without the hidden by default 'site' column and without the known columns
mPreferences.put(KEY + ".column.hidden", "a");
TableView<String> table = createTable("a", "b", "site");
table.getColumns().get(2).setVisible(false);
monitor(table);
assertEquals(List.of("b"), visibleIds(table));
//The user shows the column, which is kept in the next session
table.getColumns().get(2).setVisible(true);
TableView<String> restored = createTable("a", "b", "site", "system");
restored.getColumns().get(2).setVisible(false);
restored.getColumns().get(3).setVisible(false);
monitor(restored);
assertEquals(List.of("b", "site"), visibleIds(restored));
});
}
@Test
public void lastVisibleColumnCantBeHidden() throws Exception
{