package com.peachpasswords.widget import java.io.File import org.junit.Assert.assertTrue import org.junit.Test class PeachWidgetCoverageTest { @Test fun home_widgets_open_main_activity() { val relativePath = "app/src/main/java/com/peachpasswords/widget/PeachWidgets.kt" val source = (File(relativePath).takeIf { it.exists() } ?: File("../$relativePath")).readText() assertTrue("widgets should target the app shell", source.contains("import com.peachpasswords.MainActivity")) assertTrue("widgets should build a MainActivity launch intent", source.contains("MainActivity::class.java")) assertTrue("widgets should launch Peach from the tap target", source.contains(".clickable(actionStartActivity(launch))")) } }