Skip to content

Commit

Permalink
Merge pull request #55 from etherspot/PRO-2349
Browse files Browse the repository at this point in the history
Added condition for submit transaction test cases
  • Loading branch information
Jineshdarjee authored May 21, 2024
2 parents eedb152 + d152aac commit 86501fc
Show file tree
Hide file tree
Showing 4 changed files with 112 additions and 24 deletions.
34 changes: 28 additions & 6 deletions test/specs/mainnet/transferringFunds/arbitrum.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1238,8 +1238,14 @@ describe('The PrimeSDK, when transfer a token with arbitrum network on the MainN
} catch (e) {
console.error(e);
const eString = e.toString();
addContext(test, eString);
assert.fail(message.fail_submitTransaction_1)
if (eString === "Error") {
console.warn(message.skip_transaction_error)
addContext(test, message.skip_transaction_error)
test.skip();
} else {
addContext(test, eString);
assert.fail(message.fail_submitTransaction_1);
}
}

try {
Expand Down Expand Up @@ -3457,8 +3463,16 @@ describe('The PrimeSDK, when transfer a token with arbitrum network on the MainN
uoHashes.push(uoHash);
}
} catch (e) {
addContext(test, message.fail_submitTransaction_1)
assert.fail(message.fail_submitTransaction_1)
console.error(e);
const eString = e.toString();
if (eString === "Error") {
console.warn(message.skip_transaction_error)
addContext(test, message.skip_transaction_error)
test.skip();
} else {
addContext(test, eString);
assert.fail(message.fail_submitTransaction_1);
}
}

try {
Expand Down Expand Up @@ -3563,8 +3577,16 @@ describe('The PrimeSDK, when transfer a token with arbitrum network on the MainN
uoHashes.push(uoHash);
}
} catch (e) {
addContext(test, message.fail_submitTransaction_1)
assert.fail(message.fail_submitTransaction_1)
console.error(e);
const eString = e.toString();
if (eString === "Error") {
console.warn(message.skip_transaction_error)
addContext(test, message.skip_transaction_error)
test.skip();
} else {
addContext(test, eString);
assert.fail(message.fail_submitTransaction_1);
}
}

try {
Expand Down
34 changes: 28 additions & 6 deletions test/specs/mainnet/transferringFunds/matic.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1238,8 +1238,14 @@ describe('The PrimeSDK, when transfer a token with matic network on the MainNet'
} catch (e) {
console.error(e);
const eString = e.toString();
addContext(test, eString);
assert.fail(message.fail_submitTransaction_1)
if (eString === "Error") {
console.warn(message.skip_transaction_error)
addContext(test, message.skip_transaction_error)
test.skip();
} else {
addContext(test, eString);
assert.fail(message.fail_submitTransaction_1);
}
}

try {
Expand Down Expand Up @@ -3457,8 +3463,16 @@ describe('The PrimeSDK, when transfer a token with matic network on the MainNet'
uoHashes.push(uoHash);
}
} catch (e) {
addContext(test, message.fail_submitTransaction_1)
assert.fail(message.fail_submitTransaction_1)
console.error(e);
const eString = e.toString();
if (eString === "Error") {
console.warn(message.skip_transaction_error)
addContext(test, message.skip_transaction_error)
test.skip();
} else {
addContext(test, eString);
assert.fail(message.fail_submitTransaction_1);
}
}

try {
Expand Down Expand Up @@ -3563,8 +3577,16 @@ describe('The PrimeSDK, when transfer a token with matic network on the MainNet'
uoHashes.push(uoHash);
}
} catch (e) {
addContext(test, message.fail_submitTransaction_1)
assert.fail(message.fail_submitTransaction_1)
console.error(e);
const eString = e.toString();
if (eString === "Error") {
console.warn(message.skip_transaction_error)
addContext(test, message.skip_transaction_error)
test.skip();
} else {
addContext(test, eString);
assert.fail(message.fail_submitTransaction_1);
}
}

try {
Expand Down
34 changes: 28 additions & 6 deletions test/specs/mainnet/transferringFunds/optimism.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1238,8 +1238,14 @@ describe('The PrimeSDK, when transfer a token with optimism network on the MainN
} catch (e) {
console.error(e);
const eString = e.toString();
addContext(test, eString);
assert.fail(message.fail_submitTransaction_1)
if (eString === "Error") {
console.warn(message.skip_transaction_error)
addContext(test, message.skip_transaction_error)
test.skip();
} else {
addContext(test, eString);
assert.fail(message.fail_submitTransaction_1);
}
}

try {
Expand Down Expand Up @@ -3457,8 +3463,16 @@ describe('The PrimeSDK, when transfer a token with optimism network on the MainN
uoHashes.push(uoHash);
}
} catch (e) {
addContext(test, message.fail_submitTransaction_1)
assert.fail(message.fail_submitTransaction_1)
console.error(e);
const eString = e.toString();
if (eString === "Error") {
console.warn(message.skip_transaction_error)
addContext(test, message.skip_transaction_error)
test.skip();
} else {
addContext(test, eString);
assert.fail(message.fail_submitTransaction_1);
}
}

try {
Expand Down Expand Up @@ -3563,8 +3577,16 @@ describe('The PrimeSDK, when transfer a token with optimism network on the MainN
uoHashes.push(uoHash);
}
} catch (e) {
addContext(test, message.fail_submitTransaction_1)
assert.fail(message.fail_submitTransaction_1)
console.error(e);
const eString = e.toString();
if (eString === "Error") {
console.warn(message.skip_transaction_error)
addContext(test, message.skip_transaction_error)
test.skip();
} else {
addContext(test, eString);
assert.fail(message.fail_submitTransaction_1);
}
}

try {
Expand Down
34 changes: 28 additions & 6 deletions test/specs/mainnet/transferringFunds/xdai.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1238,8 +1238,14 @@ describe('The PrimeSDK, when transfer a token with xdai network on the MainNet',
} catch (e) {
console.error(e);
const eString = e.toString();
addContext(test, eString);
assert.fail(message.fail_submitTransaction_1)
if (eString === "Error") {
console.warn(message.skip_transaction_error)
addContext(test, message.skip_transaction_error)
test.skip();
} else {
addContext(test, eString);
assert.fail(message.fail_submitTransaction_1)
}
}

try {
Expand Down Expand Up @@ -3457,8 +3463,16 @@ describe('The PrimeSDK, when transfer a token with xdai network on the MainNet',
uoHashes.push(uoHash);
}
} catch (e) {
addContext(test, message.fail_submitTransaction_1)
assert.fail(message.fail_submitTransaction_1)
console.error(e);
const eString = e.toString();
if (eString === "Error") {
console.warn(message.skip_transaction_error)
addContext(test, message.skip_transaction_error)
test.skip();
} else {
addContext(test, eString);
assert.fail(message.fail_submitTransaction_1)
}
}

try {
Expand Down Expand Up @@ -3563,8 +3577,16 @@ describe('The PrimeSDK, when transfer a token with xdai network on the MainNet',
uoHashes.push(uoHash);
}
} catch (e) {
addContext(test, message.fail_submitTransaction_1)
assert.fail(message.fail_submitTransaction_1)
console.error(e);
const eString = e.toString();
if (eString === "Error") {
console.warn(message.skip_transaction_error)
addContext(test, message.skip_transaction_error)
test.skip();
} else {
addContext(test, eString);
assert.fail(message.fail_submitTransaction_1)
}
}

try {
Expand Down

0 comments on commit 86501fc

Please sign in to comment.