tokenbridge
tokenbridge copied to clipboard
Refactor UI-E2E tests
https://github.com/poanetwork/tokenbridge/pull/186#discussion_r313578915
The UI-E2E tests are unclear because of two reasons:
- They rely on sequential execution - for example first test case opens the website, and subsequent test cases assume that the website is opened.
- The pre-conditions like selected MetaMask network are not clearly specified - it is not clear which test cases should begin with foreign network, and which with home network.
Expected changes
- Wrap test cases that rely on sequential execution into a
test.describewithtest.before - Current sequential execution:
- Opening website URL and relying on open website in subsequent tests
- Performing the transfer and checking the balances in subsequent tests
- Switching MetaMask networks and relying on it in subsequent tests