extend changing username to make sure it shows up the changes in the chat dialogue for new messages
This commit is contained in:
parent
b4680e42d7
commit
e33678e625
|
@ -26,6 +26,24 @@ describe("change username value", function(){
|
|||
//check if the username has been changed to John McLear
|
||||
expect(correctUsernameValue).to.be(true);
|
||||
|
||||
|
||||
|
||||
//click on the chat button to make chat visible
|
||||
var $chatButton = chrome$("#chaticon");
|
||||
$chatButton.click();
|
||||
var $chatInput = chrome$("#chatinput");
|
||||
$chatInput.sendkeys('O hi'); // simulate a keypress of typing JohnMcLear
|
||||
$chatInput.sendkeys('{enter}'); // simulate a keypress of enter actually does evt.which = 10 not 13
|
||||
|
||||
//check if chat shows up
|
||||
helper.waitFor(function(){
|
||||
return chrome$("#chattext").children("p").length !== 0; // wait until the chat message shows up
|
||||
}).done(function(){
|
||||
var $firstChatMessage = chrome$("#chattext").children("p");
|
||||
var containsJohnMcLear = $firstChatMessage.text().indexOf("John McLear") !== -1; // does the string contain Jo$
|
||||
expect(containsJohnMcLear).to.be(true); // expect the first chat message to contain JohnMcLear
|
||||
});
|
||||
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue