-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from PetJournal/refactor/change-to-the-new-nam…
…e-and-gender-screen-design Refactor/change to the new name and gender screen design
- Loading branch information
Showing
19 changed files
with
359 additions
and
215 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
...src/androidTest/java/com/soujunior/petjournal/login/LoginAccountConfirmationDialogTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package com.soujunior.petjournal.login | ||
|
||
import androidx.compose.runtime.mutableStateOf | ||
import androidx.compose.runtime.remember | ||
import androidx.compose.ui.test.junit4.createComposeRule | ||
import androidx.compose.ui.test.onAllNodesWithText | ||
import androidx.compose.ui.test.onNodeWithText | ||
import androidx.compose.ui.test.performClick | ||
import androidx.test.ext.junit.runners.AndroidJUnit4 | ||
import com.soujunior.petjournal.ui.screens_app.account_manager.loginScreen.components.AccountConfirmationDialog | ||
import org.junit.Rule | ||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
|
||
@RunWith(AndroidJUnit4::class) | ||
class LoginAccountConfirmationDialogTest { | ||
@get:Rule | ||
val composeTestRule = createComposeRule() | ||
|
||
@Test | ||
fun whenAccountNotConfirmed_shouldShowConfirmationDialog() { | ||
composeTestRule.setContent { | ||
val showDialog = remember { mutableStateOf(true) } | ||
|
||
if (showDialog.value) { | ||
AccountConfirmationDialog( | ||
onDismiss = { showDialog.value = false } | ||
) | ||
} | ||
} | ||
|
||
composeTestRule.onNodeWithText("Confirmação do E-mail").assertExists() | ||
|
||
composeTestRule.onNodeWithText("Entendi").performClick() | ||
|
||
composeTestRule.waitUntil(timeoutMillis = 5_000) { | ||
composeTestRule.onAllNodesWithText("Confirmação do E-mail").fetchSemanticsNodes() | ||
.isEmpty() | ||
} | ||
|
||
composeTestRule.onNodeWithText("Confirmação do E-mail").assertDoesNotExist() | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
petJournal/app/src/main/java/com/soujunior/petjournal/ui/components/AlertText.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.