@shko.online/componentframework-mock
Version:
Mocking library to help with testing PowerApps Component Framework Components
33 lines (32 loc) • 1.15 kB
JavaScript
/*
Copyright (c) 2022 Betim Beja and Shko Online LLC
Licensed under the MIT license.
*/
import { stub } from 'sinon';
export class ModeMock {
constructor() {
this.allocatedHeight = void 0;
this.allocatedWidth = void 0;
this.isControlDisabled = void 0;
this.isVisible = void 0;
this.label = void 0;
this.setControlState = void 0;
this._FullScreen = void 0;
this._TrackingContainerResize = void 0;
this.setFullScreen = void 0;
this.trackContainerResize = void 0;
this.allocatedHeight = -1;
this.allocatedWidth = -1;
this.isVisible = true;
this.isControlDisabled = false;
this.label = 'Mocked with @shko.online/componentframework-mock';
this.setControlState = stub(); // this is mocked in ComponentFrameworkMockGenerator
this._FullScreen = false;
this.setFullScreen = stub(); // this is mocked in mockNotifyOutputChanged
this.trackContainerResize = stub(); // this is mocked in ComponentFrameworkMockGenerator
this.trackContainerResize.callsFake(value => {
this._TrackingContainerResize = value;
});
this._TrackingContainerResize = false;
}
}