Comments (6)
Hey @levz0r, I'm trying this out now and I believe that check_inbox has some useful functionality that get_messages is missing. That is, it waits for a while until it grabs the exact email you're looking for. I'm also writing some tests which rely on sending a registration email off and doing something with the body when it arrives in the gmail inbox, and I'm finding that if I use get_messages alone, then it gets them too early - before the email I want has arrived and my tests fail.
I can use check_inbox and then run get_messages, which works, and which I am resorting to now, but having the body come back as part of check_inbox for a single email sure would be handy. It would be far less code in the testing framework and also 1 let call to _get_recent_email.
Might it be worth accepting PR: #8 as submitted by @templth ?
from gmail-tester.
Here is the corresponding PR: #8
from gmail-tester.
Hi Thierry,
Thank you for your feedback :)
Basically, I'm thinking to make check_inbox
obsolete in the further versions because there is no real need in it anymore.
Maybe I'm wrong though... What's you use case?
from gmail-tester.
Hey Lev,
You're welcome ;-)
My use case is to test the complete onboarding chain of an application:
- Register with an email
- Receive an email with a link in it to complete the registration process
- Go to this link
- Fill the remaining hints
- Finalize registration
Do you think it possible to achieve this without using the check_inbox
function? If so, what can I use instead?
Thanks very much!
Thierry
from gmail-tester.
Absolutely possible!
You can read how we test a similar process here: https://medium.com/p/how-to-poll-a-gmail-inbox-in-cypress-io-a4286cfdb888
Feel free to open a ticket if appropriate.
from gmail-tester.
P.S
In the post we are using check_inbox
, because we do not do assertions on the email body. If we would need to that, we would use get_messages
...
from gmail-tester.
Related Issues (20)
- Cannot destructure property 'HTTP2_HEADER_CONTENT_ENCODING' of 'http2.constants' as it is undefined. HOT 1
- How to use gmail-tester with latest cypress version (Cypress 10)? HOT 1
- I'm receiving an error on set 'include_body: true' HOT 1
- Label not a typed parameter for check_message HOT 2
- Activation Page redirects to Localhost, Terminal Not Accepting Code HOT 1
- Incomplete documentation HOT 2
- error while executing the command "node node_modules/gmail-tester/init.js credentials.json token.json [email protected]" HOT 5
- Created a new project on Google Console, Get the Credentials but the init process never ends HOT 21
- version in npm is 1.3.8, while here it's 1.3.4
- check_inbox - Cannot destructure property 'HTTP2_HEADER_CONTENT_ENCODING' of 'http2.constants' as it is undefined. e HOT 2
- socket hang up issue
- readme links to a deprecated adwords page HOT 1
- Add credentials and token in cypress.config.js into cypress.env file
- It's not possible to paste verification code during refresh token in 1.3.8 HOT 3
- The API returned an error: Error: Invalid Credentials HOT 1
- Unable to get new credentials, does this still work?
- get_messages returns empty array of emails
- cheerio.load() expects a string node_modules/cheerio/lib/load.js:74:1 #3475 HOT 2
- Creds expiring after ~1wk - is that normal? HOT 1
- I am not getting credential.json file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gmail-tester.