test(account): e2e for ldap and samba
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
68c94ec3c1
commit
3650567caf
|
@ -124,6 +124,24 @@ export default {
|
|||
syncUserPassword: 'vn-textfield[ng-model="$ctrl.syncPassword"]',
|
||||
buttonAccept: 'button[response="accept"]'
|
||||
},
|
||||
accountLdap: {
|
||||
checkEnable: 'vn-account-ldap vn-check[ng-model="watcher.hasData"]',
|
||||
server: 'vn-account-ldap vn-textfield[ng-model="$ctrl.config.server"]',
|
||||
rdn: 'vn-account-ldap vn-textfield[ng-model="$ctrl.config.rdn"]',
|
||||
password: 'vn-account-ldap vn-textfield[ng-model="$ctrl.config.password"]',
|
||||
userDn: 'vn-account-ldap vn-textfield[ng-model="$ctrl.config.userDn"]',
|
||||
groupDn: 'vn-account-ldap vn-textfield[ng-model="$ctrl.config.groupDn"]',
|
||||
save: 'vn-account-ldap vn-submit'
|
||||
},
|
||||
accountSamba: {
|
||||
checkEnable: 'vn-account-samba vn-check[ng-model="watcher.hasData"]',
|
||||
adDomain: 'vn-account-samba vn-textfield[ng-model="$ctrl.config.adDomain"]',
|
||||
adController: 'vn-account-samba vn-textfield[ng-model="$ctrl.config.adController"]',
|
||||
adUser: 'vn-account-samba vn-textfield[ng-model="$ctrl.config.adUser"]',
|
||||
adPassword: 'vn-account-samba vn-textfield[ng-model="$ctrl.config.adPassword"]',
|
||||
verifyCert: 'vn-account-samba vn-check[ng-model="$ctrl.config.verifyCert"]',
|
||||
save: 'vn-account-samba vn-submit'
|
||||
},
|
||||
clientsIndex: {
|
||||
createClientButton: `vn-float-button`
|
||||
},
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
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!');
|
||||
});
|
||||
});
|
|
@ -0,0 +1,32 @@
|
|||
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!');
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue