Comments (3)
I'm having the same issue
"@types/xrm": "9.0.18"
"xrm-mock": "3.4.16"
"typescript": "3.7.4" -- Tried going back as far as 3.5.3 with no success.
Updating the definitions to match the base types fixes it locally. Is there a recommended version of typescript and @types/xrm to use for the latest version of xrm-mock? It's likely I've missed something obvious but thought I'd share.
The specific issues are:
- In gridcontrol.mock.d.ts - handler should be typed as
Xrm.Events.ContextSensitiveHandler
a. Currently typed ashandler: () => void
- In executeresponse.mock.d.ts
a. Current Definition for ExecuteResponseMock
body: string;
headers: any;
ok: boolean;
status: number;
statusText: string;
type: string;
url: string;
constructor(components: IExecuteResponseComponents);
b. Members Required to Implement Xrm.ExecuteResponse (and Response / Body base classes)
body: ReadableStream<Uint8Array>;
headers: Headers;
ok: boolean;
redirected: boolean;
status: number;
statusText: string;
type: ResponseType;
url: string;
trailer: Promise<Headers>;
clone(): Response;
bodyUsed: boolean;
arrayBuffer(): Promise<ArrayBuffer>;
blob(): Promise<Blob>;
formData(): Promise<FormData>;
json(): Promise<any>;
text(): Promise<string>;
constructor(components: IExecuteResponseComponents);
from xrm-mock.
@mikefactorial good work. #49 includes the code you provided. I'll publish the new xrm-mock v3.4.17 now.
from xrm-mock.
Pulled the latest and everything works great. Thank you @camelCaseDave for a great framework!
from xrm-mock.
Related Issues (20)
- Need Help : Trying to write unit test in Javascript
- How to stub Xrm.Navigation.navigateTo() function? HOT 2
- How to properly use Form Context? HOT 1
- Feature request: Ability to observe what notifications exist on form
- setVisible() do nothing HOT 2
- createSection Adds section to Tab twice
- Default Section Controls collection
- Lookup Control missing implementations
- `getAttribute('name').controls` should always contain controls that were added for the attribute
- Save Event's getSaveMode() is not able to return all event types
- The getFormContext function is not implemented in onSave event
- Question: FormContext and Statecode
- XrmMock.GridControlMock Does not implement setVisible()
- Add empty lookup on form
- use xrm-mock for Xrm v8 and v9 in one project
- Add support for Control Notifications
- Xrm.ProcessFlow.ProcessManager Not Implemented Error HOT 2
- getVisbile, setVisible on formselector is not implemented. headersection, footersection on Ui obeject are also not available.
- Testing onChange event with async code HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xrm-mock.