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