mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-03-04 04:13:49 +01:00
TST: e2e: create bip84 -> receive (& receive with amount)
This commit is contained in:
parent
e9a5539af3
commit
35fd560702
4 changed files with 30 additions and 7 deletions
|
@ -574,7 +574,7 @@ export class BlueCopyTextToClipboard extends Component {
|
|||
render() {
|
||||
return (
|
||||
<View style={{ justifyContent: 'center', alignItems: 'center', paddingHorizontal: 16 }}>
|
||||
<TouchableOpacity onPress={this.copyToClipboard} disabled={this.state.hasTappedText}>
|
||||
<TouchableOpacity onPress={this.copyToClipboard} disabled={this.state.hasTappedText} testID="BlueCopyTextToClipboard">
|
||||
<Animated.Text style={styleCopyTextToClipboard.address} numberOfLines={0}>
|
||||
{this.state.address}
|
||||
</Animated.Text>
|
||||
|
|
|
@ -138,15 +138,15 @@ const ReceiveDetails = () => {
|
|||
<View style={styles.scrollBody}>
|
||||
{isCustom && (
|
||||
<>
|
||||
<BlueText style={styles.amount} numberOfLines={1}>
|
||||
<BlueText testID="CustomAmountText" style={styles.amount} numberOfLines={1}>
|
||||
{getDisplayAmount()}
|
||||
</BlueText>
|
||||
<BlueText style={styles.label} numberOfLines={1}>
|
||||
<BlueText testID="CustomAmountDescriptionText" style={styles.label} numberOfLines={1}>
|
||||
{customLabel}
|
||||
</BlueText>
|
||||
</>
|
||||
)}
|
||||
<View style={styles.qrCodeContainer}>
|
||||
<View style={styles.qrCodeContainer} testID="BitcoinAddressQRCodeContainer">
|
||||
<QRCode
|
||||
value={bip21encoded}
|
||||
logo={require('../../img/qr-code.png')}
|
||||
|
@ -161,7 +161,7 @@ const ReceiveDetails = () => {
|
|||
<BlueCopyTextToClipboard text={isCustom ? bip21encoded : address} />
|
||||
</View>
|
||||
<View style={styles.share}>
|
||||
<BlueButtonLink title={loc.receive.details_setAmount} onPress={showCustomAmountModal} />
|
||||
<BlueButtonLink testID="SetCustomAmountButton" title={loc.receive.details_setAmount} onPress={showCustomAmountModal} />
|
||||
<View>
|
||||
<SecondButton onPress={handleShareButtonPressed} title={loc.receive.details_share} />
|
||||
</View>
|
||||
|
@ -302,11 +302,17 @@ const ReceiveDetails = () => {
|
|||
value={customLabel || ''}
|
||||
numberOfLines={1}
|
||||
style={styles.customAmountText}
|
||||
testID="CustomAmountDescription"
|
||||
/>
|
||||
</View>
|
||||
<BlueSpacing20 />
|
||||
<View>
|
||||
<BlueButton style={styles.modalButton} title={loc.receive.details_create} onPress={createCustomAmountAddress} />
|
||||
<BlueButton
|
||||
testID="CustomAmountSaveButton"
|
||||
style={styles.modalButton}
|
||||
title={loc.receive.details_create}
|
||||
onPress={createCustomAmountAddress}
|
||||
/>
|
||||
<BlueSpacing20 />
|
||||
</View>
|
||||
<BlueSpacing20 />
|
||||
|
|
|
@ -678,6 +678,7 @@ const WalletTransactions = () => {
|
|||
<FContainer>
|
||||
{wallet.current.allowReceive() && (
|
||||
<FButton
|
||||
testID="ReceiveButton"
|
||||
text={loc.receive.header}
|
||||
onPress={() => {
|
||||
if (wallet.current.chain === Chain.OFFCHAIN) {
|
||||
|
|
|
@ -31,7 +31,7 @@ describe('BlueWallet UI Tests', () => {
|
|||
process.env.TRAVIS && require('fs').writeFileSync(lockFile, '1');
|
||||
});
|
||||
|
||||
it('can create wallet, reload app and it persists', async () => {
|
||||
it('can create wallet, reload app and it persists. then go to receive screen, set custom amount and label.', async () => {
|
||||
const lockFile = '/tmp/travislock.' + hashIt(jasmine.currentTest.fullName);
|
||||
if (process.env.TRAVIS) {
|
||||
if (require('fs').existsSync(lockFile))
|
||||
|
@ -44,6 +44,22 @@ describe('BlueWallet UI Tests', () => {
|
|||
await device.launchApp({ newInstance: true });
|
||||
await yo('WalletsList');
|
||||
await expect(element(by.id('cr34t3d'))).toBeVisible();
|
||||
await element(by.id('cr34t3d')).tap();
|
||||
await element(by.id('ReceiveButton')).tap();
|
||||
await element(by.text('Yes, I have')).tap();
|
||||
await element(by.text(`No, and don't ask me again`)).tap();
|
||||
await yo('BitcoinAddressQRCodeContainer');
|
||||
await yo('BlueCopyTextToClipboard');
|
||||
await element(by.id('SetCustomAmountButton')).tap();
|
||||
await element(by.id('BitcoinAmountInput')).typeText('1');
|
||||
await element(by.id('CustomAmountDescription')).typeText('test');
|
||||
await element(by.id('CustomAmountSaveButton')).tap();
|
||||
await sup('1 BTC');
|
||||
await sup('test');
|
||||
await yo('BitcoinAddressQRCodeContainer');
|
||||
await yo('BlueCopyTextToClipboard');
|
||||
await device.pressBack();
|
||||
await device.pressBack();
|
||||
process.env.TRAVIS && require('fs').writeFileSync(lockFile, '1');
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue