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() => {
|
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.waitToClick(selectors.clientBillingData.newBankEntityButton);
|
||||||
await page.write(selectors.clientBillingData.newBankEntityName, 'Gotham City Bank');
|
await page.write(selectors.clientBillingData.newBankEntityName, 'Gotham City Bank');
|
||||||
await page.write(selectors.clientBillingData.newBankEntityCode, '9999');
|
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() => {
|
it(`should search for the deleted invouceOut to find no results`, async() => {
|
||||||
await page.write(selectors.invoiceOutIndex.topbarSearch, 'T2222222');
|
await page.write(selectors.invoiceOutIndex.topbarSearch, 'T2222222');
|
||||||
await page.waitToClick(selectors.invoiceOutIndex.searchButton);
|
await page.waitToClick(selectors.invoiceOutIndex.searchButton);
|
||||||
|
await page.waitForSpinnerLoad();
|
||||||
await page.waitForNumberOfElements(selectors.invoiceOutIndex.searchResult, 0);
|
await page.waitForNumberOfElements(selectors.invoiceOutIndex.searchResult, 0);
|
||||||
const result = await page.countElement(selectors.invoiceOutIndex.searchResult);
|
const result = await page.countElement(selectors.invoiceOutIndex.searchResult);
|
||||||
|
|
||||||
|
@ -69,6 +70,7 @@ describe('InvoiceOut descriptor path', () => {
|
||||||
await page.waitToClick(selectors.ticketsIndex.openAdvancedSearchButton);
|
await page.waitToClick(selectors.ticketsIndex.openAdvancedSearchButton);
|
||||||
await page.write(selectors.ticketsIndex.advancedSearchInvoiceOut, 'T2222222');
|
await page.write(selectors.ticketsIndex.advancedSearchInvoiceOut, 'T2222222');
|
||||||
await page.waitToClick(selectors.ticketsIndex.advancedSearchButton);
|
await page.waitToClick(selectors.ticketsIndex.advancedSearchButton);
|
||||||
|
await page.waitForSpinnerLoad();
|
||||||
await page.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 0);
|
await page.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 0);
|
||||||
const result = await page.countElement(selectors.ticketsIndex.searchResult);
|
const result = await page.countElement(selectors.ticketsIndex.searchResult);
|
||||||
|
|
||||||
|
|
|
@ -40,11 +40,11 @@
|
||||||
</div>
|
</div>
|
||||||
<vn-confirm
|
<vn-confirm
|
||||||
vn-id="deleteConfirmation"
|
vn-id="deleteConfirmation"
|
||||||
on-response="$ctrl.deleteInvoiceOut($response)"
|
on-accept="$ctrl.deleteInvoiceOut()"
|
||||||
question="Are you sure you want to delete this invoice?">
|
question="Are you sure you want to delete this invoice?">
|
||||||
</vn-confirm>
|
</vn-confirm>
|
||||||
<vn-confirm
|
<vn-confirm
|
||||||
vn-id="bookConfirmation"
|
vn-id="bookConfirmation"
|
||||||
on-response="$ctrl.bookInvoiceOut($response)"
|
on-accept="$ctrl.bookInvoiceOut()"
|
||||||
question="Are you sure you want to book this invoice?">
|
question="Are you sure you want to book this invoice?">
|
||||||
</vn-confirm>
|
</vn-confirm>
|
|
@ -5,9 +5,18 @@ class Controller extends Component {
|
||||||
constructor($element, $) {
|
constructor($element, $) {
|
||||||
super($element, $);
|
super($element, $);
|
||||||
this.moreOptions = [
|
this.moreOptions = [
|
||||||
{callback: this.showInvoiceOutPdf, name: 'Show invoice PDF'},
|
{
|
||||||
{callback: this.showDeleteInvoiceOutDialog, name: 'Delete Invoice', acl: 'invoicing'},
|
name: 'Show invoice PDF',
|
||||||
{callback: this.showBookInvoiceOutDialog, name: 'Book invoice', acl: 'invoicing'}
|
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();
|
this.$.bookConfirmation.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteInvoiceOut(response) {
|
deleteInvoiceOut() {
|
||||||
if (response === 'accept') {
|
const query = `InvoiceOuts/${this.invoiceOut.id}/delete`;
|
||||||
const query = `InvoiceOuts/${this.invoiceOut.id}/delete`;
|
return this.$http.post(query)
|
||||||
this.$http.post(query).then(() => {
|
.then(() => this.$state.go('invoiceOut.index'))
|
||||||
this.vnApp.showSuccess(this.$translate.instant('InvoiceOut deleted'));
|
.then(() => this.vnApp.showSuccess(this.$t('InvoiceOut deleted')));
|
||||||
this.$state.go('invoiceOut.index');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bookInvoiceOut(response) {
|
bookInvoiceOut() {
|
||||||
if (response === 'accept') {
|
const query = `InvoiceOuts/${this.invoiceOut.ref}/book`;
|
||||||
const query = `InvoiceOuts/${this.invoiceOut.ref}/book`;
|
return this.$http.post(query)
|
||||||
this.$http.post(query).then(() => {
|
.then(() => this.$state.reload())
|
||||||
this.vnApp.showSuccess(this.$translate.instant('InvoiceOut booked'));
|
.then(() => this.vnApp.showSuccess(this.$t('InvoiceOut booked')));
|
||||||
this.$state.reload();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
set quicklinks(value = {}) {
|
set quicklinks(value = {}) {
|
||||||
|
|
Loading…
Reference in New Issue