Skip to content

Commit

Permalink
Merge pull request #1304 from hallieswan/AG-1435
Browse files Browse the repository at this point in the history
AG-1435
  • Loading branch information
hallieswan committed May 14, 2024
2 parents e7bf92e + 694d9de commit aea77e0
Show file tree
Hide file tree
Showing 27 changed files with 1,351 additions and 72 deletions.
6 changes: 4 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
"sourceType": "module",
"project": ["./tsconfig.base.json"]
},
"plugins": ["@typescript-eslint"],
"rules": {
Expand All @@ -23,6 +24,7 @@
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-this-alias": "off"
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/no-floating-promises": "warn"
}
}
46 changes: 23 additions & 23 deletions package-lock.json

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

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
"mongo:start:windows": "sh ./scripts/start-mongo.sh 'C:\\data\\db'",
"data:local": "npm run clean:data && sh ./scripts/get-data-local.sh",
"e2e": "playwright test --trace on",
"e2e:ui": "playwright test --ui"
"e2e:ui": "playwright test --ui",
"e2e:update": "npm install -D @playwright/test@latest; npx playwright install --with-deps; npx playwright --version"
},
"pre-commit": [
"test"
Expand Down Expand Up @@ -94,7 +95,7 @@
"@angularclass/hmr": "^3.0.0",
"@babel/plugin-proposal-decorators": "^7.18.10",
"@ngtools/webpack": "^13.3.9",
"@playwright/test": "^1.39.0",
"@playwright/test": "^1.43.1",
"@types/aws-param-store": "^2.1.2",
"@types/browser-update": "^3.3.0",
"@types/compression": "^1.7.2",
Expand Down
2 changes: 2 additions & 0 deletions src/app/core/components/footer/footer.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ describe('Component: Footer', () => {
const link = element.querySelector('.footer-logo a') as HTMLElement;
expect(link).toBeTruthy();

// https://github.com/angular/angular/issues/45202
// eslint-disable-next-line @typescript-eslint/no-floating-promises
router.navigate(['/about']);
tick();
expect(location.path()).toBe('/about');
Expand Down
2 changes: 2 additions & 0 deletions src/app/core/components/header/header.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ describe('Component: Header', () => {
const link = element.querySelector('.header-logo a') as HTMLElement;
expect(link).toBeTruthy();

// https://github.com/angular/angular/issues/45202
// eslint-disable-next-line @typescript-eslint/no-floating-promises
router.navigate(['/nominated-targets']);
tick();
expect(location.path()).toBe('/nominated-targets');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ describe('Component: BarChart - Median', () => {
let component: MedianBarChartComponent;
let element: HTMLElement;

beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
beforeEach(waitForAsync(async () => {
await TestBed.configureTestingModule({
declarations: [MedianBarChartComponent],
imports: [RouterTestingModule],
providers: [HelperService],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ <h1 class="gct-heading h2">Gene Comparison Tool</h1>
<div *ngIf="genesTable.filteredValue?.length">
<button
class="pin-all-button"
[disabled]="getPinDisabledStatus()"
[ngClass]="{
disabled: getPinDisabledStatus()
}"
Expand Down Expand Up @@ -471,6 +472,7 @@ <h1 class="gct-heading h2">Gene Comparison Tool</h1>
<div>
<button
(click)="onPinGeneClick(gene)"
[disabled]="getPinDisabledStatus()"
[ngClass]="{
disabled: getPinDisabledStatus()
}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ describe('Component: GeneComparisonToolComponent', () => {
let element: HTMLElement;
let route: ActivatedRoute;

beforeEach(fakeAsync(() => {
TestBed.configureTestingModule({
beforeEach(fakeAsync(async () => {
await TestBed.configureTestingModule({
declarations: [
GeneComparisonToolComponent,
GeneComparisonToolDetailsPanelComponent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ export class GeneDetailsComponent implements OnInit, AfterViewInit {
.subscribe((gene) => {
if (!gene) {
this.helperService.setLoading(false);
// https://github.com/angular/angular/issues/45202
// eslint-disable-next-line @typescript-eslint/no-floating-promises
this.router.navigateByUrl('/404-not-found', { skipLocationChange: true });
} else {
this.gene = gene;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ export class GeneNetworkComponent implements OnInit {
}

navigateToSimilarGenes() {
// https://github.com/angular/angular/issues/45202
// eslint-disable-next-line @typescript-eslint/no-floating-promises
this.router.navigate([
'/genes/' + this._gene?.ensembl_gene_id + '/similar',
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ export class GeneSearchComponent extends Unsub implements AfterViewInit {
this.results = [];
this.showGeneResults = false;
this.searchNavigated.emit();
// https://github.com/angular/angular/issues/45202
// eslint-disable-next-line @typescript-eslint/no-floating-promises
this.router.navigate(['/genes/' + id]);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ export class GeneSimilarComponent implements OnInit {
.subscribe((gene: Gene | null) => {
if (!gene) {
this.helperService.setLoading(false);
// https://github.com/angular/angular/issues/45202
// eslint-disable-next-line @typescript-eslint/no-floating-promises
this.router.navigateByUrl('/404-not-found', { skipLocationChange: true });
} else {
this.gene = gene;
Expand Down Expand Up @@ -144,6 +146,8 @@ export class GeneSimilarComponent implements OnInit {
navigateToGeneComparisonTool() {
const ids: string[] = this.genes.map((g: Gene) => g.ensembl_gene_id);
this.helperService.setGCTSelection(ids);
// https://github.com/angular/angular/issues/45202
// eslint-disable-next-line @typescript-eslint/no-floating-promises
this.router.navigate(['/genes/comparison']);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ export class GeneTableComponent implements OnInit {
}

navigateToGene(gene: any) {
// https://github.com/angular/angular/issues/45202
// eslint-disable-next-line @typescript-eslint/no-floating-promises
this.router.navigate(['/genes/' + gene.ensembl_gene_id]);
}

Expand Down Expand Up @@ -174,12 +176,16 @@ export class GeneTableComponent implements OnInit {

navigateToGeneComparisonTool() {
if (typeof this.gctLink === 'object') {
// https://github.com/angular/angular/issues/45202
// eslint-disable-next-line @typescript-eslint/no-floating-promises
this.router.navigate(['/genes/comparison'], {
queryParams: this.gctLink,
});
} else {
const ids: string[] = this._genes.map((g: Gene) => g.ensembl_gene_id);
this.helperService.setGCTSelection(ids);
// https://github.com/angular/angular/issues/45202
// eslint-disable-next-line @typescript-eslint/no-floating-promises
this.router.navigate(['/genes/comparison']);
}
}
Expand Down

0 comments on commit aea77e0

Please sign in to comment.