FIX: Clear `sessionStorage` between click track tests

This commit is contained in:
Robin Ward 2017-03-27 16:16:14 -04:00
parent 1d478a97db
commit a4b658920e
1 changed files with 2 additions and 1 deletions

View File

@ -8,13 +8,14 @@ var windowOpen,
module("lib:click-track", { module("lib:click-track", {
setup: function() { setup: function() {
// Prevent any of these tests from navigating away // Prevent any of these tests from navigating away
win = {focus: function() { } }; win = {focus: function() { } };
redirectTo = sandbox.stub(DiscourseURL, "redirectTo"); redirectTo = sandbox.stub(DiscourseURL, "redirectTo");
windowOpen = sandbox.stub(window, "open").returns(win); windowOpen = sandbox.stub(window, "open").returns(win);
sandbox.stub(win, "focus"); sandbox.stub(win, "focus");
sessionStorage.clear();
fixture().html( fixture().html(
`<div id="topic" data-topic-id="1337"> `<div id="topic" data-topic-id="1337">
<article data-post-id="42" data-user-id="3141"> <article data-post-id="42" data-user-id="3141">