web access user changed to a non-worker
gitea/salix/pipeline/head This commit is unstable Details

This commit is contained in:
Carlos Jimenez Ruiz 2022-06-17 09:28:54 +02:00
parent 1e504b6b9f
commit 9e70b8c5fd
1 changed files with 9 additions and 10 deletions

View File

@ -2,14 +2,13 @@ import selectors from '../../helpers/selectors';
import getBrowser from '../../helpers/puppeteer'; import getBrowser from '../../helpers/puppeteer';
describe('Client Edit web access path', () => { describe('Client Edit web access path', () => {
pending('#4170 e2e account descriptor');
let browser; let browser;
let page; let page;
beforeAll(async() => { beforeAll(async() => {
browser = await getBrowser(); browser = await getBrowser();
page = browser.page; page = browser.page;
await page.loginAndModule('employee', 'client'); await page.loginAndModule('employee', 'client');
await page.accessToSearchResult('Bruce Banner'); await page.accessToSearchResult('1105');
await page.accessToSection('client.card.webAccess'); await page.accessToSection('client.card.webAccess');
}); });
@ -27,7 +26,7 @@ describe('Client Edit web access path', () => {
it(`should update the name`, async() => { it(`should update the name`, async() => {
await page.clearInput(selectors.clientWebAccess.userName); await page.clearInput(selectors.clientWebAccess.userName);
await page.write(selectors.clientWebAccess.userName, 'Hulk'); await page.write(selectors.clientWebAccess.userName, 'Legion');
await page.waitToClick(selectors.clientWebAccess.saveButton); await page.waitToClick(selectors.clientWebAccess.saveButton);
const message = await page.waitForSnackbar(); const message = await page.waitForSnackbar();
@ -44,30 +43,30 @@ describe('Client Edit web access path', () => {
it('should confirm web access name have been updated', async() => { it('should confirm web access name have been updated', async() => {
const result = await page.waitToGetProperty(selectors.clientWebAccess.userName, 'value'); const result = await page.waitToGetProperty(selectors.clientWebAccess.userName, 'value');
expect(result).toEqual('Hulk'); expect(result).toEqual('Legion');
}); });
it(`should navigate to the log section`, async() => { it(`should navigate to the log section`, async() => {
await page.accessToSection('client.card.log'); await page.accessToSection('client.card.log');
}); });
it(`should confirm the last log is showing the updated client name and no modifications on the active checkbox`, async() => { it(`should confirm the last log shows the updated client name and no modifications on active checkbox`, async() => {
let lastModificationPreviousValue = await page let lastModificationPreviousValue = await page
.waitToGetProperty(selectors.clientLog.lastModificationPreviousValue, 'innerText'); .waitToGetProperty(selectors.clientLog.lastModificationPreviousValue, 'innerText');
let lastModificationCurrentValue = await page let lastModificationCurrentValue = await page
.waitToGetProperty(selectors.clientLog.lastModificationCurrentValue, 'innerText'); .waitToGetProperty(selectors.clientLog.lastModificationCurrentValue, 'innerText');
expect(lastModificationPreviousValue).toEqual('name BruceBanner active false'); expect(lastModificationPreviousValue).toEqual('name MaxEisenhardt active false');
expect(lastModificationCurrentValue).toEqual('name Hulk active false'); expect(lastModificationCurrentValue).toEqual('name Legion active false');
}); });
it(`should confirm the penultimate log is showing the updated avtive field and no modifications on the client name`, async() => { it(`should confirm the penultimate log shows the updated active and no modifications on client name`, async() => {
let penultimateModificationPreviousValue = await page let penultimateModificationPreviousValue = await page
.waitToGetProperty(selectors.clientLog.penultimateModificationPreviousValue, 'innerText'); .waitToGetProperty(selectors.clientLog.penultimateModificationPreviousValue, 'innerText');
let penultimateModificationCurrentValue = await page let penultimateModificationCurrentValue = await page
.waitToGetProperty(selectors.clientLog.penultimateModificationCurrentValue, 'innerText'); .waitToGetProperty(selectors.clientLog.penultimateModificationCurrentValue, 'innerText');
expect(penultimateModificationPreviousValue).toEqual('name BruceBanner active true'); expect(penultimateModificationPreviousValue).toEqual('name MaxEisenhardt active true');
expect(penultimateModificationCurrentValue).toEqual('name BruceBanner active false'); expect(penultimateModificationCurrentValue).toEqual('name MaxEisenhardt active false');
}); });
}); });