mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 16:06: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,11 +1,11 @@
|
|||
describe("Chat messages and UI", function(){
|
||||
//create a new pad before each test run
|
||||
beforeEach(function(cb){
|
||||
describe('Chat messages and UI', function () {
|
||||
// create a new pad before each test run
|
||||
beforeEach(function (cb) {
|
||||
helper.newPad(cb);
|
||||
});
|
||||
|
||||
it("opens chat, sends a message, makes sure it exists on the page and hides chat", async function() {
|
||||
var chatValue = "JohnMcLear";
|
||||
it('opens chat, sends a message, makes sure it exists on the page and hides chat', async function () {
|
||||
const chatValue = 'JohnMcLear';
|
||||
|
||||
await helper.showChat();
|
||||
await helper.sendChatMessage(`${chatValue}{enter}`);
|
||||
|
@ -18,33 +18,33 @@ describe("Chat messages and UI", function(){
|
|||
// <span class="time author-a-qjkwz78zs4z122z0pz80zz82zz79zphz83z">12:38
|
||||
// </span> JohnMcLear
|
||||
// </p>
|
||||
let username = helper.chatTextParagraphs().children("b").text();
|
||||
let time = helper.chatTextParagraphs().children(".time").text();
|
||||
const username = helper.chatTextParagraphs().children('b').text();
|
||||
const time = helper.chatTextParagraphs().children('.time').text();
|
||||
|
||||
expect(helper.chatTextParagraphs().text()).to.be(`${username}${time} ${chatValue}`);
|
||||
|
||||
await helper.hideChat();
|
||||
});
|
||||
|
||||
it("makes sure that an empty message can't be sent", async function() {
|
||||
var chatValue = "mluto";
|
||||
it("makes sure that an empty message can't be sent", async function () {
|
||||
const chatValue = 'mluto';
|
||||
|
||||
await helper.showChat();
|
||||
|
||||
await helper.sendChatMessage(`{enter}${chatValue}{enter}`); // simulate a keypress of typing enter, mluto and enter (to send 'mluto')
|
||||
|
||||
let chat = helper.chatTextParagraphs();
|
||||
const chat = helper.chatTextParagraphs();
|
||||
|
||||
expect(chat.length).to.be(1);
|
||||
|
||||
// check that the received message is not the empty one
|
||||
let username = chat.children("b").text();
|
||||
let time = chat.children(".time").text();
|
||||
const username = chat.children('b').text();
|
||||
const time = chat.children('.time').text();
|
||||
|
||||
expect(chat.text()).to.be(`${username}${time} ${chatValue}`);
|
||||
});
|
||||
|
||||
it("makes chat stick to right side of the screen via settings, remove sticky via settings, close it", async function() {
|
||||
it('makes chat stick to right side of the screen via settings, remove sticky via settings, close it', async function () {
|
||||
await helper.showSettings();
|
||||
|
||||
await helper.enableStickyChatviaSettings();
|
||||
|
@ -60,7 +60,7 @@ describe("Chat messages and UI", function(){
|
|||
expect(helper.isChatboxShown()).to.be(false);
|
||||
});
|
||||
|
||||
it("makes chat stick to right side of the screen via icon on the top right, remove sticky via icon, close it", async function() {
|
||||
it('makes chat stick to right side of the screen via icon on the top right, remove sticky via icon, close it', async function () {
|
||||
await helper.showChat();
|
||||
|
||||
await helper.enableStickyChatviaIcon();
|
||||
|
@ -76,39 +76,36 @@ describe("Chat messages and UI", function(){
|
|||
expect(helper.isChatboxShown()).to.be(false);
|
||||
});
|
||||
|
||||
xit("Checks showChat=false URL Parameter hides chat then when removed it shows chat", function(done) {
|
||||
xit('Checks showChat=false URL Parameter hides chat then when removed it shows chat', function (done) {
|
||||
this.timeout(60000);
|
||||
var inner$ = helper.padInner$;
|
||||
var chrome$ = helper.padChrome$;
|
||||
const inner$ = helper.padInner$;
|
||||
const chrome$ = helper.padChrome$;
|
||||
|
||||
setTimeout(function(){ //give it a second to save the username on the server side
|
||||
setTimeout(() => { // give it a second to save the username on the server side
|
||||
helper.newPad({ // get a new pad, but don't clear the cookies
|
||||
clearCookies: false,
|
||||
params:{
|
||||
showChat: "false"
|
||||
}, cb: function(){
|
||||
var chrome$ = helper.padChrome$;
|
||||
var chaticon = chrome$("#chaticon");
|
||||
params: {
|
||||
showChat: 'false',
|
||||
}, cb() {
|
||||
const chrome$ = helper.padChrome$;
|
||||
const chaticon = chrome$('#chaticon');
|
||||
// chat should be hidden.
|
||||
expect(chaticon.is(":visible")).to.be(false);
|
||||
expect(chaticon.is(':visible')).to.be(false);
|
||||
|
||||
setTimeout(function(){ //give it a second to save the username on the server side
|
||||
setTimeout(() => { // give it a second to save the username on the server side
|
||||
helper.newPad({ // get a new pad, but don't clear the cookies
|
||||
clearCookies: false
|
||||
, cb: function(){
|
||||
var chrome$ = helper.padChrome$;
|
||||
var chaticon = chrome$("#chaticon");
|
||||
clearCookies: false,
|
||||
cb() {
|
||||
const chrome$ = helper.padChrome$;
|
||||
const chaticon = chrome$('#chaticon');
|
||||
// chat should be visible.
|
||||
expect(chaticon.is(":visible")).to.be(true);
|
||||
expect(chaticon.is(':visible')).to.be(true);
|
||||
done();
|
||||
}
|
||||
},
|
||||
});
|
||||
}, 1000);
|
||||
|
||||
}
|
||||
},
|
||||
});
|
||||
}, 1000);
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue