tests: frontend tests for admin UI

This commit is contained in:
John McLear 2021-02-06 20:13:35 +00:00
parent 21cc298d6d
commit c639e743d7
4 changed files with 274 additions and 0 deletions

View 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');
});
});