34 lines
1.1 KiB
JavaScript
34 lines
1.1 KiB
JavaScript
import selectors from '../../helpers/selectors.js';
|
|
import getBrowser from '../../helpers/puppeteer';
|
|
|
|
describe('Account Connections path', () => {
|
|
let browser;
|
|
let page;
|
|
const account = 'sysadmin';
|
|
|
|
beforeAll(async() => {
|
|
browser = await getBrowser();
|
|
page = browser.page;
|
|
await page.loginAndModule(account, 'account');
|
|
await page.accessToSection('account.connections');
|
|
});
|
|
|
|
afterAll(async() => {
|
|
await browser.close();
|
|
});
|
|
|
|
it('should check this is the last connection', async() => {
|
|
const firstResult = await page.waitToGetProperty(selectors.accountConnections.firstConnection, 'innerText');
|
|
|
|
expect(firstResult).toContain(account);
|
|
});
|
|
|
|
it('should kill this connection and then get redirected to the login page', async() => {
|
|
await page.waitToClick(selectors.accountConnections.deleteFirstConnection);
|
|
await page.waitToClick(selectors.globalItems.acceptButton);
|
|
const message = await page.waitForSnackbar();
|
|
|
|
expect(message.text).toContain('Your session has expired, please login again');
|
|
});
|
|
});
|