-
Notifications
You must be signed in to change notification settings - Fork 1
fix: TT-24 Display project type in projects table #685
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: TT-24 Display project type in projects table #685
Conversation
Codecov Report
@@ Coverage Diff @@
## master #685 +/- ##
==========================================
+ Coverage 93.09% 94.22% +1.12%
==========================================
Files 85 103 +18
Lines 1564 2042 +478
Branches 107 148 +41
==========================================
+ Hits 1456 1924 +468
- Misses 67 76 +9
- Partials 41 42 +1
Continue to review full report at Codecov.
|
component.projectsTypes = [nameType]; | ||
component.ngOnInit(); | ||
const nameTest = component.getProjectType(id); | ||
expect(nameTest).toBe('BK'); |
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.
The nameTest get the id of the project.
and in the expect should compare the id
expect(idTest).toBe('1223');
and you can create another expect for name
NAME: expect(nameTest).toBe('BK');
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.
The nameTest gets the name of the projectType to print it in the table, that's why I changed the getPProjectType
function to getProjectTypeName
in the next commit.
} | ||
|
||
getProjectType(typeId: string) { | ||
const typeName = this.projectsTypes.find( |
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.
change typeName for typeProject
Kudos, SonarCloud Quality Gate passed!
|
component.ngOnInit(); | ||
|
||
const projectNameTest = component.getProjectTypeName(id); | ||
expect(projectNameTest).toBe('BK'); |
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.
I am testing ('BK') here because the input of function getProjectTypeName is the project_type_id and it returns the name of the project type to render it on the table.
Hi Team, I solved the problem by creating a new method to show the project type in the table. The problem is solved and the project type is displaying in the project-list table in the customers-management.