@@ -24,9 +24,6 @@ class TestDapp {
24
24
private readonly confirmScrollToBottomButtonRedesign =
25
25
'.confirm-scroll-to-bottom__button' ;
26
26
27
- private readonly confirmSignatureButton =
28
- '[data-testid="page-container-footer-next"]' ;
29
-
30
27
private readonly confirmSignatureButtonRedesign =
31
28
'[data-testid="confirm-footer-button"]' ;
32
29
@@ -80,11 +77,6 @@ class TestDapp {
80
77
81
78
private readonly personalSignResult = '#personalSignVerifyECRecoverResult' ;
82
79
83
- private readonly personalSignSignatureRequestMessage = {
84
- text : 'personal_sign' ,
85
- tag : 'div' ,
86
- } ;
87
-
88
80
private readonly personalSignVerifyButton = '#personalSignVerify' ;
89
81
90
82
private personalSignSigUtilResultSelector =
@@ -96,11 +88,6 @@ class TestDapp {
96
88
97
89
private readonly signPermitResult = '#signPermitResult' ;
98
90
99
- private readonly signPermitSignatureRequestMessage = {
100
- text : 'Permit' ,
101
- tag : 'p' ,
102
- } ;
103
-
104
91
private readonly signPermitVerifyButton = '#signPermitVerify' ;
105
92
106
93
private readonly signPermitVerifyResult = '#signPermitVerifyResult' ;
@@ -115,11 +102,6 @@ class TestDapp {
115
102
116
103
private readonly signTypedDataResult = '#signTypedDataResult' ;
117
104
118
- private readonly signTypedDataSignatureRequestMessage = {
119
- text : 'Hi, Alice!' ,
120
- tag : 'div' ,
121
- } ;
122
-
123
105
private readonly signTypedDataV3Button = '#signTypedDataV3' ;
124
106
125
107
private readonly signTypedDataV3Result = '#signTypedDataV3Result' ;
@@ -704,9 +686,8 @@ class TestDapp {
704
686
console . log ( 'Sign message with personal sign' ) ;
705
687
await this . clickPersonalSign ( ) ;
706
688
await this . driver . switchToWindowWithTitle ( WINDOW_TITLES . Dialog ) ;
707
- await this . driver . waitForSelector ( this . personalSignSignatureRequestMessage ) ;
708
689
await this . driver . clickElementAndWaitForWindowToClose (
709
- this . confirmSignatureButton ,
690
+ this . confirmSignatureButtonRedesign ,
710
691
) ;
711
692
}
712
693
@@ -717,9 +698,8 @@ class TestDapp {
717
698
console . log ( 'Sign message with signPermit' ) ;
718
699
await this . clickPermit ( ) ;
719
700
await this . driver . switchToWindowWithTitle ( WINDOW_TITLES . Dialog ) ;
720
- await this . driver . waitForSelector ( this . signPermitSignatureRequestMessage ) ;
721
701
await this . driver . clickElementAndWaitForWindowToClose (
722
- this . confirmSignatureButton ,
702
+ this . confirmSignatureButtonRedesign ,
723
703
) ;
724
704
}
725
705
@@ -730,11 +710,8 @@ class TestDapp {
730
710
console . log ( 'Sign message with signTypedData' ) ;
731
711
await this . clickSignTypedData ( ) ;
732
712
await this . driver . switchToWindowWithTitle ( WINDOW_TITLES . Dialog ) ;
733
- await this . driver . waitForSelector (
734
- this . signTypedDataSignatureRequestMessage ,
735
- ) ;
736
713
await this . driver . clickElementAndWaitForWindowToClose (
737
- this . confirmSignatureButton ,
714
+ this . confirmSignatureButtonRedesign ,
738
715
) ;
739
716
}
740
717
@@ -750,39 +727,44 @@ class TestDapp {
750
727
) ;
751
728
await this . driver . clickElementSafe ( this . confirmDialogScrollButton , 200 ) ;
752
729
await this . driver . clickElementAndWaitForWindowToClose (
753
- this . confirmSignatureButton ,
730
+ this . confirmSignatureButtonRedesign ,
731
+ ) ;
732
+ }
733
+
734
+ async signTypedDataV3Redesign ( ) {
735
+ await this . clickSignTypedDatav3 ( ) ;
736
+ await this . driver . switchToWindowWithTitle ( WINDOW_TITLES . Dialog ) ;
737
+ await this . driver . waitForSelector (
738
+ this . signTypedDataV3V4SignatureRequestMessageRedesign ,
739
+ ) ;
740
+ await this . driver . clickElementSafe (
741
+ this . confirmScrollToBottomButtonRedesign ,
742
+ 200 ,
743
+ ) ;
744
+ await this . driver . clickElementAndWaitForWindowToClose (
745
+ this . confirmSignatureButtonRedesign ,
754
746
) ;
755
747
}
756
748
757
749
/**
758
750
* Sign a message with the signTypedDataV4 method.
759
751
*
760
- * @param confirmationRedesign - Indicates whether the redesigned signature confirmation flow is used. Defaults to false.
761
752
*/
762
- async signTypedDataV4 ( confirmationRedesign : boolean = false ) {
753
+ async signTypedDataV4 ( ) {
763
754
console . log ( 'Sign message with signTypedDataV4' ) ;
764
755
await this . clickSignTypedDatav4 ( ) ;
765
756
await this . driver . switchToWindowWithTitle ( WINDOW_TITLES . Dialog ) ;
766
- if ( confirmationRedesign ) {
767
- await this . driver . waitForSelector (
768
- this . signTypedDataV3V4SignatureRequestMessageRedesign ,
769
- ) ;
770
- await this . driver . clickElementSafe (
771
- this . confirmScrollToBottomButtonRedesign ,
772
- 200 ,
773
- ) ;
774
- await this . driver . clickElementAndWaitForWindowToClose (
775
- this . confirmSignatureButtonRedesign ,
776
- ) ;
777
- } else {
778
- await this . driver . waitForSelector (
779
- this . signTypedDataV3V4SignatureRequestMessage ,
780
- ) ;
781
- await this . driver . clickElementSafe ( this . confirmDialogScrollButton , 200 ) ;
782
- await this . driver . clickElementAndWaitForWindowToClose (
783
- this . confirmSignatureButton ,
784
- ) ;
785
- }
757
+
758
+ await this . driver . waitForSelector (
759
+ this . signTypedDataV3V4SignatureRequestMessageRedesign ,
760
+ ) ;
761
+ await this . driver . clickElementSafe (
762
+ this . confirmScrollToBottomButtonRedesign ,
763
+ 200 ,
764
+ ) ;
765
+ await this . driver . clickElementAndWaitForWindowToClose (
766
+ this . confirmSignatureButtonRedesign ,
767
+ ) ;
786
768
}
787
769
788
770
async pasteIntoEip747ContractAddressInput ( ) {
0 commit comments