21 lines · 1.0 KB · KotlinRaw
package com.cottondb.mailimport org.junit.Assert.assertTrueimport org.junit.Testimport java.io.File/** ANDROID READY 1: Post's Help carries the privacy policy and the way to reach us, as every other app's Help does. */class PostReadyTest { private val repo = generateSequence(File("").absoluteFile) { it.parentFile }.first { File(it, "apps/registry.json").isFile } @Test fun help_draws_the_cores_links() { val parts = File(repo, "apps/android/shell/src/main/kotlin/com/cottondb/shell/SettingsParts.kt").readText() val help = parts.substring(parts.indexOf("fun HelpPart("), parts.indexOf("fun HelpSection(")) assertTrue(help.contains("help.arr(\"links\")")) assertTrue(help.contains("\"settings-link-\${l.str(\"id\")}\"")) assertTrue(help.contains("HelpSection(help, links)")) val pages = File(repo, "apps/android/app/src/mail/kotlin/com/cottondb/mail/SharedPages.kt").readText() assertTrue(pages.contains("\"help\" -> HelpPart(state.shell, s)")) }}