-
Notifications
You must be signed in to change notification settings - Fork 635
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of github.com:rainbow-me/rainbow into brody/sw…
…ap-v2-e2e * 'develop' of github.com:rainbow-me/rainbow: Fix weird issues with rounding (#5822) Fix provider recursion bug, provider function types (#5829) bump braces (#5831) Add entry point for other networks (#5824) remove info icon on max transaction fee row as we don't have that in spec (#5827) [e2e] Add Malicious Dapp interaction test (#5764) reorg ens related calls (#5828) Performance: limit Sentry tracking, fix NFT hooks (#5819) fix wrong chainname (#5823) Disable flashbots toggle on appropriate chains (#5812) add type to SearchAsset type and add into type possibilities (#5820) fix fasterimage border radius android (#5816) more Safemath fixes (#5818)
- Loading branch information
Showing
71 changed files
with
839 additions
and
637 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import { | ||
beforeAllcleanApp, | ||
afterAllcleanApp, | ||
importWalletFlow, | ||
waitAndTap, | ||
swipe, | ||
checkIfVisible, | ||
checkIfExistsByText, | ||
typeText, | ||
delayTime, | ||
tapAtPoint, | ||
checkIfExists, | ||
} from './helpers'; | ||
import { WALLET_VARS } from './testVariables'; | ||
|
||
describe('Check malicious dapp warning', () => { | ||
beforeAll(async () => { | ||
await beforeAllcleanApp({ hardhat: false }); | ||
}); | ||
|
||
afterAll(async () => { | ||
await afterAllcleanApp({ hardhat: false }); | ||
}); | ||
|
||
it('Should be able to watch a wallet and load the wallet screen', async () => { | ||
await importWalletFlow(WALLET_VARS.SEED_WALLET.PK); | ||
}); | ||
|
||
it('Should be able to navigate to the dapp browser', async () => { | ||
await swipe('wallet-screen', 'left', 'fast'); | ||
await swipe('discover-sheet', 'left', 'fast'); | ||
await checkIfVisible('browser-screen'); | ||
}); | ||
|
||
it('Should be able to type on search input and go to malicious dapp', async () => { | ||
await waitAndTap('browser-search-input'); | ||
await checkIfExistsByText('Find apps and more'); | ||
await typeText('browser-search-input', 'https://test-dap-welps.vercel.app/', true, false, true); | ||
// Waiting for webpage to load | ||
await delayTime('long'); | ||
}); | ||
|
||
it('Should attempt to connect to in browser dapp', async () => { | ||
// Detox can't query elements within a WebView within our app | ||
// Using tapAtPoint() to tap coordinates is a workaround for now | ||
|
||
// Tapping connect button | ||
await tapAtPoint('browser-screen', { x: 275, y: 80 }); | ||
// Waiting for rainbowkit sheet to load / animate in | ||
await delayTime('medium'); | ||
// Tapping Rainbow button | ||
await tapAtPoint('browser-screen', { x: 50, y: 325 }); | ||
|
||
await checkIfExists('malicious-dapp-warning'); | ||
}); | ||
}); |
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
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
Oops, something went wrong.