Skip to content

add automation of the RGP proband tab #2160

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

Merged
merged 13 commits into from
Aug 10, 2023
Merged

Conversation

Rinchan20
Copy link
Contributor

@Rinchan20 Rinchan20 commented Jul 14, 2023

is slightly flaky when checking that textarea notes are preserved after revisiting the page

is part 3 of breaking down this large PR: #2048

is slightly flaky when checking that textarea notes are preserved after revisiting the page
@Rinchan20
Copy link
Contributor Author

dev probably needs a slight tweak in order for the test to pass - doesn't seem to be housekeeping related - the tweak needed is that the RGP dynamic form -> Contact Info -> State is a textfield in dev env but is a dropdown in test env. It also appears to be a textfield in staging. So it just needs consistency across the 3 non-prod envs. I can just change it so that it looks for a textfield instead of a dropdown though. Passes in test env though.

@aweng98
Copy link
Contributor

aweng98 commented Jul 17, 2023

I ran all tests against Dev on CircleCI. It had one test failure which I think it's related to your change. Can you take a look see to it can be fixed?
https://app.circleci.com/pipelines/github/broadinstitute/ddp-angular/25247/workflows/2d615392-ce1c-4a0d-a23b-77f5d79655a8

@Rinchan20
Copy link
Contributor Author

if it's the failure for finding the proband tab - that one would be because of housekeeping. Once a participant enrolls in RGP, there should be a proband tab created in RGP but sometimes in dev (and recently test - at least on Friday, I think?) it will not appear without running DSM RGP export - I think it'll be fixed once this ticket is done: https://broadworkbench.atlassian.net/browse/PEPPER-692

Copy link
Contributor

@aweng98 aweng98 left a comment

Choose a reason for hiding this comment

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

There is a problem with test which explains why it doesn't run on CircleCI and localhost. Failure root cause is not related to Housekeeping.
The user object inside the saveParticipantGuid(participantGuid) function is not "known" to the test. user objects in the test and that func are two different objects. Let me know if you have any questions about this.

@@ -48,3 +48,18 @@ export function offsetDaysFromToday(number = 1, opts: { isAdd?: boolean } = {}):
}
return today;
}

export const calculateBirthDate = (month: string, day: string, year: string): number => {
Copy link
Contributor

Choose a reason for hiding this comment

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

This func is nice!
How about rename to calculateAge? I think date is not accurate description for what the func do.

await participantListPage.waitForReady();
const participantListTable = new ParticipantListTable(page);
await participantListPage.filterListByParticipantGUID(user.patient.participantGuid);
await participantListTable.openParticipantPageAt(0);
Copy link
Contributor

Choose a reason for hiding this comment

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

Need a check to assert one row exists after filter search before open participant page.

}

public getPrimaryPhoneNumber(): Locator {
return this.page.locator("//td[contains(text(), 'Phone')]/following-sibling::td//div//input[@data-placeholder='Phone (Primary)']");
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a fan of long xpath. It is brittle. We can improve it at a later time.

this._relationToProband = relationToProband;
}

public set relationshipID(relationshipID : string) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need these set functions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

plan is to use them at around the next PR when adding family members - but since they're not relevant for this PR I think I'll just take them out and add them back in only if they're actually being used - thinking about it more, that'll help with not causing confusion down the line when seeing a method available that's not clearly being used

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants