Skip to content

Instantly share code, notes, and snippets.

@markchristopherng
Created August 23, 2022 00:47
Show Gist options
  • Save markchristopherng/8b83508595853017cb0d7e8866512e28 to your computer and use it in GitHub Desktop.
Save markchristopherng/8b83508595853017cb0d7e8866512e28 to your computer and use it in GitHub Desktop.
@Config(application = PostApp::class, instrumentedPackages = ["androidx.loader.content"])
class AccountDetailsActivityTest :
RobolectricTestBase<AccountDetailsActivity>(AccountDetailsActivity::class) {
@get:Rule
val composeTestRule = createComposeRule()
private lateinit var page: AccountDetailsPage
@Before
@Throws(Exception::class)
fun setUp() {
page = AccountDetailsPage(composeTestRule)
}
@Test
fun testRequestNonEmptyCSSOProfile() {
with(page) {
apcn.assertText(stringRes(R.string.glam_customer_number), "C0000APMOB23")
with(personalDetails) {
preferredName.assertText(stringRes(R.string.glam_preferred_name), "Bob")
lastName.assertText(stringRes(R.string.glam_surname), "Smith")
givenName.assertText(stringRes(R.string.glam_given_name), "BobLegal")
dateOfBirth.assertText(stringRes(R.string.glam_date_of_birth), "08/06/1976")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment