Hey! Read about my experience writing custom tasks for the cypress framework.
Read the article on Medium: https://medium.com/@levz0r/how-to-poll-a-gmail-inbox-in-cypress-io-a4286cfdb888
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (5)
Great work! Thank you so much!
Do you already have an idea how to integrate it into a build pipeline?
My first thought was to store the keys and tokens as secret environment variables and build the configuration objects inside the script. But as i see, i always need to provide a path to the json files and can't call gmail.get_messages() directly with the config objects.
EDIT: I've created a small script, which writes the .json files from the environment variables during the test step in the build pipeline.
Hi Marco,
We have a pre-build step which copies the files from an external source into our build environment.
You have to init gmail-tester on your machine, upload the credentials files to the build machine, then define the pre-build step.
Another solution is to have templates of the credentials files and to inject the tokens from env. variables. This solution requires some coding/scripting.
Thanks for your quick response Lev!
I think my solution corresponds to your second suggestion and works well so far. Thank you!
How do i extend the interval of the token? as far as i understood the token will not refresh if older then 24h, so injecting the old token from .env doesnt solve our problem, correct?
Update: The story was featured on docs.cypress.io/examples/media/blo...
Thanks all!