-
-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
112 additions
and
249 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 was deleted.
Oops, something went wrong.
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
12 changes: 0 additions & 12 deletions
12
wallets/phantom/src/playwright/pages/HomePage/actions/popups/closePopover.ts
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
wallets/phantom/src/playwright/pages/HomePage/actions/popups/closeRecoveryPhraseReminder.ts
This file was deleted.
Oops, something went wrong.
2 changes: 0 additions & 2 deletions
2
wallets/phantom/src/playwright/pages/HomePage/actions/popups/index.ts
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
wallets/phantom/src/playwright/pages/HomePage/actions/switchNetwork.ts
This file was deleted.
Oops, something went wrong.
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
10 changes: 0 additions & 10 deletions
10
wallets/phantom/src/playwright/pages/NotificationPage/actions/token.ts
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
export * from './OnboardingPage/page' | ||
export * from './CrashPage/page' | ||
export * from './UnlockPage/page' | ||
export * from './HomePage/page' | ||
export * from './NotificationPage/page' |
10 changes: 0 additions & 10 deletions
10
wallets/phantom/src/playwright/utils/clickLocatorIfCondition.ts
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { type Page, expect } from '@playwright/test' | ||
import type { Phantom } from '../../../src/playwright' | ||
|
||
export const aaveSetup = async (page: Page, phantom: Phantom) => { | ||
await page.goto('https://app.aave.com') | ||
|
||
await phantom.toggleTestnetMode() | ||
|
||
await page.locator('button#settings-button').click() | ||
await page.locator('li:has-text("Testnet mode")').click() | ||
await expect(page.getByRole('button', { name: 'TESTNET' })).toBeVisible() | ||
|
||
await page.getByRole('button', { name: 'Connect wallet' }).first().click() | ||
await page.getByRole('button', { name: 'Phantom' }).click() | ||
|
||
await phantom.connectToDapp() | ||
await phantom.page.waitForTimeout(1_000) | ||
await phantom.closeUnsupportedNetworkWarning() | ||
|
||
await expect(page.getByText('0xf3...2266'), '"0xf3...2266" should be visible').toBeVisible() | ||
|
||
await page.goto( | ||
'https://app.aave.com/reserve-overview/?underlyingAsset=0xff34b3d4aee8ddcd6f9afffb6fe49bd371b8a357&marketName=proto_sepolia_v3' | ||
) | ||
|
||
await page.getByRole('button', { name: 'Supply' }).click() | ||
await page.locator('input[aria-label="amount input"]').fill('1') | ||
|
||
await expect( | ||
page.getByRole('button', { | ||
name: 'Supply DAI' | ||
}) | ||
).toBeDisabled() | ||
|
||
await page.locator('button:has-text("Approve DAI to continue")').click() | ||
} |
22 changes: 22 additions & 0 deletions
22
wallets/phantom/test/playwright/commonSteps/solanaSandboxSetup.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,22 @@ | ||
import { type Page, expect } from '@playwright/test' | ||
import type { Phantom } from '../../../src/playwright' | ||
|
||
export const solanaSandboxSetup = async (page: Page, phantom: Phantom) => { | ||
await phantom.page.waitForTimeout(1_000) | ||
await phantom.importWalletFromPrivateKey( | ||
'solana', | ||
'XQaKFLLSKbzpVzmfJrj4yUjAyFy2Eu7JcNdbPdnLuod2Uw3yf3tjGd4ha1DBfFdjkZFX1PZg3knth2Tz2tvd8C4' | ||
) | ||
|
||
await phantom.toggleTestnetMode() | ||
|
||
await page.goto('https://r3byv.csb.app/') | ||
await page.locator('a:has-text("Yes, proceed to preview")').click() | ||
await page.getByRole('button', { name: 'Connect to Phantom' }).click() | ||
|
||
await phantom.connectToDapp() | ||
|
||
await page.getByRole('button', { name: 'Clear Logs' }).click() | ||
|
||
await expect(page.getByText('Click a button and watch magic happen...')).toBeVisible() | ||
} |
Oops, something went wrong.