@@ -707,6 +707,7 @@ class AppViewModel @Inject constructor(
707707 showAddressValidationError(
708708 titleRes = R .string.other__scan_err_decoding,
709709 descriptionRes = R .string.other__scan__error__generic,
710+ testTag = " InvalidAddressToast" ,
710711 )
711712 return @withContext
712713 }
@@ -723,6 +724,7 @@ class AppViewModel @Inject constructor(
723724 showAddressValidationError(
724725 titleRes = R .string.other__scan_err_decoding,
725726 descriptionRes = R .string.other__scan__error__expired,
727+ testTag = " ExpiredLightningToast" ,
726728 )
727729 return
728730 }
@@ -735,6 +737,7 @@ class AppViewModel @Inject constructor(
735737 titleRes = R .string.other__pay_insufficient_spending,
736738 descriptionRes = R .string.other__pay_insufficient_spending_amount_description,
737739 descriptionArgs = mapOf (" amount" to shortfall.toString()),
740+ testTag = " InsufficientSpendingToast" ,
738741 )
739742 return
740743 }
@@ -750,6 +753,7 @@ class AppViewModel @Inject constructor(
750753 showAddressValidationError(
751754 titleRes = R .string.other__scan_err_decoding,
752755 descriptionRes = R .string.other__scan__error__generic,
756+ testTag = " InvalidAddressToast" ,
753757 )
754758 return
755759 }
@@ -760,6 +764,7 @@ class AppViewModel @Inject constructor(
760764 showAddressValidationError(
761765 titleRes = R .string.other__pay_insufficient_savings,
762766 descriptionRes = R .string.other__pay_insufficient_savings_description,
767+ testTag = " InsufficientSavingsToast" ,
763768 )
764769 return
765770 }
@@ -770,6 +775,7 @@ class AppViewModel @Inject constructor(
770775 titleRes = R .string.other__pay_insufficient_savings,
771776 descriptionRes = R .string.other__pay_insufficient_savings_amount_description,
772777 descriptionArgs = mapOf (" amount" to shortfall.toString()),
778+ testTag = " InsufficientSavingsToast" ,
773779 )
774780 return
775781 }
@@ -781,6 +787,7 @@ class AppViewModel @Inject constructor(
781787 @StringRes titleRes : Int ,
782788 @StringRes descriptionRes : Int ,
783789 descriptionArgs : Map <String , String > = emptyMap(),
790+ testTag : String? = null,
784791 ) {
785792 _sendUiState .update { it.copy(isAddressInputValid = false ) }
786793 var description = context.getString(descriptionRes)
@@ -791,6 +798,7 @@ class AppViewModel @Inject constructor(
791798 type = Toast .ToastType .ERROR ,
792799 title = context.getString(titleRes),
793800 description = description,
801+ testTag = testTag,
794802 )
795803 }
796804
@@ -1001,6 +1009,7 @@ class AppViewModel @Inject constructor(
10011009 type = Toast .ToastType .ERROR ,
10021010 title = context.getString(R .string.other__scan_err_decoding),
10031011 description = context.getString(R .string.other__scan__error__generic),
1012+ testTag = " InvalidAddressToast" ,
10041013 )
10051014 return
10061015 }
@@ -1064,6 +1073,7 @@ class AppViewModel @Inject constructor(
10641073 type = Toast .ToastType .ERROR ,
10651074 title = context.getString(R .string.other__pay_insufficient_savings),
10661075 description = context.getString(R .string.other__pay_insufficient_savings_description),
1076+ testTag = " InsufficientSavingsToast" ,
10671077 )
10681078 return
10691079 }
@@ -1076,6 +1086,7 @@ class AppViewModel @Inject constructor(
10761086 title = context.getString(R .string.other__pay_insufficient_savings),
10771087 description = context.getString(R .string.other__pay_insufficient_savings_amount_description)
10781088 .replace(" {amount}" , shortfall.toString()),
1089+ testTag = " InsufficientSavingsToast" ,
10791090 )
10801091 return
10811092 }
@@ -1101,6 +1112,7 @@ class AppViewModel @Inject constructor(
11011112 type = Toast .ToastType .ERROR ,
11021113 title = context.getString(R .string.other__scan_err_decoding),
11031114 description = context.getString(R .string.other__scan__error__expired),
1115+ testTag = " ExpiredLightningToast" ,
11041116 )
11051117 return
11061118 }
@@ -1116,6 +1128,7 @@ class AppViewModel @Inject constructor(
11161128 title = context.getString(R .string.other__pay_insufficient_spending),
11171129 description = context.getString(R .string.other__pay_insufficient_spending_amount_description)
11181130 .replace(" {amount}" , shortfall.toString()),
1131+ testTag = " InsufficientSpendingToast" ,
11191132 )
11201133 return
11211134 }
0 commit comments