package com.peachpasswords.ui.vault import org.junit.Assert.assertEquals import org.junit.Test class GhostWatermarkTest { /** The watermark is the FULL title, not just its first character (brief Fix 4). */ @Test fun entry_detail_ghost_watermark_is_full_title() { assertEquals("GitHub", ghostWatermarkText("GitHub")) assertEquals("My Bank Account", ghostWatermarkText("My Bank Account")) // Multi-byte / emoji titles pass through whole, never truncated to one glyph. assertEquals("日本語メモ", ghostWatermarkText("日本語メモ")) } /** A blank title falls back to "P" so the hero never renders empty. */ @Test fun blank_title_falls_back_to_p() { assertEquals("P", ghostWatermarkText("")) assertEquals("P", ghostWatermarkText(" ")) } }