You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the exception from the mock : Lookup Control cannot have more than one default view..
Correction proposal
If we replace the throw new Error("No default view was found!"); from getDefaultView with a return undefined when doesn't have the issue anymore and the first scenario is passing.
The text was updated successfully, but these errors were encountered:
I am trying to use the LookupControl to test a functionnality that should add a custom view.
It look like there is an inconsistency in the implementation of the Mock which prevent me to do so :
Scenario
If i create create an attribute with a component :
And then have some implementation that add a customView (with default set to true), like :
I end up with an error from the mock :
No default view was found!
. This is from thegetDefaultView
method from the mock (https://github.com/camelCaseDave/xrm-mock/blob/88c77c97e96a9ff2051b0ffdc2b4bed1e13262c0/src/xrm-mock/controls/lookupcontrol/lookupcontrol.mock.ts#L89). This method throw an exception when there is no default view and is used inside theaddCustomView
in the first if.But if add a default view before execution of addCustomView :
I have the exception from the mock :
Lookup Control cannot have more than one default view.
.Correction proposal
If we replace the
throw new Error("No default view was found!");
fromgetDefaultView
with areturn undefined
when doesn't have the issue anymore and the first scenario is passing.The text was updated successfully, but these errors were encountered: