Skip to content

Commit

Permalink
0.9.3 (2) (#162)
Browse files Browse the repository at this point in the history
* version bump, enable signing

* enable import wif for web

* bump

* correct setup layout for smaller screens

* hide message sign again for this release

* upload screenshot

* take screenshot

* final touches for smaller screens

* another screen..

* tests: scrollIntoView

* disable screenshot upload

* update for imported e2e
  • Loading branch information
willyfromtheblock authored Jun 14, 2022
1 parent 0d9a70b commit 1ea1770
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 28 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/analyze-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,10 @@ jobs:
script: |
flutter drive --target=test_driver/app.dart --driver=test_driver/key_new.dart
flutter drive --target=test_driver/app.dart --driver=test_driver/key_imported.dart
# - name: Upload screenshots
# if: always()
# uses: actions/upload-artifact@v3
# with:
# name: screenshot
# path: shot.png
# retention-days: 5
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### **0.9.3** (2022-06-13)
### **0.9.3** (2022-06-14)
* Improved error handling for edge case in which secure storage is not accessible on Android phones
* Legal notices for setup
* Various dependency updates under the hood
Expand Down
1 change: 1 addition & 0 deletions lib/screens/setup/setup.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class SetupScreen extends StatefulWidget {
var padding = MediaQuery.of(ctx).padding;
var correctedHeight = height - padding.top - padding.bottom;

if (MediaQuery.of(ctx).size.height < 600) return 700;
if (kIsWeb) return correctedHeight;

return MediaQuery.of(ctx).orientation == Orientation.portrait
Expand Down
4 changes: 3 additions & 1 deletion lib/screens/setup/setup_legal.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ class _SetupLegalScreenState extends State<SetupLegalScreen> {
),
body: SingleChildScrollView(
child: Container(
height: SetupScreen.calcContainerHeight(context),
height: MediaQuery.of(context).size.width <= 350
? 800
: SetupScreen.calcContainerHeight(context),
color: Theme.of(context).primaryColor,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
Expand Down
26 changes: 14 additions & 12 deletions lib/screens/wallet/import_wif.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:coinslib/coinslib.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:provider/provider.dart';
Expand Down Expand Up @@ -217,18 +218,19 @@ class _ImportWifScreenState extends State<ImportWifScreen> {
minLines: 4,
maxLines: 4,
),
SizedBox(height: 10),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
PeerButton(
action: () => createQrScanner('priv'),
text: AppLocalizations.instance
.translate('paperwallet_step_2_text'),
small: true,
),
],
),
if (!kIsWeb) SizedBox(height: 10),
if (!kIsWeb)
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
PeerButton(
action: () => createQrScanner('priv'),
text: AppLocalizations.instance
.translate('paperwallet_step_2_text'),
small: true,
),
],
),
SizedBox(height: 10),
Row(
mainAxisAlignment: MainAxisAlignment.center,
Expand Down
23 changes: 11 additions & 12 deletions lib/screens/wallet/wallet_home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -395,20 +395,19 @@ class _WalletHomeState extends State<WalletHomeScreen>
),
),
),
if (_appSettings.camerasAvailble)
PopupMenuItem(
value: 'import_wif',
child: ListTile(
leading: Icon(
Icons.arrow_circle_down,
color: Theme.of(context).colorScheme.secondary,
),
title: Text(
AppLocalizations.instance
.translate('wallet_pop_menu_wif'),
),
PopupMenuItem(
value: 'import_wif',
child: ListTile(
leading: Icon(
Icons.arrow_circle_down,
color: Theme.of(context).colorScheme.secondary,
),
title: Text(
AppLocalizations.instance
.translate('wallet_pop_menu_wif'),
),
),
),
PopupMenuItem(
value: 'server_settings',
child: ListTile(
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: peercoin
description: A new Peercoin wallet.

version: 0.9.3+90
version: 0.9.3+91

environment:
sdk: '>=2.12.0 <3.0.0'
Expand Down
9 changes: 8 additions & 1 deletion test_driver/key_imported.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,27 @@ void main() {
await driver.tap(find.byValueKey('setupLanguageButton'));
await driver.tap(find.text('English'));
await driver.tap(find.pageBack());
await driver.scrollIntoView(find.text('Import Seed'));
await driver.tap(find.text('Import Seed'));
await driver.scrollIntoView(find.byValueKey('importTextField'));
await driver.tap(find.byValueKey('importTextField'));
await driver.enterText(
'vapor please suffer wood enrich quality position chest quantum fog rival museum',
);
await driver.tap(find.text('Import'));

await driver.scrollIntoView(elevatedButtonFinder);
await driver.tap(elevatedButtonFinder); //pin pad
for (var i = 1; i <= 12; i++) {
await driver.tap(find.text('0'));
}
await driver
.scrollIntoView(find.byValueKey('setupApiTickerSwitchKey'));
await driver.tap(find.byValueKey('setupApiTickerSwitchKey'));
await driver.tap(find.byValueKey('setupApiBGSwitchKey'));
await driver.tap(find.text('Continue'));
await driver.scrollIntoView(find.byValueKey('setupLegalConsentKey'));
await driver.tap(find.byValueKey('setupLegalConsentKey'));
await driver.scrollIntoView(find.text('Finish Setup'));
await driver.tap(find.text('Finish Setup'));
await driver.tap(find.pageBack());
await driver.runUnsynchronized(
Expand Down Expand Up @@ -93,6 +99,7 @@ void main() {
);
},
retry: 2,
timeout: Timeout.factor(2),
);
},
);
Expand Down
12 changes: 12 additions & 0 deletions test_driver/key_new.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// import 'dart:io';

import 'package:flutter_driver/flutter_driver.dart';
import 'package:test/test.dart';

Expand Down Expand Up @@ -38,18 +40,28 @@ void main() {
await driver.tap(find.byValueKey('setupLanguageButton'));
await driver.tap(find.text('English'));
await driver.tap(find.pageBack());
await driver.scrollIntoView(find.text('Create Wallet'));
await driver.tap(find.text('Create Wallet'));
await driver.scrollIntoView(find.text('Export now'));
await driver.tap(find.text('Export now'));
await driver.tap(find.text('Continue'));
await driver.tap(find.text('Continue'));
await driver.scrollIntoView(elevatedButtonFinder);
await driver.tap(elevatedButtonFinder); //pin pad
for (var i = 1; i <= 12; i++) {
await driver.tap(find.text('0'));
}
await driver
.scrollIntoView(find.byValueKey('setupApiTickerSwitchKey'));
await driver.tap(find.byValueKey('setupApiTickerSwitchKey'));
await driver.tap(find.byValueKey('setupApiBGSwitchKey'));
await driver.tap(find.text('Continue'));
// final pixels = await driver.screenshot();
// final file = File('shot.png');
// await file.writeAsBytes(pixels);
await driver.scrollIntoView(find.byValueKey('setupLegalConsentKey'));
await driver.tap(find.byValueKey('setupLegalConsentKey'));
await driver.scrollIntoView(find.text('Finish Setup'));
await driver.tap(find.text('Finish Setup'));
await driver.tap(find.pageBack());
await driver.runUnsynchronized(
Expand Down

0 comments on commit 1ea1770

Please sign in to comment.