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
Currently, credentialsJsonPath and tokenJsonPath are expected to be strings containing the file path to respective JSON files. However, the underlying gmail-tester library actually can receive them as objects as well, which would greatly simplify setting up test environment on CI.
I made it work on my project by monkey-patching the validation function:
diff --git a/node_modules/wdio-gmail-service/build/service.js b/node_modules/wdio-gmail-service/build/service.js
index 4737aad..7a6ba46 100644
--- a/node_modules/wdio-gmail-service/build/service.js
+++ b/node_modules/wdio-gmail-service/build/service.js
@@ -13,10 +13,10 @@ export default class GmailService {
if (!from && !to && !subject) {
throw new Error('At least one of `from`, `to` or `subject` need to be provided to checkInbox');
}
- if (typeof this._credentialsJsonPath !== 'string') {
+ if (!this._credentialsJsonPath) {
throw new Error('Service option "credentialsJsonPath" not set, but required');
}
- if (typeof this._tokenJsonPath !== 'string') {
+ if (!this._tokenJsonPath) {
throw new Error('Service option "tokenJsonPath" not set, but required');
}
const wait_time_sec = this._intervalSec;
But it would be nice to have a proper support for this.
The text was updated successfully, but these errors were encountered:
@yafanasiev makes sense, I think we can do a similar change where we rename the parameters to credentials and token and allow them to be either a JSON object or a string to a file.
@christian-bromann I can take a stab at it, but do you want to change the parameters and release new major version or leave the old one for backward compatibility?
Currently, credentialsJsonPath and tokenJsonPath are expected to be strings containing the file path to respective JSON files. However, the underlying
gmail-tester
library actually can receive them as objects as well, which would greatly simplify setting up test environment on CI.I made it work on my project by monkey-patching the validation function:
But it would be nice to have a proper support for this.
The text was updated successfully, but these errors were encountered: