diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml
index 3e5099c4b..10b77ef49 100644
--- a/src/i18n/locale/es.yml
+++ b/src/i18n/locale/es.yml
@@ -1177,6 +1177,9 @@ agency:
removeItemError: Error al eliminar la agencia
pageTitles:
agency: Agencia
+ searchBar:
+ info: Puedes buscar por nombre o id
+ label: Buscar agencia...
components:
topbar: {}
itemsFilterPanel:
diff --git a/src/pages/Agency/Card/AgencyBasicData.vue b/src/pages/Agency/Card/AgencyBasicData.vue
index 40510a205..5999f853b 100644
--- a/src/pages/Agency/Card/AgencyBasicData.vue
+++ b/src/pages/Agency/Card/AgencyBasicData.vue
@@ -6,7 +6,6 @@ import { useI18n } from 'vue-i18n';
import FormModel from 'components/FormModel.vue';
import FetchData from 'src/components/FetchData.vue';
import VnRow from 'components/ui/VnRow.vue';
-import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
import VnInput from 'src/components/common/VnInput.vue';
import VnSelectFilter from 'src/components/common/VnSelectFilter.vue';
@@ -22,7 +21,6 @@ const warehouses = ref([]);
@on-fetch="(data) => (warehouses = data)"
auto-load
/>
-
diff --git a/src/pages/Agency/Card/AgencyCard.vue b/src/pages/Agency/Card/AgencyCard.vue
index ec90abf66..e78d1cc55 100644
--- a/src/pages/Agency/Card/AgencyCard.vue
+++ b/src/pages/Agency/Card/AgencyCard.vue
@@ -1,17 +1,12 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/src/pages/Agency/Card/AgencyWorkcenter.vue b/src/pages/Agency/Card/AgencyWorkcenter.vue
index 83231e6c2..ed9f15689 100644
--- a/src/pages/Agency/Card/AgencyWorkcenter.vue
+++ b/src/pages/Agency/Card/AgencyWorkcenter.vue
@@ -133,6 +133,7 @@ async function deleteWorCenter(id) {
isAnyVolumeAllowed: Permite cualquier volumen
Search agency: Buscar agencia
You can search by name: Puedes buscar por nombre
+ This workCenter is already assigned to this agency: Este workCenter ya está asignado a esta agencia
en:
isOwn: Has owner
isAnyVolumeAllowed: Allows any volume
diff --git a/test/cypress/integration/agency/spec.spec.js b/test/cypress/integration/agency/spec.spec.js
index dd6b0da6f..c3f5f7c88 100644
--- a/test/cypress/integration/agency/spec.spec.js
+++ b/test/cypress/integration/agency/spec.spec.js
@@ -1,25 +1,51 @@
describe('template spec', () => {
+ const agencyId = 11;
beforeEach(() => {
cy.viewport(1920, 1080);
cy.login('developer');
cy.visit(`/#/agency`);
});
- it('passes', () => {
+ it('assign workCenter', () => {
cy.visit(`/#/agency`);
- /* ==== Generated with Cypress Studio ==== */
cy.get(':nth-child(1) > :nth-child(1) > .card-list-body > .list-items').click();
- cy.get('[href="#/agency/1/workCenter"] > .q-item__section--main').click();
+ cy.get('[href="#/agency/11/workCenter"] > .q-item__section--main').click();
cy.get('.q-page-sticky > div > .q-btn > .q-btn__content > .q-icon').click();
- cy.get('#f_fa5833a2-f919-4542-b663-e72b3ba4ffe5').click();
- cy.get('#f_fa5833a2-f919-4542-b663-e72b3ba4ffe5_0').click();
- cy.get('#formModel > .q-card').click();
+ cy.get(
+ '.vn-row > .q-field > .q-field__inner > .q-field__control > .q-field__control-container'
+ ).type('workCenterOne{enter}');
cy.get('.q-btn--standard > .q-btn__content > .block').click();
+ cy.get('.q-notification__message').should('have.text', 'Data created');
+ });
+
+ it('delete workCenter', () => {
+ cy.get(':nth-child(1) > :nth-child(1) > .card-list-body > .list-items').click();
+ cy.get('[href="#/agency/11/workCenter"] > .q-item__section--main').click();
+ cy.get('.q-item__section--side > .q-btn > .q-btn__content > .q-icon').click();
+ cy.get('.q-notification__message').should(
+ 'have.text',
+ 'Agency removed successfully'
+ );
+ });
+
+ it('error on duplicate workCenter', () => {
+ cy.visit(`/#/agency`);
+ cy.get(':nth-child(1) > :nth-child(1) > .card-list-body > .list-items').click();
+ cy.get('[href="#/agency/11/workCenter"] > .q-item__section--main').click();
cy.get('.q-page-sticky > div > .q-btn > .q-btn__content > .q-icon').click();
- cy.get('#f_94743509-f7a7-4e5c-83f4-61ab52c7cd72').click();
- cy.get('#f_94743509-f7a7-4e5c-83f4-61ab52c7cd72_1 > .q-item__section').click();
+ cy.get(
+ '.vn-row > .q-field > .q-field__inner > .q-field__control > .q-field__control-container'
+ ).type('workCenterOne{enter}');
cy.get('.q-btn--standard > .q-btn__content > .block').click();
- cy.get('.q-btn--flat > .q-btn__content > .block').;
- /* ==== End Cypress Studio ==== */
+ cy.get('.q-notification__message').should('have.text', 'Data created');
+ cy.get('.q-page-sticky > div > .q-btn > .q-btn__content > .q-icon').click();
+ cy.get(
+ '.vn-row > .q-field > .q-field__inner > .q-field__control > .q-field__control-container'
+ ).type('workCenterOne{enter}');
+ cy.get('.q-btn--standard > .q-btn__content > .block').click();
+
+ cy.get(
+ ':nth-child(2) > .q-notification__wrapper > .q-notification__content > .q-notification__message'
+ ).should('have.text', 'This workCenter is already assigned to this agency');
});
});