2022-05-18 12:01:30 +00:00
|
|
|
import selectors from '../../helpers/selectors.js';
|
|
|
|
import getBrowser from '../../helpers/puppeteer';
|
|
|
|
|
2022-05-18 13:02:06 +00:00
|
|
|
describe('Account Accounts path', () => {
|
2022-05-18 12:01:30 +00:00
|
|
|
let browser;
|
|
|
|
let page;
|
|
|
|
|
|
|
|
beforeAll(async() => {
|
|
|
|
browser = await getBrowser();
|
|
|
|
page = browser.page;
|
|
|
|
await page.loginAndModule('sysadmin', 'account');
|
|
|
|
await page.accessToSection('account.accounts');
|
|
|
|
});
|
|
|
|
|
|
|
|
afterAll(async() => {
|
|
|
|
await browser.close();
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should sync roles', async() => {
|
|
|
|
await page.waitToClick(selectors.accountAccounts.syncRoles);
|
|
|
|
const message = await page.waitForSnackbar();
|
|
|
|
|
|
|
|
expect(message.text).toContain('Roles synchronized!');
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should relogin', async() => {
|
|
|
|
await page.loginAndModule('sysadmin', 'account');
|
|
|
|
await page.accessToSection('account.accounts');
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should sync all', async() => {
|
|
|
|
await page.waitToClick(selectors.accountAccounts.syncAll);
|
|
|
|
const message = await page.waitForSnackbar();
|
|
|
|
|
|
|
|
expect(message.text).toContain('Synchronizing in the background');
|
|
|
|
});
|
|
|
|
});
|