Code Monkey home page Code Monkey logo

Comments (6)

dsmurrell avatar dsmurrell commented on May 27, 2024 1

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.

templth avatar templth commented on May 27, 2024

Here is the corresponding PR: #8

from gmail-tester.

levz0r avatar levz0r commented on May 27, 2024

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.

templth avatar templth commented on May 27, 2024

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.

levz0r avatar levz0r commented on May 27, 2024

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.

levz0r avatar levz0r commented on May 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.