fix chat always on screen test

pull/1097/merge
John McLear 2012-10-28 18:25:29 +00:00
parent 72d40fcfd4
commit e9e59700ae
1 changed files with 13 additions and 2 deletions

View File

@ -16,14 +16,25 @@ describe("chat always ons creen select", function(){
//get the chat selector
var $stickychatCheckbox = chrome$("#options-stickychat");
//select monospace and fire change event
//select chat always on screen and fire change event
$stickychatCheckbox.attr('selected','selected');
$stickychatCheckbox.change();
$stickychatCheckbox.click();
//check if chat changed to get the stickychat Class
var hasStickyChatClass = chrome$(".chatbox").hasClass("stickychat");
var $chatbox = chrome$("#chatbox");
var hasStickyChatClass = $chatbox.hasClass("stickyChat");
expect(hasStickyChatClass).to.be(true);
//select chat always on screen and fire change event
$stickychatCheckbox.attr('selected','selected');
$stickychatCheckbox.change();
$stickychatCheckbox.click();
//check if chat changed to remove the stickychat Class
var hasStickyChatClass = $chatbox.hasClass("stickyChat");
expect(hasStickyChatClass).to.be(false);
done();
});
});