E2E fixes: client billing data, invoiceOut descriptor
gitea/salix/pipeline/head Something is wrong with the build of this commit
Details
gitea/salix/pipeline/head Something is wrong with the build of this commit
Details
This commit is contained in:
parent
d6fda676f6
commit
5d1e0ee682
|
@ -32,6 +32,10 @@ describe('Client Edit billing data path', () => {
|
|||
});
|
||||
|
||||
it(`should create a new BIC code`, async() => {
|
||||
// XXX: Windows fix, entity code doesn't get the focus, so the text
|
||||
// '9999' is written in entity name.
|
||||
await page.waitFor(500);
|
||||
|
||||
await page.waitToClick(selectors.clientBillingData.newBankEntityButton);
|
||||
await page.write(selectors.clientBillingData.newBankEntityName, 'Gotham City Bank');
|
||||
await page.write(selectors.clientBillingData.newBankEntityCode, '9999');
|
||||
|
|
|
@ -52,6 +52,7 @@ describe('InvoiceOut descriptor path', () => {
|
|||
it(`should search for the deleted invouceOut to find no results`, async() => {
|
||||
await page.write(selectors.invoiceOutIndex.topbarSearch, 'T2222222');
|
||||
await page.waitToClick(selectors.invoiceOutIndex.searchButton);
|
||||
await page.waitForSpinnerLoad();
|
||||
await page.waitForNumberOfElements(selectors.invoiceOutIndex.searchResult, 0);
|
||||
const result = await page.countElement(selectors.invoiceOutIndex.searchResult);
|
||||
|
||||
|
@ -69,6 +70,7 @@ describe('InvoiceOut descriptor path', () => {
|
|||
await page.waitToClick(selectors.ticketsIndex.openAdvancedSearchButton);
|
||||
await page.write(selectors.ticketsIndex.advancedSearchInvoiceOut, 'T2222222');
|
||||
await page.waitToClick(selectors.ticketsIndex.advancedSearchButton);
|
||||
await page.waitForSpinnerLoad();
|
||||
await page.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 0);
|
||||
const result = await page.countElement(selectors.ticketsIndex.searchResult);
|
||||
|
||||
|
|
|
@ -40,11 +40,11 @@
|
|||
</div>
|
||||
<vn-confirm
|
||||
vn-id="deleteConfirmation"
|
||||
on-response="$ctrl.deleteInvoiceOut($response)"
|
||||
on-accept="$ctrl.deleteInvoiceOut()"
|
||||
question="Are you sure you want to delete this invoice?">
|
||||
</vn-confirm>
|
||||
<vn-confirm
|
||||
vn-id="bookConfirmation"
|
||||
on-response="$ctrl.bookInvoiceOut($response)"
|
||||
on-accept="$ctrl.bookInvoiceOut()"
|
||||
question="Are you sure you want to book this invoice?">
|
||||
</vn-confirm>
|
|
@ -5,9 +5,18 @@ class Controller extends Component {
|
|||
constructor($element, $) {
|
||||
super($element, $);
|
||||
this.moreOptions = [
|
||||
{callback: this.showInvoiceOutPdf, name: 'Show invoice PDF'},
|
||||
{callback: this.showDeleteInvoiceOutDialog, name: 'Delete Invoice', acl: 'invoicing'},
|
||||
{callback: this.showBookInvoiceOutDialog, name: 'Book invoice', acl: 'invoicing'}
|
||||
{
|
||||
name: 'Show invoice PDF',
|
||||
callback: this.showInvoiceOutPdf
|
||||
}, {
|
||||
name: 'Delete Invoice',
|
||||
callback: this.showDeleteInvoiceOutDialog,
|
||||
acl: 'invoicing'
|
||||
}, {
|
||||
name: 'Book invoice',
|
||||
callback: this.showBookInvoiceOutDialog,
|
||||
acl: 'invoicing'
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -60,24 +69,18 @@ class Controller extends Component {
|
|||
this.$.bookConfirmation.show();
|
||||
}
|
||||
|
||||
deleteInvoiceOut(response) {
|
||||
if (response === 'accept') {
|
||||
const query = `InvoiceOuts/${this.invoiceOut.id}/delete`;
|
||||
this.$http.post(query).then(() => {
|
||||
this.vnApp.showSuccess(this.$translate.instant('InvoiceOut deleted'));
|
||||
this.$state.go('invoiceOut.index');
|
||||
});
|
||||
}
|
||||
deleteInvoiceOut() {
|
||||
const query = `InvoiceOuts/${this.invoiceOut.id}/delete`;
|
||||
return this.$http.post(query)
|
||||
.then(() => this.$state.go('invoiceOut.index'))
|
||||
.then(() => this.vnApp.showSuccess(this.$t('InvoiceOut deleted')));
|
||||
}
|
||||
|
||||
bookInvoiceOut(response) {
|
||||
if (response === 'accept') {
|
||||
const query = `InvoiceOuts/${this.invoiceOut.ref}/book`;
|
||||
this.$http.post(query).then(() => {
|
||||
this.vnApp.showSuccess(this.$translate.instant('InvoiceOut booked'));
|
||||
this.$state.reload();
|
||||
});
|
||||
}
|
||||
bookInvoiceOut() {
|
||||
const query = `InvoiceOuts/${this.invoiceOut.ref}/book`;
|
||||
return this.$http.post(query)
|
||||
.then(() => this.$state.reload())
|
||||
.then(() => this.vnApp.showSuccess(this.$t('InvoiceOut booked')));
|
||||
}
|
||||
|
||||
set quicklinks(value = {}) {
|
||||
|
|
Loading…
Reference in New Issue