diff --git a/tests/frontend/specs/authorship_of_editions.js b/tests/frontend/specs/authorship_of_editions.js index 3bea2c46e..0c173e962 100644 --- a/tests/frontend/specs/authorship_of_editions.js +++ b/tests/frontend/specs/authorship_of_editions.js @@ -41,6 +41,10 @@ describe('author of pad edition', function() { // Reload pad, to make changes as a second user. Need a timeout here to make sure // all changes were saved before reloading setTimeout(function() { + // Expire cookie, so author is changed after reloading the pad. + // See https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie#Example_4_Reset_the_previous_cookie + helper.padChrome$.document.cookie = 'token=foo;expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/'; + helper.newPad(done, padId); }, 1000); });