mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-14 11:06:55 -04:00
Added a simple test
This commit is contained in:
parent
6a7f4a8906
commit
18e98382c0
1 changed files with 28 additions and 0 deletions
|
@ -36,4 +36,32 @@ describe("send chat message", function(){
|
|||
});
|
||||
|
||||
});
|
||||
|
||||
it("checks for the date-hover on chat-messages", function(done) {
|
||||
var inner$ = helper.padInner$;
|
||||
var chrome$ = helper.padChrome$;
|
||||
var chatValue = "JohnMcLear";
|
||||
|
||||
//click on the chat button to make chat visible
|
||||
var $chatButton = chrome$("#chaticon");
|
||||
$chatButton.click();
|
||||
var $chatInput = chrome$("#chatinput");
|
||||
$chatInput.sendkeys('JohnMcLear'); // 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 time = $firstChatMessage.children(".time");
|
||||
var dateValue = time.attr('title');
|
||||
// can't test any further because the date is i18nzed..
|
||||
expect(dateValue).not.to.be(undefined);
|
||||
expect(dateValue).not.to.be('');
|
||||
done();
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue