Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

Corrected - Angular 11 Product Dashboard Changes #3404

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

VivekBuzruk
Copy link

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+

@trafico-bot trafico-bot bot added the 🔍 Ready for Review Pull Request is not reviewed yet label Jun 18, 2021
@lgtm-com
Copy link

lgtm-com bot commented Jun 18, 2021

This pull request introduces 30 alerts when merging 364c1fe into 00bf008 - view on LGTM.com

new alerts:

  • 28 for Unused variable, import, function or class
  • 2 for Useless assignment to local variable

Copy link
Contributor

@Sandhya-Rajasabeson Sandhya-Rajasabeson left a 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";
Copy link
Contributor

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";
Copy link
Contributor

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

@trafico-bot trafico-bot bot added ⚠️ Changes requested Pull Request needs changes before it can be reviewed again and removed 🔍 Ready for Review Pull Request is not reviewed yet labels Jun 22, 2021
@trafico-bot trafico-bot bot added 🔍 Ready for Review Pull Request is not reviewed yet and removed ⚠️ Changes requested Pull Request needs changes before it can be reviewed again labels Jun 23, 2021
@lgtm-com
Copy link

lgtm-com bot commented Jun 23, 2021

This pull request introduces 30 alerts when merging 89bb968 into 00bf008 - view on LGTM.com

new alerts:

  • 28 for Unused variable, import, function or class
  • 2 for Useless assignment to local variable

@VivekBuzruk
Copy link
Author

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.

@VivekBuzruk
Copy link
Author

@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

@tatlax3636
Copy link
Collaborator

tatlax3636 commented Jul 14, 2021

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,
Ryan

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ VivekBuzruk
❌ mend-bolt-for-github[bot]
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🔍 Ready for Review Pull Request is not reviewed yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants