We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Originally posted by martynaol March 28, 2022 I want to store the access token to use this value later. I have :
const pactum = require('pactum'); const { Given, When, Then, Before } = require('@cucumber/cucumber'); Before(async () => { await pactum .spec() .post('/credentials') .withForm({ username: email, password: passw, }) .expectStatus(200) .stores('token', 'access_token'); }) pactum.request.setDefaultHeaders('Authorization', 'Bearer $S{token}');
syntax '$S{token}' is a string, the next request is with "headers": { "Authorization": "Bearer $S{token}" },
what am I doing wrong?
The text was updated successfully, but these errors were encountered:
Getting the same issue. Did you find a solution?
Sorry, something went wrong.
This is fixed. Please use the latest version of pactum.
I request to recheck, as with v3.4.0 (latest), the bug seems to exists. (initially tried with v3.3.3, then upgraded today)
Read more in discussion 130
Successfully merging a pull request may close this issue.
Discussed in #130
Originally posted by martynaol March 28, 2022
I want to store the access token to use this value later. I have :
syntax '$S{token}' is a string, the next request is with "headers": {
"Authorization": "Bearer $S{token}"
},
what am I doing wrong?
The text was updated successfully, but these errors were encountered: