Skip to content

Commit 71acb7a

Browse files
test: GoogleAuthScreenTest to avoid account collisions
1 parent 43b2c39 commit 71acb7a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

e2eTest/src/test/java/com/firebase/ui/auth/ui/screens/GoogleAuthScreenTest.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,15 @@ class GoogleAuthScreenTest {
149149

150150
@Test
151151
fun `anonymous upgrade with google links anonymous user and emits Success auth state`() = runTest {
152-
val email = "anonymousupgrade@example.com"
152+
val email = "anonymous-google-upgrade-${System.currentTimeMillis()}@example.com"
153+
val sub = "anonymous-google-upgrade-${System.nanoTime()}"
153154
val name = "Anonymous Upgrade User"
154155
val photoUrl = "https://example.com/avatar.jpg"
155156

156157
// Generate a JWT token for the Google account
157158
val mockIdToken = generateMockGoogleIdToken(
158159
email = email,
160+
sub = sub,
159161
name = name,
160162
photoUrl = photoUrl
161163
)

0 commit comments

Comments
 (0)