Skip to content

Commit

Permalink
Re-enable TestWeChatPay (#9348)
Browse files Browse the repository at this point in the history
* Re-enable TestWeChatPay

* Add delay before attempting to authorize test payment for WeChat
  • Loading branch information
tjclawson-stripe authored Sep 30, 2024
1 parent d0a0683 commit c7b26f3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ import com.stripe.android.paymentsheet.example.playground.settings.CustomerSetti
import com.stripe.android.paymentsheet.example.playground.settings.CustomerType
import com.stripe.android.paymentsheet.example.playground.settings.SupportedPaymentMethodsSettingsDefinition
import com.stripe.android.test.core.TestParameters
import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith

@Ignore("Currently flaky. Let's investigate why.")
@RunWith(AndroidJUnit4::class)
internal class TestWeChatPay : BasePlaygroundTest() {
private val testParameters = TestParameters.create(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1146,7 +1146,14 @@ internal class PlaygroundTestDriver(
.text(testParameters.isSetupMode),
className = "android.widget.TextView",
device = device
) {}.click()
) {
override fun click() {
if (testParameters.paymentMethodCode == "wechat_pay") {
wait(5000)
}
super.click()
}
}.click()
Log.e("Stripe", "Fail authorization was a text view not a button this time")
}
}
Expand Down

0 comments on commit c7b26f3

Please sign in to comment.