Skip to content
Open
11 changes: 11 additions & 0 deletions packages/dashboard/e2e/fixtures/e2e-shared-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,17 @@ export const e2eCustomFields: CustomFields = {
label: [{ languageCode: LanguageCode.en, value: 'Feature Type' }],
options: [{ value: 'standard' }, { value: 'premium' }],
},
{
// Used by tests/regression/issue-4741-form-error-summary.spec.ts.
// Nullable + a pattern that permits the empty default, so it does not
// affect other product create/edit tests, but rejects non-numeric
// input — letting a test drive the form into an invalid state.
name: 'oss540NumericCode',
type: 'string',
nullable: true,
pattern: '^[0-9]*$',
label: [{ languageCode: LanguageCode.en, value: 'OSS-540 Numeric Code' }],
},
// ── SEO tab ──
{
name: 'seoTitle',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import { expect, type Page, test } from '@playwright/test';

import { BaseDetailPage } from '../../page-objects/detail-page.base.js';

// `#4741` — Operation buttons are frequently disabled with no on-page prompts.
//
// When a detail-page form is invalid, the submit button is disabled. Previously
// there was no on-page indication of *why* — the validation error was only
// logged to the console. This regression verifies that the FormErrorSummary
// banner surfaces the reason. The `oss540NumericCode` product custom field
// (see e2e/fixtures/e2e-shared-config.ts) rejects non-numeric input, letting us
// drive the form into an invalid state deterministically.
test.describe('Issue #4741: disabled submit button surfaces a reason', () => {
const detailPage = (page: Page) =>
new BaseDetailPage(page, {
newPath: '/products/new',
pathPrefix: '/products/',
newTitle: 'New product',
});

const SUMMARY_TITLE = 'This cannot be saved until the following are fixed:';

test('shows a validation summary when a field value is invalid', async ({ page }) => {
const dp = detailPage(page);
await dp.gotoNew();
await dp.expectNewPageLoaded();

// A valid name on its own makes the form submittable…
await dp.fillInput('Product name', 'OSS-540 error summary test');
await expect(dp.createButton).toBeEnabled({ timeout: 10_000 });

// …until a field is given an invalid value.
await dp.fillInput('OSS-540 Numeric Code', 'abc');

// The submit button is disabled (unchanged behaviour) AND the page now
// explains why via the summary banner — the fix for #4741.
await expect(dp.createButton).toBeDisabled();
await expect(page.getByText(SUMMARY_TITLE)).toBeVisible();
await expect(page.getByText('Value must match pattern: ^[0-9]*$').first()).toBeVisible();

// Correcting the value clears the summary and re-enables the button.
await dp.fillInput('OSS-540 Numeric Code', '12345');
await expect(page.getByText(SUMMARY_TITLE)).toBeHidden();
await expect(dp.createButton).toBeEnabled();
});
});
14 changes: 11 additions & 3 deletions packages/dashboard/src/i18n/locales/ar.po
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ msgstr "عنوان 5"
msgid "Failed to add payment"
msgstr "فشل إضافة الدفع"

#: src/lib/framework/layout-engine/page-layout.tsx:759
#: src/lib/framework/layout-engine/page-layout.tsx:761
msgid "Updated"
msgstr "تم التحديث"

Expand Down Expand Up @@ -1675,7 +1675,7 @@ msgstr "تم تحديث العنوان بنجاح"
#: src/app/routes/_authenticated/_api-keys/api-keys_.$id.tsx:226
#: src/app/routes/_authenticated/_orders/components/fulfillment-details.tsx:126
#: src/lib/components/shared/asset/asset-gallery.tsx:747
#: src/lib/framework/layout-engine/page-layout.tsx:746
#: src/lib/framework/layout-engine/page-layout.tsx:748
msgid "Created"
msgstr "تم الإنشاء"

Expand Down Expand Up @@ -3713,6 +3713,10 @@ msgstr ""
msgid "Pick a date and time"
msgstr ""

#: src/lib/components/shared/form-error-summary.tsx:101
msgid "This field is invalid"
msgstr ""

#: src/app/routes/_authenticated/_orders/components/fulfillment-details.tsx:53
#: src/app/routes/_authenticated/_orders/components/fulfillment-details.tsx:57
msgid "Failed to update fulfillment state"
Expand Down Expand Up @@ -4371,11 +4375,15 @@ msgstr "تم تسوية الدفع"
msgid "orderState.Shipped"
msgstr "تم الشحن"

#: src/lib/components/shared/form-error-summary.tsx:86
msgid "This cannot be saved until the following are fixed:"
msgstr ""

#: src/app/routes/_authenticated/_system/healthchecks.tsx:83
#~ msgid "Monitored Resources"
#~ msgstr "الموارد المراقبة"

#: src/lib/framework/layout-engine/page-layout.tsx:718
#: src/lib/framework/layout-engine/page-layout.tsx:720
msgid "Entity Information"
msgstr "معلومات الكيان"

Expand Down
14 changes: 11 additions & 3 deletions packages/dashboard/src/i18n/locales/bg.po
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ msgstr "Заглавие 5"
msgid "Failed to add payment"
msgstr "Неуспешно добавяне на плащане"

#: src/lib/framework/layout-engine/page-layout.tsx:759
#: src/lib/framework/layout-engine/page-layout.tsx:761
msgid "Updated"
msgstr "Актуализиран"

Expand Down Expand Up @@ -1684,7 +1684,7 @@ msgstr "Адресът е актуализиран успешно"
#: src/app/routes/_authenticated/_api-keys/api-keys_.$id.tsx:226
#: src/app/routes/_authenticated/_orders/components/fulfillment-details.tsx:126
#: src/lib/components/shared/asset/asset-gallery.tsx:747
#: src/lib/framework/layout-engine/page-layout.tsx:746
#: src/lib/framework/layout-engine/page-layout.tsx:748
msgid "Created"
msgstr "Създаден"

Expand Down Expand Up @@ -3733,6 +3733,10 @@ msgstr ""
msgid "Pick a date and time"
msgstr ""

#: src/lib/components/shared/form-error-summary.tsx:101
msgid "This field is invalid"
msgstr ""

#: src/app/routes/_authenticated/_orders/components/fulfillment-details.tsx:53
#: src/app/routes/_authenticated/_orders/components/fulfillment-details.tsx:57
msgid "Failed to update fulfillment state"
Expand Down Expand Up @@ -4391,11 +4395,15 @@ msgstr "Плащането е приключено"
msgid "orderState.Shipped"
msgstr "Изпратена"

#: src/lib/components/shared/form-error-summary.tsx:86
msgid "This cannot be saved until the following are fixed:"
msgstr ""

#: src/app/routes/_authenticated/_system/healthchecks.tsx:83
#~ msgid "Monitored Resources"
#~ msgstr "Наблюдавани ресурси"

#: src/lib/framework/layout-engine/page-layout.tsx:718
#: src/lib/framework/layout-engine/page-layout.tsx:720
msgid "Entity Information"
msgstr "Информация за обекта"

Expand Down
14 changes: 11 additions & 3 deletions packages/dashboard/src/i18n/locales/cs.po
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ msgstr "Nadpis 5"
msgid "Failed to add payment"
msgstr "Nepodařilo se přidat platbu"

#: src/lib/framework/layout-engine/page-layout.tsx:759
#: src/lib/framework/layout-engine/page-layout.tsx:761
msgid "Updated"
msgstr "Aktualizováno"

Expand Down Expand Up @@ -1675,7 +1675,7 @@ msgstr "Adresa úspěšně aktualizována"
#: src/app/routes/_authenticated/_api-keys/api-keys_.$id.tsx:226
#: src/app/routes/_authenticated/_orders/components/fulfillment-details.tsx:126
#: src/lib/components/shared/asset/asset-gallery.tsx:747
#: src/lib/framework/layout-engine/page-layout.tsx:746
#: src/lib/framework/layout-engine/page-layout.tsx:748
msgid "Created"
msgstr "Vytvořeno"

Expand Down Expand Up @@ -3713,6 +3713,10 @@ msgstr ""
msgid "Pick a date and time"
msgstr ""

#: src/lib/components/shared/form-error-summary.tsx:101
msgid "This field is invalid"
msgstr ""

#: src/app/routes/_authenticated/_orders/components/fulfillment-details.tsx:53
#: src/app/routes/_authenticated/_orders/components/fulfillment-details.tsx:57
msgid "Failed to update fulfillment state"
Expand Down Expand Up @@ -4371,11 +4375,15 @@ msgstr "Platba vypořádána"
msgid "orderState.Shipped"
msgstr "Odesláno"

#: src/lib/components/shared/form-error-summary.tsx:86
msgid "This cannot be saved until the following are fixed:"
msgstr ""

#: src/app/routes/_authenticated/_system/healthchecks.tsx:83
#~ msgid "Monitored Resources"
#~ msgstr "Monitorované zdroje"

#: src/lib/framework/layout-engine/page-layout.tsx:718
#: src/lib/framework/layout-engine/page-layout.tsx:720
msgid "Entity Information"
msgstr "Informace o entitě"

Expand Down
14 changes: 11 additions & 3 deletions packages/dashboard/src/i18n/locales/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ msgstr "Überschrift 5"
msgid "Failed to add payment"
msgstr "Fehler beim Hinzufügen der Zahlung"

#: src/lib/framework/layout-engine/page-layout.tsx:759
#: src/lib/framework/layout-engine/page-layout.tsx:761
msgid "Updated"
msgstr "Aktualisiert"

Expand Down Expand Up @@ -1675,7 +1675,7 @@ msgstr "Adresse erfolgreich aktualisiert"
#: src/app/routes/_authenticated/_api-keys/api-keys_.$id.tsx:226
#: src/app/routes/_authenticated/_orders/components/fulfillment-details.tsx:126
#: src/lib/components/shared/asset/asset-gallery.tsx:747
#: src/lib/framework/layout-engine/page-layout.tsx:746
#: src/lib/framework/layout-engine/page-layout.tsx:748
msgid "Created"
msgstr "Erstellt"

Expand Down Expand Up @@ -3713,6 +3713,10 @@ msgstr ""
msgid "Pick a date and time"
msgstr ""

#: src/lib/components/shared/form-error-summary.tsx:101
msgid "This field is invalid"
msgstr ""

#: src/app/routes/_authenticated/_orders/components/fulfillment-details.tsx:53
#: src/app/routes/_authenticated/_orders/components/fulfillment-details.tsx:57
msgid "Failed to update fulfillment state"
Expand Down Expand Up @@ -4371,11 +4375,15 @@ msgstr "Zahlung abgewickelt"
msgid "orderState.Shipped"
msgstr "Versandt"

#: src/lib/components/shared/form-error-summary.tsx:86
msgid "This cannot be saved until the following are fixed:"
msgstr ""

#: src/app/routes/_authenticated/_system/healthchecks.tsx:83
#~ msgid "Monitored Resources"
#~ msgstr "Überwachte Ressourcen"

#: src/lib/framework/layout-engine/page-layout.tsx:718
#: src/lib/framework/layout-engine/page-layout.tsx:720
msgid "Entity Information"
msgstr "Entitätsinformationen"

Expand Down
14 changes: 11 additions & 3 deletions packages/dashboard/src/i18n/locales/en.po
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ msgstr "Heading 5"
msgid "Failed to add payment"
msgstr "Failed to add payment"

#: src/lib/framework/layout-engine/page-layout.tsx:759
#: src/lib/framework/layout-engine/page-layout.tsx:761
msgid "Updated"
msgstr "Updated"

Expand Down Expand Up @@ -1675,7 +1675,7 @@ msgstr "Address updated successfully"
#: src/app/routes/_authenticated/_api-keys/api-keys_.$id.tsx:226
#: src/app/routes/_authenticated/_orders/components/fulfillment-details.tsx:126
#: src/lib/components/shared/asset/asset-gallery.tsx:747
#: src/lib/framework/layout-engine/page-layout.tsx:746
#: src/lib/framework/layout-engine/page-layout.tsx:748
msgid "Created"
msgstr "Created"

Expand Down Expand Up @@ -3713,6 +3713,10 @@ msgstr "Search API keys..."
msgid "Pick a date and time"
msgstr "Pick a date and time"

#: src/lib/components/shared/form-error-summary.tsx:101
msgid "This field is invalid"
msgstr "This field is invalid"

#: src/app/routes/_authenticated/_orders/components/fulfillment-details.tsx:53
#: src/app/routes/_authenticated/_orders/components/fulfillment-details.tsx:57
msgid "Failed to update fulfillment state"
Expand Down Expand Up @@ -4371,11 +4375,15 @@ msgstr "Payment settled"
msgid "orderState.Shipped"
msgstr "Shipped"

#: src/lib/components/shared/form-error-summary.tsx:86
msgid "This cannot be saved until the following are fixed:"
msgstr "This cannot be saved until the following are fixed:"

#: src/app/routes/_authenticated/_system/healthchecks.tsx:83
#~ msgid "Monitored Resources"
#~ msgstr "Monitored Resources"

#: src/lib/framework/layout-engine/page-layout.tsx:718
#: src/lib/framework/layout-engine/page-layout.tsx:720
msgid "Entity Information"
msgstr "Entity Information"

Expand Down
14 changes: 11 additions & 3 deletions packages/dashboard/src/i18n/locales/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ msgstr "Encabezado 5"
msgid "Failed to add payment"
msgstr "Error al agregar pago"

#: src/lib/framework/layout-engine/page-layout.tsx:759
#: src/lib/framework/layout-engine/page-layout.tsx:761
msgid "Updated"
msgstr "Actualizado"

Expand Down Expand Up @@ -1675,7 +1675,7 @@ msgstr "Dirección actualizada exitosamente"
#: src/app/routes/_authenticated/_api-keys/api-keys_.$id.tsx:226
#: src/app/routes/_authenticated/_orders/components/fulfillment-details.tsx:126
#: src/lib/components/shared/asset/asset-gallery.tsx:747
#: src/lib/framework/layout-engine/page-layout.tsx:746
#: src/lib/framework/layout-engine/page-layout.tsx:748
msgid "Created"
msgstr "Creado"

Expand Down Expand Up @@ -3713,6 +3713,10 @@ msgstr ""
msgid "Pick a date and time"
msgstr ""

#: src/lib/components/shared/form-error-summary.tsx:101
msgid "This field is invalid"
msgstr ""

#: src/app/routes/_authenticated/_orders/components/fulfillment-details.tsx:53
#: src/app/routes/_authenticated/_orders/components/fulfillment-details.tsx:57
msgid "Failed to update fulfillment state"
Expand Down Expand Up @@ -4371,11 +4375,15 @@ msgstr "Pago liquidado"
msgid "orderState.Shipped"
msgstr "Enviado"

#: src/lib/components/shared/form-error-summary.tsx:86
msgid "This cannot be saved until the following are fixed:"
msgstr ""

#: src/app/routes/_authenticated/_system/healthchecks.tsx:83
#~ msgid "Monitored Resources"
#~ msgstr "Recursos Monitoreados"

#: src/lib/framework/layout-engine/page-layout.tsx:718
#: src/lib/framework/layout-engine/page-layout.tsx:720
msgid "Entity Information"
msgstr "Información de Entidad"

Expand Down
14 changes: 11 additions & 3 deletions packages/dashboard/src/i18n/locales/fa.po
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ msgstr "سرفصل ۵"
msgid "Failed to add payment"
msgstr "افزودن پرداخت ناموفق بود"

#: src/lib/framework/layout-engine/page-layout.tsx:759
#: src/lib/framework/layout-engine/page-layout.tsx:761
msgid "Updated"
msgstr "به‌روزرسانی شد"

Expand Down Expand Up @@ -1675,7 +1675,7 @@ msgstr "آدرس با موفقیت به‌روزرسانی شد"
#: src/app/routes/_authenticated/_api-keys/api-keys_.$id.tsx:226
#: src/app/routes/_authenticated/_orders/components/fulfillment-details.tsx:126
#: src/lib/components/shared/asset/asset-gallery.tsx:747
#: src/lib/framework/layout-engine/page-layout.tsx:746
#: src/lib/framework/layout-engine/page-layout.tsx:748
msgid "Created"
msgstr "ایجاد شد"

Expand Down Expand Up @@ -3713,6 +3713,10 @@ msgstr ""
msgid "Pick a date and time"
msgstr ""

#: src/lib/components/shared/form-error-summary.tsx:101
msgid "This field is invalid"
msgstr ""

#: src/app/routes/_authenticated/_orders/components/fulfillment-details.tsx:53
#: src/app/routes/_authenticated/_orders/components/fulfillment-details.tsx:57
msgid "Failed to update fulfillment state"
Expand Down Expand Up @@ -4371,11 +4375,15 @@ msgstr "پرداخت تسویه شده"
msgid "orderState.Shipped"
msgstr "ارسال شده"

#: src/lib/components/shared/form-error-summary.tsx:86
msgid "This cannot be saved until the following are fixed:"
msgstr ""

#: src/app/routes/_authenticated/_system/healthchecks.tsx:83
#~ msgid "Monitored Resources"
#~ msgstr "منابع نظارت شده"

#: src/lib/framework/layout-engine/page-layout.tsx:718
#: src/lib/framework/layout-engine/page-layout.tsx:720
msgid "Entity Information"
msgstr "اطلاعات موجودیت"

Expand Down
Loading
Loading