Commit abe85c8b authored by JC Brand's avatar JC Brand

Update tests

The chat toggle element is now determined by class, not id.
parent d394ad7f
...@@ -62,9 +62,9 @@ ...@@ -62,9 +62,9 @@
expect(this.rosterview.$el.is(':visible')).toEqual(false); expect(this.rosterview.$el.is(':visible')).toEqual(false);
}, xmppchat)); }, xmppchat));
it("can be opened by clicking a DOM element with id 'toggle-online-users'", $.proxy(function () { it("can be opened by clicking a DOM element with class 'toggle-online-users'", $.proxy(function () {
spyOn(this, 'toggleControlBox').andCallThrough(); spyOn(this, 'toggleControlBox').andCallThrough();
$('#toggle-online-users').click(); $('.toggle-online-users').click();
expect(this.toggleControlBox).toHaveBeenCalled(); expect(this.toggleControlBox).toHaveBeenCalled();
}, xmppchat)); }, xmppchat));
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<div id="chatpanel"> <div id="chatpanel">
<div id="collective-xmpp-chat-data"></div> <div id="collective-xmpp-chat-data"></div>
<div id="toggle-controlbox"> <div id="toggle-controlbox">
<a href="#" class="chat" id="toggle-online-users"> <a href="#" class="chat toggle-online-users">
<span class="conn-feedback">Click here to chat</span> <strong style="display: none" id="online-count">(0)</strong> <span class="conn-feedback">Click here to chat</span> <strong style="display: none" id="online-count">(0)</strong>
</a> </a>
</div> </div>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment