redeemSuperInvite method
Implementation
Future<void> redeemSuperInvite(
String token, {
FutureOr<void> Function()? dialogTest,
}) async {
await find.byKey(Keys.mainNav).should(findsOneWidget);
await navigateTo([
MainNavKeys.quickJump,
MainNavKeys.quickJump,
QuickJumpKeys.settings,
SettingsMenu.superInvitations,
]);
final tokenTxt = find.byKey(RedeemToken.redeemTokenField);
await tokenTxt.should(findsOneWidget);
await tokenTxt.enterTextWithoutReplace(token);
final submitBtn = find.byKey(RedeemToken.redeemTokenSubmit);
await submitBtn.should(findsOneWidget);
await submitBtn.tap();
// opens the dialog we need to confirm now
if (dialogTest != null) {
await dialogTest();
}
final confirmBtn = find.byKey(redeemConfirmKey);
await confirmBtn.should(findsOneWidget);
await confirmBtn.tap();
}