2022-05-19 13:02:39 +00:00
|
|
|
import selectors from '../../helpers/selectors.js';
|
|
|
|
import getBrowser from '../../helpers/puppeteer';
|
|
|
|
|
|
|
|
describe('Account Samba path', () => {
|
|
|
|
let browser;
|
|
|
|
let page;
|
|
|
|
|
|
|
|
beforeAll(async() => {
|
|
|
|
browser = await getBrowser();
|
|
|
|
page = browser.page;
|
|
|
|
await page.loginAndModule('sysadmin', 'account');
|
|
|
|
await page.accessToSection('account.samba');
|
|
|
|
});
|
|
|
|
|
|
|
|
afterAll(async() => {
|
|
|
|
await browser.close();
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should set data and save', async() => {
|
|
|
|
await page.waitToClick(selectors.accountSamba.checkEnable);
|
|
|
|
await page.write(selectors.accountSamba.adDomain, '1234');
|
|
|
|
await page.write(selectors.accountSamba.adController, '1234');
|
|
|
|
await page.write(selectors.accountSamba.adUser, 'nightmare');
|
|
|
|
await page.write(selectors.accountSamba.adPassword, 'sysadmin');
|
|
|
|
await page.waitToClick(selectors.accountSamba.verifyCert);
|
|
|
|
await page.waitToClick(selectors.accountSamba.save);
|
|
|
|
|
|
|
|
const message = await page.waitForSnackbar();
|
|
|
|
|
|
|
|
expect(message.text).toContain('Data saved!');
|
|
|
|
});
|
2022-10-26 06:27:28 +00:00
|
|
|
|
|
|
|
it('should reset data', async() => {
|
|
|
|
await page.waitToClick(selectors.accountSamba.checkEnable);
|
|
|
|
await page.waitToClick(selectors.accountSamba.save);
|
|
|
|
|
|
|
|
const message = await page.waitForSnackbar();
|
|
|
|
|
|
|
|
expect(message.text).toContain('Data saved!');
|
|
|
|
});
|
2022-05-19 13:02:39 +00:00
|
|
|
});
|