Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Development #133

Merged
merged 2 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ jobs:
- run: npm i -g @angular/cli
- run: npm i -g nx
- run: npm i
- run: nx run ramp:lint
- run: ng run-many --all --target=lint
- run: ng run-many --all --target=test -- --no-watch --no-progress --browsers=ChromeHeadlessCI
45 changes: 15 additions & 30 deletions apps/ramp-client/src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,41 +1,26 @@
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing';
import { MatDialogModule } from '@angular/material/dialog';
import { RouterTestingModule } from '@angular/router/testing';
import { EffectsModule } from '@ngrx/effects';
import { StoreModule } from '@ngrx/store';
import { FeaturesRampRampHeaderModule } from '@ramp/features/ramp/ramp-header';
import { SharedNcatsNcatsFooterModule } from '@ramp/shared/ncats/ncats-footer';
import { SharedUiLoadingSpinnerModule } from '@ramp/shared/ui/loading-spinner';
import { RampFacade, StoresRampStoreModule } from '@ramp/stores/ramp-store';
import { environment } from '../environments/environment';
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
import { provideEffects } from "@ngrx/effects";
import { provideStore } from "@ngrx/store";
import { provideStoreDevtools } from "@ngrx/store-devtools";
import { RampEffects, rampReducer } from "@ramp/stores/ramp-store";
import { AppComponent } from './app.component';

describe('AppComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [AppComponent],
declarations: [],
imports: [
RouterTestingModule,
HttpClientTestingModule,
SharedUiLoadingSpinnerModule,
FeaturesRampRampHeaderModule,
SharedNcatsNcatsFooterModule,
MatDialogModule,
StoresRampStoreModule,
StoreModule.forRoot(
{},
{
metaReducers: !environment.production ? [] : [],
runtimeChecks: {
strictActionImmutability: true,
strictStateImmutability: true,
},
},
),
EffectsModule.forRoot([]),
BrowserAnimationsModule,
AppComponent
],
providers: [RampFacade],
providers: [
provideStore({
rampStore: rampReducer
}),
provideEffects([RampEffects]),
provideStoreDevtools({ maxAge: 25, logOnly: false })
]
}).compileComponents();
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ActivatedRoute } from '@angular/router';
import { RouterTestingModule } from '@angular/router/testing';
import { EffectsModule } from '@ngrx/effects';
import { StoreModule } from '@ngrx/store';
import { RampFacade, StoresRampStoreModule } from '@ramp/stores/ramp-store';
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
import { provideEffects } from "@ngrx/effects";
import { provideStore, StoreModule } from "@ngrx/store";
import { provideStoreDevtools } from "@ngrx/store-devtools";
import {
RampEffects,
rampReducer,
} from '@ramp/stores/ramp-store';

import { AnalytesFromPathwaysComponent } from './analytes-from-pathways.component';

Expand All @@ -17,47 +16,19 @@ describe('AnalytesFromPathwaysComponent', () => {

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [AnalytesFromPathwaysComponent],
declarations: [],
imports: [
BrowserAnimationsModule,
RouterTestingModule,
StoresRampStoreModule,
HttpClientTestingModule,
FormsModule,
ReactiveFormsModule,
StoreModule.forRoot(
{},
{
metaReducers: [],
runtimeChecks: {
strictActionImmutability: true,
strictStateImmutability: true,
},
},
),
EffectsModule.forRoot([]),
AnalytesFromPathwaysComponent,
StoreModule
],
providers: [
RampFacade,
{
provide: ActivatedRoute,
useValue: {
snapshot: {
data: {
title: 'Analytes From Pathways',
input: 'pathways',
function:
'analytes <- RaMP::getAnalyteFromPathway(pathway="###REPLACE###")',
examples:
'De Novo Triacylglycerol Biosynthesis, sphingolipid metabolism',
description:
'Analytes (genes, proteins, metabolites) can be retrieve by pathway. Enter a list of exact pathway names.',
},
},
},
},
provideStore({
rampStore: rampReducer
}),
provideEffects([RampEffects]),
provideStoreDevtools({ maxAge: 25, logOnly: false }),
],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
}).compileComponents();
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatDialogModule } from '@angular/material/dialog';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatIconModule } from '@angular/material/icon';
import { MatInputModule } from '@angular/material/input';
import { MatRadioModule } from '@angular/material/radio';
import { MatSelectModule } from '@angular/material/select';
import { MatTabsModule } from '@angular/material/tabs';
import { MatTooltipModule } from '@angular/material/tooltip';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ActivatedRoute } from '@angular/router';
import { RouterTestingModule } from '@angular/router/testing';
import { EffectsModule } from '@ngrx/effects';
import { StoreModule } from '@ngrx/store';
import { provideEffects } from "@ngrx/effects";
import { provideStore } from "@ngrx/store";
import { provideStoreDevtools } from "@ngrx/store-devtools";
import { RampEffects, rampReducer } from "@ramp/stores/ramp-store";


import { ChemicalEnrichmentComponent } from './chemical-enrichment.component';
Expand All @@ -26,53 +14,18 @@ describe('ChemicalEnrichmentComponent', () => {

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ChemicalEnrichmentComponent],
declarations: [],
imports: [
BrowserAnimationsModule,
RouterTestingModule,
HttpClientTestingModule,
MatTabsModule,
MatFormFieldModule,
MatButtonModule,
MatTooltipModule,
MatIconModule,
ReactiveFormsModule,
MatSelectModule,
MatRadioModule,
MatInputModule,
MatDialogModule,
StoreModule.forRoot(
{},
{
metaReducers: [],
runtimeChecks: {
strictActionImmutability: true,
strictStateImmutability: true,
},
},
),
EffectsModule.forRoot([]),
ChemicalEnrichmentComponent
],
providers: [
{
provide: ActivatedRoute,
useValue: {
snapshot: {
data: {
title: 'Analytes From Pathways',
input: 'pathways',
function:
'analytes <- RaMP::getAnalyteFromPathway(pathway="###REPLACE###")',
examples:
'De Novo Triacylglycerol Biosynthesis, sphingolipid metabolism',
description:
'Analytes (genes, proteins, metabolites) can be retrieve by pathway. Enter a list of exact pathway names.',
},
},
},
},
provideStore({
rampStore: rampReducer
}),
provideEffects([RampEffects]),
provideStoreDevtools({ maxAge: 25, logOnly: false }),
],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
}).compileComponents();
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MatSelectModule } from '@angular/material/select';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ActivatedRoute } from '@angular/router';
import { RouterTestingModule } from '@angular/router/testing';
import { EffectsModule } from '@ngrx/effects';
import { StoreModule } from '@ngrx/store';
import { RampFacade, StoresRampStoreModule } from '@ramp/stores/ramp-store';
import { provideEffects } from "@ngrx/effects";
import { provideStore } from "@ngrx/store";
import { provideStoreDevtools } from "@ngrx/store-devtools";
import { RampEffects, rampReducer } from "@ramp/stores/ramp-store";

import { ClassesFromMetabolitesComponent } from './classes-from-metabolites.component';

Expand All @@ -18,48 +13,18 @@ describe('ClassesFromMetabolitesComponent', () => {

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ClassesFromMetabolitesComponent],
declarations: [],
imports: [
BrowserAnimationsModule,
RouterTestingModule,
StoresRampStoreModule,
HttpClientTestingModule,
FormsModule,
ReactiveFormsModule,
MatSelectModule,
StoreModule.forRoot(
{},
{
metaReducers: [],
runtimeChecks: {
strictActionImmutability: true,
strictStateImmutability: true,
},
},
),
EffectsModule.forRoot([]),
ClassesFromMetabolitesComponent
],
providers: [
RampFacade,
{
provide: ActivatedRoute,
useValue: {
snapshot: {
data: {
title: 'Analytes From Pathways',
input: 'pathways',
function:
'analytes <- RaMP::getAnalyteFromPathway(pathway="###REPLACE###")',
examples:
'De Novo Triacylglycerol Biosynthesis, sphingolipid metabolism',
description:
'Analytes (genes, proteins, metabolites) can be retrieve by pathway. Enter a list of exact pathway names.',
},
},
},
},
],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
provideStore({
rampStore: rampReducer
}),
provideEffects([RampEffects]),
provideStoreDevtools({ maxAge: 25, logOnly: false }),
]
}).compileComponents();
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ActivatedRoute } from '@angular/router';
import { RouterTestingModule } from '@angular/router/testing';
import { EffectsModule } from '@ngrx/effects';
import { StoreModule } from '@ngrx/store';
import { RampFacade, StoresRampStoreModule } from '@ramp/stores/ramp-store';
import { provideEffects } from "@ngrx/effects";
import { provideStore } from "@ngrx/store";
import { provideStoreDevtools } from "@ngrx/store-devtools";
import { RampEffects, rampReducer } from "@ramp/stores/ramp-store";

import { CommonReactionAnalytesComponent } from './common-reaction-analytes.component';

Expand All @@ -17,47 +13,18 @@ describe('CommonReactionAnalytesComponent', () => {

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [CommonReactionAnalytesComponent],
declarations: [],
imports: [
BrowserAnimationsModule,
RouterTestingModule,
StoresRampStoreModule,
HttpClientTestingModule,
FormsModule,
ReactiveFormsModule,
StoreModule.forRoot(
{},
{
metaReducers: [],
runtimeChecks: {
strictActionImmutability: true,
strictStateImmutability: true,
},
},
),
EffectsModule.forRoot([]),
CommonReactionAnalytesComponent
],
providers: [
RampFacade,
{
provide: ActivatedRoute,
useValue: {
snapshot: {
data: {
title: 'Analytes From Pathways',
input: 'pathways',
function:
'analytes <- RaMP::getAnalyteFromPathway(pathway="###REPLACE###")',
examples:
'De Novo Triacylglycerol Biosynthesis, sphingolipid metabolism',
description:
'Analytes (genes, proteins, metabolites) can be retrieve by pathway. Enter a list of exact pathway names.',
},
},
},
},
],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
provideStore({
rampStore: rampReducer
}),
provideEffects([RampEffects]),
provideStoreDevtools({ maxAge: 25, logOnly: false }),
]
}).compileComponents();
});

Expand Down
Loading
Loading