UNPKG

@shko.online/componentframework-mock

Version:

Mocking library to help with testing PowerApps Component Framework Components

32 lines (31 loc) 875 B
/* Copyright (c) 2022 Betim Beja and Shko Online LLC Licensed under the MIT license. */ import { stub } from 'sinon'; export class NavigationMock { constructor() { this.openAlertDialog = void 0; this.openConfirmDialog = void 0; this.openErrorDialog = void 0; this.openFile = void 0; this.openForm = void 0; this.openUrl = void 0; this.openWebResource = void 0; this.openAlertDialog = stub(); this.openAlertDialog.callsFake((alertStrings, options) => { return Promise.resolve(); }); this.openConfirmDialog = stub(); this.openConfirmDialog.callsFake((confirmStrings, options) => { return Promise.resolve({ confirmed: true }); }); this.openErrorDialog = stub(); this.openFile = stub(); this.openForm = stub(); this.openUrl = stub(); this.openWebResource = stub(); } }