-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Corrected - Angular 11 Product Dashboard Changes #3404
base: master
Are you sure you want to change the base?
Conversation
Configure WhiteSource Bolt for GitHub
This pull request introduces 30 alerts when merging 364c1fe into 00bf008 - view on LGTM.com new alerts:
|
src/app/shared/layouts/engine-wagon-layout-chart/engine-wagon-layout-chart.component.spec.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried running unit tests locally and ran into some issues. Other than the two comments added about a new feature unit test and material table imports, I am also seeing issues with mocking promises. Looking into what might have been deprecated with karma upgrades to make these unit tests not work anymore.
Here is an example of what error I see when running unit tests
`Error: src/app/user/login/login.component.spec.ts:65:63 - error TS2322: Type '() => void' is not assignable to type '{ (observer?: PartialObserver): Subscription; (next: null, error: null, complete: () => void): Subscription; (next: null, error: (error: any) => void, complete?: () => void): Subscription; (next: (value: boolean) => void, error: null, complete: () => void): Subscription; (next?: (value: boolean) => void, er...'.
Type 'void' is not assignable to type 'Subscription'.
65 const spy = spyOn(authService, 'login').and.returnValue({ subscribe: () => {} });
`
import { ChartComponent } from "../../charts/chart/chart.component"; | ||
import { LineChartComponent } from "../../charts/line-chart/line-chart.component"; | ||
import { LayoutComponent } from "../layout/layout.component"; | ||
import { OneByTwoLayoutTableChartComponent } from "./one-by-two-layout-table-chart.component"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These tests are failing, I think it is because it is in the file for the the unit test for EngineWagonLayoutChartComponent but it is creating and testing OneByTwoLayoutTableChartComponent
@@ -9,7 +9,8 @@ import { SecurityScanConfigComponent } from './security-scan-config/security-sca | |||
import { SecurityScanDeleteFormComponent } from './security-scan-delete-form/security-scan-delete-form.component'; | |||
import { NgbTypeaheadModule } from '@ng-bootstrap/ng-bootstrap'; | |||
import { SecurityScanDetailComponent } from './security-scan-detail/security-scan-detail.component'; | |||
import { MatIconModule, MatTableModule } from '@angular/material/'; | |||
import { MatTableModule } from "@angular/material/table"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this import change needs to be added to the unit test for this file as well, else the unit tests do not pass. I am looking more into why @angular/material is no longer in node_modules after this upgrade. Same for the unit test for collectors.component.spec.ts
This pull request introduces 30 alerts when merging 89bb968 into 00bf008 - view on LGTM.com new alerts:
|
Engine-Wagon (rather Engine-Wagon-Guard) layout is a layout planned for Product Dashboard, where Team's / Component's CI/CD layout will be represented (Engine being Component Info along with Quality dimensions followed various Environment stages, last being Production). This is WIP and at this stage displays Product Dashboard's few parameters. I focused more on correctness through manual tests and unit tests need to be developed Anyway, to correct "test-build" errors, I committed modifications to my local repository (VivekBuzruk@89bb968). Can not generate PR as it may include earlier commits too. Need to spend more time to assess validity of all unit tests. |
@Sandhya-Rajasabeson - Any other challenge? Planning to add few unit / commit tests to product dashboard, but will like to know your plan to integrate PR. Thanks |
Hi @VivekBuzruk , Sandhya is no longer with Capital One, so I will be taking over this work. Over the next couple days I will review this PR and see how it fits in with the other open PRs, and will get back to you later this week/early next week. Feel free to reach out with any questions/comments! Best, |
|
1] Angular 8 -> Angular 11. Apart from package.json, few config. files like angular.json are also modified. Many files were modified to handle Angular 11 changes.
2] Little improvement to Build, Static Code and Commit Widget appearance
-- Change of Project selection dropDown to Static Code widget is hidden through a flag. Need to introduce configured use of UI. This DropDown selection change occupies too much screen space and requires better Look & Feel. Also there was a reference to one API which was changed as was not found in current source code.
-- Also Added pie chart to Static Code widget
3] Initial code for Product Dashboard is uploaded. Need lot of improvement.
4] Font source downloaded and made available as part of local assets directory. This is required for internal usage within an organization.
5] Few changes are driven by TSLint warnings (like introducing double quote etc.).
Node version used / required : v12.13.0+