-
Notifications
You must be signed in to change notification settings - Fork 662
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
52f21eb
commit be1137a
Showing
7 changed files
with
156 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
paymentsheet-example/src/androidTest/java/com/stripe/android/lpm/TestGooglePay.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package com.stripe.android.lpm | ||
|
||
import androidx.test.ext.junit.runners.AndroidJUnit4 | ||
import com.stripe.android.BasePlaygroundTest | ||
import com.stripe.android.paymentsheet.example.playground.settings.Country | ||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
|
||
@RunWith(AndroidJUnit4::class) | ||
internal class TestGooglePay : BasePlaygroundTest() { | ||
@Test | ||
fun testUnitedStates() { | ||
testDriver.confirmWithGooglePay(Country.US) | ||
} | ||
|
||
@Test | ||
fun testFrance() { | ||
testDriver.confirmWithGooglePay(Country.FR) | ||
} | ||
|
||
@Test | ||
fun testGreatBritain() { | ||
testDriver.confirmWithGooglePay(Country.GB) | ||
} | ||
|
||
@Test | ||
fun testAustralia() { | ||
testDriver.confirmWithGooglePay(Country.AU) | ||
} | ||
|
||
@Test | ||
fun testBrazil() { | ||
testDriver.confirmWithGooglePay(Country.BR) | ||
} | ||
|
||
@Test | ||
fun testJapan() { | ||
testDriver.confirmWithGooglePay(Country.JP) | ||
} | ||
|
||
@Test | ||
fun testMexico() { | ||
testDriver.confirmWithGooglePay(Country.MX) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...ntsheet-example/src/androidTest/java/com/stripe/android/test/core/ui/UiAutomatorWindow.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.stripe.android.test.core.ui | ||
|
||
import androidx.test.uiautomator.UiDevice | ||
import com.stripe.android.test.core.DEFAULT_UI_TIMEOUT | ||
|
||
class UiAutomatorWindow( | ||
private val device: UiDevice, | ||
private val packageName: String | ||
) { | ||
fun waitFor() { | ||
device.waitForWindowUpdate(packageName, DEFAULT_UI_TIMEOUT.inWholeMilliseconds) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters