42 lines
1.3 KiB
JavaScript
42 lines
1.3 KiB
JavaScript
import selectors from '../../helpers/selectors.js';
|
|
import getBrowser from '../../helpers/puppeteer';
|
|
|
|
describe('Account LDAP path', () => {
|
|
let browser;
|
|
let page;
|
|
|
|
beforeAll(async() => {
|
|
browser = await getBrowser();
|
|
page = browser.page;
|
|
await page.loginAndModule('sysadmin', 'account');
|
|
await page.accessToSection('account.ldap');
|
|
});
|
|
|
|
afterAll(async() => {
|
|
await browser.close();
|
|
});
|
|
|
|
it('should set data and save', async() => {
|
|
await page.waitToClick(selectors.accountLdap.checkEnable);
|
|
await page.write(selectors.accountLdap.server, '1234');
|
|
await page.write(selectors.accountLdap.rdn, '1234');
|
|
await page.write(selectors.accountLdap.password, 'nightmare');
|
|
await page.write(selectors.accountLdap.userDn, 'sysadmin');
|
|
await page.write(selectors.accountLdap.groupDn, '1234');
|
|
await page.waitToClick(selectors.accountLdap.save);
|
|
|
|
const message = await page.waitForSnackbar();
|
|
|
|
expect(message.text).toContain('Data saved!');
|
|
});
|
|
|
|
it('should reset data', async() => {
|
|
await page.waitToClick(selectors.accountLdap.checkEnable);
|
|
await page.waitToClick(selectors.accountLdap.save);
|
|
|
|
const message = await page.waitForSnackbar();
|
|
|
|
expect(message.text).toContain('Data saved!');
|
|
});
|
|
});
|