File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -150,6 +150,15 @@ const metamask = {
150150 // note: this is required for fast execution of e2e tests to avoid flakiness
151151 // otherwise popup may not be detected properly and not closed
152152 await playwright . metamaskWindow ( ) . waitForTimeout ( 1000 ) ;
153+
154+ let smartTxOptInBtn =
155+ '.mm-smart-transactions-opt-in-modal .mm-box--rounded-pill' ;
156+ if (
157+ ( await playwright . metamaskWindow ( ) . locator ( smartTxOptInBtn ) . count ( ) ) > 0
158+ ) {
159+ await playwright . waitAndClick ( smartTxOptInBtn ) ;
160+ }
161+
153162 if (
154163 ( await playwright
155164 . metamaskWindow ( )
@@ -1535,10 +1544,6 @@ const metamask = {
15351544 await module . exports . importAccount ( secretWordsOrPrivateKey ) ;
15361545 }
15371546
1538- // Enhanced Transaction Protection
1539- await playwright . waitAndClick (
1540- mainPageElements . accountModal . primaryButton ,
1541- ) ;
15421547 await setupSettings ( enableAdvancedSettings , enableExperimentalSettings ) ;
15431548
15441549 await module . exports . changeNetwork ( network ) ;
You can’t perform that action at this time.
0 commit comments