neardevhub-bos
neardevhub-bos copied to clipboard
Mocked contract calls and a connected wallet for Playwright Tests
Is your feature request related to a problem? Please describe.
In order to thoroughly test our UI, we need to introduce capability for a connected wallet (or mock) and contract calls. For example,
- The "Create Community" button requires context.accountId to not be null.
- Community configuration requires a connected wallet and needs to check permissions from the contract.
Describe the solution you'd like
The ability to mock specific scenarios, such as when a wallet is not connected, a wallet is connected with permissions, and without permissions.
Describe alternatives you've considered
Haven't done deep dive into it, but this looks relevant:
- Configuring storageState
- Browser context; but we need to be able to init different contexts for specific tests.
- Requests