Skip to content

Commit 2dc8ccc

Browse files
committed
Adapt to new profile creation user flow
1 parent 9b25aa9 commit 2dc8ccc

1 file changed

Lines changed: 9 additions & 16 deletions

File tree

app/src/androidTest/java/com/github/swent/echo/MainActivityTest.kt

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -173,22 +173,15 @@ class MainActivityTest {
173173
// Registers with google sign in
174174
composeTestRule.onNodeWithTag("google-sign-in-button").performClick()
175175

176-
// TODO: Use create profile page once we have it
177-
runBlocking {
178-
val userId = authenticationService.getCurrentUserID()
179-
assertNotNull(userId)
180-
repository.setUserProfile(
181-
UserProfile(
182-
userId!!,
183-
"Colin Berger",
184-
null,
185-
null,
186-
emptySet(),
187-
emptySet(),
188-
emptySet(),
189-
)
190-
)
191-
}
176+
// The profile creation screen should be displayed
177+
composeTestRule.onNodeWithTag("profile-creation").assertIsDisplayed()
178+
179+
// Insert first and last name
180+
composeTestRule.onNodeWithTag("FirstName").performTextInput("John")
181+
composeTestRule.onNodeWithTag("LastName").performTextInput("Doe")
182+
183+
// Click on the save button
184+
composeTestRule.onNodeWithTag("Save").performClick()
192185

193186
// Redirected to the home screen
194187
composeTestRule.onNodeWithTag("home_screen").assertIsDisplayed()

0 commit comments

Comments
 (0)