TenKeyLabs / dappwright

🏌🏼‍E2E testing for dApps using Playwright + MetaMask & Coinbase Wallet
https://www.npmjs.com/package/@tenkeylabs/dappwright
Other
83 stars 21 forks source link

New features proposal #306

Open IGoRFonin opened 7 months ago

IGoRFonin commented 7 months ago

Empowering through arguments.

I wan't to add some features: 1) prop: "chromium" // chrome with extra features 2) prop: chromiumContext // for extra chromium settings from 'launchPersistentContext' 3) prop: 'userDataDir' // path from custom dir without delete. It's helps save static cache between runs and run multiple chromiums 4) run browser from cached 'userDataDir' and paste only password

@osis Wait for your comments about this proposal. Otherwise, I'll just use fork

osis commented 6 months ago

I like the spirit of this issue! Would love to know more...

  1. Are you saying you want to use chrome instead of chromium? If so, ss there a particular advantage to doing this?
  2. Which extra setting would you like to use? Because...
  3. Dappwright already uses a persistent userDataDir to run its tests. Changing this may cause issues so I would be careful about extending this interface.

Also there is this interface that will allow you add extra options through to chromium.

sirtimid commented 3 months ago

@osis You do use a persistent userDataDir but it is being removed between test suites here https://github.com/TenKeyLabs/dappwright/blob/main/src/launch.ts#L32 which means that for every new one there is still some time being spent to import the wallet. Perhaps it would be nice to have an option not to remove it? Do you see any downsides on doing that?

osis commented 3 months ago

@sirtimid we get around this by holding an instance of the wallet and only launching once across tests. You can see an example here. https://github.com/TenKeyLabs/dappwright-examples/tree/main/tests/multiple-files