diff --git a/.eslintrc.json b/.eslintrc.json index 710c3bd6..39773f7d 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -11,7 +11,8 @@ "parser": "@typescript-eslint/parser", "parserOptions": { "ecmaVersion": "latest", - "sourceType": "module" + "sourceType": "module", + "project": ["./tsconfig.base.json"] }, "plugins": ["@typescript-eslint"], "rules": { @@ -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" } } diff --git a/package-lock.json b/package-lock.json index 146fd0e7..56d6ebd7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -54,7 +54,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", @@ -4302,12 +4302,12 @@ } }, "node_modules/@playwright/test": { - "version": "1.39.0", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.39.0.tgz", - "integrity": "sha512-3u1iFqgzl7zr004bGPYiN/5EZpRUSFddQBra8Rqll5N0/vfpqlP9I9EXqAoGacuAbX6c9Ulg/Cjqglp5VkK6UQ==", + "version": "1.43.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.43.1.tgz", + "integrity": "sha512-HgtQzFgNEEo4TE22K/X7sYTYNqEMMTZmFS8kTq6m8hXj+m1D8TgwgIbumHddJa9h4yl4GkKb8/bgAl2+g7eDgA==", "dev": true, "dependencies": { - "playwright": "1.39.0" + "playwright": "1.43.1" }, "bin": { "playwright": "cli.js" @@ -16942,12 +16942,12 @@ } }, "node_modules/playwright": { - "version": "1.39.0", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.39.0.tgz", - "integrity": "sha512-naE5QT11uC/Oiq0BwZ50gDmy8c8WLPRTEWuSSFVG2egBka/1qMoSqYQcROMT9zLwJ86oPofcTH2jBY/5wWOgIw==", + "version": "1.43.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.43.1.tgz", + "integrity": "sha512-V7SoH0ai2kNt1Md9E3Gwas5B9m8KR2GVvwZnAI6Pg0m3sh7UvgiYhRrhsziCmqMJNouPckiOhk8T+9bSAK0VIA==", "dev": true, "dependencies": { - "playwright-core": "1.39.0" + "playwright-core": "1.43.1" }, "bin": { "playwright": "cli.js" @@ -16960,9 +16960,9 @@ } }, "node_modules/playwright-core": { - "version": "1.39.0", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.39.0.tgz", - "integrity": "sha512-+k4pdZgs1qiM+OUkSjx96YiKsXsmb59evFoqv8SKO067qBA+Z2s/dCzJij/ZhdQcs2zlTAgRKfeiiLm8PQ2qvw==", + "version": "1.43.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.43.1.tgz", + "integrity": "sha512-EI36Mto2Vrx6VF7rm708qSnesVQKbxEWvPrfA1IPY6HgczBplDx7ENtx+K2n4kJ41sLLkuGfmb0ZLSSXlDhqPg==", "dev": true, "bin": { "playwright-core": "cli.js" @@ -25601,12 +25601,12 @@ } }, "@playwright/test": { - "version": "1.39.0", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.39.0.tgz", - "integrity": "sha512-3u1iFqgzl7zr004bGPYiN/5EZpRUSFddQBra8Rqll5N0/vfpqlP9I9EXqAoGacuAbX6c9Ulg/Cjqglp5VkK6UQ==", + "version": "1.43.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.43.1.tgz", + "integrity": "sha512-HgtQzFgNEEo4TE22K/X7sYTYNqEMMTZmFS8kTq6m8hXj+m1D8TgwgIbumHddJa9h4yl4GkKb8/bgAl2+g7eDgA==", "dev": true, "requires": { - "playwright": "1.39.0" + "playwright": "1.43.1" } }, "@popperjs/core": { @@ -35507,19 +35507,19 @@ } }, "playwright": { - "version": "1.39.0", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.39.0.tgz", - "integrity": "sha512-naE5QT11uC/Oiq0BwZ50gDmy8c8WLPRTEWuSSFVG2egBka/1qMoSqYQcROMT9zLwJ86oPofcTH2jBY/5wWOgIw==", + "version": "1.43.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.43.1.tgz", + "integrity": "sha512-V7SoH0ai2kNt1Md9E3Gwas5B9m8KR2GVvwZnAI6Pg0m3sh7UvgiYhRrhsziCmqMJNouPckiOhk8T+9bSAK0VIA==", "dev": true, "requires": { "fsevents": "2.3.2", - "playwright-core": "1.39.0" + "playwright-core": "1.43.1" } }, "playwright-core": { - "version": "1.39.0", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.39.0.tgz", - "integrity": "sha512-+k4pdZgs1qiM+OUkSjx96YiKsXsmb59evFoqv8SKO067qBA+Z2s/dCzJij/ZhdQcs2zlTAgRKfeiiLm8PQ2qvw==", + "version": "1.43.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.43.1.tgz", + "integrity": "sha512-EI36Mto2Vrx6VF7rm708qSnesVQKbxEWvPrfA1IPY6HgczBplDx7ENtx+K2n4kJ41sLLkuGfmb0ZLSSXlDhqPg==", "dev": true }, "portfinder": { diff --git a/package.json b/package.json index 630d4b0d..a92ebd8d 100644 --- a/package.json +++ b/package.json @@ -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" @@ -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", diff --git a/src/app/core/components/footer/footer.component.spec.ts b/src/app/core/components/footer/footer.component.spec.ts index 9154ab96..6fc4041c 100644 --- a/src/app/core/components/footer/footer.component.spec.ts +++ b/src/app/core/components/footer/footer.component.spec.ts @@ -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'); diff --git a/src/app/core/components/header/header.component.spec.ts b/src/app/core/components/header/header.component.spec.ts index c972f8ca..c77798b7 100644 --- a/src/app/core/components/header/header.component.spec.ts +++ b/src/app/core/components/header/header.component.spec.ts @@ -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'); diff --git a/src/app/features/charts/components/median-barchart/median-barchart.component.spec.ts b/src/app/features/charts/components/median-barchart/median-barchart.component.spec.ts index 6b73bc01..6e3f835f 100644 --- a/src/app/features/charts/components/median-barchart/median-barchart.component.spec.ts +++ b/src/app/features/charts/components/median-barchart/median-barchart.component.spec.ts @@ -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], diff --git a/src/app/features/genes/components/gene-comparison-tool/gene-comparison-tool.component.html b/src/app/features/genes/components/gene-comparison-tool/gene-comparison-tool.component.html index b41680f5..42772416 100644 --- a/src/app/features/genes/components/gene-comparison-tool/gene-comparison-tool.component.html +++ b/src/app/features/genes/components/gene-comparison-tool/gene-comparison-tool.component.html @@ -403,6 +403,7 @@