Skip to content

Commit

Permalink
feat(app): refine phoenix-ui and fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
9inpachi committed Nov 2, 2020
1 parent 75f8799 commit 2b78c6c
Show file tree
Hide file tree
Showing 18 changed files with 97 additions and 50 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ install:
script:
- cd ./packages/phoenix-app
- npm run test:coverage -- --no-watch --no-progress --browsers=ChromeHeadlessCI
- npm run test -- --no-watch --no-progress --browsers=ChromeHeadlessCI
# Bug with Angular 10 (https://github.com/angular/protractor/issues/5460)
#- npm run e2e -- --protractor-config=e2e/protractor-ci.conf.js

Expand Down
3 changes: 1 addition & 2 deletions packages/phoenix-app/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,7 @@
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "src/phoenix-ui/tsconfig.lib.json",
"project": "src/phoenix-ui/ng-package.json",
"styles": "src/styles.scss"
"project": "src/phoenix-ui/ng-package.json"
},
"configurations": {
"production": {
Expand Down
82 changes: 58 additions & 24 deletions packages/phoenix-app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/phoenix-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.1000.6",
"@angular-devkit/build-ng-packagr": "~0.1000.8",
"@angular-devkit/build-ng-packagr": "^0.1002.0",
"@angular/cli": "^10.0.8",
"@angular/compiler-cli": "^10.0.14",
"@angular/language-service": "^10.0.14",
Expand All @@ -61,7 +61,7 @@
"karma-coverage-istanbul-reporter": "^3.0.3",
"karma-jasmine": "^4.0.1",
"karma-jasmine-html-reporter": "^1.5.4",
"ng-packagr": "^10.0.0",
"ng-packagr": "^10.1.2",
"protractor": "^7.0.0",
"ts-node": "~9.0.0",
"tslint": "~6.1.3",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, Input } from '@angular/core';
import { PhoenixMenuNode } from 'phoenix-event-display';
import type { PhoenixMenuNode } from 'phoenix-event-display';

@Component({
selector: 'app-phoenix-menu-item',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, Input } from '@angular/core';
import { PhoenixMenuNode } from 'phoenix-event-display';
import type { PhoenixMenuNode } from 'phoenix-event-display';

@Component({
selector: 'app-phoenix-menu',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { AnimateCameraComponent } from './animate-camera.component';
import { EventDisplayService } from '../../../services/event-display.service';
import { PhoenixUIModule } from '../../phoenix-ui.module';

describe('AnimateCameraComponent', () => {
let component: AnimateCameraComponent;
Expand All @@ -11,6 +12,7 @@ describe('AnimateCameraComponent', () => {

beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [PhoenixUIModule],
declarations: [AnimateCameraComponent],
providers: [{
provide: EventDisplayService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { AnimateEventComponent } from './animate-event.component';
import { EventDisplayService } from '../../../services/event-display.service';
import { PhoenixUIModule } from '../../phoenix-ui.module';

describe('AnimateEventComponent', () => {
let component: AnimateEventComponent;
Expand All @@ -12,6 +13,7 @@ describe('AnimateEventComponent', () => {

beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [PhoenixUIModule],
providers: [{
provide: EventDisplayService,
useValue: mockEventDisplay
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ describe('IoOptionsDialogComponent', () => {
component.handleJiveXMLDataInput(files);
expect(component.handleFileInput).toHaveBeenCalled();
});
});
}, 30000);

describe('handleEventDataInput sync', () => {
afterEach(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { MenuToggleComponent } from './menu-toggle.component';
import { PhoenixUIModule } from '../../phoenix-ui.module';

describe('MenuToggleComponent', () => {
let component: MenuToggleComponent;
let fixture: ComponentFixture<MenuToggleComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [PhoenixUIModule]
declarations: [MenuToggleComponent]
})
.compileComponents();
}));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Component, ViewChild, ElementRef, AfterViewInit, Input } from '@angular/core';
import { Component, ViewChild, AfterViewInit, Input } from '@angular/core';
import type { ElementRef } from '@angular/core';
import { EventDisplayService } from '../../../../services/event-display.service';

@Component({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Component, Input, ViewChild, ElementRef, AfterViewInit } from '@angular/core';
import { Component, Input, ViewChild, AfterViewInit } from '@angular/core';
import type { ElementRef } from '@angular/core';
import { ResizeSensor } from "css-element-queries";

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Component, Input, ViewChildren, QueryList } from '@angular/core';
import { Component, Input, ViewChildren } from '@angular/core';
import type { QueryList } from '@angular/core';
import { EventDisplayService } from '../../../../services/event-display.service';

@Component({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { VrToggleComponent } from './vr-toggle.component';
import { EventDisplayService } from '../../../services/event-display.service';
import { PhoenixUIModule } from '../../phoenix-ui.module';

describe('VrToggleComponent', () => {
let component: VrToggleComponent;
Expand All @@ -11,6 +12,7 @@ describe('VrToggleComponent', () => {

beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [PhoenixUIModule],
providers: [{
provide: EventDisplayService,
useValue: mockEventDisplay
Expand Down
8 changes: 5 additions & 3 deletions packages/phoenix-app/src/phoenix-ui/ng-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
"lib": {
"entryFile": "./index.ts",
"umdModuleIds": {
"phoenix-ui": "phoenix-ui"
"phoenix-event-display": "phoenixEventDisplay",
"css-element-queries": "cssElementQueries",
"ng5-slider": "ng5Slider"
}

}
},
"whitelistedNonPeerDependencies": ["."]
}
15 changes: 13 additions & 2 deletions packages/phoenix-app/src/phoenix-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
{
"name": "phoenix-ui",
"version": "0.0.1",
"version": "1.0.2",
"files": [
"../../dist/phoenix-ui"
],
"peerDependencies": {
"@angular/cdk": "^10.1.3",
"@angular/common": "^10.0.14",
"@angular/core": "^10.0.14"
"@angular/compiler": "^10.0.14",
"@angular/core": "^10.0.14",
"@angular/material": "^10.1.3",
"@angular/platform-browser-dynamic": "^10.0.14",
"css-element-queries": "^1.2.3",
"ng5-slider": "^1.2.4",
"phoenix-event-display": "^1.0.2",
"three": "^0.120.0"
},
"dependencies": {
"tslib": "^2.0.0"
Expand Down
3 changes: 2 additions & 1 deletion packages/phoenix-app/src/phoenix-ui/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"angularCompilerOptions": {
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"enableResourceInlining": true
"enableResourceInlining": true,
"enableIvy": false
},
"exclude": [
"./test.ts",
Expand Down
7 changes: 0 additions & 7 deletions packages/phoenix-app/src/phoenix-ui/tsconfig.lib.prod.json

This file was deleted.

0 comments on commit 2b78c6c

Please sign in to comment.