#5926 - Worker/PDA docuware #2482
|
@ -1,17 +1,6 @@
|
||||||
const axios = require('axios');
|
const axios = require('axios');
|
||||||
const {Docuware} = require('vn-loopback/server/server').models;
|
const {Docuware} = require('vn-loopback/server/server').models;
|
||||||
|
describe('hasDeviceReady()', () => {
|
||||||
describe('Docuware core', () => {
|
|
||||||
beforeAll(() => {
|
|
||||||
process.env.NODE_ENV = 'testing';
|
|
||||||
spyOn(Docuware, 'hasDeviceReady').and.returnValue(true);
|
|
||||||
});
|
|
||||||
|
|
||||||
afterAll(() => {
|
|
||||||
delete process.env.NODE_ENV;
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('hasDeviceReady()', () => {
|
|
||||||
it('should return true', async() => {
|
it('should return true', async() => {
|
||||||
const result = await Docuware.hasDeviceReady({device: 'Tablet 1'});
|
const result = await Docuware.hasDeviceReady({device: 'Tablet 1'});
|
||||||
|
|
||||||
|
@ -29,6 +18,16 @@ describe('Docuware core', () => {
|
||||||
|
|
||||||
expect(result).toBeFalse();
|
expect(result).toBeFalse();
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('Docuware core', () => {
|
||||||
|
beforeAll(() => {
|
||||||
|
process.env.NODE_ENV = 'testing';
|
||||||
|
spyOn(Docuware, 'hasDeviceReady').and.returnValue(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
afterAll(() => {
|
||||||
|
delete process.env.NODE_ENV;
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('getOptions()', () => {
|
describe('getOptions()', () => {
|
||||||
|
@ -173,7 +172,7 @@ describe('Docuware core', () => {
|
||||||
expect(result.id).toEqual(1);
|
expect(result.id).toEqual(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
fit('should return data with parse', async() => {
|
it('should return data with parse', async() => {
|
||||||
spyOn(Docuware, 'getFileCabinet').and.returnValue((new Promise(resolve => resolve(Math.random()))));
|
spyOn(Docuware, 'getFileCabinet').and.returnValue((new Promise(resolve => resolve(Math.random()))));
|
||||||
spyOn(Docuware, 'getDialog').and.returnValue((new Promise(resolve => resolve(Math.random()))));
|
spyOn(Docuware, 'getDialog').and.returnValue((new Promise(resolve => resolve(Math.random()))));
|
||||||
const data = {
|
const data = {
|
||||||
|
|
Loading…
Reference in New Issue