-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CT-2901 | Billing info UI tests & refactor (#241)
* Add happy path billing info test * Add UK post code validation test and refactor * Add missing postcode check on happy path test * Add US and CA post code validation tests * Test data and selectors refactor * Address PR comment
- Loading branch information
1 parent
b9e019c
commit c0b2300
Showing
7 changed files
with
516 additions
and
242 deletions.
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
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 |
---|---|---|
|
@@ -9,33 +9,44 @@ | |
import Foundation | ||
|
||
class TestData { | ||
static let CARD_NUMBER = "4976 3500 0000 6891" | ||
static let CARDHOLDER_NAME = "Test User" | ||
static let CARD_EXPIRY = "1225" | ||
static let CARD_SECURITY_CODE = "341" | ||
|
||
static let PAY_WITH_CARD_LABEL = "Pay with card" | ||
static let PREAUTH_WITH_CARD_LABEL = "Pre-auth with card" | ||
static let REGISTER_CARD_LABEL = "Register card" | ||
static let CHECK_CARD_LABEL = "Check card" | ||
static let TOKEN_PAYMENTS_LABEL = "Token Payments" | ||
static let PAYMENT_METHODS_LABEL = "Payment methods" | ||
static let PREAUTH_METHODS_LABEL = "PreAuth methods" | ||
|
||
static let CANCEL_BUTTON = "Cancel" | ||
|
||
static let CANCELLED_PAYMENT_TOAST = "The transaction was cancelled by the user." | ||
static let CANCELLED_3DS2_PAYMENT_TOAST = "Unable to process transaction. Card authentication failed with 3DS Server." | ||
|
||
static let ALLOW = "ALLOW" | ||
static let PREVENT = "PREVENT" | ||
static let REVIEW = "REVIEW" | ||
static let AUTHORISE = "AUTHORISE" | ||
static let AUTHENTICATE = "AUTHENTICATE" | ||
static let TRA = "TRANSACTION_RISK_ANALYSIS" | ||
static let LOW_VALUE = "LOW_VALUE" | ||
static let NO_CHALLENGE = "NO_CHALLENGE_REQUESTED" | ||
static let NO_PREFERENCE = "NO_PREFERENCE" | ||
static let CHALLENGE_MANDATE = "CHALLENGE_REQUESTED_AS_MANDATE" | ||
static let CHALLENGE_REQUESTED = "CHALLENGE_REQUESTED" | ||
struct CardDetails { | ||
static let CARD_NUMBER = "4976 3500 0000 6891" | ||
static let CARDHOLDER_NAME = "Test User" | ||
static let CARD_EXPIRY = "1225" | ||
static let CARD_SECURITY_CODE = "341" | ||
} | ||
struct Ravelin { | ||
static let ALLOW = "ALLOW" | ||
static let PREVENT = "PREVENT" | ||
static let REVIEW = "REVIEW" | ||
static let AUTHORISE = "AUTHORISE" | ||
static let AUTHENTICATE = "AUTHENTICATE" | ||
static let TRA = "TRANSACTION_RISK_ANALYSIS" | ||
static let LOW_VALUE = "LOW_VALUE" | ||
static let NO_CHALLENGE = "NO_CHALLENGE_REQUESTED" | ||
static let NO_PREFERENCE = "NO_PREFERENCE" | ||
static let CHALLENGE_MANDATE = "CHALLENGE_REQUESTED_AS_MANDATE" | ||
static let CHALLENGE_REQUESTED = "CHALLENGE_REQUESTED" | ||
} | ||
struct BillingInfo { | ||
static let VALID_EMAIL = "[email protected]" | ||
static let VALID_MOBILE = "07812345678" | ||
static let VALID_ADDRESS = "235 Regent Street" | ||
static let VALID_CITY = "London" | ||
static let VALID_POSTCODE = "W1B 2EL" | ||
static let VALID_ADDRESS_TWO = "West End" | ||
static let VALID_COUNTRY_CODE = "826" | ||
static let INVALID_POSTCODE = "38GL112" | ||
static let SPECIAL_CHARACTERS = "#$@*" | ||
static let INVALID_POSTCODE_LABEL = "Invalid postcode entered" | ||
static let INVALID_ZIPCODE_LABEL = "Invalid ZIP code entered" | ||
static let INVALID_EMAIL_LABEL = "Please enter a valid email" | ||
static let INVALID_PHONE_LABEL = "Please enter a valid mobile number" | ||
static let INVALID_ADDRESS_LABEL = "Please enter a valid address" | ||
static let INVALID_CITY_LABEL = "Please enter a valid city" | ||
} | ||
struct Other { | ||
static let CANCELLED_PAYMENT_TOAST = "The transaction was cancelled by the user." | ||
static let CANCELLED_3DS2_PAYMENT_TOAST = "Unable to process transaction. Card authentication failed with 3DS Server." | ||
} | ||
} |
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
Oops, something went wrong.