From cb2d2d1ce07b75db20c53dfd2bf898625f2b82ee Mon Sep 17 00:00:00 2001
From: provira <provira@verdnatura.es>
Date: Tue, 18 Feb 2025 15:00:58 +0100
Subject: [PATCH 01/15] feat: refs #8612 changed shelving to VnTable & created
 e2e tests

---
 src/pages/Shelving/ShelvingList.vue           | 166 ++++++++++++------
 src/router/modules/shelving.js                |   9 -
 .../parking/parkingBasicData.spec.js          |   0
 .../parking/parkingList.spec.js               |   0
 .../shelving/shelvingBasicData.spec.js        |  20 +++
 .../integration/shelving/shelvingList.spec.js |  32 ++++
 6 files changed, 166 insertions(+), 61 deletions(-)
 rename test/cypress/integration/{ => shelving}/parking/parkingBasicData.spec.js (100%)
 rename test/cypress/integration/{ => shelving}/parking/parkingList.spec.js (100%)
 create mode 100644 test/cypress/integration/shelving/shelvingBasicData.spec.js
 create mode 100644 test/cypress/integration/shelving/shelvingList.spec.js

diff --git a/src/pages/Shelving/ShelvingList.vue b/src/pages/Shelving/ShelvingList.vue
index 4e0c21100..4af1e4e7d 100644
--- a/src/pages/Shelving/ShelvingList.vue
+++ b/src/pages/Shelving/ShelvingList.vue
@@ -1,25 +1,60 @@
 <script setup>
-import VnPaginate from 'components/ui/VnPaginate.vue';
-import CardList from 'components/ui/CardList.vue';
-import VnLv from 'components/ui/VnLv.vue';
+import { computed } from 'vue';
 import { useRouter } from 'vue-router';
-import ShelvingFilter from 'pages/Shelving/Card/ShelvingFilter.vue';
-import ShelvingSummary from 'pages/Shelving/Card/ShelvingSummary.vue';
-import { useSummaryDialog } from 'src/composables/useSummaryDialog';
+import { useI18n } from 'vue-i18n';
+import VnTable from 'components/VnTable/VnTable.vue';
 import VnSection from 'src/components/common/VnSection.vue';
+import ShelvingFilter from 'pages/Shelving/Card/ShelvingFilter.vue';
+import { useSummaryDialog } from 'src/composables/useSummaryDialog';
 import exprBuilder from './ShelvingExprBuilder.js';
+import VnSelect from 'src/components/common/VnSelect.vue';
+import { QCheckbox } from 'quasar';
 
+const { t } = useI18n();
 const router = useRouter();
-const { viewSummary } = useSummaryDialog();
 const dataKey = 'ShelvingList';
 
 const filter = {
     include: [{ relation: 'parking' }],
 };
 
-function navigate(id) {
-    router.push({ path: `/shelving/${id}` });
-}
+const columns = computed(() => [
+    {
+        align: 'left',
+        name: 'code',
+        label: t('globals.code'),
+        isId: true,
+        isTitle: true,
+        columnFilter: false,
+        create: true,
+    },
+    {
+        align: 'left',
+        name: 'parking',
+        label: t('shelving.list.parking'),
+        sortable: true,
+        format: (val) => val?.code ?? '',
+        cardVisible: true,
+    },
+    {
+        align: 'left',
+        name: 'priority',
+        label: t('shelving.list.priority'),
+        sortable: true,
+        cardVisible: true,
+        create: true,
+    },
+    {
+        align: 'left',
+        name: 'isRecyclable',
+        label: t('shelving.summary.recyclable'),
+        sortable: true,
+    },
+]);
+
+const onDataSaved = ({ id }) => {
+    router.push({ name: 'ShelvingBasicData', params: { id } });
+};
 </script>
 
 <template>
@@ -37,48 +72,75 @@ function navigate(id) {
             <ShelvingFilter data-key="ShelvingList" />
         </template>
         <template #body>
-            <QPage class="column items-center q-pa-md">
-                <div class="vn-card-list">
-                    <VnPaginate :data-key="dataKey">
-                        <template #body="{ rows }">
-                            <CardList
-                                v-for="row of rows"
-                                :key="row.id"
-                                :id="row.id"
-                                :title="row.code"
-                                @click="navigate(row.id)"
-                            >
-                                <template #list-items>
-                                    <VnLv
-                                        :label="$t('shelving.list.parking')"
-                                        :title-label="$t('shelving.list.parking')"
-                                        :value="row.parking?.code"
-                                    />
-                                    <VnLv
-                                        :label="$t('shelving.list.priority')"
-                                        :value="row?.priority"
-                                    />
-                                </template>
-                                <template #actions>
-                                    <QBtn
-                                        :label="$t('components.smartCard.openSummary')"
-                                        @click.stop="viewSummary(row.id, ShelvingSummary)"
-                                        color="primary"
-                                    />
-                                </template>
-                            </CardList>
-                        </template>
-                    </VnPaginate>
-                </div>
-                <QPageSticky :offset="[20, 20]">
-                    <RouterLink :to="{ name: 'ShelvingCreate' }">
-                        <QBtn fab icon="add" color="primary" v-shortcut="'+'" />
-                        <QTooltip>
-                            {{ $t('shelving.list.newShelving') }}
-                        </QTooltip>
-                    </RouterLink>
-                </QPageSticky>
-            </QPage>
+            <VnTable
+                :data-key="dataKey"
+                :columns="columns"
+                is-editable="false"
+                :right-search="false"
+                :use-model="true"
+                :disable-option="{ table: true }"
+                redirect="shelving"
+                default-mode="card"
+                :create="{
+                    urlCreate: 'Shelvings',
+                    title: t('globals.pageTitles.shelvingCreate'),
+                    onDataSaved,
+                    formInitialData: {
+                        parkingFk: null,
+                        priority: null,
+                        code: '',
+                        isRecyclable: false,
+                    },
+                }"
+            >
+                <template #more-create-dialog="{ data }">
+                    <VnSelect
+                        v-model="data.parkingFk"
+                        url="Parkings"
+                        option-value="id"
+                        option-label="code"
+                        :label="t('shelving.list.parking')"
+                        :filter-options="['id', 'code']"
+                        :fields="['id', 'code']"
+                    />
+                    <QCheckbox
+                        v-model="data.isRecyclable"
+                        :label="t('shelving.summary.recyclable')"
+                    />
+                </template>
+            </VnTable>
         </template>
     </VnSection>
 </template>
+
+<style lang="scss" scoped>
+.list {
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    width: 55%;
+}
+.list-container {
+    display: flex;
+    justify-content: center;
+}
+</style>
+
+<i18n>
+    es:
+        shelving:
+            list:
+                parking: Estacionamiento
+                priority: Prioridad
+        
+            summary:
+                recyclable: Reciclable
+    en:
+        shelving:
+            list:
+                parking: Parking
+                priority: Priority
+        
+            summary:
+                recyclable: Recyclable
+</i18n>
diff --git a/src/router/modules/shelving.js b/src/router/modules/shelving.js
index c085dd8dc..94ff274dc 100644
--- a/src/router/modules/shelving.js
+++ b/src/router/modules/shelving.js
@@ -111,15 +111,6 @@ export default {
                         shelvingCard,
                     ],
                 },
-                {
-                    path: 'create',
-                    name: 'ShelvingCreate',
-                    meta: {
-                        title: 'shelvingCreate',
-                        icon: 'add',
-                    },
-                    component: () => import('src/pages/Shelving/Card/ShelvingForm.vue'),
-                },
                 {
                     path: 'parking',
                     name: 'ParkingMain',
diff --git a/test/cypress/integration/parking/parkingBasicData.spec.js b/test/cypress/integration/shelving/parking/parkingBasicData.spec.js
similarity index 100%
rename from test/cypress/integration/parking/parkingBasicData.spec.js
rename to test/cypress/integration/shelving/parking/parkingBasicData.spec.js
diff --git a/test/cypress/integration/parking/parkingList.spec.js b/test/cypress/integration/shelving/parking/parkingList.spec.js
similarity index 100%
rename from test/cypress/integration/parking/parkingList.spec.js
rename to test/cypress/integration/shelving/parking/parkingList.spec.js
diff --git a/test/cypress/integration/shelving/shelvingBasicData.spec.js b/test/cypress/integration/shelving/shelvingBasicData.spec.js
new file mode 100644
index 000000000..54547463e
--- /dev/null
+++ b/test/cypress/integration/shelving/shelvingBasicData.spec.js
@@ -0,0 +1,20 @@
+/// <reference types="cypress" />
+describe('ShelvingList', () => {
+    
+    const parking = '.q-card > :nth-child(1) > .q-select > .q-field__inner > .q-field__control > .q-field__control-container';
+    beforeEach(() => {
+        cy.viewport(1920, 1080);
+        cy.login('developer');
+        cy.visit(`/#/shelving/1/basic-data`);
+    });
+
+    it('should edit the data and save', () => {
+        cy.selectOption(parking, 'P-01-1');
+        cy.dataCy('Code_input').type('1');
+        cy.dataCy('Priority_input').type('10');
+        cy.get(':nth-child(2) > .q-checkbox > .q-checkbox__inner').click();
+        cy.saveCard();
+        cy.get('.q-notification__message').should('have.text', 'Data saved');
+
+    });
+});
\ No newline at end of file
diff --git a/test/cypress/integration/shelving/shelvingList.spec.js b/test/cypress/integration/shelving/shelvingList.spec.js
new file mode 100644
index 000000000..1a792c3d1
--- /dev/null
+++ b/test/cypress/integration/shelving/shelvingList.spec.js
@@ -0,0 +1,32 @@
+/// <reference types="cypress" />
+describe('ShelvingList', () => {
+    beforeEach(() => {
+        cy.viewport(1920, 1080);
+        cy.login('developer');
+        cy.visit(`/#/shelving/list`);
+    });
+
+    it('should redirect on clicking a shelving', () => {
+        cy.get('#searchbar input').type('{enter}');
+        cy.get(':nth-child(2) > .q-card').click();
+        cy.url().should('include', '/shelving/2/summary');
+    });
+
+    it('should filter and redirect if only one result', () => {
+        cy.selectOption('[data-cy="Parking_select"]', 'P-02-2');
+        cy.dataCy('Parking_select').type('{enter}');
+        cy.url().should('match', /\/shelving\/\d+\/summary/);
+    });
+
+    it('should create a new shelving', () => {
+        cy.dataCy('vnTableCreateBtn').click();
+        cy.dataCy('code-create-popup').type('Test');
+        cy.dataCy('Priority_input').type('10');
+        cy.selectOption(
+            '.grid-create > .q-select > .q-field__inner > .q-field__control > .q-field__control-container', '100-01'
+        )
+        cy.dataCy('FormModelPopup_save').click();
+        cy.checkNotification('Data created');
+        cy.url().should('match', /\/shelving\/\d+\/basic-data/);
+    });
+});

From 4ff6971a07d20ba0261050c1eea480cda138e8fc Mon Sep 17 00:00:00 2001
From: provira <provira@verdnatura.es>
Date: Fri, 21 Feb 2025 13:02:12 +0100
Subject: [PATCH 02/15] feat: refs #8612 added summary button & changed e2e
 tests

---
 src/pages/Shelving/ShelvingList.vue               | 15 +++++++++++++++
 .../shelving/shelvingBasicData.spec.js            | 12 +++++++++---
 .../integration/shelving/shelvingList.spec.js     | 12 ++++++++++--
 3 files changed, 34 insertions(+), 5 deletions(-)

diff --git a/src/pages/Shelving/ShelvingList.vue b/src/pages/Shelving/ShelvingList.vue
index 4af1e4e7d..b95d3915f 100644
--- a/src/pages/Shelving/ShelvingList.vue
+++ b/src/pages/Shelving/ShelvingList.vue
@@ -5,6 +5,7 @@ import { useI18n } from 'vue-i18n';
 import VnTable from 'components/VnTable/VnTable.vue';
 import VnSection from 'src/components/common/VnSection.vue';
 import ShelvingFilter from 'pages/Shelving/Card/ShelvingFilter.vue';
+import ShelvingSummary from './Card/ShelvingSummary.vue';
 import { useSummaryDialog } from 'src/composables/useSummaryDialog';
 import exprBuilder from './ShelvingExprBuilder.js';
 import VnSelect from 'src/components/common/VnSelect.vue';
@@ -12,6 +13,7 @@ import { QCheckbox } from 'quasar';
 
 const { t } = useI18n();
 const router = useRouter();
+const { viewSummary } = useSummaryDialog();
 const dataKey = 'ShelvingList';
 
 const filter = {
@@ -50,6 +52,19 @@ const columns = computed(() => [
         label: t('shelving.summary.recyclable'),
         sortable: true,
     },
+    {
+        align: 'right',
+        label: '',
+        name: 'tableActions',
+        actions: [
+            {
+                title: t('components.smartCard.viewSummary'),
+                icon: 'preview',
+                action: (row) => viewSummary(row.id, ShelvingSummary),
+                isPrimary: true,
+            },
+        ],
+    },
 ]);
 
 const onDataSaved = ({ id }) => {
diff --git a/test/cypress/integration/shelving/shelvingBasicData.spec.js b/test/cypress/integration/shelving/shelvingBasicData.spec.js
index 54547463e..0e90d2350 100644
--- a/test/cypress/integration/shelving/shelvingBasicData.spec.js
+++ b/test/cypress/integration/shelving/shelvingBasicData.spec.js
@@ -8,13 +8,19 @@ describe('ShelvingList', () => {
         cy.visit(`/#/shelving/1/basic-data`);
     });
 
+    it('should give an error if the code aldready exists', () => {
+        cy.dataCy('Code_input').should('exist').clear();
+        cy.dataCy('Code_input').type('AA7');
+        cy.saveCard();
+        cy.get('.q-notification__message').should('have.text', 'The code already exists');
+    });
     it('should edit the data and save', () => {
         cy.selectOption(parking, 'P-01-1');
-        cy.dataCy('Code_input').type('1');
+        cy.dataCy('Code_input').clear();
+        cy.dataCy('Code_input').type('AA1');
         cy.dataCy('Priority_input').type('10');
         cy.get(':nth-child(2) > .q-checkbox > .q-checkbox__inner').click();
         cy.saveCard();
         cy.get('.q-notification__message').should('have.text', 'Data saved');
-
     });
-});
\ No newline at end of file
+});
diff --git a/test/cypress/integration/shelving/shelvingList.spec.js b/test/cypress/integration/shelving/shelvingList.spec.js
index 1a792c3d1..86cbabf89 100644
--- a/test/cypress/integration/shelving/shelvingList.spec.js
+++ b/test/cypress/integration/shelving/shelvingList.spec.js
@@ -8,10 +8,18 @@ describe('ShelvingList', () => {
 
     it('should redirect on clicking a shelving', () => {
         cy.get('#searchbar input').type('{enter}');
-        cy.get(':nth-child(2) > .q-card').click();
-        cy.url().should('include', '/shelving/2/summary');
+        cy.dataCy('cardBtn').eq(0).click();
+        cy.get('.summaryHeader > .header > .q-icon').click();
+        cy.url().should('include', '/shelving/1/summary');
     });
 
+    it('should redirect from preview to basic-data', () => {
+        cy.get('#searchbar input').type('{enter}');
+        cy.dataCy('cardBtn').eq(0).click();
+        cy.get('.q-card > .header').click();
+        cy.url().should('include', '/shelving/1/basic-data');
+    })
+
     it('should filter and redirect if only one result', () => {
         cy.selectOption('[data-cy="Parking_select"]', 'P-02-2');
         cy.dataCy('Parking_select').type('{enter}');

From ae52fa17e3ff33a7bb4a5b8869cc6aeea3daee02 Mon Sep 17 00:00:00 2001
From: provira <provira@verdnatura.es>
Date: Fri, 21 Feb 2025 14:23:56 +0100
Subject: [PATCH 03/15] fix: refs #8612 changed QCheckbox for VnCheckbox

---
 src/pages/Shelving/ShelvingList.vue | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/pages/Shelving/ShelvingList.vue b/src/pages/Shelving/ShelvingList.vue
index b95d3915f..651121de8 100644
--- a/src/pages/Shelving/ShelvingList.vue
+++ b/src/pages/Shelving/ShelvingList.vue
@@ -9,7 +9,7 @@ import ShelvingSummary from './Card/ShelvingSummary.vue';
 import { useSummaryDialog } from 'src/composables/useSummaryDialog';
 import exprBuilder from './ShelvingExprBuilder.js';
 import VnSelect from 'src/components/common/VnSelect.vue';
-import { QCheckbox } from 'quasar';
+import VnCheckbox from 'src/components/common/VnCheckbox.vue';
 
 const { t } = useI18n();
 const router = useRouter();
@@ -118,7 +118,7 @@ const onDataSaved = ({ id }) => {
                         :filter-options="['id', 'code']"
                         :fields="['id', 'code']"
                     />
-                    <QCheckbox
+                    <VnCheckbox
                         v-model="data.isRecyclable"
                         :label="t('shelving.summary.recyclable')"
                     />

From 3835d7debe7e0267068d1e1859085c230d7f5588 Mon Sep 17 00:00:00 2001
From: provira <provira@verdnatura.es>
Date: Wed, 26 Feb 2025 08:04:04 +0100
Subject: [PATCH 04/15] fix: refs #8612 fixed shelving e2e tests

---
 .../integration/shelving/shelvingBasicData.spec.js   | 12 +++++-------
 .../integration/shelving/shelvingList.spec.js        | 11 ++++++-----
 2 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/test/cypress/integration/shelving/shelvingBasicData.spec.js b/test/cypress/integration/shelving/shelvingBasicData.spec.js
index 0e90d2350..d7b0dc692 100644
--- a/test/cypress/integration/shelving/shelvingBasicData.spec.js
+++ b/test/cypress/integration/shelving/shelvingBasicData.spec.js
@@ -1,7 +1,7 @@
 /// <reference types="cypress" />
 describe('ShelvingList', () => {
-    
-    const parking = '.q-card > :nth-child(1) > .q-select > .q-field__inner > .q-field__control > .q-field__control-container';
+    const parking =
+        '.q-card > :nth-child(1) > .q-select > .q-field__inner > .q-field__control > .q-field__control-container';
     beforeEach(() => {
         cy.viewport(1920, 1080);
         cy.login('developer');
@@ -9,16 +9,14 @@ describe('ShelvingList', () => {
     });
 
     it('should give an error if the code aldready exists', () => {
-        cy.dataCy('Code_input').should('exist').clear();
-        cy.dataCy('Code_input').type('AA7');
+        cy.dataCy('Code_input').should('exist').clear().type('AA7');
         cy.saveCard();
         cy.get('.q-notification__message').should('have.text', 'The code already exists');
     });
     it('should edit the data and save', () => {
         cy.selectOption(parking, 'P-01-1');
-        cy.dataCy('Code_input').clear();
-        cy.dataCy('Code_input').type('AA1');
-        cy.dataCy('Priority_input').type('10');
+        cy.dataCy('Code_input').clear().type('AA1');
+        cy.dataCy('Priority_input').clear().type('10');
         cy.get(':nth-child(2) > .q-checkbox > .q-checkbox__inner').click();
         cy.saveCard();
         cy.get('.q-notification__message').should('have.text', 'Data saved');
diff --git a/test/cypress/integration/shelving/shelvingList.spec.js b/test/cypress/integration/shelving/shelvingList.spec.js
index 86cbabf89..745dd1b78 100644
--- a/test/cypress/integration/shelving/shelvingList.spec.js
+++ b/test/cypress/integration/shelving/shelvingList.spec.js
@@ -7,18 +7,18 @@ describe('ShelvingList', () => {
     });
 
     it('should redirect on clicking a shelving', () => {
-        cy.get('#searchbar input').type('{enter}');
+        cy.typeSearchbar('{enter}');
         cy.dataCy('cardBtn').eq(0).click();
         cy.get('.summaryHeader > .header > .q-icon').click();
         cy.url().should('include', '/shelving/1/summary');
     });
 
     it('should redirect from preview to basic-data', () => {
-        cy.get('#searchbar input').type('{enter}');
+        cy.typeSearchbar('{enter}');
         cy.dataCy('cardBtn').eq(0).click();
         cy.get('.q-card > .header').click();
         cy.url().should('include', '/shelving/1/basic-data');
-    })
+    });
 
     it('should filter and redirect if only one result', () => {
         cy.selectOption('[data-cy="Parking_select"]', 'P-02-2');
@@ -31,8 +31,9 @@ describe('ShelvingList', () => {
         cy.dataCy('code-create-popup').type('Test');
         cy.dataCy('Priority_input').type('10');
         cy.selectOption(
-            '.grid-create > .q-select > .q-field__inner > .q-field__control > .q-field__control-container', '100-01'
-        )
+            '.grid-create > .q-select > .q-field__inner > .q-field__control > .q-field__control-container',
+            '100-01',
+        );
         cy.dataCy('FormModelPopup_save').click();
         cy.checkNotification('Data created');
         cy.url().should('match', /\/shelving\/\d+\/basic-data/);

From f7f12b8c3b75a498c845b33ece4292f6aa52416a Mon Sep 17 00:00:00 2001
From: provira <provira@verdnatura.es>
Date: Thu, 27 Feb 2025 12:40:01 +0100
Subject: [PATCH 05/15] fix: refs #8417 fixed claimPhoto e2e test

---
 .../integration/claim/claimPhoto.spec.js      | 19 ++++++-------------
 1 file changed, 6 insertions(+), 13 deletions(-)

diff --git a/test/cypress/integration/claim/claimPhoto.spec.js b/test/cypress/integration/claim/claimPhoto.spec.js
index c3522cbfe..f62a9e313 100755
--- a/test/cypress/integration/claim/claimPhoto.spec.js
+++ b/test/cypress/integration/claim/claimPhoto.spec.js
@@ -1,6 +1,6 @@
 /// <reference types="cypress" />
 // redmine.verdnatura.es/issues/8417
-describe.skip('ClaimPhoto', () => {
+describe('ClaimPhoto', () => {
     beforeEach(() => {
         const claimId = 1;
         cy.login('developer');
@@ -16,6 +16,7 @@ describe.skip('ClaimPhoto', () => {
     });
 
     it('should add new file with drag and drop', () => {
+        cy.get('.container').should('be.visible').and('exist');
         cy.get('.container').selectFile('test/cypress/fixtures/image.jpg', {
             action: 'drag-drop',
         });
@@ -23,12 +24,8 @@ describe.skip('ClaimPhoto', () => {
     });
 
     it('should open first image dialog change to second and close', () => {
-        cy.get(':nth-last-child(1) > .q-card').click();
-        cy.get('.q-carousel__slide > .q-img > .q-img__container > .q-img__image').should(
-            'be.visible',
-        );
-
-        cy.get('.q-carousel__control > button').click();
+        cy.get(':nth-child(1) > .q-card > .q-img > .q-img__container > .q-img__image').click();
+        cy.get('.q-carousel__next-arrow > .q-btn > .q-btn__content > .q-icon').click();
 
         cy.get(
             '.q-dialog__inner > .q-toolbar > .q-btn > .q-btn__content > .q-icon',
@@ -39,17 +36,13 @@ describe.skip('ClaimPhoto', () => {
     });
 
     it('should remove third and fourth file', () => {
-        cy.get(
-            '.multimediaParent > :nth-last-child(1) > .q-btn > .q-btn__content > .q-icon',
-        ).click();
+        cy.dataCy('delete-button-4').click();
         cy.get(
             '.q-card__actions > .q-btn--unelevated > .q-btn__content > .block',
         ).click();
         cy.get('.q-notification__message').should('have.text', 'Data deleted');
 
-        cy.get(
-            '.multimediaParent > :nth-last-child(1) > .q-btn > .q-btn__content > .q-icon',
-        ).click();
+        cy.dataCy('delete-button-3').click();
         cy.get(
             '.q-card__actions > .q-btn--unelevated > .q-btn__content > .block',
         ).click();

From 3d204911621c7396c432c54ba02580a591835d80 Mon Sep 17 00:00:00 2001
From: provira <provira@verdnatura.es>
Date: Thu, 27 Feb 2025 12:56:18 +0100
Subject: [PATCH 06/15] fix: refs #8417 added data-cy to delete button

---
 src/pages/Claim/Card/ClaimPhoto.vue | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/pages/Claim/Card/ClaimPhoto.vue b/src/pages/Claim/Card/ClaimPhoto.vue
index d4acc9bbe..5496e5c51 100644
--- a/src/pages/Claim/Card/ClaimPhoto.vue
+++ b/src/pages/Claim/Card/ClaimPhoto.vue
@@ -210,6 +210,7 @@ function onDrag() {
                     class="all-pointer-events absolute delete-button zindex"
                     @click.stop="viewDeleteDms(index)"
                     round
+                    :data-cy="`delete-button-${index+1}`"
                 />
                 <QIcon
                     name="play_circle"

From b941943c6d8b55ba21562a39e4289523387ee091 Mon Sep 17 00:00:00 2001
From: provira <provira@verdnatura.es>
Date: Fri, 28 Feb 2025 11:45:39 +0100
Subject: [PATCH 07/15] fix: refs #8417 added data-cy to all files and fixed
 test

---
 src/pages/Claim/Card/ClaimPhoto.vue               | 2 ++
 test/cypress/integration/claim/claimPhoto.spec.js | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/pages/Claim/Card/ClaimPhoto.vue b/src/pages/Claim/Card/ClaimPhoto.vue
index 5496e5c51..4ced7e862 100644
--- a/src/pages/Claim/Card/ClaimPhoto.vue
+++ b/src/pages/Claim/Card/ClaimPhoto.vue
@@ -228,6 +228,7 @@ function onDrag() {
                         class="rounded-borders cursor-pointer fit"
                         @click="openDialog(media.dmsFk)"
                         v-if="!media.isVideo"
+                        :data-cy="`file-${index+1}`"
                     >
                     </QImg>
                     <video
@@ -236,6 +237,7 @@ function onDrag() {
                         muted="muted"
                         v-if="media.isVideo"
                         @click="openDialog(media.dmsFk)"
+                        :data-cy="`file-${index+1}`"
                     />
                 </QCard>
             </div>
diff --git a/test/cypress/integration/claim/claimPhoto.spec.js b/test/cypress/integration/claim/claimPhoto.spec.js
index f62a9e313..3a9e43f17 100755
--- a/test/cypress/integration/claim/claimPhoto.spec.js
+++ b/test/cypress/integration/claim/claimPhoto.spec.js
@@ -24,7 +24,7 @@ describe('ClaimPhoto', () => {
     });
 
     it('should open first image dialog change to second and close', () => {
-        cy.get(':nth-child(1) > .q-card > .q-img > .q-img__container > .q-img__image').click();
+        cy.dataCy('file-1').click();
         cy.get('.q-carousel__next-arrow > .q-btn > .q-btn__content > .q-icon').click();
 
         cy.get(

From e2a9eadf444d673076c868cb2e074209f3712be5 Mon Sep 17 00:00:00 2001
From: provira <provira@verdnatura.es>
Date: Mon, 3 Mar 2025 08:58:56 +0100
Subject: [PATCH 08/15] fix: refs #8417 fixed failing test case

---
 test/cypress/integration/claim/claimPhoto.spec.js | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/test/cypress/integration/claim/claimPhoto.spec.js b/test/cypress/integration/claim/claimPhoto.spec.js
index 3a9e43f17..d534db71f 100755
--- a/test/cypress/integration/claim/claimPhoto.spec.js
+++ b/test/cypress/integration/claim/claimPhoto.spec.js
@@ -1,5 +1,4 @@
 /// <reference types="cypress" />
-// redmine.verdnatura.es/issues/8417
 describe('ClaimPhoto', () => {
     beforeEach(() => {
         const claimId = 1;
@@ -23,13 +22,21 @@ describe('ClaimPhoto', () => {
         cy.get('.q-notification__message').should('have.text', 'Data saved');
     });
 
-    it('should open first image dialog change to second and close', () => {
-        cy.dataCy('file-1').click();
-        cy.get('.q-carousel__next-arrow > .q-btn > .q-btn__content > .q-icon').click();
+    it.only('should open first image dialog change to second and close', () => {
+        cy.waitForElement('[data-cy="file-1"] .q-img__image--loaded');
+        cy.get(
+            ':nth-child(1) > .q-card > .q-img > .q-img__container > .q-img__image',
+        ).click();
+        cy.get('.q-carousel__slide > .q-img > .q-img__container > .q-img__image').should(
+            'be.visible',
+        );
+
+        cy.get('.q-carousel__control > button').as('nextButton').click();
 
         cy.get(
             '.q-dialog__inner > .q-toolbar > .q-btn > .q-btn__content > .q-icon',
         ).click();
+
         cy.get('.q-carousel__slide > .q-img > .q-img__container > .q-img__image').should(
             'not.be.visible',
         );

From a50344b1fa6c561c98c24fe9a02b689a837f99b0 Mon Sep 17 00:00:00 2001
From: provira <provira@verdnatura.es>
Date: Mon, 3 Mar 2025 13:45:09 +0100
Subject: [PATCH 09/15] fix: refs #8417 removed .only

---
 test/cypress/integration/claim/claimPhoto.spec.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/cypress/integration/claim/claimPhoto.spec.js b/test/cypress/integration/claim/claimPhoto.spec.js
index d534db71f..c3b312a23 100755
--- a/test/cypress/integration/claim/claimPhoto.spec.js
+++ b/test/cypress/integration/claim/claimPhoto.spec.js
@@ -22,7 +22,7 @@ describe('ClaimPhoto', () => {
         cy.get('.q-notification__message').should('have.text', 'Data saved');
     });
 
-    it.only('should open first image dialog change to second and close', () => {
+    it('should open first image dialog change to second and close', () => {
         cy.waitForElement('[data-cy="file-1"] .q-img__image--loaded');
         cy.get(
             ':nth-child(1) > .q-card > .q-img > .q-img__container > .q-img__image',

From 44be16e43a991ef016995ea0f8aaae489da3b44e Mon Sep 17 00:00:00 2001
From: provira <provira@verdnatura.es>
Date: Tue, 4 Mar 2025 08:54:18 +0100
Subject: [PATCH 10/15] fix: refs #8417 fixed e2e test

---
 .../integration/claim/claimPhoto.spec.js      | 24 +++++++------------
 1 file changed, 9 insertions(+), 15 deletions(-)

diff --git a/test/cypress/integration/claim/claimPhoto.spec.js b/test/cypress/integration/claim/claimPhoto.spec.js
index c3b312a23..324646a87 100755
--- a/test/cypress/integration/claim/claimPhoto.spec.js
+++ b/test/cypress/integration/claim/claimPhoto.spec.js
@@ -1,5 +1,7 @@
 /// <reference types="cypress" />
 describe('ClaimPhoto', () => {
+    const carrouselClose = '.q-dialog__inner > .q-toolbar > .q-btn > .q-btn__content > .q-icon';
+    const carrousel = '.q-carousel__slide > .q-img > .q-img__container > .q-img__image';
     beforeEach(() => {
         const claimId = 1;
         cy.login('developer');
@@ -23,23 +25,15 @@ describe('ClaimPhoto', () => {
     });
 
     it('should open first image dialog change to second and close', () => {
-        cy.waitForElement('[data-cy="file-1"] .q-img__image--loaded');
-        cy.get(
-            ':nth-child(1) > .q-card > .q-img > .q-img__container > .q-img__image',
-        ).click();
-        cy.get('.q-carousel__slide > .q-img > .q-img__container > .q-img__image').should(
-            'be.visible',
-        );
+        cy.dataCy('file-1').click();
+        cy.get(carrouselClose).click();
+        cy.get(carrousel).should('not.be.visible');
 
+        cy.dataCy('file-1').click();
+        cy.get(carrousel).should('be.visible');
         cy.get('.q-carousel__control > button').as('nextButton').click();
-
-        cy.get(
-            '.q-dialog__inner > .q-toolbar > .q-btn > .q-btn__content > .q-icon',
-        ).click();
-
-        cy.get('.q-carousel__slide > .q-img > .q-img__container > .q-img__image').should(
-            'not.be.visible',
-        );
+        cy.get(carrouselClose,).click();
+        cy.get(carrousel).should('not.be.visible');
     });
 
     it('should remove third and fourth file', () => {

From 377e31a4bcf162688bc64312f2e69171121a3fa8 Mon Sep 17 00:00:00 2001
From: provira <provira@verdnatura.es>
Date: Tue, 4 Mar 2025 09:39:37 +0100
Subject: [PATCH 11/15] fix: refs #8417 fixed e2e test case

---
 test/cypress/integration/claim/claimPhoto.spec.js | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/test/cypress/integration/claim/claimPhoto.spec.js b/test/cypress/integration/claim/claimPhoto.spec.js
index 324646a87..531819955 100755
--- a/test/cypress/integration/claim/claimPhoto.spec.js
+++ b/test/cypress/integration/claim/claimPhoto.spec.js
@@ -27,13 +27,12 @@ describe('ClaimPhoto', () => {
     it('should open first image dialog change to second and close', () => {
         cy.dataCy('file-1').click();
         cy.get(carrouselClose).click();
-        cy.get(carrousel).should('not.be.visible');
 
         cy.dataCy('file-1').click();
         cy.get(carrousel).should('be.visible');
         cy.get('.q-carousel__control > button').as('nextButton').click();
-        cy.get(carrouselClose,).click();
-        cy.get(carrousel).should('not.be.visible');
+        cy.get('.q-carousel__slide > .q-ma-none').should('be.visible');
+        cy.get(carrouselClose).click();
     });
 
     it('should remove third and fourth file', () => {

From fa50108a96b4c97880965f99b7dfcdbdba5e4428 Mon Sep 17 00:00:00 2001
From: provira <provira@verdnatura.es>
Date: Tue, 4 Mar 2025 11:08:52 +0100
Subject: [PATCH 12/15] fix: refs #8417 fixed claimPhoto e2e

---
 test/cypress/integration/claim/claimPhoto.spec.js | 2 --
 1 file changed, 2 deletions(-)

diff --git a/test/cypress/integration/claim/claimPhoto.spec.js b/test/cypress/integration/claim/claimPhoto.spec.js
index 531819955..592642f4d 100755
--- a/test/cypress/integration/claim/claimPhoto.spec.js
+++ b/test/cypress/integration/claim/claimPhoto.spec.js
@@ -1,7 +1,6 @@
 /// <reference types="cypress" />
 describe('ClaimPhoto', () => {
     const carrouselClose = '.q-dialog__inner > .q-toolbar > .q-btn > .q-btn__content > .q-icon';
-    const carrousel = '.q-carousel__slide > .q-img > .q-img__container > .q-img__image';
     beforeEach(() => {
         const claimId = 1;
         cy.login('developer');
@@ -29,7 +28,6 @@ describe('ClaimPhoto', () => {
         cy.get(carrouselClose).click();
 
         cy.dataCy('file-1').click();
-        cy.get(carrousel).should('be.visible');
         cy.get('.q-carousel__control > button').as('nextButton').click();
         cy.get('.q-carousel__slide > .q-ma-none').should('be.visible');
         cy.get(carrouselClose).click();

From 2831dfc95b7760f65a9114703c36b23c8551d174 Mon Sep 17 00:00:00 2001
From: provira <provira@verdnatura.es>
Date: Tue, 4 Mar 2025 14:20:28 +0100
Subject: [PATCH 13/15] fix: refs #8417 fixed invoiceOutSummary e2e test

---
 test/cypress/integration/invoiceOut/invoiceOutSummary.spec.js | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/test/cypress/integration/invoiceOut/invoiceOutSummary.spec.js b/test/cypress/integration/invoiceOut/invoiceOutSummary.spec.js
index 333f7e2c4..617007e37 100644
--- a/test/cypress/integration/invoiceOut/invoiceOutSummary.spec.js
+++ b/test/cypress/integration/invoiceOut/invoiceOutSummary.spec.js
@@ -17,7 +17,6 @@ describe('InvoiceOut summary', () => {
         cy.login('developer');
         cy.visit(`/#/invoice-out/1/summary`);
     });
-
     it('open the descriptors', () => {
         cy.get(firstRowDescriptors(1)).click();
         cy.get('.descriptor').should('be.visible');
@@ -33,9 +32,8 @@ describe('InvoiceOut summary', () => {
         cy.get('.q-item > .q-item__label').should('include.text', '1101');
     });
 
-    it('should open the ticket list', () => {
+    it.only('should open the ticket list', () => {
         cy.get(toTicketList).click();
-        cy.get('.descriptor').should('be.visible');
         cy.dataCy('vnFilterPanelChip').should('include.text', 'T1111111');
     });
 

From fa8e8a7d4d23839c7a91a2df9e948ba1bcc15fc9 Mon Sep 17 00:00:00 2001
From: alexm <alexm@verdnatura.es>
Date: Wed, 5 Mar 2025 07:35:53 +0100
Subject: [PATCH 14/15] fix(CustomerDescriptor): isFreezed icon

---
 src/pages/Customer/Card/CustomerDescriptor.vue | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/pages/Customer/Card/CustomerDescriptor.vue b/src/pages/Customer/Card/CustomerDescriptor.vue
index 89f9d9449..04c81ddcc 100644
--- a/src/pages/Customer/Card/CustomerDescriptor.vue
+++ b/src/pages/Customer/Card/CustomerDescriptor.vue
@@ -119,7 +119,7 @@ const debtWarning = computed(() => {
                     <QTooltip>{{ t('Allowed substitution') }}</QTooltip>
                 </QIcon>
                 <QIcon
-                    v-if="customer?.isFreezed"
+                    v-if="entity?.isFreezed"
                     name="vn:frozen"
                     size="xs"
                     color="primary"
@@ -163,13 +163,13 @@ const debtWarning = computed(() => {
                         <br />
                         {{
                             t('unpaidDated', {
-                                dated: toDate(customer.unpaid?.dated),
+                                dated: toDate(entity.unpaid?.dated),
                             })
                         }}
                         <br />
                         {{
                             t('unpaidAmount', {
-                                amount: toCurrency(customer.unpaid?.amount),
+                                amount: toCurrency(entity.unpaid?.amount),
                             })
                         }}
                     </QTooltip>

From f030fcd8b71f15985b4d9a63a7888bcf6359b8ed Mon Sep 17 00:00:00 2001
From: alexm <alexm@verdnatura.es>
Date: Wed, 5 Mar 2025 07:40:07 +0100
Subject: [PATCH 15/15] fix(CustomerDescriptor): reposition isFreezed icon for
 better visibility

---
 src/pages/Customer/Card/CustomerDescriptor.vue | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/pages/Customer/Card/CustomerDescriptor.vue b/src/pages/Customer/Card/CustomerDescriptor.vue
index 04c81ddcc..e3156dd6d 100644
--- a/src/pages/Customer/Card/CustomerDescriptor.vue
+++ b/src/pages/Customer/Card/CustomerDescriptor.vue
@@ -118,14 +118,6 @@ const debtWarning = computed(() => {
                 >
                     <QTooltip>{{ t('Allowed substitution') }}</QTooltip>
                 </QIcon>
-                <QIcon
-                    v-if="entity?.isFreezed"
-                    name="vn:frozen"
-                    size="xs"
-                    color="primary"
-                >
-                    <QTooltip>{{ t('customer.card.isFrozen') }}</QTooltip>
-                </QIcon>
                 <QIcon
                     v-if="!entity.account?.active"
                     color="primary"
@@ -150,6 +142,14 @@ const debtWarning = computed(() => {
                 >
                     <QTooltip>{{ t('customer.card.notChecked') }}</QTooltip>
                 </QIcon>
+                <QIcon
+                    v-if="entity?.isFreezed"
+                    name="vn:frozen"
+                    size="xs"
+                    color="primary"
+                >
+                    <QTooltip>{{ t('customer.card.isFrozen') }}</QTooltip>
+                </QIcon>
                 <QBtn
                     v-if="entity.unpaid"
                     flat