mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
#272 Update 'viewer' test config
This commit is contained in:
@@ -48,6 +48,21 @@ System.config(config);
|
||||
|
||||
System.import('@angular/platform-browser/src/browser/browser_adapter')
|
||||
.then(function(browser_adapter) { browser_adapter.BrowserDomAdapter.makeCurrent(); })
|
||||
.then(function () {
|
||||
return Promise.all([
|
||||
System.import('@angular/core/testing'),
|
||||
System.import('@angular/platform-browser-dynamic/testing')
|
||||
])
|
||||
})
|
||||
.then(function (providers) {
|
||||
var testing = providers[0];
|
||||
var testingBrowser = providers[1];
|
||||
|
||||
testing.setBaseTestProviders(
|
||||
testingBrowser.TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,
|
||||
testingBrowser.TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS);
|
||||
|
||||
})
|
||||
.then(function() { return Promise.all(resolveTestFiles()); })
|
||||
.then(
|
||||
function() {
|
||||
|
@@ -15,20 +15,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { describe, expect, it, inject, setBaseTestProviders } from '@angular/core/testing';
|
||||
import { describe, expect, it, inject } from '@angular/core/testing';
|
||||
import { TestComponentBuilder } from '@angular/compiler/testing';
|
||||
import {
|
||||
TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,
|
||||
TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS
|
||||
} from '@angular/platform-browser-dynamic/testing';
|
||||
|
||||
import { PdfViewerComponent } from './pdfViewer.component';
|
||||
import { PDFJSmock } from './assets/PDFJS.mock';
|
||||
import { PDFViewermock } from './assets/PDFViewer.mock';
|
||||
import { EventMock } from './assets/event.mock';
|
||||
|
||||
describe('PdfViewer', () => {
|
||||
setBaseTestProviders(TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,
|
||||
TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS);
|
||||
|
||||
describe('View', () => {
|
||||
it('Canvas should be present', inject([TestComponentBuilder], (tcb: TestComponentBuilder) => {
|
||||
|
Reference in New Issue
Block a user