tests front chat going from stiky to smally

This commit is contained in:
John McLear 2014-12-28 20:25:46 +01:00
parent 74eca43965
commit 9715e039cd
1 changed files with 31 additions and 0 deletions

View File

@ -96,4 +96,35 @@ describe("Chat messages and UI", function(){
done();
});
it("makes chat stick to right side of the screen then makes it one step smaller", function(done) {
var inner$ = helper.padInner$;
var chrome$ = helper.padChrome$;
//click on the settings button to make settings visible
var $settingsButton = chrome$(".buttonicon-settings");
$settingsButton.click();
//get the chat selector
var $stickychatCheckbox = chrome$("#options-stickychat");
//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 $chatbox = chrome$("#chatbox");
var hasStickyChatClass = $chatbox.hasClass("stickyChat");
expect(hasStickyChatClass).to.be(true);
//select chat always on screen and fire change event
chrome$('#titlecross').click();
//check if chat changed to remove the stickychat Class
var hasStickyChatClass = $chatbox.hasClass("stickyChat");
expect(hasStickyChatClass).to.be(false);
done();
});
});