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 ? (
@@ -38,7 +38,7 @@ export const SleepTimeSelection = ({ onClick={() => { setDay('Hoy') }} - className={`${day === 'Hoy' ? 'bg-decoration-sleep-colordark' : 'bg-decoration-sleep-colorlight'} hover:bg-decoration-sleep-colordark rounded-2xl px-5 py-2 md:px-10`} + className={`${day === 'Hoy' ? 'bg-decoration-sleep-colordark' : 'bg-decoration-sleep-colorlight'} rounded-2xl px-5 py-2 hover:bg-decoration-sleep-colordark md:px-10`} > Hoy diff --git a/src/components/information/toggle.tsx b/src/components/information/toggle.tsx index 7640b3a..18a4176 100644 --- a/src/components/information/toggle.tsx +++ b/src/components/information/toggle.tsx @@ -22,7 +22,7 @@ const ToggleComponent = ({ title, children, editModeToggle }: ToggleProps) => {