When extending a page with a new action, the action does not appear when trying to invoke it on a TestPage variable in a given Test Suite.
This seems to have occurred only in the below version.
pageextension 50000 TestExtension extends "Contact Card"
{
actions
{
addafter("Apply Template")
{
action(TestAction)
{
Caption = 'TestAction';
ApplicationArea = All;
trigger OnAction()
begin
message('HelloWorld');
end;
}
}
}
}
codeunit 50001 "TestCodeunit"
{
Subtype = Test;
TestPermissions = Disabled;
[Test]
procedure TestPageExtensionAction();
var
ContactCardTestPage: TestPage "Contact Card";
begin
ContactCardTestPage.TestAction.Invoke();
end;
}
"message": "'TestPage Contact Card' does not contain a definition for 'TestAction'",
"source": "AL",
Do you have defined the dependency to your Base App in your Test App?
Yes. Have tried with multiple Apps/Test apps as well. The exact same code works if using a previous extension version- 13.0.24284.0-W1
We fixed this issue yesterday. It should be out soon.
Most helpful comment
We fixed this issue yesterday. It should be out soon.