Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@ fun enterPaymentSheetDetails(
cardExpiry: String,
cardSecurityCode: String,
) {
fillTextField(SDK.id.numberTextInputEditText, cardNumber)
fillTextField(SDK.id.card_number, cardNumber)

fillTextField(SDK.id.nameTextInputEditText, cardHolder)
fillTextField(SDK.id.cardholder_name, cardHolder)

fillTextField(SDK.id.expirationDateTextInputEditText, cardExpiry)
fillTextField(SDK.id.expiry_date, cardExpiry)

fillTextField(SDK.id.securityNumberTextInputEditText, cardSecurityCode)
fillTextField(SDK.id.security_code, cardSecurityCode)
}

fun fillTextField(
Expand All @@ -131,7 +131,7 @@ fun updateRecommendationUrlWith(suffix: String) {
putString("recommendation_url", recommendationURL + suffix)
}.commit()

onView(withId(Examples.id.action_settings))
onView(withId(Examples.id.settings_button))
.perform(click())

onView(withText("Generate payment session"))
Expand All @@ -149,28 +149,28 @@ fun fillBillingDetails(
postcode: String,
state: String? = null,
) {
fillTextField(SDK.id.emailTextInputEditText, email)
fillTextField(SDK.id.cardholder_email_field, email)

selectFromMultipleAndEnterText(SDK.id.countryTextInputEditText, country)
selectFromMultipleAndEnterText(SDK.id.country_field, country)

onView(withText(country)).perform(click())

Thread.sleep(500)

if (country == "India" || country == "China") {
if (state != null) {
fillTextField(SDK.id.administrativeDivisionTextInputEditText, state)
fillTextField(SDK.id.administrative_division_field, state)
onView(withText(state)).perform(click())
}
}

fillTextField(SDK.id.mobileNumberTextInputEditText, phone)
fillTextField(SDK.id.cardholder_phone_number_field, phone)

fillTextField(SDK.id.addressLine1TextInputEditText, addressLineOne)
fillTextField(SDK.id.cardholder_address_line_1_field, addressLineOne)

fillTextField(SDK.id.cityTextInputEditText, city)
fillTextField(SDK.id.cardholder_city_field, city)

fillTextField(SDK.id.postalCodeTextInputEditText, postcode)
fillTextField(SDK.id.postcode_field, postcode)
}

fun selectFromMultipleAndEnterText(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class RavelinIntegrationTest {
CARD_SECURITY_CODE,
)

onView(withId(R.id.cardEntrySubmitButton))
onView(withId(R.id.submit_button))
.check(matches(isEnabled()))
.perform(click())

Expand All @@ -112,7 +112,7 @@ class RavelinIntegrationTest {
CARD_SECURITY_CODE,
)

onView(withId(R.id.cardEntrySubmitButton))
onView(withId(R.id.submit_button))
.check(matches(isEnabled()))
.perform(click())

Expand All @@ -135,7 +135,7 @@ class RavelinIntegrationTest {
CARD_SECURITY_CODE,
)

onView(withId(R.id.cardEntrySubmitButton))
onView(withId(R.id.submit_button))
.check(matches(isEnabled()))
.perform(click())

Expand All @@ -156,7 +156,7 @@ class RavelinIntegrationTest {
CARD_SECURITY_CODE,
)

onView(withId(R.id.cardEntrySubmitButton))
onView(withId(R.id.submit_button))
.check(matches(isEnabled()))
.perform(click())

Expand All @@ -177,7 +177,7 @@ class RavelinIntegrationTest {
CARD_SECURITY_CODE,
)

onView(withId(R.id.cardEntrySubmitButton))
onView(withId(R.id.submit_button))
.check(matches(isEnabled()))
.perform(click())

Expand All @@ -200,7 +200,7 @@ class RavelinIntegrationTest {
CARD_SECURITY_CODE,
)

onView(withId(R.id.cardEntrySubmitButton))
onView(withId(R.id.submit_button))
.check(matches(isEnabled()))
.perform(click())

Expand All @@ -221,7 +221,7 @@ class RavelinIntegrationTest {
CARD_SECURITY_CODE,
)

onView(withId(R.id.cardEntrySubmitButton))
onView(withId(R.id.submit_button))
.check(matches(isEnabled()))
.perform(click())

Expand Down Expand Up @@ -249,7 +249,7 @@ class RavelinIntegrationTest {
CARD_SECURITY_CODE,
)

onView(withId(R.id.cardEntrySubmitButton))
onView(withId(R.id.submit_button))
.check(matches(isEnabled()))
.perform(click())

Expand Down Expand Up @@ -280,7 +280,7 @@ class RavelinIntegrationTest {
CARD_SECURITY_CODE,
)

onView(withId(R.id.cardEntrySubmitButton))
onView(withId(R.id.submit_button))
.check(matches(isEnabled()))
.perform(click())

Expand All @@ -303,7 +303,7 @@ class RavelinIntegrationTest {
CARD_SECURITY_CODE,
)

onView(withId(R.id.cardEntrySubmitButton))
onView(withId(R.id.submit_button))
.check(matches(isEnabled()))
.perform(click())

Expand Down Expand Up @@ -334,7 +334,7 @@ class RavelinIntegrationTest {
CARD_SECURITY_CODE,
)

onView(withId(R.id.cardEntrySubmitButton))
onView(withId(R.id.submit_button))
.check(matches(isEnabled()))
.perform(click())

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<!-- Settings, should appear as action button -->
<item
android:id="@+id/action_settings"
android:id="@+id/settings_button"
android:icon="@drawable/ic_settings_24"
android:title="@string/title_settings"
app:showAsAction="always" />
Expand Down
28 changes: 14 additions & 14 deletions judokit-android/src/main/res/layout/billing_details_form_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
android:layout_height="wrap_content">

<EditText
android:id="@+id/emailTextInputEditText"
android:id="@+id/cardholder_email_field"
style="@style/JudoTheme.TextInputEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -71,7 +71,7 @@
android:layout_height="wrap_content">

<androidx.appcompat.widget.AppCompatAutoCompleteTextView
android:id="@+id/countryTextInputEditText"
android:id="@+id/country_field"
style="@style/JudoTheme.TextInputEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -89,7 +89,7 @@
android:layout_height="wrap_content">

<androidx.appcompat.widget.AppCompatAutoCompleteTextView
android:id="@+id/administrativeDivisionTextInputEditText"
android:id="@+id/administrative_division_field"
style="@style/JudoTheme.TextInputEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -116,7 +116,7 @@
app:disableRightCornerRadius="true">

<EditText
android:id="@+id/phoneCountryCodeTextInputEditText"
android:id="@+id/cardholder_phone_code_field"
style="@style/JudoTheme.TextInputEditText"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand All @@ -136,7 +136,7 @@
app:disableLeftCornerRadius="true">

<EditText
android:id="@+id/mobileNumberTextInputEditText"
android:id="@+id/cardholder_phone_number_field"
style="@style/JudoTheme.TextInputEditText"
android:layout_width="wrap_content"
android:layout_height="match_parent"
Expand All @@ -155,7 +155,7 @@
android:layout_height="wrap_content">

<EditText
android:id="@+id/addressLine1TextInputEditText"
android:id="@+id/cardholder_address_line_1_field"
style="@style/JudoTheme.TextInputEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -173,7 +173,7 @@
android:visibility="gone">

<EditText
android:id="@+id/addressLine2TextInputEditText"
android:id="@+id/cardholder_address_line_2_field"
style="@style/JudoTheme.TextInputEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -190,7 +190,7 @@
android:visibility="gone">

<EditText
android:id="@+id/addressLine3TextInputEditText"
android:id="@+id/cardholder_address_line_3_field"
style="@style/JudoTheme.TextInputEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down Expand Up @@ -220,7 +220,7 @@
tools:ignore="HardcodedText" />

<TextView
android:id="@+id/addAddressLineButtonText"
android:id="@+id/add_address_line_button"
style="@style/JudoTheme.TextButton.Large"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand All @@ -238,7 +238,7 @@
android:layout_height="wrap_content">

<EditText
android:id="@+id/cityTextInputEditText"
android:id="@+id/cardholder_city_field"
style="@style/JudoTheme.TextInputEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -254,7 +254,7 @@
android:layout_height="wrap_content">

<EditText
android:id="@+id/postalCodeTextInputEditText"
android:id="@+id/post_code_field"
style="@style/JudoTheme.TextInputEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down Expand Up @@ -286,7 +286,7 @@
android:id="@+id/flow3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:constraint_referenced_ids="billingDetailsBackButton,billingDetailsSubmitButton"
app:constraint_referenced_ids="billing_details_back_button,billing_details_submit_button"
app:flow_horizontalAlign="start"
app:flow_horizontalBias="0"
app:flow_horizontalGap="@dimen/space_9"
Expand All @@ -299,15 +299,15 @@
app:layout_constraintTop_toTopOf="parent" />

<com.judopay.judokit.android.ui.common.ProgressButton
android:id="@+id/billingDetailsBackButton"
android:id="@+id/billing_details_back_button"
style="@style/JudoTheme.BottomBackButton"
android:layout_width="@dimen/width_100"
android:layout_height="@dimen/button_height"
android:minWidth="@dimen/min_touch_target_size"
android:text="@string/jp_back" />

<com.judopay.judokit.android.ui.common.ProgressButton
android:id="@+id/billingDetailsSubmitButton"
android:id="@+id/billing_details_submit_button"
style="@style/JudoTheme.BlackRoundedButton"
android:layout_width="@dimen/width_0"
android:layout_height="@dimen/button_height"
Expand Down
16 changes: 8 additions & 8 deletions judokit-android/src/main/res/layout/card_entry_form_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
android:layout_height="wrap_content">

<EditText
android:id="@+id/numberTextInputEditText"
android:id="@+id/card_number"
style="@style/JudoTheme.TextInputEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -69,7 +69,7 @@
android:layout_height="wrap_content">

<EditText
android:id="@+id/nameTextInputEditText"
android:id="@+id/cardholder_name"
style="@style/JudoTheme.TextInputEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -96,7 +96,7 @@
android:layout_height="match_parent">

<EditText
android:id="@+id/expirationDateTextInputEditText"
android:id="@+id/expiry_date"
style="@style/JudoTheme.TextInputEditText"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand All @@ -118,7 +118,7 @@
android:layout_height="match_parent">

<EditText
android:id="@+id/securityNumberTextInputEditText"
android:id="@+id/security_code"
style="@style/JudoTheme.TextInputEditText"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand Down Expand Up @@ -148,7 +148,7 @@
android:visibility="gone">

<androidx.appcompat.widget.AppCompatAutoCompleteTextView
android:id="@+id/countryTextInputEditText"
android:id="@+id/country_field"
style="@style/JudoTheme.TextInputEditText"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand All @@ -173,7 +173,7 @@
android:visibility="gone">

<EditText
android:id="@+id/postcodeTextInputEditText"
android:id="@+id/postcode_field"
style="@style/JudoTheme.TextInputEditText"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand Down Expand Up @@ -205,7 +205,7 @@
android:id="@+id/flow3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:constraint_referenced_ids="cardEntrySubmitButton,secureTransmissionTextView"
app:constraint_referenced_ids="submit_button,secureTransmissionTextView"
app:flow_horizontalAlign="start"
app:flow_horizontalBias="0"
app:flow_maxElementsWrap="1"
Expand All @@ -218,7 +218,7 @@
app:layout_constraintBottom_toBottomOf="parent"/>

<com.judopay.judokit.android.ui.common.ProgressButton
android:id="@+id/cardEntrySubmitButton"
android:id="@+id/submit_button"
style="@style/JudoTheme.BlackRoundedButton"
android:layout_width="match_parent"
android:layout_height="@dimen/button_height"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
app:layout_constraintEnd_toStartOf="@+id/verticalBarrier">

<TextView
android:id="@+id/errorTextView"
android:id="@+id/error_text_view"
style="@style/JudoTheme.Caption.Error.Medium"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
app:layout_constraintTop_toTopOf="parent" />

<Button
android:id="@+id/addButton"
android:id="@+id/add_card_button"
style="@style/JudoTheme.OutlinedButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
app:layout_constraintTop_toTopOf="parent">

<com.judopay.judokit.android.ui.common.ProgressButton
android:id="@+id/payButton"
android:id="@+id/submit_button"
style="@style/JudoTheme.BlackRoundedButton"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand Down
Loading
Loading