Skip to content

Clean drafts before each GMail test - #3320

Merged
tomholub merged 4 commits into
masterfrom
issue-3315-local-storage-extraction
Jan 17, 2021
Merged

tomholub merged 4 commits into
masterfrom
issue-3315-local-storage-extraction

Conversation

@rrrooommmaaa

@rrrooommmaaa rrrooommmaaa commented Jan 16, 2021

Copy link
Copy Markdown
Contributor

This PR extracts google token and deletes all drafts on the account

close #3315

@rrrooommmaaa

Copy link
Copy Markdown
Contributor Author

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.

@tomholub I suggest to extract google token like this and clear the drafts using it (if that's what you meant)

Comment thread test/source/browser/controllable.ts Outdated
}
}

public getFromLocalStorage = async (keys: string[]): Promise<any> => {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!! I did not know this was possible. This is an amazingly elegant solution.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use https://www.npmjs.com/package/googleapis package to access gmail api?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I'm pretty liberal with adding deps to the test infrastructure.

@rrrooommmaaa

rrrooommmaaa commented Jan 17, 2021

Copy link
Copy Markdown
Contributor Author

This version requests cleanup on each TestWithBrowser call with !isMock

@rrrooommmaaa
rrrooommmaaa marked this pull request as ready for review January 17, 2021 09:39
@rrrooommmaaa rrrooommmaaa changed the title extract google token Clean drafts before each GMail test Jan 17, 2021

@tomholub tomholub left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@tomholub
tomholub merged commit a1de444 into master Jan 17, 2021
@tomholub
tomholub deleted the issue-3315-local-storage-extraction branch January 17, 2021 10:35
tomholub added a commit that referenced this pull request Jan 18, 2021
* issue 3257 rename att to attachment - initial

* issue #3315 Clean drafts before each GMail test (#3320)

* extract google token

* tslint fix

* clean GMail drafts

* Added googleapis package

* issue 3257 rename att to attachment - initial

* renamed att to attachment

* renamed att to attachment

* renamed att to attachment

* renamed att to attachment

* renamed att to attachment

Co-authored-by: Tom J <tom@holub.me>
Co-authored-by: Roman <rrrooommmaaa@mail.ru>
Co-authored-by: bilal.ashraf@gmail.com <bilal.ashraf@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

accumulating drafts cause live gmail tests to fail

2 participants