Closed smakosh closed 2 years ago
@sbycrosz 👀
Hi @smakosh I test it with the same component and works for me, can you paste an example of your test code, please?
Hi @smakosh I test it with the same component and works for me, can you paste an example of your test code, please?
Sure will do tomorrow morning
Hey @Damimd10, Could you share your code snippet here.
I'm using Detox and here's the error log:
And here's my code snippet
<LiteCreditCardInput
onChange={handleCreditCardInput}
inputStyle={styles.creditCardInput}
additionalInputsProps={{
number: {
testID: 'stripe-input-credit-card',
},
expiry: {
testID: 'stripe-input-expiry',
},
cvc: {
testID: 'stripe-input-cvc',
},
}}
/>
my e2e test snippet code responsible for that
....
await element(by.id('stripe-input-credit-card')).typeText(
'5111111111111118'
)
await element(by.id('stripe-input-expiry')).typeText('1221')
await element(by.id('stripe-input-cvc')).typeText('123')
await element(by.id('confirm-payment')).tap()
....
Credit card credentials have been taken from Stripe docs
@smakosh this is working on Android, but not working on iOS
@smakosh are you using javascript in your e2e tests?
@smakosh are you using javascript in your e2e tests?
Detox
@smakosh yeah i understanding that. me too. but my tests written on typescript.
here an example
Details
additionalInputsProps
prop to pass atestID
for each input butDetox
is failing to type anything there or replace the text.Example