mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-05 06:36:55 +01:00
Preserve independent event seams, cover loop-carried handled state, strengthen checkpoint and UI-handler fixtures, and align DeleteAll fallback guidance. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 10646e50-2d8b-4cca-b02b-dfa78629e6a1
29 lines
811 B
AL
29 lines
811 B
AL
codeunit 50400 "Test UI Handler Capture Good"
|
|
{
|
|
Subtype = Test;
|
|
|
|
[Test]
|
|
[HandlerFunctions('CustomerCardHandler')]
|
|
procedure CustomerCardShowsSelectedCustomer()
|
|
var
|
|
Customer: Record Customer;
|
|
begin
|
|
LibrarySales.CreateCustomer(Customer);
|
|
CapturedCustomerNo := '';
|
|
|
|
Page.RunModal(Page::"Customer Card", Customer);
|
|
|
|
Assert.AreEqual(Customer."No.", CapturedCustomerNo, 'The customer card opened for the wrong customer.');
|
|
end;
|
|
|
|
[ModalPageHandler]
|
|
procedure CustomerCardHandler(var CustomerCard: TestPage "Customer Card")
|
|
begin
|
|
CapturedCustomerNo := CustomerCard."No.".Value();
|
|
end;
|
|
|
|
var
|
|
Assert: Codeunit "Library Assert";
|
|
LibrarySales: Codeunit "Library - Sales";
|
|
CapturedCustomerNo: Code[20];
|
|
}
|