Skip to content

Commit

Permalink
Fix flakey US Bank embedded test.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaynewstrom-stripe committed Feb 19, 2025
1 parent b4f6cf1 commit b75c883
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import com.stripe.android.paymentsheet.example.playground.settings.DefaultBillin
import com.stripe.android.paymentsheet.example.playground.settings.DelayedPaymentMethodsSettingsDefinition
import com.stripe.android.paymentsheet.example.playground.settings.SupportedPaymentMethodsSettingsDefinition
import com.stripe.android.test.core.TestParameters
import org.junit.Ignore
import org.junit.Test

internal class TestEmbedded : BasePlaygroundTest() {
Expand Down Expand Up @@ -49,13 +48,11 @@ internal class TestEmbedded : BasePlaygroundTest() {
)
}

@Ignore("Ignore until we can investigate why US Bank Account does not progress when clicking the primary button")
@Test
fun testUsBankAccount() {
testDriver.confirmEmbeddedUsBankAccount(
testParameters = TestParameters.create(
paymentMethodCode = "us_bank_account",
authorizationAction = null,
executeInNightlyRun = true,
) { settings ->
settings[CountrySettingsDefinition] = Country.US
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1531,6 +1531,13 @@ internal class PlaygroundTestDriver(
TimeUnit.MILLISECONDS.sleep(250)
}

composeTestRule.waitUntil(timeoutMillis = DEFAULT_UI_TIMEOUT.inWholeMilliseconds) {
composeTestRule
.onAllNodesWithText("Agree and continue")
.fetchSemanticsNodes(atLeastOneRootRequired = false)
.size == 1
}

clickButton("Agree and continue")
clickButton("Test Institution")

Expand Down

0 comments on commit b75c883

Please sign in to comment.