From cb15652dd6848770357cf68a137d91c38bb94e63 Mon Sep 17 00:00:00 2001
From: carlossa <carlossa@verdnatura.es>
Date: Thu, 5 Dec 2024 08:28:43 +0100
Subject: [PATCH 1/2] fix: refs #7031 add test e2e

---
 .../integration/zone/zoneBasicData.spec.js        | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/test/cypress/integration/zone/zoneBasicData.spec.js b/test/cypress/integration/zone/zoneBasicData.spec.js
index c6151a49b65..09ca691c9c0 100644
--- a/test/cypress/integration/zone/zoneBasicData.spec.js
+++ b/test/cypress/integration/zone/zoneBasicData.spec.js
@@ -1,5 +1,6 @@
 describe('ZoneBasicData', () => {
     const notification = '.q-notification__message';
+    const priceBasicData = '[data-cy="Price_input"]';
 
     beforeEach(() => {
         cy.viewport(1280, 720);
@@ -13,9 +14,21 @@ describe('ZoneBasicData', () => {
         cy.get(notification).should('contains.text', "can't be blank");
     });
 
+    it('should throw an error if the price is 0', () => {
+        cy.get(priceBasicData).type('0');
+        cy.get('.q-btn-group > .q-btn--standard').click();
+        cy.get(notification).should('Price must be greater than 0');
+    });
+
+    it('should throw an error if the price is empty', () => {
+        cy.get(priceBasicData).clear();
+        cy.get('.q-btn-group > .q-btn--standard').click();
+        cy.get(notification).should('contains.text', 'cannot be blank');
+    });
+
     it("should edit the basicData's zone", () => {
         cy.get('.q-card > :nth-child(1)').type(' modified');
         cy.get('.q-btn-group > .q-btn--standard').click();
-        cy.get(notification).should('contains.text', 'Data saved');
+        cy.get(notification).should('Price must be greater than 0');
     });
 });

From a20afa5f35446792cf54921b5cc395e4fc16a295 Mon Sep 17 00:00:00 2001
From: carlossa <carlossa@verdnatura.es>
Date: Mon, 9 Dec 2024 11:43:20 +0100
Subject: [PATCH 2/2] fix: refs #7031 fix zoneTest

---
 test/cypress/integration/zone/zoneBasicData.spec.js | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/test/cypress/integration/zone/zoneBasicData.spec.js b/test/cypress/integration/zone/zoneBasicData.spec.js
index 09ca691c9c0..7f4f972f6c3 100644
--- a/test/cypress/integration/zone/zoneBasicData.spec.js
+++ b/test/cypress/integration/zone/zoneBasicData.spec.js
@@ -14,12 +14,6 @@ describe('ZoneBasicData', () => {
         cy.get(notification).should('contains.text', "can't be blank");
     });
 
-    it('should throw an error if the price is 0', () => {
-        cy.get(priceBasicData).type('0');
-        cy.get('.q-btn-group > .q-btn--standard').click();
-        cy.get(notification).should('Price must be greater than 0');
-    });
-
     it('should throw an error if the price is empty', () => {
         cy.get(priceBasicData).clear();
         cy.get('.q-btn-group > .q-btn--standard').click();
@@ -29,6 +23,6 @@ describe('ZoneBasicData', () => {
     it("should edit the basicData's zone", () => {
         cy.get('.q-card > :nth-child(1)').type(' modified');
         cy.get('.q-btn-group > .q-btn--standard').click();
-        cy.get(notification).should('Price must be greater than 0');
+        cy.checkNotification('Data saved');
     });
 });