mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00
lint: Run eslint --fix
on bin/
and tests/
This commit is contained in:
parent
0625739cb8
commit
b8d07a42eb
78 changed files with 4319 additions and 4599 deletions
|
@ -1,85 +1,77 @@
|
|||
describe("chat-load-messages", function(){
|
||||
var padName;
|
||||
describe('chat-load-messages', function () {
|
||||
let padName;
|
||||
|
||||
it("creates a pad", function(done) {
|
||||
it('creates a pad', function (done) {
|
||||
padName = helper.newPad(done);
|
||||
this.timeout(60000);
|
||||
});
|
||||
|
||||
it("adds a lot of messages", function(done) {
|
||||
var inner$ = helper.padInner$;
|
||||
var chrome$ = helper.padChrome$;
|
||||
var chatButton = chrome$("#chaticon");
|
||||
it('adds a lot of messages', function (done) {
|
||||
const inner$ = helper.padInner$;
|
||||
const chrome$ = helper.padChrome$;
|
||||
const chatButton = chrome$('#chaticon');
|
||||
chatButton.click();
|
||||
var chatInput = chrome$("#chatinput");
|
||||
var chatText = chrome$("#chattext");
|
||||
const chatInput = chrome$('#chatinput');
|
||||
const chatText = chrome$('#chattext');
|
||||
|
||||
this.timeout(60000);
|
||||
|
||||
var messages = 140;
|
||||
for(var i=1; i <= messages; i++) {
|
||||
var num = ''+i;
|
||||
if(num.length == 1)
|
||||
num = '00'+num;
|
||||
if(num.length == 2)
|
||||
num = '0'+num;
|
||||
chatInput.sendkeys('msg' + num);
|
||||
const messages = 140;
|
||||
for (let i = 1; i <= messages; i++) {
|
||||
let num = `${i}`;
|
||||
if (num.length == 1) num = `00${num}`;
|
||||
if (num.length == 2) num = `0${num}`;
|
||||
chatInput.sendkeys(`msg${num}`);
|
||||
chatInput.sendkeys('{enter}');
|
||||
}
|
||||
helper.waitFor(function(){
|
||||
return chatText.children("p").length == messages;
|
||||
}, 60000).always(function(){
|
||||
expect(chatText.children("p").length).to.be(messages);
|
||||
helper.waitFor(() => chatText.children('p').length == messages, 60000).always(() => {
|
||||
expect(chatText.children('p').length).to.be(messages);
|
||||
helper.newPad(done, padName);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it("checks initial message count", function(done) {
|
||||
var chatText;
|
||||
var expectedCount = 101;
|
||||
var chrome$ = helper.padChrome$;
|
||||
helper.waitFor(function(){
|
||||
var chatButton = chrome$("#chaticon");
|
||||
it('checks initial message count', function (done) {
|
||||
let chatText;
|
||||
const expectedCount = 101;
|
||||
const chrome$ = helper.padChrome$;
|
||||
helper.waitFor(() => {
|
||||
const chatButton = chrome$('#chaticon');
|
||||
chatButton.click();
|
||||
chatText = chrome$("#chattext");
|
||||
return chatText.children("p").length == expectedCount;
|
||||
}).always(function(){
|
||||
expect(chatText.children("p").length).to.be(expectedCount);
|
||||
chatText = chrome$('#chattext');
|
||||
return chatText.children('p').length == expectedCount;
|
||||
}).always(() => {
|
||||
expect(chatText.children('p').length).to.be(expectedCount);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it("loads more messages", function(done) {
|
||||
var expectedCount = 122;
|
||||
var chrome$ = helper.padChrome$;
|
||||
var chatButton = chrome$("#chaticon");
|
||||
it('loads more messages', function (done) {
|
||||
const expectedCount = 122;
|
||||
const chrome$ = helper.padChrome$;
|
||||
const chatButton = chrome$('#chaticon');
|
||||
chatButton.click();
|
||||
var chatText = chrome$("#chattext");
|
||||
var loadMsgBtn = chrome$("#chatloadmessagesbutton");
|
||||
const chatText = chrome$('#chattext');
|
||||
const loadMsgBtn = chrome$('#chatloadmessagesbutton');
|
||||
|
||||
loadMsgBtn.click();
|
||||
helper.waitFor(function(){
|
||||
return chatText.children("p").length == expectedCount;
|
||||
}).always(function(){
|
||||
expect(chatText.children("p").length).to.be(expectedCount);
|
||||
helper.waitFor(() => chatText.children('p').length == expectedCount).always(() => {
|
||||
expect(chatText.children('p').length).to.be(expectedCount);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it("checks for button vanishing", function(done) {
|
||||
var expectedDisplay = 'none';
|
||||
var chrome$ = helper.padChrome$;
|
||||
var chatButton = chrome$("#chaticon");
|
||||
it('checks for button vanishing', function (done) {
|
||||
const expectedDisplay = 'none';
|
||||
const chrome$ = helper.padChrome$;
|
||||
const chatButton = chrome$('#chaticon');
|
||||
chatButton.click();
|
||||
var chatText = chrome$("#chattext");
|
||||
var loadMsgBtn = chrome$("#chatloadmessagesbutton");
|
||||
var loadMsgBall = chrome$("#chatloadmessagesball");
|
||||
const chatText = chrome$('#chattext');
|
||||
const loadMsgBtn = chrome$('#chatloadmessagesbutton');
|
||||
const loadMsgBall = chrome$('#chatloadmessagesball');
|
||||
|
||||
loadMsgBtn.click();
|
||||
helper.waitFor(function(){
|
||||
return loadMsgBtn.css('display') == expectedDisplay &&
|
||||
loadMsgBall.css('display') == expectedDisplay;
|
||||
}).always(function(){
|
||||
helper.waitFor(() => loadMsgBtn.css('display') == expectedDisplay &&
|
||||
loadMsgBall.css('display') == expectedDisplay).always(() => {
|
||||
expect(loadMsgBtn.css('display')).to.be(expectedDisplay);
|
||||
expect(loadMsgBall.css('display')).to.be(expectedDisplay);
|
||||
done();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue