Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 2622-route_tickets_refactor
This commit is contained in:
commit
d0e6a8a582
|
@ -0,0 +1,2 @@
|
||||||
|
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`)
|
||||||
|
VALUES ('PayDem', '*', 'READ', 'ALLOW', 'ROLE', 'employee');
|
|
@ -960,5 +960,11 @@ export default {
|
||||||
province: 'vn-supplier-fiscal-data vn-autocomplete[ng-model="$ctrl.supplier.provinceFk"]',
|
province: 'vn-supplier-fiscal-data vn-autocomplete[ng-model="$ctrl.supplier.provinceFk"]',
|
||||||
country: 'vn-supplier-fiscal-data vn-autocomplete[ng-model="$ctrl.supplier.countryFk"]',
|
country: 'vn-supplier-fiscal-data vn-autocomplete[ng-model="$ctrl.supplier.countryFk"]',
|
||||||
saveButton: 'vn-supplier-fiscal-data button[type="submit"]',
|
saveButton: 'vn-supplier-fiscal-data button[type="submit"]',
|
||||||
|
},
|
||||||
|
supplierBillingData: {
|
||||||
|
payMethod: 'vn-supplier-billing-data vn-autocomplete[ng-model="$ctrl.supplier.payMethodFk"]',
|
||||||
|
payDem: 'vn-supplier-billing-data vn-autocomplete[ng-model="$ctrl.supplier.payDemFk"]',
|
||||||
|
payDay: 'vn-supplier-billing-data vn-input-number[ng-model="$ctrl.supplier.payDay"]',
|
||||||
|
saveButton: 'vn-supplier-billing-data button[type=submit]'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -0,0 +1,52 @@
|
||||||
|
import selectors from '../../helpers/selectors.js';
|
||||||
|
import getBrowser from '../../helpers/puppeteer';
|
||||||
|
|
||||||
|
describe('Supplier billing data path', () => {
|
||||||
|
let browser;
|
||||||
|
let page;
|
||||||
|
|
||||||
|
beforeAll(async() => {
|
||||||
|
browser = await getBrowser();
|
||||||
|
page = browser.page;
|
||||||
|
await page.loginAndModule('administrative', 'supplier');
|
||||||
|
await page.accessToSearchResult('442');
|
||||||
|
await page.accessToSection('supplier.card.billingData');
|
||||||
|
});
|
||||||
|
|
||||||
|
afterAll(async() => {
|
||||||
|
await browser.close();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should edit the billing data', async() => {
|
||||||
|
await page.autocompleteSearch(selectors.supplierBillingData.payMethod, 'PayMethod with IBAN');
|
||||||
|
await page.autocompleteSearch(selectors.supplierBillingData.payDem, '10');
|
||||||
|
await page.clearInput(selectors.supplierBillingData.payDay);
|
||||||
|
await page.write(selectors.supplierBillingData.payDay, '19');
|
||||||
|
await page.waitToClick(selectors.supplierBillingData.saveButton);
|
||||||
|
const message = await page.waitForSnackbar();
|
||||||
|
|
||||||
|
expect(message.text).toContain('Data saved!');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should reload the section', async() => {
|
||||||
|
await page.reloadSection('supplier.card.billingData');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should check the pay method was edited', async() => {
|
||||||
|
const result = await page.waitToGetProperty(selectors.supplierBillingData.payMethod, 'value');
|
||||||
|
|
||||||
|
expect(result).toEqual('PayMethod with IBAN');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should check the payDem was edited', async() => {
|
||||||
|
const result = await page.waitToGetProperty(selectors.supplierBillingData.payDem, 'value');
|
||||||
|
|
||||||
|
expect(result).toEqual('10');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should check the pay day was edited', async() => {
|
||||||
|
const result = await page.waitToGetProperty(selectors.supplierBillingData.payDay, 'value');
|
||||||
|
|
||||||
|
expect(result).toEqual('19');
|
||||||
|
});
|
||||||
|
});
|
|
@ -52,12 +52,13 @@
|
||||||
<vn-button-bar>
|
<vn-button-bar>
|
||||||
<vn-submit
|
<vn-submit
|
||||||
label="Save"
|
label="Save"
|
||||||
ng-if="watcher.dataChanged()"
|
disabled="!watcher.dataChanged()"
|
||||||
vn-acl="salesAssistant">
|
vn-acl="salesAssistant">
|
||||||
</vn-submit>
|
</vn-submit>
|
||||||
<vn-button
|
<vn-button
|
||||||
|
class="cancel"
|
||||||
label="Undo changes"
|
label="Undo changes"
|
||||||
ng-if="watcher.dataChanged()"
|
disabled="!watcher.dataChanged()"
|
||||||
ng-click="watcher.loadOriginalData()">
|
ng-click="watcher.loadOriginalData()">
|
||||||
</vn-button>
|
</vn-button>
|
||||||
</vn-button-bar>
|
</vn-button-bar>
|
||||||
|
|
|
@ -84,7 +84,8 @@
|
||||||
"description": "Billing data",
|
"description": "Billing data",
|
||||||
"params": {
|
"params": {
|
||||||
"supplier": "$ctrl.supplier"
|
"supplier": "$ctrl.supplier"
|
||||||
}
|
},
|
||||||
|
"acl": ["administrative"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
Loading…
Reference in New Issue