Skip to content

Commit

Permalink
GT-2330 Add Intent Test
Browse files Browse the repository at this point in the history
  • Loading branch information
gyasistory committed Dec 11, 2024
1 parent afc0f6c commit 60f212d
Showing 1 changed file with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,35 @@ class CyoaActivityTest {
}
}


@Test
fun `Intent Processing - Is showTips True`() {
manifestEnglish.value = manifest(listOf(page1, page2))

scenario(intent = context.createCyoaActivityIntent(TOOL, Locale.ENGLISH, showTips = true)) {
it.onActivity {
assertEquals(TOOL, it.dataModel.toolCode.value)
assertEquals(true, it.dataModel.showTips.value)
assertEquals(listOf(Locale.ENGLISH), it.dataModel.primaryLocales.value)
assertEquals("page1", it.pageFragment!!.pageId)
}
}
}

@Test
fun `Intent Processing - Is showTips False`() {
manifestEnglish.value = manifest(listOf(page1, page2))

scenario(intent = context.createCyoaActivityIntent(TOOL, Locale.ENGLISH, showTips = false)) {
it.onActivity {
assertEquals(TOOL, it.dataModel.toolCode.value)
assertEquals(false, it.dataModel.showTips.value)
assertEquals(listOf(Locale.ENGLISH), it.dataModel.primaryLocales.value)
assertEquals("page1", it.pageFragment!!.pageId)
}
}
}

@Test
fun `Intent Processing - godtoolsapp_com Deep Link - Specific Page`() {
manifestEnglish.value = manifest(listOf(page1, page2))
Expand Down

0 comments on commit 60f212d

Please sign in to comment.