Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: create autotest for Accounts tc1854 #191

Conversation

amelnytskyi
Copy link
Contributor

What ❔

  • Added autotest for Accounts tc1854 [Account API] /api?module=account&action=txlistinternal&txhash= response returns elements

Why ❔

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.

@amelnytskyi amelnytskyi self-assigned this Feb 27, 2024
@amelnytskyi amelnytskyi added the automation writing/fixing/maintaining auto-tests/e2e-tests label Feb 27, 2024
Copy link

github-actions bot commented Feb 27, 2024

API E2E Test Results

206 tests   - 1   206 ✅  - 1   27s ⏱️ ±0s
 14 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit cc0f288. ± Comparison against base commit 5467a5e.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Feb 27, 2024

Visit the preview URL for this PR (updated for commit cc0f288):

(expires Wed, 20 Mar 2024 08:59:26 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: e508f9012944951194447cb8885950b451a24403

Copy link

github-actions bot commented Feb 27, 2024

Unit Test Results

    4 files  ±0    263 suites  ±0   14m 14s ⏱️ +14s
2 079 tests  - 3  2 078 ✅  - 3  1 💤 ±0  0 ❌ ±0 
2 284 runs   - 6  2 283 ✅  - 6  1 💤 ±0  0 ❌ ±0 

Results for commit cc0f288. ± Comparison against base commit 5467a5e.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@pcheremu pcheremu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test itself looks good. Allure doc was also updated. As we have changes in packages/integration-tests/src/playbook/deploy/use-multitransferETH.ts we will need one more @abilevych review.

@pcheremu pcheremu requested a review from abilevych February 28, 2024 15:25
@@ -66,6 +66,9 @@ export default async function callMultiTransferETH(hre: HardhatRuntimeEnvironmen
);
if (transferFromContract) {
console.log(`Contract transfer to us!`);
const transferReceipt = await transferFromContract.wait(1);
console.log(`Contract transfer transaction hash: ${transferReceipt.transactionHash}`);
await fs.writeFile(Buffer.txMultiTransferCall, transferReceipt.transactionHash);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably, It makes sense to put the 71st line to the bottom. There are presented other lines related to the writing buffer files

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in the latest commit

@amelnytskyi
Copy link
Contributor Author

@abilevych requested changes added - could you please review again?
Thanks in advance

console.log(`Contract transfer to us!`);
} else {
console.error(`Contract said something unexpected: ${transferFromContract}`);
async function makeMultiTransfer() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the purpose of wrapping by function over const transferFromContract?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm using the same approach we have for makeTransfer() in this use-multitransferETH.ts file - wrapped by function and returned tx hash of multitransfer to call it and write a result (hash) to the file in the end of use-multitransferETH.ts file

Moved writeFile for multiTransfer down to other writeFile calls
@amelnytskyi amelnytskyi force-pushed the QA-690-Create-automation-test-for-Accounts-tc1854 branch from da31ea0 to 4e86100 Compare March 11, 2024 13:27
Aligned test with integration-test-signed branch
Fixed failing tc272 by changing deployed bytecode value
Replacing wait(1) with waitFinalize()
@amelnytskyi
Copy link
Contributor Author

@abilevych PR is fixed and ready for review

@abilevych
Copy link
Contributor

@amelnytskyi please request my review once you resolve conflicts.

@amelnytskyi
Copy link
Contributor Author

@abilevych conflict resolved - ready for review

@amelnytskyi amelnytskyi merged commit 1fd5261 into integration-tests-signed Mar 20, 2024
36 checks passed
@amelnytskyi amelnytskyi deleted the QA-690-Create-automation-test-for-Accounts-tc1854 branch March 20, 2024 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation writing/fixing/maintaining auto-tests/e2e-tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants