Skip to content
New issue

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

Assertion error expending cookie #297

Open
Jidarofa opened this issue Aug 18, 2021 · 0 comments
Open

Assertion error expending cookie #297

Jidarofa opened this issue Aug 18, 2021 · 0 comments

Comments

@Jidarofa
Copy link

Jidarofa commented Aug 18, 2021

Hello I have the follow code

it("it should gives the token", (done) => {
			var agent =  chai.request.agent(url)
			agent
				.post('path')
				.set({
					"Content-Type": "application/x-www-form-urlencoded",
				})
				.send({
					"username":"user",
					"password":"ps",
					"domain":"ForAllDomains",
					"authMode":"user",
					"state":"",
					"__oauinst__":""
				})				
				.end((err, res) => {
					expect(res).to.have.cookie('.BzSSO')

But when i want to have the cookie is't possible because appear the next error:

Uncaught AssertionError: expected cookie '.BzSSO' to exist

real response:

headers: {
    date: 'Wed, 18 Aug 2021 16:46:40 GMT',
    'content-type': 'text/plain; charset=utf-8',
    'content-length': '155',
    connection: 'close',
    'cache-control': 'no-cache, no-store',
    pragma: 'no-cache',
    'content-encoding': 'gzip',
    expires: '-1',
    vary: 'Accept-Encoding',
    'set-cookie': [
      '.BzSSO=CfDJ8KfvN9uUUfFEqXxmsdwgrYPk07XJVYGFBc_fIVMPwSFgPm01pvGfUt4rBsDdhQIo3hpsY8HpN30ag7PstNz9rMbthHmD__a7G7DZrHcip9yoO21KnXgNKZrIDpGWr_7zjwC8fL-hY8ETNcSDwy-jYAMW2TE-mHOcGWoHIiJWj7TopzobnDKMFHlPSvyLk6WfSC_iIb0XOePNGQVLW0wGNlutxAYXYmYjtGdmrrFGWrk09JqxAZHdbWxkjeX5qmJro7OITOjJY0EfJopdE3pZH4oL089SKhpv2f1syRutVI__jbYjWw6CDY3eyy98BY; expires=Sat, 28 Aug 2019 16:46:40 GMT; domain=accounts-cuaderno.bizagi.com; path=/; secure; samesite=strict; httponly'
    ],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant