Commit 33d85cd9 authored by JC Brand's avatar JC Brand

Fix tests after adding nick input field

parent 7f4f3d7d
...@@ -22,8 +22,10 @@ ...@@ -22,8 +22,10 @@
} }
var roomspanel = this.chatboxesview.views.controlbox.roomspanel; var roomspanel = this.chatboxesview.views.controlbox.roomspanel;
var $input = roomspanel.$el.find('input.new-chatroom-name'); var $input = roomspanel.$el.find('input.new-chatroom-name');
var $nick = roomspanel.$el.find('input.new-chatroom-nick');
var $server = roomspanel.$el.find('input.new-chatroom-server'); var $server = roomspanel.$el.find('input.new-chatroom-server');
$input.val('lounge'); $input.val('lounge');
$nick.val('dummy');
$server.val('muc.localhost'); $server.val('muc.localhost');
roomspanel.$el.find('form').submit(); roomspanel.$el.find('form').submit();
$('.toggle-online-users').click(); $('.toggle-online-users').click();
...@@ -110,8 +112,10 @@ ...@@ -110,8 +112,10 @@
beforeEach($.proxy(function () { beforeEach($.proxy(function () {
var roomspanel = this.chatboxesview.views.controlbox.roomspanel; var roomspanel = this.chatboxesview.views.controlbox.roomspanel;
var $input = roomspanel.$el.find('input.new-chatroom-name'); var $input = roomspanel.$el.find('input.new-chatroom-name');
var $nick = roomspanel.$el.find('input.new-chatroom-nick');
var $server = roomspanel.$el.find('input.new-chatroom-server'); var $server = roomspanel.$el.find('input.new-chatroom-server');
$input.val('problematic'); $input.val('problematic');
$nick.val('dummy');
$server.val('muc.localhost'); $server.val('muc.localhost');
roomspanel.$el.find('form').submit(); roomspanel.$el.find('form').submit();
}, converse)); }, converse));
......
...@@ -621,6 +621,7 @@ ...@@ -621,6 +621,7 @@
it("contains a form through which a new chatroom can be created", $.proxy(function () { it("contains a form through which a new chatroom can be created", $.proxy(function () {
var roomspanel = this.chatboxesview.views.controlbox.roomspanel; var roomspanel = this.chatboxesview.views.controlbox.roomspanel;
var $input = roomspanel.$el.find('input.new-chatroom-name'); var $input = roomspanel.$el.find('input.new-chatroom-name');
var $nick = roomspanel.$el.find('input.new-chatroom-nick');
var $server = roomspanel.$el.find('input.new-chatroom-server'); var $server = roomspanel.$el.find('input.new-chatroom-server');
expect($input.length).toBe(1); expect($input.length).toBe(1);
expect($server.length).toBe(1); expect($server.length).toBe(1);
...@@ -629,6 +630,7 @@ ...@@ -629,6 +630,7 @@
roomspanel.delegateEvents(); // We need to rebind all events otherwise our spy won't be called roomspanel.delegateEvents(); // We need to rebind all events otherwise our spy won't be called
runs(function () { runs(function () {
$input.val('Lounge'); $input.val('Lounge');
$nick.val('dummy');
$server.val('muc.localhost'); $server.val('muc.localhost');
}); });
waits('250'); waits('250');
......
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