-
-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Phantom - confirmTransaction function updates and tests
- Loading branch information
Showing
7 changed files
with
53 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 4 additions & 34 deletions
38
wallets/phantom/src/selectors/pages/NotificationPage/transactionPage.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
wallets/phantom/test/playwright/e2e/confirmTransaction.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { connectPhantomToTestDapp } from '../commonSteps/connectPhantomToTestDapp' | ||
import synpress from '../synpress' | ||
|
||
const test = synpress | ||
|
||
const { expect } = test | ||
|
||
test('should confirm contract deployment with default gas setting', async ({ page, phantom }) => { | ||
connectPhantomToTestDapp(page, phantom) | ||
|
||
await expect(page.locator('#tokenAddresses')).toBeEmpty() | ||
await page.locator('#createToken').click() | ||
|
||
await phantom.confirmTransaction() | ||
|
||
await expect(page.locator('#tokenAddresses')).toContainText('Creation Failed') | ||
}) | ||
|
||
;(['Slow', 'Fast'] as const).forEach((gasSetting) => { | ||
test(`should confirm contract deployment with ${gasSetting} gas setting`, async ({ page, phantom }) => { | ||
connectPhantomToTestDapp(page, phantom) | ||
|
||
await expect(page.locator('#tokenAddresses')).toBeEmpty() | ||
await page.locator('#createToken').click() | ||
|
||
await phantom.confirmTransaction({ gasSetting }) | ||
|
||
await expect(page.locator('#tokenAddresses')).toContainText('Creation Failed') | ||
}) | ||
}) |