Skip to content

Commit

Permalink
update ADP-2666 e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr Stachyra authored and piotr-iohk committed Mar 15, 2023
1 parent cdbec32 commit 4d72d1a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
1 change: 0 additions & 1 deletion test/e2e/helpers/tx_history.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ def tx_has_mint_or_burn(tx, mint: true, burn: true)
end
end


def tx_validity_interval(tx, invalid_before: before, invalid_hereafter: hereafter)
expect(tx['validity_interval']['invalid_before']).to eq({ 'quantity' => invalid_before, 'unit' => 'slot' })
expect(tx['validity_interval']['invalid_hereafter']).to eq({ 'quantity' => invalid_hereafter, 'unit' => 'slot' })
Expand Down
13 changes: 8 additions & 5 deletions test/e2e/spec/e2e_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@

# 3. [cardano-cli] Submit minting transaction using reference script sending minted tokens to wallet address

wallet_id = '305f19e7a384f89e6f5e36025ff5e9a22d33cd6b'
wallet_id = @target_id
txs = SHELLEY.transactions.list(wallet_id)
expect(txs).to be_correct_and_respond 200

Expand Down Expand Up @@ -110,6 +110,7 @@
tx_deposits(tx_details, deposit_taken: 0, deposit_returned: 0)
tx_withdrawals(tx_details, present: false)
tx_has_mint_or_burn(tx_details, mint: true, burn: false)
expect(tx_details['mint']['tokens'].first['policy_script']['script_type']).to eq 'reference script'
tx_extra_signatures(tx_details, present: true)
tx_script_integrity(tx_details, present: true)
tx_validity_interval_default(tx_details)
Expand Down Expand Up @@ -158,7 +159,7 @@
end

# 3. [cardano-cli] Submit minting transaction using reference script sending minted tokens to wallet address
wallet_id = '305f19e7a384f89e6f5e36025ff5e9a22d33cd6b'
wallet_id = @target_id
txs = SHELLEY.transactions.list(wallet_id)
expect(txs).to be_correct_and_respond 200

Expand Down Expand Up @@ -199,6 +200,7 @@
tx_deposits(tx_details, deposit_taken: 0, deposit_returned: 0)
tx_withdrawals(tx_details, present: false)
tx_has_mint_or_burn(tx_details, mint: true, burn: false)
expect(tx_details['mint']['tokens'].first['policy_script']['script_type']).to eq 'reference script'
tx_extra_signatures(tx_details, present: false)
tx_script_integrity(tx_details, present: false)
tx_validity_interval_default(tx_details)
Expand Down Expand Up @@ -478,6 +480,7 @@ def fingerprint
'asset1arj5nz8zxjuxvut5wqt5q0xw7905hllugahvu7'
end
end

def script_hash
if linux?
'c22560ac64be051102d6d1cfe5b9b82eb6af4f00dd3806e5cd82e837'
Expand All @@ -489,9 +492,9 @@ def script_hash
end
mint_script = 'mintBurn_1.json'
burn_script = 'mintBurn_2.json'
assets = [{ 'policy_script' => {'script_info' => { 'language_version' => 'v1',
'script_hash' => script_hash },
'script_type' => 'plutus'},
assets = [{ 'policy_script' => { 'script_info' => { 'language_version' => 'v1',
'script_hash' => script_hash },
'script_type' => 'plutus' },
'policy_id' => policy_id,
'assets' => [{ 'fingerprint' => fingerprint,
'quantity' => 1,
Expand Down

0 comments on commit 4d72d1a

Please sign in to comment.