Skip to content

Commit

Permalink
chore(e2e): modify location suggestion existence check in EventCreati…
Browse files Browse the repository at this point in the history
…onE2ETest
  • Loading branch information
Zafouche committed Dec 5, 2024
1 parent 41accce commit d9445bf
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ import android.app.Instrumentation
import android.content.Intent
import android.net.Uri
import androidx.compose.material3.DatePickerDialog
import androidx.compose.ui.test.ExperimentalTestApi
import androidx.compose.ui.test.assertIsDisplayed
import androidx.compose.ui.test.assertTextEquals
import androidx.compose.ui.test.hasContentDescription
import androidx.compose.ui.test.hasTestTag
import androidx.compose.ui.test.hasText
import androidx.compose.ui.test.isDisplayed
import androidx.compose.ui.test.onNodeWithTag
Expand Down Expand Up @@ -172,6 +174,7 @@ class EventCreationE2ETest : EndToEndTest() {
selectTime(hour, minute, timePickerTag)
}

@OptIn(ExperimentalTestApi::class)
@Test
fun testEventCreation() {
// Sign in with the admin user
Expand Down Expand Up @@ -268,12 +271,10 @@ class EventCreationE2ETest : EndToEndTest() {
composeTestRule.onNodeWithTag(EventCreationTestTags.LOCATION).performTextInput(query)

// Wait for the location suggestions to load and select it.
composeTestRule.waitUntil(10000) {
composeTestRule
.onNodeWithTag(EventCreationTestTags.LOCATION_SUGGESTION_ITEM_LATITUDE + EVENT_LATITUDE)
.performScrollTo()
.isDisplayed()
}
composeTestRule.waitUntilExactlyOneExists(
matcher =
hasTestTag(EventCreationTestTags.LOCATION_SUGGESTION_ITEM_LATITUDE + EVENT_LATITUDE),
10000)

composeTestRule
.onNodeWithTag(EventCreationTestTags.LOCATION_SUGGESTION_ITEM_LATITUDE + EVENT_LATITUDE)
Expand Down

0 comments on commit d9445bf

Please sign in to comment.