diff --git a/cypress/e2e/CreateChallenge.cy.ts b/cypress/e2e/CreateChallenge.cy.ts
index d60c967..fd4df63 100644
--- a/cypress/e2e/CreateChallenge.cy.ts
+++ b/cypress/e2e/CreateChallenge.cy.ts
@@ -7,6 +7,8 @@ describe('CreateChallenge Component', () => {
it('should submit the form with valid input', () => {
cy.intercept('POST', '/api/challenges', {}).as('createChallenge')
+ cy.intercept('GET', '/api/healthdata', {}).as('getData')
+ cy.intercept('GET', '/api/membership', {}).as('getMembership')
// Llena el formulario con valores vĂ¡lidos
cy.get('input[id="name"]').type('My Challenge')
diff --git a/cypress/e2e/GeneralData.cy.ts b/cypress/e2e/GeneralData.cy.ts
index 28c3ea8..ae05e77 100644
--- a/cypress/e2e/GeneralData.cy.ts
+++ b/cypress/e2e/GeneralData.cy.ts
@@ -1,7 +1,9 @@
describe('GeneralData E2E Test', () => {
beforeEach(() => {
+ cy.login()
// Cambia esta ruta a la ruta donde se monta tu componente
cy.visit('/home/generalData')
+ cy.getSubscription()
})
it('renders the page correctly', () => {
@@ -22,6 +24,8 @@ describe('GeneralData E2E Test', () => {
},
}).as('getHealthData')
+ cy.intercept('POST', '/api/healthdata', {}).as('sendData')
+
// Ensure the page has loaded the initial data
cy.wait('@getHealthData')
@@ -66,6 +70,8 @@ describe('GeneralData E2E Test', () => {
},
}).as('getHealthData')
+ cy.intercept('POST', '/api/healthdata', {}).as('sendData')
+
// Ensure the page has loaded the initial data
cy.wait('@getHealthData')
diff --git a/src/app/(pages)/(main)/home/generalData/page.tsx b/src/app/(pages)/(main)/home/generalData/page.tsx
index 174b43c..0c55fc6 100644
--- a/src/app/(pages)/(main)/home/generalData/page.tsx
+++ b/src/app/(pages)/(main)/home/generalData/page.tsx
@@ -284,6 +284,7 @@ const GeneralData = () => {
{!editMode ? (