mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-25 01:46:14 -04:00
Merge branch 'develop' into mochawesome
This commit is contained in:
commit
7630e71957
75 changed files with 1347 additions and 1020 deletions
|
@ -94,7 +94,7 @@ const testImports = {
|
|||
wantText: ' word1 word2 word3\n\n',
|
||||
},
|
||||
'nonBreakingSpacePreceededBySpaceBetweenWords': {
|
||||
description: 'A non-breaking space preceeded by a normal space',
|
||||
description: 'A non-breaking space preceded by a normal space',
|
||||
input: '<html><body> word1 word2 word3<br></body></html>',
|
||||
wantHTML: '<!DOCTYPE HTML><html><body> word1 word2 word3<br><br></body></html>',
|
||||
wantText: ' word1 word2 word3\n\n',
|
||||
|
@ -191,7 +191,7 @@ const testImports = {
|
|||
wantText: 'а б в г ґ д е є ж з и і ї й к л м н о\nmultiple\n lines\n in\n pre\n\nп р с т у ф х ц ч ш щ ю я ь\n\n',
|
||||
},
|
||||
'preIntroducesASpace': {
|
||||
description: 'pre should be on a new line not preceeded by a space',
|
||||
description: 'pre should be on a new line not preceded by a space',
|
||||
input: `<html><body><p>
|
||||
1
|
||||
<pre>preline
|
||||
|
|
|
@ -107,9 +107,9 @@ describe(__filename, function () {
|
|||
-> setText(padId, "hello world")
|
||||
-> getLastEdited(padID) -- Should be when pad was made
|
||||
-> getText(padId) -- Should be "hello world"
|
||||
-> movePad(padID, newPadId) -- Should provide consistant pad data
|
||||
-> movePad(padID, newPadId) -- Should provide consistent pad data
|
||||
-> getText(newPadId) -- Should be "hello world"
|
||||
-> movePad(newPadID, originalPadId) -- Should provide consistant pad data
|
||||
-> movePad(newPadID, originalPadId) -- Should provide consistent pad data
|
||||
-> getText(originalPadId) -- Should be "hello world"
|
||||
-> getLastEdited(padID) -- Should not be 0
|
||||
-> appendText(padID, "hello")
|
||||
|
|
|
@ -100,6 +100,83 @@ describe(__filename, function () {
|
|||
assert(res.body.data.groupID);
|
||||
});
|
||||
});
|
||||
|
||||
// Test coverage for https://github.com/ether/etherpad-lite/issues/4227
|
||||
// Creates a group, creates 2 sessions, 2 pads and then deletes the group.
|
||||
it('createGroup', async function () {
|
||||
await api.get(endPoint('createGroup'))
|
||||
.expect(200)
|
||||
.expect('Content-Type', /json/)
|
||||
.expect((res) => {
|
||||
assert.equal(res.body.code, 0);
|
||||
assert(res.body.data.groupID);
|
||||
groupID = res.body.data.groupID;
|
||||
});
|
||||
});
|
||||
|
||||
it('createAuthor', async function () {
|
||||
await api.get(endPoint('createAuthor'))
|
||||
.expect(200)
|
||||
.expect('Content-Type', /json/)
|
||||
.expect((res) => {
|
||||
assert.equal(res.body.code, 0);
|
||||
assert(res.body.data.authorID);
|
||||
authorID = res.body.data.authorID;
|
||||
});
|
||||
});
|
||||
|
||||
it('createSession', async function () {
|
||||
await api.get(`${endPoint('createSession')
|
||||
}&authorID=${authorID}&groupID=${groupID}&validUntil=999999999999`)
|
||||
.expect(200)
|
||||
.expect('Content-Type', /json/)
|
||||
.expect((res) => {
|
||||
assert.equal(res.body.code, 0);
|
||||
assert(res.body.data.sessionID);
|
||||
sessionID = res.body.data.sessionID;
|
||||
});
|
||||
});
|
||||
|
||||
it('createSession', async function () {
|
||||
await api.get(`${endPoint('createSession')
|
||||
}&authorID=${authorID}&groupID=${groupID}&validUntil=999999999999`)
|
||||
.expect(200)
|
||||
.expect('Content-Type', /json/)
|
||||
.expect((res) => {
|
||||
assert.equal(res.body.code, 0);
|
||||
assert(res.body.data.sessionID);
|
||||
sessionID = res.body.data.sessionID;
|
||||
});
|
||||
});
|
||||
|
||||
it('createGroupPad', async function () {
|
||||
await api.get(`${endPoint('createGroupPad')}&groupID=${groupID}&padName=x1234567`)
|
||||
.expect(200)
|
||||
.expect('Content-Type', /json/)
|
||||
.expect((res) => {
|
||||
assert.equal(res.body.code, 0);
|
||||
});
|
||||
});
|
||||
|
||||
it('createGroupPad', async function () {
|
||||
await api.get(`${endPoint('createGroupPad')}&groupID=${groupID}&padName=x12345678`)
|
||||
.expect(200)
|
||||
.expect('Content-Type', /json/)
|
||||
.expect((res) => {
|
||||
assert.equal(res.body.code, 0);
|
||||
});
|
||||
});
|
||||
|
||||
it('deleteGroup', async function () {
|
||||
await api.get(`${endPoint('deleteGroup')}&groupID=${groupID}`)
|
||||
.expect(200)
|
||||
.expect('Content-Type', /json/)
|
||||
.expect((res) => {
|
||||
assert.equal(res.body.code, 0);
|
||||
});
|
||||
});
|
||||
// End of coverage for https://github.com/ether/etherpad-lite/issues/4227
|
||||
|
||||
});
|
||||
|
||||
describe('API: Author creation', function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue