mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 12:29:51 +00:00
fix(integration-tests): Fix issues relating to send flow integration tests.
This change: - Handles the slider during the send confirmation flow during the send integration test - Adds the missing seeds for the restore flow to the relevant workflow files
This commit is contained in:
parent
55d32ab1d7
commit
717bb0c53b
4 changed files with 87 additions and 69 deletions
|
@ -150,6 +150,8 @@ jobs:
|
||||||
echo "const tronTestWalletSeeds = '${{ secrets.TRON_TEST_WALLET_SEEDS }}';" >> lib/.secrets.g.dart
|
echo "const tronTestWalletSeeds = '${{ secrets.TRON_TEST_WALLET_SEEDS }}';" >> lib/.secrets.g.dart
|
||||||
echo "const nanoTestWalletSeeds = '${{ secrets.NANO_TEST_WALLET_SEEDS }}';" >> lib/.secrets.g.dart
|
echo "const nanoTestWalletSeeds = '${{ secrets.NANO_TEST_WALLET_SEEDS }}';" >> lib/.secrets.g.dart
|
||||||
echo "const wowneroTestWalletSeeds = '${{ secrets.WOWNERO_TEST_WALLET_SEEDS }}';" >> lib/.secrets.g.dart
|
echo "const wowneroTestWalletSeeds = '${{ secrets.WOWNERO_TEST_WALLET_SEEDS }}';" >> lib/.secrets.g.dart
|
||||||
|
echo "const zanoTestWalletSeeds = '${{ secrets.ZANO_TEST_WALLET_SEEDS }}';" >> lib/.secrets.g.dart
|
||||||
|
echo "const decredTestWalletSeeds = '${{ secrets.DECRED_TEST_WALLET_SEEDS }}';" >> lib/.secrets.g.dart
|
||||||
echo "const moneroTestWalletReceiveAddress = '${{ secrets.MONERO_TEST_WALLET_RECEIVE_ADDRESS }}';" >> lib/.secrets.g.dart
|
echo "const moneroTestWalletReceiveAddress = '${{ secrets.MONERO_TEST_WALLET_RECEIVE_ADDRESS }}';" >> lib/.secrets.g.dart
|
||||||
echo "const bitcoinTestWalletReceiveAddress = '${{ secrets.BITCOIN_TEST_WALLET_RECEIVE_ADDRESS }}';" >> lib/.secrets.g.dart
|
echo "const bitcoinTestWalletReceiveAddress = '${{ secrets.BITCOIN_TEST_WALLET_RECEIVE_ADDRESS }}';" >> lib/.secrets.g.dart
|
||||||
echo "const ethereumTestWalletReceiveAddress = '${{ secrets.ETHEREUM_TEST_WALLET_RECEIVE_ADDRESS }}';" >> lib/.secrets.g.dart
|
echo "const ethereumTestWalletReceiveAddress = '${{ secrets.ETHEREUM_TEST_WALLET_RECEIVE_ADDRESS }}';" >> lib/.secrets.g.dart
|
||||||
|
@ -160,6 +162,8 @@ jobs:
|
||||||
echo "const tronTestWalletReceiveAddress = '${{ secrets.TRON_TEST_WALLET_RECEIVE_ADDRESS }}';" >> lib/.secrets.g.dart
|
echo "const tronTestWalletReceiveAddress = '${{ secrets.TRON_TEST_WALLET_RECEIVE_ADDRESS }}';" >> lib/.secrets.g.dart
|
||||||
echo "const nanoTestWalletReceiveAddress = '${{ secrets.NANO_TEST_WALLET_RECEIVE_ADDRESS }}';" >> lib/.secrets.g.dart
|
echo "const nanoTestWalletReceiveAddress = '${{ secrets.NANO_TEST_WALLET_RECEIVE_ADDRESS }}';" >> lib/.secrets.g.dart
|
||||||
echo "const wowneroTestWalletReceiveAddress = '${{ secrets.WOWNERO_TEST_WALLET_RECEIVE_ADDRESS }}';" >> lib/.secrets.g.dart
|
echo "const wowneroTestWalletReceiveAddress = '${{ secrets.WOWNERO_TEST_WALLET_RECEIVE_ADDRESS }}';" >> lib/.secrets.g.dart
|
||||||
|
echo "const zanoTestWalletReceiveAddress = '${{ secrets.ZANO_TEST_WALLET_RECEIVE_ADDRESS }}';" >> lib/.secrets.g.dart
|
||||||
|
echo "const decredTestWalletReceiveAddress = '${{ secrets.DECRED_TEST_WALLET_RECEIVE_ADDRESS }}';" >> lib/.secrets.g.dart
|
||||||
echo "const moneroTestWalletBlockHeight = '${{ secrets.MONERO_TEST_WALLET_BLOCK_HEIGHT }}';" >> lib/.secrets.g.dart
|
echo "const moneroTestWalletBlockHeight = '${{ secrets.MONERO_TEST_WALLET_BLOCK_HEIGHT }}';" >> lib/.secrets.g.dart
|
||||||
# end of test secrets
|
# end of test secrets
|
||||||
echo "const chainflipApiKey = '${{ secrets.CHAINFLIP_API_KEY }}';" >> lib/.secrets.g.dart
|
echo "const chainflipApiKey = '${{ secrets.CHAINFLIP_API_KEY }}';" >> lib/.secrets.g.dart
|
||||||
|
|
3
.github/workflows/pr_test_build_linux.yml
vendored
3
.github/workflows/pr_test_build_linux.yml
vendored
|
@ -153,6 +153,7 @@ jobs:
|
||||||
echo "const nanoTestWalletSeeds = '${{ secrets.NANO_TEST_WALLET_SEEDS }}';" >> lib/.secrets.g.dart
|
echo "const nanoTestWalletSeeds = '${{ secrets.NANO_TEST_WALLET_SEEDS }}';" >> lib/.secrets.g.dart
|
||||||
echo "const wowneroTestWalletSeeds = '${{ secrets.WOWNERO_TEST_WALLET_SEEDS }}';" >> lib/.secrets.g.dart
|
echo "const wowneroTestWalletSeeds = '${{ secrets.WOWNERO_TEST_WALLET_SEEDS }}';" >> lib/.secrets.g.dart
|
||||||
echo "const zanoTestWalletSeeds = '${{ secrets.ZANO_TEST_WALLET_SEEDS }}';" >> lib/.secrets.g.dart
|
echo "const zanoTestWalletSeeds = '${{ secrets.ZANO_TEST_WALLET_SEEDS }}';" >> lib/.secrets.g.dart
|
||||||
|
echo "const decredTestWalletSeeds = '${{ secrets.DECRED_TEST_WALLET_SEEDS }}';" >> lib/.secrets.g.dart
|
||||||
echo "const moneroTestWalletReceiveAddress = '${{ secrets.MONERO_TEST_WALLET_RECEIVE_ADDRESS }}';" >> lib/.secrets.g.dart
|
echo "const moneroTestWalletReceiveAddress = '${{ secrets.MONERO_TEST_WALLET_RECEIVE_ADDRESS }}';" >> lib/.secrets.g.dart
|
||||||
echo "const bitcoinTestWalletReceiveAddress = '${{ secrets.BITCOIN_TEST_WALLET_RECEIVE_ADDRESS }}';" >> lib/.secrets.g.dart
|
echo "const bitcoinTestWalletReceiveAddress = '${{ secrets.BITCOIN_TEST_WALLET_RECEIVE_ADDRESS }}';" >> lib/.secrets.g.dart
|
||||||
echo "const ethereumTestWalletReceiveAddress = '${{ secrets.ETHEREUM_TEST_WALLET_RECEIVE_ADDRESS }}';" >> lib/.secrets.g.dart
|
echo "const ethereumTestWalletReceiveAddress = '${{ secrets.ETHEREUM_TEST_WALLET_RECEIVE_ADDRESS }}';" >> lib/.secrets.g.dart
|
||||||
|
@ -163,6 +164,8 @@ jobs:
|
||||||
echo "const tronTestWalletReceiveAddress = '${{ secrets.TRON_TEST_WALLET_RECEIVE_ADDRESS }}';" >> lib/.secrets.g.dart
|
echo "const tronTestWalletReceiveAddress = '${{ secrets.TRON_TEST_WALLET_RECEIVE_ADDRESS }}';" >> lib/.secrets.g.dart
|
||||||
echo "const nanoTestWalletReceiveAddress = '${{ secrets.NANO_TEST_WALLET_RECEIVE_ADDRESS }}';" >> lib/.secrets.g.dart
|
echo "const nanoTestWalletReceiveAddress = '${{ secrets.NANO_TEST_WALLET_RECEIVE_ADDRESS }}';" >> lib/.secrets.g.dart
|
||||||
echo "const wowneroTestWalletReceiveAddress = '${{ secrets.WOWNERO_TEST_WALLET_RECEIVE_ADDRESS }}';" >> lib/.secrets.g.dart
|
echo "const wowneroTestWalletReceiveAddress = '${{ secrets.WOWNERO_TEST_WALLET_RECEIVE_ADDRESS }}';" >> lib/.secrets.g.dart
|
||||||
|
echo "const zanoTestWalletReceiveAddress = '${{ secrets.ZANO_TEST_WALLET_RECEIVE_ADDRESS }}';" >> lib/.secrets.g.dart
|
||||||
|
echo "const decredTestWalletReceiveAddress = '${{ secrets.DECRED_TEST_WALLET_RECEIVE_ADDRESS }}';" >> lib/.secrets.g.dart
|
||||||
echo "const moneroTestWalletBlockHeight = '${{ secrets.MONERO_TEST_WALLET_BLOCK_HEIGHT }}';" >> lib/.secrets.g.dart
|
echo "const moneroTestWalletBlockHeight = '${{ secrets.MONERO_TEST_WALLET_BLOCK_HEIGHT }}';" >> lib/.secrets.g.dart
|
||||||
# end of test secrets
|
# end of test secrets
|
||||||
echo "const chainflipApiKey = '${{ secrets.CHAINFLIP_API_KEY }}';" >> lib/.secrets.g.dart
|
echo "const chainflipApiKey = '${{ secrets.CHAINFLIP_API_KEY }}';" >> lib/.secrets.g.dart
|
||||||
|
|
|
@ -231,7 +231,7 @@ class SendPageRobot {
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
tester.printToConsole('Auth failed, retrying');
|
tester.printToConsole('Auth failed, retrying');
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
_handleAuthPage();
|
await _handleAuthPage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
|
@ -309,8 +309,7 @@ class SendPageRobot {
|
||||||
final double sliderWidth = state.sliderWidth;
|
final double sliderWidth = state.sliderWidth;
|
||||||
final double threshold = effectiveMaxWidth - sliderWidth - 10;
|
final double threshold = effectiveMaxWidth - sliderWidth - 10;
|
||||||
|
|
||||||
final sliderFinder =
|
final sliderFinder = find.byKey(const ValueKey('standard_slide_button_widget_slider_key'));
|
||||||
find.byKey(const ValueKey('standard_slide_button_widget_slider_container_key'));
|
|
||||||
expect(sliderFinder, findsOneWidget);
|
expect(sliderFinder, findsOneWidget);
|
||||||
|
|
||||||
// Using the center of the container as the drag start.
|
// Using the center of the container as the drag start.
|
||||||
|
|
|
@ -44,73 +44,85 @@ class StandardSlideButtonState extends State<StandardSlideButton> {
|
||||||
? Colors.black.withOpacity(0.5)
|
? Colors.black.withOpacity(0.5)
|
||||||
: Theme.of(context).extension<FilterTheme>()!.buttonColor;
|
: Theme.of(context).extension<FilterTheme>()!.buttonColor;
|
||||||
|
|
||||||
return accessible
|
if (accessible) {
|
||||||
? PrimaryButton(
|
return PrimaryButton(
|
||||||
text: widget.accessibleNavigationModeButtonText,
|
text: widget.accessibleNavigationModeButtonText,
|
||||||
color: Theme.of(context).primaryColor,
|
color: Theme.of(context).primaryColor,
|
||||||
textColor: Colors.white,
|
textColor: Colors.white,
|
||||||
onPressed: () => widget.onSlideComplete())
|
onPressed: widget.onSlideComplete,
|
||||||
: LayoutBuilder(builder: (context, constraints) {
|
);
|
||||||
final double maxWidth = constraints.maxWidth;
|
}
|
||||||
const double sideMargin = 4.0;
|
|
||||||
final double effectiveMaxWidth = maxWidth - 2 * sideMargin;
|
|
||||||
const double sliderWidth = 42.0;
|
|
||||||
|
|
||||||
return Container(
|
return LayoutBuilder(
|
||||||
height: widget.height,
|
builder: (context, constraints) {
|
||||||
decoration: BoxDecoration(
|
final maxWidth = constraints.maxWidth;
|
||||||
borderRadius: BorderRadius.circular(10), color: tileBackgroundColor),
|
sideMargin = 4.0;
|
||||||
child: Stack(
|
effectiveMaxWidth = maxWidth - 2 * sideMargin;
|
||||||
alignment: Alignment.centerLeft,
|
sliderWidth = 42.0;
|
||||||
children: [
|
|
||||||
Center(
|
return Container(
|
||||||
child: Text(widget.buttonText,
|
height: widget.height,
|
||||||
style: TextStyle(
|
decoration: BoxDecoration(
|
||||||
fontSize: 16,
|
borderRadius: BorderRadius.circular(10),
|
||||||
fontFamily: 'Lato',
|
color: tileBackgroundColor,
|
||||||
fontWeight: FontWeight.w600,
|
),
|
||||||
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor))),
|
child: Stack(
|
||||||
Positioned(
|
alignment: Alignment.centerLeft,
|
||||||
left: sideMargin + _dragPosition,
|
children: [
|
||||||
child: GestureDetector(
|
Center(
|
||||||
key: ValueKey('standard_slide_button_widget_slider_key'),
|
child: Text(
|
||||||
onHorizontalDragUpdate: (details) {
|
widget.buttonText,
|
||||||
setState(() {
|
style: TextStyle(
|
||||||
_dragPosition += details.delta.dx;
|
fontSize: 16,
|
||||||
if (_dragPosition < 0) _dragPosition = 0;
|
fontFamily: 'Lato',
|
||||||
if (_dragPosition > effectiveMaxWidth - sliderWidth) {
|
fontWeight: FontWeight.w600,
|
||||||
_dragPosition = effectiveMaxWidth - sliderWidth;
|
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
|
||||||
}
|
),
|
||||||
});
|
),
|
||||||
},
|
|
||||||
onHorizontalDragEnd: (details) {
|
|
||||||
if (_dragPosition >= effectiveMaxWidth - sliderWidth - 10) {
|
|
||||||
widget.onSlideComplete();
|
|
||||||
} else {
|
|
||||||
setState(() => _dragPosition = 0);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
key: ValueKey('standard_slide_button_widget_slider_container_key'),
|
|
||||||
width: sliderWidth,
|
|
||||||
height: widget.height - 8,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(10),
|
|
||||||
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
|
|
||||||
),
|
|
||||||
alignment: Alignment.center,
|
|
||||||
child: Icon(
|
|
||||||
key: ValueKey('standard_slide_button_widget_slider_icon_key'),
|
|
||||||
Icons.arrow_forward,
|
|
||||||
color: widget.currentTheme.type == ThemeType.bright
|
|
||||||
? Theme.of(context).extension<CakeMenuTheme>()!.backgroundColor
|
|
||||||
: Theme.of(context).extension<FilterTheme>()!.buttonColor),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
);
|
Positioned(
|
||||||
});
|
left: sideMargin + _dragPosition,
|
||||||
|
child: GestureDetector(
|
||||||
|
key: ValueKey('standard_slide_button_widget_slider_key'),
|
||||||
|
onHorizontalDragUpdate: (details) {
|
||||||
|
setState(() {
|
||||||
|
_dragPosition += details.delta.dx;
|
||||||
|
if (_dragPosition < 0) _dragPosition = 0;
|
||||||
|
if (_dragPosition > effectiveMaxWidth - sliderWidth) {
|
||||||
|
_dragPosition = effectiveMaxWidth - sliderWidth;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onHorizontalDragEnd: (details) {
|
||||||
|
if (_dragPosition >= effectiveMaxWidth - sliderWidth - 10) {
|
||||||
|
widget.onSlideComplete();
|
||||||
|
} else {
|
||||||
|
setState(() => _dragPosition = 0);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
key: ValueKey('standard_slide_button_widget_slider_container_key'),
|
||||||
|
width: sliderWidth,
|
||||||
|
height: widget.height - 8,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
|
||||||
|
),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Icon(
|
||||||
|
key: ValueKey('standard_slide_button_widget_slider_icon_key'),
|
||||||
|
Icons.arrow_forward,
|
||||||
|
color: widget.currentTheme.type == ThemeType.bright
|
||||||
|
? Theme.of(context).extension<CakeMenuTheme>()!.backgroundColor
|
||||||
|
: Theme.of(context).extension<FilterTheme>()!.buttonColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue