From 6195060f35c78249f4630865e09855f9e624bd32 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Thu, 5 Nov 2026 15:52:37 +0100 Subject: feat(app): add an about screen Version with build number, documentation and project links, Ko-fi, the privacy statement, the certificate this copy was really signed with, and the licenses. Debug builds also show the git commit, since a test build can share its version with a release. Co-Authored-By: Claude Opus 5.5 --- .../app/passwordstore/ui/settings/AboutTest.kt | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 app/src/test/java/app/passwordstore/ui/settings/AboutTest.kt (limited to 'app/src/test/java') diff --git a/app/src/test/java/app/passwordstore/ui/settings/AboutTest.kt b/app/src/test/java/app/passwordstore/ui/settings/AboutTest.kt new file mode 100644 index 00000000..e692c229 --- /dev/null +++ b/app/src/test/java/app/passwordstore/ui/settings/AboutTest.kt @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2026 Danilo M. + * SPDX-License-Identifier: GPL-3.0-only + */ + +package app.passwordstore.ui.settings + +import kotlin.test.Test +import kotlin.test.assertEquals + +class AboutTest { + + @Test + fun versionLineWithoutCommit() { + assertEquals("0.3.0 (300)", versionLine("0.3.0", 300, "")) + } + + @Test + fun versionLineWithCommit() { + assertEquals("0.3.0-debug (300) ยท daa7ee01", versionLine("0.3.0-debug", 300, "daa7ee01")) + } + + @Test + fun changelogUrlPointsAtTheReleaseTag() { + assertEquals( + "https://github.com/danixland/HardenedPass/blob/v0.3.0/CHANGELOG.md", + changelogUrl("0.3.0-debug"), + ) + } + + @Test + fun fingerprintIsColonSeparatedUppercaseSha256() { + assertEquals( + "BA:78:16:BF:8F:01:CF:EA:41:41:40:DE:5D:AE:22:23:" + + "B0:03:61:A3:96:17:7A:9C:B4:10:FF:61:F2:00:15:AD", + certificateFingerprint("abc".encodeToByteArray()), + ) + } +} -- cgit v1.2.3