@@ -31,30 +31,28 @@ describe('Test sending transactions', () => {
3131 } )
3232 } )
3333
34- // Skipped for now, will only work reliably once the the Cypress tests run without mining loop
34+ //
3535 it ( 'Open up transaction details' , ( ) => {
3636 cy . selectWallet ( "Test Hot Wallet 1" )
3737 cy . get ( '#btn_transactions' ) . click ( )
38- // Click on the txid in the first row
39- cy . get ( 'tbody.tx-tbody' ) . find ( 'tr' ) . eq ( 0 ) . find ( '#column-txid' ) . find ( '.explorer-link' ) . click ( )
40- cy . get ( '.tx-data-info' ) . contains ( 'Input #0' )
41- cy . get ( '.tx-data-info' ) . contains ( 'Transaction id:' )
42- cy . get ( '.tx-data-info' ) . contains ( 'Output index:' ) // Not sure whether it is always 1 - output ordering is random in Core ...
43- cy . get ( '.tx-data-info' ) . contains ( 'Address #0' )
38+ // Click on the txid of the (hopefully) only send tx
39+ cy . get ( 'tbody.tx-tbody' ) . find ( 'tr' ) . find ( '.svg-send' ) . parent ( ) . parent ( ) . parent ( ) . find ( '#column-txid' ) . find ( '.explorer-link' ) . click ( )
40+ // Input
4441 cy . get ( '.tx-data-info' ) . contains ( 'Value: 20 tBTC' )
45- cy . get ( '.tx-data-info' ) . contains ( 'Output #0' )
46- cy . get ( '.tx-data-info' ) . contains ( 'Burn address' )
47- cy . get ( '.tx-data-info' ) . contains ( 'Value: 19.9999989 tBTC' ) // Fees should always be the same
42+ // Output
43+ cy . get ( '.tx-data-info' ) . contains ( / V a l u e : \s 1 9 \. 9 9 9 9 \d { 3 } / ) // The amount from the raw tx has 7 decimals, fees change apparently
4844 cy . get ( '#page_overlay_popup_cancel_button' ) . click ( )
4945 // Change to sats and check amounts and units
5046 cy . get ( '[href="/settings/"]' ) . click ( )
5147 cy . get ( '[name="unit"]' ) . select ( 'sats' )
5248 cy . contains ( 'Save' ) . click ( )
5349 cy . selectWallet ( "Test Hot Wallet 1" )
5450 cy . get ( '#btn_transactions' ) . click ( )
55- cy . get ( 'tbody.tx-tbody' ) . find ( 'tr' ) . eq ( 0 ) . find ( '#column-txid' ) . find ( '.explorer-link' ) . click ( )
51+ cy . get ( 'tbody.tx-tbody' ) . find ( 'tr' ) . find ( '.svg-send' ) . parent ( ) . parent ( ) . parent ( ) . find ( '#column-txid' ) . find ( '.explorer-link' ) . click ( )
52+ // Input
5653 cy . get ( '.tx-data-info' ) . contains ( 'Value: 2,000,000,000 tsat' )
57- cy . get ( '.tx-data-info' ) . contains ( 'Value: 1,999,999,890 tsat' )
54+ // Output
55+ cy . get ( '.tx-data-info' ) . contains ( / V a l u e : \s 1 , 9 9 9 , 9 9 \d , \d { 3 } \s t s a t / ) // Fees change apparently
5856 cy . get ( '#page_overlay_popup_cancel_button' ) . click ( )
5957 // Change back to btc
6058 cy . get ( '[href="/settings/"]' ) . click ( )
0 commit comments