@@ -25,6 +25,11 @@ test('should be able to maintain state when returning from transaction modal whe
2525 { coin : 'SOL' , value : 'HN7cABqLq46Es1jh92dQQisAq662SmxELLLsHHe4YWrH' } ,
2626 { coin : 'ETH' , value : '0xbec1C7C11F2Fa9AB24b9E49122D26e721766DAF6' } ,
2727 { coin : 'BTC' , value : '1PzAJcFtEiXo9UGtRU6iqXQKj8NXtcC7DE' } ,
28+ {
29+ coin : 'SUI' ,
30+ // eslint-disable-next-line no-restricted-syntax -- SUI addresses are 64 hex chars, not private keys
31+ value : '0x1231231231231231231231231231231231231231231231231231231231231231' ,
32+ } ,
2833 ] ,
2934 contentHash : 'ipfs://bafybeico3uuyj3vphxpvbowchdwjlrlrh62awxscrnii7w7flu5z6fk77y' ,
3035 abi : await encodeAbi ( { encodeAs : 'json' , data : dummyABI } ) ,
@@ -51,6 +56,10 @@ test('should be able to maintain state when returning from transaction modal whe
5156 await expect ( recordsPage . getRecordValue ( 'address' , 'BTC' ) ) . toHaveText (
5257 '1PzAJcFtEiXo9UGtRU6iqXQKj8NXtcC7DE' ,
5358 )
59+ await expect ( recordsPage . getRecordValue ( 'address' , 'SUI' ) ) . toHaveText (
60+ // eslint-disable-next-line no-restricted-syntax -- SUI addresses are 64 hex chars, not private keys
61+ '0x1231231231231231231231231231231231231231231231231231231231231231' ,
62+ )
5463 await expect ( recordsPage . getRecordValue ( 'contentHash' ) ) . toHaveText (
5564 'ipfs://bafybeico3uuyj3vphxpvbowchdwjlrlrh62awxscrnii7w7flu5z6fk77y' ,
5665 )
@@ -71,6 +80,10 @@ test('should be able to maintain state when returning from transaction modal whe
7180 await expect ( await advancedEditor . recordInput ( 'address' , 'BTC' ) ) . toHaveValue (
7281 '1PzAJcFtEiXo9UGtRU6iqXQKj8NXtcC7DE' ,
7382 )
83+ await expect ( await advancedEditor . recordInput ( 'address' , 'SUI' ) ) . toHaveValue (
84+ // eslint-disable-next-line no-restricted-syntax -- SUI addresses are 64 hex chars, not private keys
85+ '0x1231231231231231231231231231231231231231231231231231231231231231' ,
86+ )
7487 await expect ( await advancedEditor . recordInput ( 'contentHash' ) ) . toHaveValue (
7588 'ipfs://bafybeico3uuyj3vphxpvbowchdwjlrlrh62awxscrnii7w7flu5z6fk77y' ,
7689 )
@@ -79,34 +92,37 @@ test('should be able to maintain state when returning from transaction modal whe
7992 await advancedEditor . recordClearButton ( 'text' , 'text' ) . then ( ( button ) => button . click ( ) )
8093 await advancedEditor . recordClearButton ( 'address' , 'SOL' ) . then ( ( button ) => button . click ( ) )
8194 await advancedEditor . recordClearButton ( 'address' , 'ETH' ) . then ( ( button ) => button . click ( ) )
95+ await advancedEditor . recordClearButton ( 'address' , 'SUI' ) . then ( ( button ) => button . click ( ) )
8296 await advancedEditor . recordInput ( 'contentHash' ) . then ( ( input ) => input . fill ( '' ) )
8397 await advancedEditor . recordInput ( 'abi' ) . then ( ( input ) => input . fill ( '' ) )
8498
8599 await advancedEditor . saveButton . click ( )
86100
87101 // Validate transaction display item
88- await expect ( transactionModal . displayItem ( 'update' ) ) . toHaveText ( '5 records' )
102+ await expect ( transactionModal . displayItem ( 'update' ) ) . toHaveText ( '6 records' )
89103
90104 await transactionModal . backButton . click ( )
91105
92106 // Validate inputs have been rebuilt correctly
93107 await expect ( await advancedEditor . recordComponent ( 'text' , 'text' ) ) . toHaveCount ( 0 )
94108 await expect ( await advancedEditor . recordComponent ( 'address' , 'SOL' ) ) . toHaveCount ( 0 )
95109 await expect ( await advancedEditor . recordComponent ( 'address' , 'ETH' ) ) . toHaveCount ( 0 )
110+ await expect ( await advancedEditor . recordComponent ( 'address' , 'SUI' ) ) . toHaveCount ( 0 )
96111 await expect ( await advancedEditor . recordInput ( 'contentHash' ) ) . toHaveValue ( '' )
97112 await expect ( await advancedEditor . recordInput ( 'abi' ) ) . toHaveValue ( '' )
98113
99114 await advancedEditor . saveButton . click ( )
100115
101116 // Validate transaction display item
102- await expect ( transactionModal . displayItem ( 'update' ) ) . toHaveText ( '5 records' )
117+ await expect ( transactionModal . displayItem ( 'update' ) ) . toHaveText ( '6 records' )
103118
104119 await transactionModal . autoComplete ( )
105120
106121 // Validate change in records
107122 await expect ( recordsPage . getRecordButton ( 'text' , 'text' ) ) . toHaveCount ( 0 )
108123 await expect ( recordsPage . getRecordButton ( 'address' , 'SOL' ) ) . toHaveCount ( 0 )
109124 await expect ( recordsPage . getRecordButton ( 'address' , 'ETH' ) ) . toHaveCount ( 0 )
125+ await expect ( recordsPage . getRecordButton ( 'address' , 'SUI' ) ) . toHaveCount ( 0 )
110126 await expect ( recordsPage . getRecordButton ( 'contentHash' ) ) . toHaveCount ( 0 )
111127 await expect ( recordsPage . getRecordButton ( 'abi' ) ) . toHaveCount ( 0 )
112128} )
0 commit comments