bcquality/microsoft/knowledge/testing/ui-handlers-in-tests.bad.al
wenjiefan 5f1cff2fb6 Refine self-improvement review guidance
Narrow IsHandled, label-scope, UI-handler, checkpoint, and bulk-operation guidance to evidence-backed false-positive boundaries.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-08-18 11:17:14 +02:00

28 lines
711 B
AL

codeunit 50401 "Test UI Handler Proof Bad"
{
Subtype = Test;
[Test]
[HandlerFunctions('CustomerCardHandler')]
procedure CustomerCardActionSucceeds()
var
Customer: Record Customer;
begin
Customer.Get('10000');
ActionSucceeded := true;
Page.RunModal(Page::"Customer Card", Customer);
// This only proves a value assigned before the action stayed true.
Assert.IsTrue(ActionSucceeded, 'The customer card action failed.');
end;
[ModalPageHandler]
procedure CustomerCardHandler(var CustomerCard: TestPage "Customer Card")
begin
end;
var
Assert: Codeunit "Library Assert";
ActionSucceeded: Boolean;
}