Skip to content

E2E Testing - #47

Open
jiafuei wants to merge 13 commits into
mainfrom
feat/sol-121-e2e-testing
Open

E2E Testing#47
jiafuei wants to merge 13 commits into
mainfrom
feat/sol-121-e2e-testing

Conversation

@jiafuei

@jiafuei jiafuei commented May 11, 2022

Copy link
Copy Markdown

Add e2e testing for example app

@jiafuei
jiafuei requested review from ieow and metallicalfa2 May 11, 2022 05:14
@@ -1,39 +1,13987 @@
{
"name": "vue-app",
"version": "0.1.0",
"lockfileVersion": 1,
"lockfileVersion": 2,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should we commit package lock files for test commits? cc: @metallicalfa2

Comment thread examples/vue-app/src/components/HelloWorld.vue Outdated
Comment on lines +52 to +62
const [page1] = await Promise.all([
page.waitForEvent("popup"),
page.click("button >> text=Sign All Transactions")
]);

await page1.waitForSelector("text=Confirm Permission");
await page1.click("button >> text=Approve")
await wait(1500);

const consoleData = JSON.parse(await page.locator("#console > p").innerText());
expect(consoleData).toHaveLength(3);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can we use try, catch to test error sceneraio's console to have better coverage?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

can you clarify how try catch will increase test coverage here?

Comment thread examples/vue-app/tests/e2e/custom-program/custom-program.test.ts
jiafuei added 4 commits June 2, 2022 23:35
# Conflicts:
#	examples/vue-app/package-lock.json
#	examples/vue-app/package.json
#	examples/vue-app/src/components/HelloWorld.vue
#	package-lock.json

@guru-web3 guru-web3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks good cc @metallicalfa2

please confirm if this is okay to show in example app
<button @click="() => transfer(10001)">Transfer error
<button @click="() => lookupDepositSPL(mintAddress, 100)" :disabled="network!==testnet">Custom program error (Testnet)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants