-
-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Phantom support - Cypress tests and some refactoring
- Loading branch information
Showing
18 changed files
with
132 additions
and
31 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
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
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...aywright/pages/LockPage/actions/unlock.ts → ...wright/pages/UnlockPage/actions/unlock.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
4 changes: 2 additions & 2 deletions
4
...tom/src/playwright/pages/LockPage/page.ts → ...m/src/playwright/pages/UnlockPage/page.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export * from './OnboardingPage/page' | ||
export * from './CrashPage/page' | ||
export * from './LockPage/page' | ||
export * from './UnlockPage/page' | ||
export * from './HomePage/page' | ||
export * from './NotificationPage/page' |
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
File renamed without changes.
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,3 @@ | ||
it('should should get account address for Solana network', () => { | ||
cy.getAccountAddress('solana').should('eq', 'oeYf6KAJkLYhBuR8CiGc6L4D4Xtfepr85fuDgA9kq96') | ||
}) |
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,11 @@ | ||
import * as selectors from '../../src/selectors/' | ||
|
||
it('should open settings and go back to homepage', () => { | ||
cy.openSettings() | ||
|
||
cy.shouldHavePhantomPageElement(selectors.homePage.settings.lockWallet, true) | ||
|
||
cy.goBackToHomePage() | ||
|
||
cy.shouldHavePhantomPageElement(selectors.homePage.settings.lockWallet, false) | ||
}) |
5 changes: 5 additions & 0 deletions
5
wallets/phantom/test/cypress/importWalletFromPrivateKey.cy.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,5 @@ | ||
it('should import a new wallet from private key', () => { | ||
cy.importWalletFromPrivateKey('ethereum', 'ea084c575a01e2bbefcca3db101eaeab1d8af15554640a510c73692db24d0a6a') | ||
|
||
cy.getAccountAddress('ethereum').should('eq', '0xa2ce797cA71d0EaE1be5a7EffD27Fd6C38126801') | ||
}) |
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,13 @@ | ||
import * as selectors from '../../src/selectors/' | ||
|
||
it('should lock & unlock the wallet without any errors', () => { | ||
cy.shouldHavePhantomPageElement(selectors.homePage.accountMenu.accountName, true) | ||
|
||
cy.lock() | ||
|
||
cy.shouldHavePhantomPageElement(selectors.unlockPage.submitButton, true) | ||
|
||
cy.unlock() | ||
|
||
cy.shouldHavePhantomPageElement(selectors.homePage.accountMenu.accountName, true) | ||
}) |
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,13 @@ | ||
it('should toggle Testnet mode', () => { | ||
// Turn Testnet mode ON | ||
cy.toggleTestnetMode() | ||
|
||
cy.goToHomePage() | ||
cy.shouldHavePhantomPageElement('text=You are currently in Testnet Mode', true) | ||
|
||
// Turn Testnet mode OFF | ||
cy.toggleTestnetMode() | ||
|
||
cy.goToHomePage() | ||
cy.shouldHavePhantomPageElement('text=You are currently in Testnet Mode', false) | ||
}) |
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