Skip to content

Commit

Permalink
append content of readme document
Browse files Browse the repository at this point in the history
  • Loading branch information
xu11 committed Jul 5, 2024
1 parent 6c68437 commit 1c99099
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
20 changes: 11 additions & 9 deletions packages/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
2.Install dependencies--yarn install
3.Run the package:e2e command
4.Run start to complete 100% synchronization
5.Run the test:e2e command (You can click neuron icon manually if Launch Neuron is slow)
5.Run the test:e2e command (You can click neuron icon manually if Launch Neuron is slow,there's also a chance it won't start)

*Regression use cases are divided into ordinary wallets and hardware wallets, and the two chunks need to be operated separately, especially hardware wallets, which involve manually synchronizing the operation of hardware wallets.
【ordinary wallets】的test cases
Expand All @@ -20,29 +20,31 @@

7.asset account receive success

8.asset account send success(Pre-operation - Ensure that the first account of the asset account has money)
8.asset account send success(Pre-operation - 1.Ensure that the first account of the asset account has money2.sync progress is 100% 3.last operation status is finished.)

9.claim in customized page success

*MacOs menu bar operation involves interaction with the system, the response time is slightly longer. If there is no response for a long time, you can manually click, and the process will automatically continue
*MacOs menu bar operation involves interaction with the system, kernel_task costs CPU, the response time is longer and longer. If there is no response for a long time, you can manually click, and the process will automatically continue
10.single sign success
11.multisigSign success
12.offlineSign success(Pre-operation-export transaction)
13.broadcastTransaction success(Pre-operation-sign and export transaction)

*Prerequisites for hardware wallet cases run-through:
1.Manually switch the wallet from the ordinary wallet to the hardware wallet
2.Comment out create ordinary wallet case
3.ledger open the ckb application

【hardware wallets】
testcases:
1.create hard wallet success
2.receive success
3.send success

*Prerequisites for cases run-through:
1.Manually switch the wallet from the ordinary wallet to the hardware wallet
2.Comment out create ordinary wallet to case
3.ledger open the ckb application

*When the neuron program is throw exception like (database lock/output dead/network abnormal/garbage data generated when the program is abnormal, etc.), the automation will automatically exit.
![img.png](img.png)

*When the neuron program is throw exception like (database lock/output dead/network abnormal/garbage data generated when the program is abnormal, etc.), the automation will automatically exit.
High frequency problem like:
1.{"code":-301,"message":"TransactionFailedToResolve: Resolve failed Unknown(OutPoint(0xa1d1f05be1dd1a41a1eaff54000e07da7c0df86acfe8dcab6929a65229c1529001000000))","data":"Resolve(Unknown(OutPoint(0xa1d1f05be1dd1a41a1eaff54000e07da7c0df86acfe8dcab6929a65229c1529001000000)))"}
2.amend Success,but pop up RBFRejected(\"Tx's current fee is 5515, expect it to >= 6432 to replace old txs\")"} Error: {"code":-1111,"message":"PoolRejectedRBF: RBF rejected: Tx's current fee is 5515, expect it to >= 6432 to replace old txs","data":"RBFRejected(\"Tx's current fee is 5515, expect it to >= 6432 to replace old txs\")"}

22 changes: 10 additions & 12 deletions packages/e2e/__tests__/tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import ClickSystemMenu from '../common/utils';
let electronApp: ElectronApplication;



test.beforeAll(async () => {
electronApp = await electron.launch({args: ["../../packages/neuron-wallet/dist/main.js"]});
electronApp.on("window", async (page) => {
Expand Down Expand Up @@ -91,7 +90,7 @@ test("Create Wallet", async () => {
}
});

/*test.describe('overview page tests', () => {
test.describe('overview page tests', () => {
test("send transaction", async () => {
await page.waitForTimeout(10000);
await page.waitForSelector('.syncStatus_synced__JM5ln');
Expand All @@ -109,14 +108,13 @@ test("Create Wallet", async () => {


test("amend transaction ", async () => {
await page.locator('//!*[@id="root"]/div/div/div[2]/div[1]/table/tbody/tr[1]/td[7]').click();
await page.locator('//*[@id="root"]/div/div/div[2]/div[1]/table/tbody/tr[1]/td[7]').click();
await page.getByRole('button', {name: '修改'}).click();
await page.getByTitle('发送').click();
await page.locator("id=password").fill('Aa111111');
await page.getByRole('button', {name: '确认'}).click();
await expect(page.getByText('已提交').first()).toBeVisible();
console.log('amend交易成功!');
//程序amend提交成功,交易记录为失败并弹窗提示RBFRejected(\"Tx's current fee is 5515, expect it to >= 6432 to replace old txs\")"} Error: {"code":-1111,"message":"PoolRejectedRBF: RBF rejected: Tx's current fee is 5515, expect it to >= 6432 to replace old txs","data":"RBFRejected(\"Tx's current fee is 5515, expect it to >= 6432 to replace old txs\")"}
});
//suggestion:this case is run whenwallet balance is large,or you need to increase balance after this case
test("one cell consume", async () => {
Expand Down Expand Up @@ -169,7 +167,8 @@ test("check transaction history", async () => {
await page.waitForSelector('//!*[@id="root"]/div/dialog[1]/div/button');
await page.getByRole('button', {name: '确认'}).click();
console.log('查历史记录成功!');
});*/

});

//所有交易完成才能执行以下操作
test.describe('实验性功能', () => {
Expand Down Expand Up @@ -201,7 +200,7 @@ test.describe('实验性功能', () => {
console.log('点击地址成功!');
await expect(page.getByText('已复制')).toBeVisible();
//关闭窗口
await page.locator('//*[@id="root"]/div/div/div[2]/div/dialog/div[1]/*[name()="svg"]').click();
await page.locator('//!*[@id="root"]/div/div/div[2]/div/dialog/div[1]/!*[name()="svg"]').click();
console.log('sudt账号复制成功!');
await page.waitForTimeout(10000);
});
Expand All @@ -222,12 +221,11 @@ test.describe('实验性功能', () => {
test("claim in customized page ", async () => {
await page.getByTitle('实验性功能').click();
await page.getByTitle('自定义资产').click();
await page.getByRole('button', {name: '领取'}).first().isEnabled();
await page.getByRole('button', {name: '领取'}).first().click();
await page.locator("id=password").fill('Aa111111');
await page.getByRole('button', {name: '确认'}).click();
console.log('领取自定义资产成功!');

await page.getByRole('button', {name: '领取'}).first().isEnabled();
await page.getByRole('button', {name: '领取'}).first().click();
await page.locator("id=password").fill('Aa111111');
await page.getByRole('button', {name: '确认'}).click();
console.log('领取自定义资产成功!');


});
Expand Down

0 comments on commit 1c99099

Please sign in to comment.