mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 08:26:16 -04:00
tests: frontend tests for admin UI
This commit is contained in:
parent
21cc298d6d
commit
c639e743d7
4 changed files with 274 additions and 0 deletions
29
src/tests/frontend/specs/adminroot.js
Normal file
29
src/tests/frontend/specs/adminroot.js
Normal file
|
@ -0,0 +1,29 @@
|
|||
'use strict';
|
||||
|
||||
describe('Admin page', function () {
|
||||
before(async function () {
|
||||
let success = false;
|
||||
$.ajax({
|
||||
url: `${location.protocol}//admin:changeme@${location.hostname}:${location.port}/admin/`,
|
||||
type: 'GET',
|
||||
success: () => success = true,
|
||||
});
|
||||
await helper.waitForPromise(() => success === true);
|
||||
});
|
||||
|
||||
beforeEach(async function () {
|
||||
helper.newAdmin('');
|
||||
await helper.waitForPromise(
|
||||
() => helper.admin$ && helper.admin$('.menu').find('li').length >= 3);
|
||||
});
|
||||
|
||||
it('Shows Plugin Manager Link', async function () {
|
||||
helper.admin$('a[data-l10n-id="admin_plugins"]').is(':visible');
|
||||
});
|
||||
it('Shows Troubleshooting Info Link', async function () {
|
||||
helper.admin$('a[data-l10n-id="admin_plugins_info"]').is(':visible');
|
||||
});
|
||||
it('Shows Settings Link', async function () {
|
||||
helper.admin$('a[data-l10n-id="admin_settings"]').is(':visible');
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue