Merge branch '3014-invoiceIn_clone_from_descriptor' of https://gitea.verdnatura.es/verdnatura/salix into 3014-invoiceIn_clone_from_descriptor
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
commit
caedfff34e
|
@ -258,7 +258,9 @@ export default {
|
||||||
},
|
},
|
||||||
clientLog: {
|
clientLog: {
|
||||||
lastModificationPreviousValue: 'vn-client-log vn-table vn-td.before',
|
lastModificationPreviousValue: 'vn-client-log vn-table vn-td.before',
|
||||||
lastModificationCurrentValue: 'vn-client-log vn-table vn-td.after'
|
lastModificationCurrentValue: 'vn-client-log vn-table vn-td.after',
|
||||||
|
penultimateModificationPreviousValue: 'vn-client-log vn-table vn-tr:nth-child(2) vn-td.before',
|
||||||
|
penultimateModificationCurrentValue: 'vn-client-log vn-table vn-tr:nth-child(2) vn-td.after'
|
||||||
|
|
||||||
},
|
},
|
||||||
clientBalance: {
|
clientBalance: {
|
||||||
|
|
|
@ -16,8 +16,15 @@ describe('Client Edit web access path', () => {
|
||||||
await browser.close();
|
await browser.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should uncheck the Enable web access checkbox and update the name`, async() => {
|
it('should uncheck the Enable web access checkbox', async() => {
|
||||||
await page.waitToClick(selectors.clientWebAccess.enableWebAccessCheckbox);
|
await page.waitToClick(selectors.clientWebAccess.enableWebAccessCheckbox);
|
||||||
|
await page.waitToClick(selectors.clientWebAccess.saveButton);
|
||||||
|
const message = await page.waitForSnackbar();
|
||||||
|
|
||||||
|
expect(message.text).toContain('Data saved!');
|
||||||
|
});
|
||||||
|
|
||||||
|
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, 'Hulk');
|
||||||
await page.waitToClick(selectors.clientWebAccess.saveButton);
|
await page.waitToClick(selectors.clientWebAccess.saveButton);
|
||||||
|
@ -26,9 +33,8 @@ describe('Client Edit web access path', () => {
|
||||||
expect(message.text).toContain('Data saved!');
|
expect(message.text).toContain('Data saved!');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm web access is now unchecked', async() => {
|
it('should reload the section and confirm web access is now unchecked', async() => {
|
||||||
await page.accessToSection('client.card.basicData');
|
await page.reloadSection('client.card.webAccess');
|
||||||
await page.accessToSection('client.card.webAccess');
|
|
||||||
const result = await page.checkboxState(selectors.clientWebAccess.enableWebAccessCheckbox);
|
const result = await page.checkboxState(selectors.clientWebAccess.enableWebAccessCheckbox);
|
||||||
|
|
||||||
expect(result).toBe('unchecked');
|
expect(result).toBe('unchecked');
|
||||||
|
@ -44,13 +50,23 @@ describe('Client Edit web access path', () => {
|
||||||
await page.accessToSection('client.card.log');
|
await page.accessToSection('client.card.log');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the log is showing the updated data for the client`, async() => {
|
it(`should confirm the last log is showing the updated client name and no modifications on the 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 true');
|
expect(lastModificationPreviousValue).toEqual('name BruceBanner active false');
|
||||||
expect(lastModificationCurrentValue).toEqual('name Hulk active false');
|
expect(lastModificationCurrentValue).toEqual('name Hulk active false');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it(`should confirm the penultimate log is showing the updated avtive field and no modifications on the client name`, async() => {
|
||||||
|
let penultimateModificationPreviousValue = await page
|
||||||
|
.waitToGetProperty(selectors.clientLog.penultimateModificationPreviousValue, 'innerText');
|
||||||
|
let penultimateModificationCurrentValue = await page
|
||||||
|
.waitToGetProperty(selectors.clientLog.penultimateModificationCurrentValue, 'innerText');
|
||||||
|
|
||||||
|
expect(penultimateModificationPreviousValue).toEqual('name BruceBanner active true');
|
||||||
|
expect(penultimateModificationCurrentValue).toEqual('name BruceBanner active false');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
<vn-card class="vn-pa-lg">
|
<vn-card class="vn-pa-lg">
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
<vn-check
|
<vn-check
|
||||||
|
vn-id="active"
|
||||||
|
disabled="watcher.orgData.name != $ctrl.account.name"
|
||||||
vn-one
|
vn-one
|
||||||
label="Enable web access"
|
label="Enable web access"
|
||||||
ng-model="$ctrl.account.active"
|
ng-model="$ctrl.account.active"
|
||||||
|
@ -17,6 +19,8 @@
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
<vn-textfield
|
<vn-textfield
|
||||||
|
vn-id="name"
|
||||||
|
disabled="watcher.orgData.active != $ctrl.account.active"
|
||||||
vn-focus
|
vn-focus
|
||||||
vn-one
|
vn-one
|
||||||
label="User"
|
label="User"
|
||||||
|
|
Loading…
Reference in New Issue