Overtorment
5 years ago
committed by
GitHub
17 changed files with 128 additions and 74 deletions
@ -1,11 +1,54 @@ |
|||||
/* global it, describe, expect, element, by */ |
/* global it, describe, expect, element, by, waitFor, device */ |
||||
|
|
||||
describe('BlueWallet UI Tests', () => { |
describe('BlueWallet UI Tests', () => { |
||||
it('Shows Wallets List screen', async () => { |
it('can launch', async () => { |
||||
await expect(element(by.id('WalletsList'))).toBeVisible(); |
await waitFor(element(by.id('WalletsList'))) |
||||
|
.toBeVisible() |
||||
|
.withTimeout(4000); |
||||
|
}); |
||||
|
|
||||
|
it.skip('can encrypt storage', async () => { |
||||
|
await waitFor(element(by.id('WalletsList'))) |
||||
|
.toBeVisible() |
||||
|
.withTimeout(4000); |
||||
|
await expect(element(by.id('SettingsButton'))).toBeVisible(); |
||||
|
await element(by.id('SettingsButton')).tap(); // detox hanges here
|
||||
|
|
||||
|
await expect(element(by.id('EncryptStorageButton'))).toBeVisible(); |
||||
}); |
}); |
||||
|
|
||||
it('Shows Wallets List screen', async () => { |
it('can create wallet, reload app and it persists', async () => { |
||||
|
await waitFor(element(by.id('WalletsList'))) |
||||
|
.toBeVisible() |
||||
|
.withTimeout(4000); |
||||
|
await element(by.id('CreateAWallet')).tap(); |
||||
|
await element(by.id('WalletNameInput')).typeText('cr34t3d\n'); |
||||
|
await waitFor(element(by.id('ActivateBitcoinButton'))) |
||||
|
.toBeVisible() |
||||
|
.withTimeout(5000); |
||||
|
await element(by.id('ActivateBitcoinButton')).tap(); |
||||
|
await element(by.id('ActivateBitcoinButton')).tap(); |
||||
|
// why tf we need 2 taps for it to work..? mystery
|
||||
|
await element(by.id('Create')).tap(); |
||||
|
|
||||
|
await waitFor(element(by.id('PleaseBackupScrollView'))) |
||||
|
.toBeVisible() |
||||
|
.withTimeout(5000); |
||||
|
|
||||
|
await element(by.id('PleaseBackupScrollView')).swipe('up', 'fast', 1); // in case emu screen is small and it doesnt fit
|
||||
|
|
||||
|
await waitFor(element(by.id('PleasebackupOk'))) |
||||
|
.toBeVisible() |
||||
|
.withTimeout(5000); |
||||
|
await element(by.id('PleasebackupOk')).tap(); |
||||
await expect(element(by.id('WalletsList'))).toBeVisible(); |
await expect(element(by.id('WalletsList'))).toBeVisible(); |
||||
|
await expect(element(by.id('cr34t3d'))).toBeVisible(); |
||||
|
|
||||
|
await device.terminateApp(); |
||||
|
await device.launchApp({ newInstance: true }); |
||||
|
await waitFor(element(by.id('WalletsList'))) |
||||
|
.toBeVisible() |
||||
|
.withTimeout(10000); |
||||
|
await expect(element(by.id('cr34t3d'))).toBeVisible(); |
||||
}); |
}); |
||||
}); |
}); |
||||
|
@ -1,2 +1,4 @@ |
|||||
$ANDROID_HOME/tools/bin/sdkmanager "system-images;android-28;default;x86_64" |
$ANDROID_HOME/tools/bin/sdkmanager "system-images;android-28;default;x86_64" |
||||
$ANDROID_HOME/tools/bin/avdmanager create avd -n Pixel_API_28_AOSP -d pixel --package "system-images;android-28;default;x86_64" |
echo no | $ANDROID_HOME/tools/bin/sdkmanager --licenses |
||||
|
echo no | $ANDROID_HOME/tools/bin/avdmanager create avd -n Pixel_API_29_AOSP --force --package "system-images;android-28;default;x86_64" |
||||
|
printf "\nhw.lcd.height=1920\nhw.lcd.width=1080\nhw.lcd.density=320\nskin.name=1080x1920" >> ~/.android/avd/Pixel_API_29_AOSP.avd/config.ini |
@ -0,0 +1,16 @@ |
|||||
|
#!/usr/bin/env bash |
||||
|
|
||||
|
echo uploading artifacts... |
||||
|
cp ./android/app/build/outputs/apk/release/app-release.apk ./artifacts/ |
||||
|
cp ./android/app/build/outputs/apk/androidTest/release/app-release-androidTest.apk ./artifacts/ |
||||
|
cp ~/.android/avd/Pixel_API_29_AOSP.avd/config.ini ./artifacts/ |
||||
|
tar -cvzf artifacts.tar.gz artifacts |
||||
|
FILENAME="artifacts.tar.gz" |
||||
|
HASH=`date +%s` |
||||
|
FILENAME_UNIQ="$HASH.tar.gz" |
||||
|
cp "$FILENAME" "$FILENAME_UNIQ" |
||||
|
curl "http://filestorage.bluewallet.io:1488/upload.php" -F "fileToUpload=@$FILENAME_UNIQ" |
||||
|
rm "$FILENAME_UNIQ" |
||||
|
DLOAD="http://filestorage.bluewallet.io:1488/$HASH.tar.gz" |
||||
|
echo artifacts download link: |
||||
|
echo $DLOAD |
Loading…
Reference in new issue