Add test component
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
This commit is contained in:
@@ -9,6 +9,7 @@ import { MenuComponent } from './menu/menu.component';
|
||||
import {RegisterDeviceComponent} from './registerdevice/registerdevice.component';
|
||||
import {NotImplementedComponent} from '@farmmaps/common';
|
||||
import { NavBarGuard } from 'projects/common/src/public-api';
|
||||
import {TestComponent} from './test/test.component';
|
||||
|
||||
export function urlMatcher(url: UrlSegment[]) {
|
||||
return {consumed:url};
|
||||
@@ -59,12 +60,16 @@ const routes = [
|
||||
{
|
||||
path: ':queryState',
|
||||
component: MapComponent
|
||||
}
|
||||
}
|
||||
]},
|
||||
{
|
||||
path:'registerdevice/:deviceToken',
|
||||
canActivate:[FullScreenGuard],
|
||||
component:RegisterDeviceComponent
|
||||
},
|
||||
{
|
||||
path:'test',
|
||||
component: TestComponent
|
||||
}
|
||||
];
|
||||
|
||||
|
@@ -22,6 +22,7 @@ import {RegisterDeviceComponent} from './registerdevice/registerdevice.component
|
||||
import { SecureOAuthStorage} from '@farmmaps/common';
|
||||
import { OAuthStorage } from 'angular-oauth2-oidc';
|
||||
import {Id4AuthconfigFactory} from './id4AuthconfigFactory';
|
||||
import { TestComponent } from './test/test.component';
|
||||
|
||||
export const BOOTSTRAP_EFFECTS = new InjectionToken('Bootstrap Effects');
|
||||
|
||||
@@ -65,7 +66,8 @@ export const metaReducers: MetaReducer<any>[] = [debug];
|
||||
AppRootComponent,
|
||||
LogoComponent,
|
||||
MenuComponent,
|
||||
RegisterDeviceComponent
|
||||
RegisterDeviceComponent,
|
||||
TestComponent
|
||||
],
|
||||
imports: [
|
||||
AppRoutingModule,
|
||||
|
12
src/app/test/test.component.html
Normal file
12
src/app/test/test.component.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<fm-gradient-select [gradientItems]="gradientItems|async" [showLabel]="false" [showAdd]="true"></fm-gradient-select>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<button class="btn btn-primary">Test</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
0
src/app/test/test.component.scss
Normal file
0
src/app/test/test.component.scss
Normal file
25
src/app/test/test.component.spec.ts
Normal file
25
src/app/test/test.component.spec.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { TestComponent } from './test.component';
|
||||
|
||||
describe('TestComponent', () => {
|
||||
let component: TestComponent;
|
||||
let fixture: ComponentFixture<TestComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ TestComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(TestComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
20
src/app/test/test.component.ts
Normal file
20
src/app/test/test.component.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ItemService} from '@farmmaps/common';
|
||||
import { Observable} from 'rxjs';
|
||||
|
||||
@Component({
|
||||
selector: 'app-test',
|
||||
templateUrl: './test.component.html',
|
||||
styleUrls: ['./test.component.scss']
|
||||
})
|
||||
export class TestComponent implements OnInit {
|
||||
|
||||
public gradientItems:Observable<any[]>
|
||||
|
||||
constructor(private itemService$:ItemService) {
|
||||
this.gradientItems = this.itemService$.getItemList("vnd.farmmaps.itemtype.gradient");
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user