diff --git a/modules/customer-invoices/src/web/proformas/update/ui/pages/proforma-update-page.tsx b/modules/customer-invoices/src/web/proformas/update/ui/pages/proforma-update-page.tsx index 8b61f15d..6f02cbb5 100644 --- a/modules/customer-invoices/src/web/proformas/update/ui/pages/proforma-update-page.tsx +++ b/modules/customer-invoices/src/web/proformas/update/ui/pages/proforma-update-page.tsx @@ -49,14 +49,22 @@ export const ProformaUpdatePage = () => { }; if (ctrl.isInitialLoading) { - return ; + return ( + + + + + + + + ); } if (ctrl.pageError) { return ( - - + + { title={ctrl.pageError.title} variant={ctrl.pageError.variant} /> - + ); } - const hasPageAlerts = updateCtrl.isUpdateError || updateCtrl.isSeriesLoadError; const actionBar = ( { primary={ { } > - {hasPageAlerts ? ( - - - {updateCtrl.isUpdateError && ( - + {updateCtrl.isUpdateError ? ( + + ) : null} + + {updateCtrl.isSeriesLoadError ? ( + + } + title={t( + "pages.proformas.update.series_load_error.title", + "No se pudieron cargar las series de facturación" )} + /> + ) : null} - {updateCtrl.isSeriesLoadError && ( - - )} - - - ) : null} - - + + diff --git a/modules/customers/src/web/update/ui/pages/customer-update-page.tsx b/modules/customers/src/web/update/ui/pages/customer-update-page.tsx index dc782b93..619f25a4 100644 --- a/modules/customers/src/web/update/ui/pages/customer-update-page.tsx +++ b/modules/customers/src/web/update/ui/pages/customer-update-page.tsx @@ -29,52 +29,51 @@ export const CustomerUpdatePage = () => { return ( - + + : undefined + } + title={ctrl.pageError.title} + variant={ctrl.pageError.variant} + /> + ); } - const hasPageAlerts = updateCtrl.isUpdateError; - return ( hola} + contentClassName="bg-red-500" header={ { /> } > - + - {hasPageAlerts ? ( - - - {updateCtrl.isUpdateError && ( - - )} - - + {updateCtrl.isUpdateError ? ( + ) : null} { onReset={updateCtrl.resetForm} onSubmit={updateCtrl.onSubmit} /> - - - - {updateCtrl.isUpdateError ? ( - - ) : null} - - diff --git a/tests/e2e/customer-invoices/proformas/update-proforma.spec.ts b/tests/e2e/customer-invoices/proformas/update-proforma.spec.ts index 94d14e7a..62bab8c0 100644 --- a/tests/e2e/customer-invoices/proformas/update-proforma.spec.ts +++ b/tests/e2e/customer-invoices/proformas/update-proforma.spec.ts @@ -12,18 +12,18 @@ test("CUSTOMER-INVOICES-PROFORMA-UPDATE-001: modifica referencia y descripción const reference = `E2E ${proforma.token}`; const description = `E2E updated draft ${proforma.token}`; await page.locator('input[name="reference"]').fill(reference); - await page.locator('textarea[name="description"]').fill(description); + await page.locator('input[name="description"]').fill(description); const responsePromise = page.waitForResponse( (response) => response.request().method() === "PUT" && new URL(response.url()).pathname.endsWith(`/proformas/${proforma.id}`) ); - await page.getByTestId("submit-button").click(); + await page.getByTestId("proforma-update-submit").click(); expect((await responsePromise).status()).toBe(200); await expect(page).toHaveURL((url) => url.pathname === `/proformas/${proforma.id}/edit`); await expect(page.locator('input[name="reference"]')).toHaveValue(reference); - await expect(page.locator('textarea[name="description"]')).toHaveValue(description); + await expect(page.locator('input[name="description"]')).toHaveValue(description); await page.reload(); await expect(page.locator('input[name="reference"]')).toHaveValue(reference); - await expect(page.locator('textarea[name="description"]')).toHaveValue(description); + await expect(page.locator('input[name="description"]')).toHaveValue(description); });