Skip to content

Improvements Automation - #5380

Draft
stairaku wants to merge 11 commits into
bcgov:devfrom
stairaku:automation-branch
Draft

Improvements Automation#5380
stairaku wants to merge 11 commits into
bcgov:devfrom
stairaku:automation-branch

Conversation

@stairaku

@stairaku stairaku commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@stairaku stairaku self-assigned this Aug 5, 2026
@stairaku stairaku added the test-scripts Tag used for functional test scripts label Aug 5, 2026
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

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}`}>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use data-testid={property-improvement-${improvement.id}}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}`}>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use data-testid={property-improvement-${improvement.id}}


async setResearchFilenameInput(fileName: string) {
await this.researchNameInput.fill(fileName);
async fillInField(elementId: string, content: string) {

@eddherrera eddherrera Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) {

@eddherrera eddherrera Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);

@eddherrera eddherrera Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions

Copy link
Copy Markdown
Contributor

See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/5380

@github-actions

Copy link
Copy Markdown
Contributor

See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/5380

@github-actions

Copy link
Copy Markdown
Contributor

See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/5380

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test-scripts Tag used for functional test scripts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants