mirror of
https://github.com/nasa/openmct.git
synced 2025-04-09 20:31:26 +00:00
[Testing] Fixes console errors while running npm test (#3593)
* ERROR: Error: [$injector:unpr] Unknown provider: exportImageServiceProvider <- exportImageService * [Vue warn]: Injection "stylesManager" not found * [Vue warn]: Error in mounted hook: "TypeError: identifier is undefined"
This commit is contained in:
parent
5eb6c15959
commit
52fab78625
@ -22,6 +22,7 @@
|
||||
|
||||
import { createOpenMct, resetApplicationState } from "utils/testing";
|
||||
import ConditionPlugin from "./plugin";
|
||||
import stylesManager from '@/ui/inspector/styles/StylesManager';
|
||||
import StylesView from "./components/inspector/StylesView.vue";
|
||||
import Vue from 'vue';
|
||||
import {getApplicableStylesForItem} from "./utils/styleUtils";
|
||||
@ -402,7 +403,8 @@ describe('the plugin', function () {
|
||||
component = new Vue({
|
||||
provide: {
|
||||
openmct: openmct,
|
||||
selection: selection
|
||||
selection: selection,
|
||||
stylesManager
|
||||
},
|
||||
el: viewContainer,
|
||||
components: {
|
||||
|
@ -7,15 +7,14 @@ export default class Snapshot {
|
||||
constructor(openmct) {
|
||||
this.openmct = openmct;
|
||||
this.snapshotContainer = new SnapshotContainer(openmct);
|
||||
this.exportImageService = openmct.$injector.get('exportImageService');
|
||||
this.dialogService = openmct.$injector.get('dialogService');
|
||||
|
||||
this.capture = this.capture.bind(this);
|
||||
this._saveSnapShot = this._saveSnapShot.bind(this);
|
||||
}
|
||||
|
||||
capture(snapshotMeta, notebookType, domElement) {
|
||||
this.exportImageService.exportPNGtoSRC(domElement, 's-status-taking-snapshot')
|
||||
const exportImageService = this.openmct.$injector.get('exportImageService');
|
||||
exportImageService.exportPNGtoSRC(domElement, 's-status-taking-snapshot')
|
||||
.then(function (blob) {
|
||||
const reader = new window.FileReader();
|
||||
reader.readAsDataURL(blob);
|
||||
|
@ -98,6 +98,10 @@ describe('the plugin', function () {
|
||||
|
||||
beforeEach((done) => {
|
||||
planDomainObject = {
|
||||
identifier: {
|
||||
key: 'test-object',
|
||||
namespace: ''
|
||||
},
|
||||
type: 'plan',
|
||||
id: "test-object",
|
||||
selectFile: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user