Improvements Automation - #5380
Conversation
|
See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/5380 |
| > | ||
| {propertyImprovements?.map((improvement, index) => ( | ||
| <StyledBorder key={improvement.id}> | ||
| <StyledBorder key={improvement.id} data-testid={`property-improvement-${index}`}> |
There was a problem hiding this comment.
Please use data-testid={property-improvement-${improvement.id}}
There was a problem hiding this comment.
That makes so difficult to get the element .... the IDs are unique and doesn't allow to have the improvements in the order they appear, that's why I'm using the index.
| {propertyImprovements.improvements.map( | ||
| (improvement: ApiGen_Concepts_PropertyImprovement, index: number) => ( | ||
| <div key={improvement.id}> | ||
| <div key={improvement.id} data-testid={`property-improvement-${index}`}> |
There was a problem hiding this comment.
Please use data-testid={property-improvement-${improvement.id}}
|
|
||
| async setResearchFilenameInput(fileName: string) { | ||
| await this.researchNameInput.fill(fileName); | ||
| async fillInField(elementId: string, content: string) { |
There was a problem hiding this comment.
I think we should keep the single responsibility method pattern, instead of using parameters for the element.
| //{ label: 'Research completed on', apiValue: apiFeatureFileJson.researchCompletionDate }, | ||
| ]; | ||
|
|
||
| for (const field of fieldsToCompare) { |
There was a problem hiding this comment.
let's not use this pattern of looping. would rather have it explicit expects for each.
| } | ||
|
|
||
| for (const date of datesToCompare) { | ||
| const uiValue = await researchViewDetails.getFieldValueByLabel(date.label); |
There was a problem hiding this comment.
let's not use this pattern of looping. would rather have it explicit expects for each.
| return 'No'; | ||
| } | ||
| export const formatApiBoolean = (value: boolean | null | undefined): string => { | ||
| if (value == null) { |
There was a problem hiding this comment.
This one needs more validations, and it should use the "===" operator. you are missing the check for undefined. The only value that should return 'Yes' is 'true'. would rather leave it as it was before.
|
See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/5380 |
|
See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/5380 |
|
See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/5380 |
|



No description provided.