Skip to content

Commit

Permalink
[ADP-3224] Change 'token' to 'assetName' in E2E expectations (#4343)
Browse files Browse the repository at this point in the history
- [x] changed `token` into `assetName` in the E2E expectations in some
error messages
- [x] add `cardano-cli` to the E2E nix shell to allow running tests
locally

Fixes
https://github.com/cardano-foundation/cardano-wallet/actions/runs/7208803096/job/19638494587#step:12:926

ADP-3224
  • Loading branch information
paolino authored Dec 14, 2023
2 parents 023364a + e9f0d02 commit b8e1f90
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion test/e2e/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ task :setup, [:env, :branch, :skip_configs] do |_task, args|
Rake::Task[:secrets_decode].invoke
end

task :run_on, [:env, :sync_strategy, :skip_configs, :branch] do |_task, args|
task :run_on, [:env, :branch, :sync_strategy, :skip_configs] do |_task, args|
log '>> Setting up env and running tests...'
log "TESTS_E2E_STATEDIR=#{STATE}"
env = args[:env]
Expand Down
1 change: 1 addition & 0 deletions test/e2e/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ in pkgs.mkShell {
] ++ pkgs.lib.optionals bins [
cardanoWallet.cardano-wallet
cardanoWallet.cardano-node
cardanoWallet.cardano-cli
];
CARDANO_NODE_CONFIGS = pkgs.cardano-node-deployments;
}
10 changes: 5 additions & 5 deletions test/e2e/spec/e2e_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2077,7 +2077,7 @@ def script_hash
burn)
expect(tx_constructed).to be_correct_and_respond 403
expect(tx_constructed['code'].to_s).to eq 'not_enough_money'
expect(tx_constructed['message'].to_s).to include "token: #{asset_name('AmazingNFTIdontHave')}"
expect(tx_constructed['message'].to_s).to include "assetName: #{asset_name('AmazingNFTIdontHave')}"
expect(tx_constructed['message'].to_s).to include 'quantity: 1'
end

Expand Down Expand Up @@ -2115,7 +2115,7 @@ def script_hash

expect(tx_constructed).to be_correct_and_respond 403
expect(tx_constructed['code'].to_s).to eq 'not_enough_money'
expect(tx_constructed['message'].to_s).to include "token: #{asset_name('MintIt')}"
expect(tx_constructed['message'].to_s).to include "assetName: #{asset_name('MintIt')}"
expect(tx_constructed['message'].to_s).to include 'quantity: 1000'

# - correct policy_script but too much
Expand All @@ -2129,7 +2129,7 @@ def script_hash

expect(tx_constructed).to be_correct_and_respond 403
expect(tx_constructed['code'].to_s).to eq 'not_enough_money'
expect(tx_constructed['message'].to_s).to include "token: #{asset_name('MintIt')}"
expect(tx_constructed['message'].to_s).to include "assetName: #{asset_name('MintIt')}"
expect(tx_constructed['message'].to_s).to include 'quantity: 22'

# Burn it:
Expand Down Expand Up @@ -2200,7 +2200,7 @@ def script_hash
burn)
expect(tx_constructed).to be_correct_and_respond 403
expect(tx_constructed['code'].to_s).to eq 'not_enough_money'
expect(tx_constructed['message'].to_s).to include "token: #{assets_name}"
expect(tx_constructed['message'].to_s).to include "assetName: #{assets_name}"
expect(tx_constructed['message'].to_s).to include "quantity: #{assets_quantity}"

# Send them back to src wallet:
Expand Down Expand Up @@ -2274,7 +2274,7 @@ def script_hash
mint)
expect(tx_constructed).to be_correct_and_respond code
expect(tx_constructed['code'].to_s).to eq message
# expect(tx_constructed['message'].to_s).to include "token: #{asset_name('AmazingNFTIdontHave')}"
# expect(tx_constructed['message'].to_s).to include "assetName: #{asset_name('AmazingNFTIdontHave')}"
# expect(tx_constructed['message'].to_s).to include "quantity: 1"
end

Expand Down

0 comments on commit b8e1f90

Please sign in to comment.