You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently looking for ways to check emails within cypress and came across this library.
Since I encountered a problem in my test project, I thought it might be due to the cypress version (10.3.1). So I cloned the gmail-tester repository and tried the cypress example inside.
Steps:
Customization in index.js path.resolve(__dirname, "../../credentials.json"), path.resolve(__dirname, "../../gmail_token.json.json")
gmail.spec.js
Removed all options except subject (and there is an unread mail with that subject in the inbox)
npm cypress open
If I now run gmail.spec.js the console shows (see last line): : Authorize this app by visiting this url: https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fgmail.readonly&response_type=code&client_id= 94167587089-mclmf5ic7i2uk8sbtv0v1umvq1rcju9b.apps.googleusercontent.com&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob Enter the code from that page here: :
Here the console stops and the cypress test runs into a timeout.
I have this behavior in my test project with Cypress V. 10.3.1 and gmail-test ^1.3.5 but also in the example project from https://github.com/levz0r/gmail-tester with Cypress ^5.1.0 and gmail- testing ^1.3.5.
Does anyone know what I'm doing wrong?
One more point:
There is a ticket here from 07/22/2022 Title: localhost redirect (#97).
Is it maybe because of the credentials.json?
In each example, after the download, the JSON file contains: "redirect_uris": [ "urn:ietf:wg:oauth:2.0:oob", "http://localhost" ]
If I download the JSON file, urn:ietf:wg:oauth:2.0:oob is not included and I enter it manually.
Without this entry I had the same behavior as #97
So maybe it's because of that or something else?
I'm grateful for any advice!
Best regards
The text was updated successfully, but these errors were encountered:
Hello,
ok, shame on me!
This is what happens when you copy too much.
In the example code, the filename of the token is 'token.json'. However, I generated a 'gmail_token.json' and of course did not adapt the code.
It has nothing to do with the entry (urn:ietf:wg:oauth:2.0:oob). If the entry is available, you get to '...accounts.google.com...' and can copy the token from there. Without this entry you get to '...localhost/...' with 'ERR_CONNECTION_REFUSED'. However, the token is included in the URL (...localhost/code=4/0AdQt8...bQ&scope= https ://www.googleapis.com/auth/gmail.readonly)
how much time does it take to start reading emails from your inbox after setting this up?
I also got the same localhost error, I copied the code from URL and passed it to the requested place.
Hello everyone,
I'm currently looking for ways to check emails within cypress and came across this library.
Since I encountered a problem in my test project, I thought it might be due to the cypress version (10.3.1). So I cloned the gmail-tester repository and tried the cypress example inside.
Steps:
path.resolve(__dirname, "../../credentials.json"),
path.resolve(__dirname, "../../gmail_token.json.json")
Removed all options except subject (and there is an unread mail with that subject in the inbox)
If I now run gmail.spec.js the console shows (see last line):
:
Authorize this app by visiting this url: https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fgmail.readonly&response_type=code&client_id= 94167587089-mclmf5ic7i2uk8sbtv0v1umvq1rcju9b.apps.googleusercontent.com&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob
Enter the code from that page here:
:
Here the console stops and the cypress test runs into a timeout.
I have this behavior in my test project with Cypress V. 10.3.1 and gmail-test ^1.3.5 but also in the example project from https://github.com/levz0r/gmail-tester with Cypress ^5.1.0 and gmail- testing ^1.3.5.
Does anyone know what I'm doing wrong?
One more point:
There is a ticket here from 07/22/2022 Title: localhost redirect (#97).
Is it maybe because of the credentials.json?
In each example, after the download, the JSON file contains:
"redirect_uris": [ "urn:ietf:wg:oauth:2.0:oob", "http://localhost" ]
If I download the JSON file, urn:ietf:wg:oauth:2.0:oob is not included and I enter it manually.
Without this entry I had the same behavior as #97
So maybe it's because of that or something else?
I'm grateful for any advice!
Best regards
The text was updated successfully, but these errors were encountered: