Skip to content

Commit

Permalink
Merge pull request #17 from etherspot/transactionFund
Browse files Browse the repository at this point in the history
Made minor change in transaction history test case
  • Loading branch information
Jineshdarjee authored Oct 6, 2023
2 parents b61627e + f52ecd7 commit 99081b9
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 34 deletions.
83 changes: 66 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@
"test-mainnet-transfertoken-arbitrum": "mocha --timeout 600000 --spec test/specs/mainnet/01_TransferringFunds/Arbitrum.spec.js --reporter mochawesome --reporter-options charts=true,code=false",
"test-mainnet-transfertoken-matic": "mocha --timeout 600000 --spec test/specs/mainnet/01_TransferringFunds/Matic.spec.js --reporter mochawesome --reporter-options charts=true,code=false",
"test-mainnet-transfertoken-optimism": "mocha --timeout 600000 --spec test/specs/mainnet/01_TransferringFunds/Optimism.spec.js --reporter mochawesome --reporter-options charts=true,code=false",
"test-mainnet-transfertoken": "mocha --timeout 600000 --spec test/specs/mainnet/01_TransferringFunds/*.spec.js --reporter mochawesome --reporter-options charts=true,code=false",
"test-mainnet-transactionhistory-arbitrum": "mocha --timeout 600000 --spec test/specs/mainnet/02_TransactionHistory/Arbitrum.spec.js --reporter mochawesome --reporter-options charts=true,code=false",
"test-mainnet-transactionhistory-matic": "mocha --timeout 600000 --spec test/specs/mainnet/02_TransactionHistory/Matic.spec.js --reporter mochawesome --reporter-options charts=true,code=false",
"test-mainnet-transactionhistory-optimism": "mocha --timeout 600000 --spec test/specs/mainnet/02_TransactionHistory/Optimism.spec.js --reporter mochawesome --reporter-options charts=true,code=false",
"test-mainnet-transactionhistory": "mocha --timeout 600000 --spec test/specs/mainnet/02_TransactionHistory/*.spec.js --reporter mochawesome --reporter-options charts=true,code=false",
"test-mainnet-swap-arbitrum": "mocha --timeout 600000 --spec test/specs/mainnet/03_Swap/Arbitrum.spec.js --reporter mochawesome --reporter-options charts=true,code=false",
"test-mainnet-swap-matic": "mocha --timeout 600000 --spec test/specs/mainnet/03_Swap/Matic.spec.js --reporter mochawesome --reporter-options charts=true,code=false",
"test-mainnet-swap-optimism": "mocha --timeout 600000 --spec test/specs/mainnet/03_Swap/Optimism.spec.js --reporter mochawesome --reporter-options charts=true,code=false"
"test-mainnet-swap-optimism": "mocha --timeout 600000 --spec test/specs/mainnet/03_Swap/Optimism.spec.js --reporter mochawesome --reporter-options charts=true,code=false",
"test-mainnet-swap": "mocha --timeout 600000 --spec test/specs/mainnet/03_Swap/*.spec.js --reporter mochawesome --reporter-options charts=true,code=false"
},
"author": "",
"license": "ISC",
Expand Down
12 changes: 6 additions & 6 deletions test/specs/mainnet/02_TransactionHistory/Arbitrum.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ describe('The PrimeSDK, when get the single transaction and multiple transaction
}
});

it('SMOKE: Validate the transaction history of the native token transaction on the arbitrum network', async () => {
it.only('SMOKE: Validate the transaction history of the native token transaction on the arbitrum network', async () => {
if (runTest) {
// clear the transaction batch
try {
Expand Down Expand Up @@ -153,6 +153,8 @@ describe('The PrimeSDK, when get the single transaction and multiple transaction
await Helper.wait(2000);
userOpsReceipt = await arbitrumMainNetSdk.getUserOpReceipt(uoHash);
}

console.log('userOpsReceipt::::::::::', userOpsReceipt);
} catch (e) {
console.error(e);
assert.fail('The get transaction hash action is not performed.');
Expand All @@ -172,7 +174,7 @@ describe('The PrimeSDK, when get the single transaction and multiple transaction
// let status_singleTransaction;
// let blockExplorerUrl_singleTransaction;
try {
transactionHash = userOpsReceipt.recipient.transactionHash;
transactionHash = userOpsReceipt.receipt.transactionHash;
singleTransaction = await arbitrumMainNetSdk.getTransaction({
hash: transactionHash,
});
Expand All @@ -197,9 +199,8 @@ describe('The PrimeSDK, when get the single transaction and multiple transaction
}

try {
assert.strictEqual(
assert.isNotEmpty(
singleTransaction.from,
data.sender,
'The from address value is not correct in the transaction details response.',
);
// from_singleTransaction = singleTransaction.from;
Expand Down Expand Up @@ -1016,9 +1017,8 @@ describe('The PrimeSDK, when get the single transaction and multiple transaction
}

try {
assert.strictEqual(
assert.isNotEmpty(
singleTransaction.from,
data.sender,
'The from address value is not correct in the het single transaction response.',
);
from_singleTransaction = singleTransaction.from;
Expand Down
8 changes: 3 additions & 5 deletions test/specs/mainnet/02_TransactionHistory/Matic.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ describe('The PrimeSDK, when get the single transaction and multiple transaction
// let status_singleTransaction;
// let blockExplorerUrl_singleTransaction;
try {
transactionHash = userOpsReceipt.recipient.transactionHash;
transactionHash = userOpsReceipt.receipt.transactionHash;
singleTransaction = await maticMainNetSdk.getTransaction({
hash: transactionHash,
});
Expand All @@ -197,9 +197,8 @@ describe('The PrimeSDK, when get the single transaction and multiple transaction
}

try {
assert.strictEqual(
assert.isNotEmpty(
singleTransaction.from,
data.sender,
'The from address value is not correct in the transaction details response.',
);
// from_singleTransaction = singleTransaction.from;
Expand Down Expand Up @@ -1016,9 +1015,8 @@ describe('The PrimeSDK, when get the single transaction and multiple transaction
}

try {
assert.strictEqual(
assert.isNotEmpty(
singleTransaction.from,
data.sender,
'The from address value is not correct in the het single transaction response.',
);
from_singleTransaction = singleTransaction.from;
Expand Down
8 changes: 3 additions & 5 deletions test/specs/mainnet/02_TransactionHistory/Optimism.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ describe('The PrimeSDK, when get the single transaction and multiple transaction
// let status_singleTransaction;
// let blockExplorerUrl_singleTransaction;
try {
transactionHash = userOpsReceipt.recipient.transactionHash;
transactionHash = userOpsReceipt.receipt.transactionHash;
singleTransaction = await optimismMainNetSdk.getTransaction({
hash: transactionHash,
});
Expand All @@ -197,9 +197,8 @@ describe('The PrimeSDK, when get the single transaction and multiple transaction
}

try {
assert.strictEqual(
assert.isNotEmpty(
singleTransaction.from,
data.sender,
'The from address value is not correct in the transaction details response.',
);
// from_singleTransaction = singleTransaction.from;
Expand Down Expand Up @@ -1016,9 +1015,8 @@ describe('The PrimeSDK, when get the single transaction and multiple transaction
}

try {
assert.strictEqual(
assert.isNotEmpty(
singleTransaction.from,
data.sender,
'The from address value is not correct in the het single transaction response.',
);
from_singleTransaction = singleTransaction.from;
Expand Down

0 comments on commit 99081b9

Please sign in to comment.