Skip to content

Commit

Permalink
style: ktfmt formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
agonzalez-r committed Dec 20, 2024
1 parent 4e5c4b7 commit c8ae58e
Showing 1 changed file with 50 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -410,58 +410,65 @@ class EndToEndAlert : TestCase() {
composeTestRule.onNodeWithTag(AlertListsScreen.NO_ALERTS_CARD).assertIsDisplayed()
}

step("Navigate back to Profile Screen") {
composeTestRule.waitForIdle()
step("Navigate back to Profile Screen") {
composeTestRule.waitForIdle()
composeTestRule
.onNodeWithTag(BottomNavigationMenu.BOTTOM_NAVIGATION_MENU_ITEM + PROFILE.textId)
.assertIsDisplayed()
.performClick()
composeTestRule.waitUntil(TIMEOUT) {
try {
composeTestRule
.onNodeWithTag(BottomNavigationMenu.BOTTOM_NAVIGATION_MENU_ITEM + PROFILE.textId)
.onNodeWithTag(ProfileScreen.NAME_FIELD)
.performScrollTo()
.assertIsDisplayed()
.performClick()
composeTestRule.waitUntil(TIMEOUT) {
try {
composeTestRule
.onNodeWithTag(ProfileScreen.NAME_FIELD)
.performScrollTo()
.assertIsDisplayed()
.assertTextEquals(NAME)
true
} catch (e: AssertionError) {
false
}
}
.assertTextEquals(NAME)
true
} catch (e: AssertionError) {
false
}
}
}

step("User navigates to Settings Screen to delete their account") {
composeTestRule.onNodeWithTag(C.Tag.TopAppBar.SETTINGS_BUTTON).assertIsDisplayed().performClick()

composeTestRule.waitForIdle()
composeTestRule.waitUntil(TIMEOUT) {
try {
composeTestRule.onAllNodesWithTag(C.Tag.SettingsScreen.SCREEN).fetchSemanticsNodes().size == 1
} catch (e: AssertionError) {
false
}
}
composeTestRule.onNodeWithTag(C.Tag.SettingsScreen.SCREEN).assertIsDisplayed()
step("User navigates to Settings Screen to delete their account") {
composeTestRule
.onNodeWithTag(C.Tag.TopAppBar.SETTINGS_BUTTON)
.assertIsDisplayed()
.performClick()

composeTestRule.waitForIdle()
composeTestRule.waitUntil(TIMEOUT) {
try {
composeTestRule
.onNodeWithTag(C.Tag.SettingsScreen.DELETE_ACCOUNT_ICON)
.performScrollTo()
.assertIsDisplayed()
.performClick()
composeTestRule.onNodeWithTag(C.Tag.SettingsScreen.DELETE_BUTTON).assertIsDisplayed().performClick()
.onAllNodesWithTag(C.Tag.SettingsScreen.SCREEN)
.fetchSemanticsNodes()
.size == 1
} catch (e: AssertionError) {
false
}
}
composeTestRule.onNodeWithTag(C.Tag.SettingsScreen.SCREEN).assertIsDisplayed()

step("User is lead back to the Sign In Screen") {
composeTestRule.waitForIdle()
composeTestRule.waitUntil(TIMEOUT) {
try {
composeTestRule.onAllNodesWithTag(SignInScreen.SCREEN).fetchSemanticsNodes().size == 1

composeTestRule
.onNodeWithTag(C.Tag.SettingsScreen.DELETE_ACCOUNT_ICON)
.performScrollTo()
.assertIsDisplayed()
.performClick()
composeTestRule
.onNodeWithTag(C.Tag.SettingsScreen.DELETE_BUTTON)
.assertIsDisplayed()
.performClick()
}

} catch (e: AssertionError) {
false
}
}
step("User is lead back to the Sign In Screen") {
composeTestRule.waitForIdle()
composeTestRule.waitUntil(TIMEOUT) {
try {
composeTestRule.onAllNodesWithTag(SignInScreen.SCREEN).fetchSemanticsNodes().size == 1
} catch (e: AssertionError) {
false
}
}
}
}
}

0 comments on commit c8ae58e

Please sign in to comment.