-
Notifications
You must be signed in to change notification settings - Fork 53
Description
Example failure: https://flowcrypt.semaphoreci.com/jobs/3a01ea85-c237-4140-b189-34108f5d5b08
The solution could be to call an API that deletes all drafts on Gmail before start of the test. However, the test code that runs on nodejs does not have the right permission, only the browser extension does (after the login step). There are three options how to solve it that come to mind:
a) somehow extract the necessary access token from the browser extension after login step, and then make a call from NodeJS to delete all drafts.
b) create a separate miniapp for tests where the nodejs app will use puppeteer to log in and authenticate. The resulting code will be scraped from the window after authentication, then nodejs requests access token manually, and then uses it to delete the drafts.
c) find out why are we leaving drafts behind in some other test, and adjust the test to always make sure to delete the draft using Gmail UI at the end of a test
