Replies: 4 comments
-
Hey Roberto! How about use the assert.fail method? It will fail your entire Scenario and you can customize the message!
Check method:
|
Beta Was this translation helpful? Give feedback.
-
Hi @brunoklein ,
In other words, the whole Scenario is marked as failure, because this is like an unexpected error, the autoLogin plugin has a workflow, explained in https://codecept.io/plugins/#autologin, but the workflow doesn't continue when |
Beta Was this translation helpful? Give feedback.
-
Which node and codeceptjs version are you using? |
Beta Was this translation helpful? Give feedback.
-
"codeceptjs": "^2.6.10",
"axios": "^0.20.0",
"puppeteer": "^5.3.0",
"rosie": "^2.0.1",
"webdriverio": "^6.5.0" |
Beta Was this translation helpful? Give feedback.
-
I've implemented an autoLogin based on REST calls, to optimize the time in
login
andcheck
processes, the problem is that when the token is invalid I don't know how to mark thecheck
process as invalid so the workflow continues withlogin
stage, if I throw anError()
the entire autoLogin process is halt due to an unexpected error. All the examples I saw use the existing API based on user interface where the user fill-in the credentials in a form and so on, but I didn't find anything using REST helper.My autoLogin config:
The custom
validationToken()
step is something like:As (ugly) workaround I've got the following code in
autoLogin.check
implementation:By the way, I launched the same question in StackOverflow with a bounty, but without luck by the moment.
Beta Was this translation helpful? Give feedback.
All reactions