tests: Fix cookie name in helper.js tests

This commit is contained in:
Richard Hansen 2021-03-31 00:30:58 -04:00 committed by webzwo0i
parent 137fa89d2a
commit aeee5c0b69

View file

@ -76,8 +76,8 @@ describe('the test helper', function () {
// Now that we have a chrome, we can set a pad cookie // Now that we have a chrome, we can set a pad cookie
// so we can confirm it gets wiped as well // so we can confirm it gets wiped as well
chrome$.document.cookie = 'prefsHtml=baz;expires=Thu, 01 Jan 3030 00:00:00 GMT; path=/'; chrome$.document.cookie = 'prefsHttp=baz;expires=Thu, 01 Jan 3030 00:00:00 GMT; path=/';
expect(chrome$.document.cookie).to.contain('prefsHtml=baz'); expect(chrome$.document.cookie).to.contain('prefsHttp=baz');
// give it a second to save the username on the server side // give it a second to save the username on the server side
await new Promise((resolve) => setTimeout(resolve, 1000)); await new Promise((resolve) => setTimeout(resolve, 1000));
@ -90,7 +90,7 @@ describe('the test helper', function () {
// We still need to test below that we're in a new session // We still need to test below that we're in a new session
expect(window.document.cookie).to.not.contain('token=foo'); expect(window.document.cookie).to.not.contain('token=foo');
expect(window.document.cookie).to.not.contain('language=bar'); expect(window.document.cookie).to.not.contain('language=bar');
expect(chrome$.document.cookie).to.contain('prefsHtml=baz'); expect(chrome$.document.cookie).to.contain('prefsHttp=baz');
expect(window.document.cookie).to.not.be(firstCookie); expect(window.document.cookie).to.not.be(firstCookie);