-
Notifications
You must be signed in to change notification settings - Fork 11
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: add test #237
base: main
Are you sure you want to change the base?
test: add test #237
Conversation
Codecov Report
@@ Coverage Diff @@
## main #237 +/- ##
=======================================
Coverage 75.88% 75.88%
=======================================
Files 62 62
Lines 1497 1497
Branches 216 216
=======================================
Hits 1136 1136
Misses 337 337
Partials 24 24
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
await page.getByLabel('Name').fill(existName); | ||
await page.getByLabel('URL').fill('https://testnet.ckbapp.dev/'); | ||
await page.getByRole('button', { name: 'Add' }).click(); | ||
await page.getByText(existName).allInnerTexts(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should get inner tests and asset it to contain two Testnet
e2e/tests/add-whitelist-site.test.ts
Outdated
expect('').toBe('failed'); | ||
}); | ||
|
||
it('should get networkChange that the url is not in whitelist', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems this test case should be moved to "change-network.test.ts"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems a duplicate test, I will remove it.
e2e/tests/add-whitelist-site.test.ts
Outdated
}); | ||
|
||
it('should get networkChange that the url is not in whitelist', async () => { | ||
await page.evaluate(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the purpose of this patch watching current nexus network? maybe use ckb_getBlockchainInfo
instead
e2e/tests/add-whitelist-site.test.ts
Outdated
*/ | ||
it.todo('should work that add 192.168.. url'); | ||
|
||
it('should work that add url is http', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should wallet_enable work that add url prefix is http
}); | ||
expect(ckbNetworkName).toBe('ckb_testnet'); | ||
}); | ||
it('should get ckb name that change network is user added', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like a composed test case for "add network" and "change network", is it necessary?
e2e/tests/account-detail.test.ts
Outdated
|
||
DefaultTestEnv.setupTest({ initWalletWithDefaults: true }); | ||
|
||
describe('Show account details', function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not use word account
as a term on UTXO wallet.
e2e/tests/add-whitelist-site.test.ts
Outdated
|
||
it('should get networkChange that the url is not in whitelist', async () => { | ||
await page.evaluate(() => { | ||
// @ts-ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not need it anymore.
e2e/tests/import-wallet.test.ts
Outdated
await page.getByRole('button', { name: 'Next' }).click(); | ||
}); | ||
|
||
it('should warn when the input password is too short', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the UI, it is not a warning, it is a error when user input is not correct.
So using word error
is more clear.
* docs: rule-based ownership skeleton Signed-off-by: homura <[email protected]> * docs: example for p2sh upgrade Signed-off-by: homura <[email protected]> * feat: a testkit pkg for unit test Signed-off-by: homura <[email protected]> * docs(testkit): jest example Signed-off-by: homura <[email protected]> * docs: custody-unlocking and serialization * fix(deps): update dependency zustand to v4.3.7 * chore(deps): update jest monorepo * chore(deps): update dependency @types/chrome to v0.0.233 * chore(deps): update dependency @auto-it/upload-assets to v10.45.0 * feat(detect-ckb): a module for detecting injected ckb * fix(ownership-providers): inject witness and cellDeps auto * chore: unnecessary root babel config * chore: examples with provider * chore: update lock file * fix: eslint * feat(detect-ckb): detecting injected ckb test cases * test(ownership-providers): update failed test cases * chore(detect-ckb): consistent nexus pkg version * chore(example): tip when nexus is not installed * chore: update lock file * fix(ownership-providers): inject witness and cellDeps auto * test(ownership-providers): update failed test cases * fix(extension-chrome): receiving end does not exist * feat(extension-chrome): add method `signTransaction` * fix: protocol doc not generated * refactor: refactor code * fix: not works on real world data * test: refine unit tests * refactor: simplify rpc object parse * docs: tutorial * chore: update lock file * chore(deps): update dependency prettier to v2.8.8 * feat: remove witness from existing input lock * Update CHANGELOG.md [skip ci] * Bump manifest version to: 0.0.16 [skip ci] * Bump version to: v0.0.16 [skip ci] * refactor(detect-ckb): customizable types of detected ckb * test(detect-ckb): eslint error since no floating promise * chore: show tx hash after sending tx in example * chore: update lock file * chore: update lock file * refactor: rm unnecessary code * test: rm unused cases * feat(ownership-provider): Ownership provider send transaction * revert(ownership-provider): revert payFee and sign * chore: fix incorrect coverage in code cov * chore: fix release error * chore: run e2e test before release * docs: explain for `byOutputIndexes` when `payFee` * Update CHANGELOG.md [skip ci] * Bump manifest version to: 0.0.17 [skip ci] * Bump version to: v0.0.17 [skip ci] * fix(ownership-provider): add method `isOwnedByWallet` * feat: a ckb node wrapper in js * fix(ownership-provider): support unsigned transaction * fix: e2e CI error * feat(ownership-providers): support payFee and signTransaction in send transaction * chore: the real ts coverage * refactor: Top-to-bottom implementation * feat: find out ownedLocks when signTransaction * chore: avoid chrome extension error * fix: filter type script cell when pay fee * refactor(e2e): make the config more clear * chore: extract `isDerivedLocks` move into ScriptInfoDb * test(e2e): added a transfer test * docs(e2e): how to launch an e2e node * test: add unit test for send transaction * fix: @nexus-wallet/testkit depended on extension-chrome move to `devDependencies` * Update CHANGELOG.md [skip ci] * Bump manifest version to: 0.0.18 [skip ci] * Bump version to: v0.0.18 [skip ci] * test: modify code for coverage * chore: avoid merge failures * refactor: modify toml config * refactor: use lodash.random instead of random * refactor: remove unused choose-port * fix: logic bug * chore: update package-lock * test: make txWithFee calculation more clear * refactor: use extended map for clearify code * refactor: optimize Map structures * chore: fix release error in pipeline * Update CHANGELOG.md [skip ci] * Bump manifest version to: 0.0.19 [skip ci] * Bump version to: v0.0.19 [skip ci] * test: refine e2e test case name --------- Signed-off-by: homura <[email protected]> Co-authored-by: homura <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: pygman <[email protected]> Co-authored-by: zhangyouxin <[email protected]> Co-authored-by: github-actions <[email protected]>
What Changed
Resolve #223
This PR dependent on #239
add create wallet && import wallet test
Motivation
Change Type
Indicate the type of change your pull request is:
documentation
patch
minor
major