diff --git a/src/components/common/VnLog.vue b/src/components/common/VnLog.vue
index 6e9128a43..1a180aaed 100644
--- a/src/components/common/VnLog.vue
+++ b/src/components/common/VnLog.vue
@@ -1,7 +1,7 @@
@@ -292,9 +297,14 @@ function handleLocation(data, location) {
option-value="id"
v-model="data.customsAgentFk"
:tooltip="t('New customs agent')"
+ :acls="[{ model: 'CustomsAgent', props: '*', accessType: 'WRITE' }]"
>
-
+ onAgentCreated(requestResponse, data)
+ "
+ />
diff --git a/src/pages/Customer/components/CustomerNewCustomsAgent.vue b/src/pages/Customer/components/CustomerNewCustomsAgent.vue
index ec9806334..69ecb0d27 100644
--- a/src/pages/Customer/components/CustomerNewCustomsAgent.vue
+++ b/src/pages/Customer/components/CustomerNewCustomsAgent.vue
@@ -16,6 +16,7 @@ const onDataSaved = (dataSaved) => {
{
timeout: 5000,
});
});
- it('Should load layout', () => {
+
+ it('Should put a new credit', () => {
cy.get('.q-page').should('be.visible');
+ cy.dataCy('vnTableCreateBtn').click();
+ cy.dataCy('Credit_input').type('100');
+ cy.dataCy('FormModelPopup_save').click();
+ cy.checkNotification('Data saved');
+ });
+
+ it('Should put a new credit with value 0 to close the client card', () => {
+ cy.get('.q-page').should('be.visible');
+ cy.dataCy('vnTableCreateBtn').click();
+ cy.dataCy('Credit_input').type('0');
+ cy.dataCy('FormModelPopup_save').click();
+ cy.checkNotification('Data saved');
+ });
+
+ it('Should not create the credit if there is no value in the input', () => {
+ cy.get('.q-page').should('be.visible');
+ cy.dataCy('vnTableCreateBtn').click();
+ cy.dataCy('FormModelPopup_save').click();
+ cy.get('.q-notification__message').should('not.exist');
});
});