From 9715e039cdc1e98a872cdb9d4dad36f16498add3 Mon Sep 17 00:00:00 2001 From: John McLear Date: Sun, 28 Dec 2014 20:25:46 +0100 Subject: [PATCH] tests front chat going from stiky to smally --- tests/frontend/specs/chat.js | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/tests/frontend/specs/chat.js b/tests/frontend/specs/chat.js index ccb8b569..7ebb76fb 100644 --- a/tests/frontend/specs/chat.js +++ b/tests/frontend/specs/chat.js @@ -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(); + }); });