Skip to content
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] Updated the patientEntry E2E #1455

Draft
wants to merge 64 commits into
base: develop
Choose a base branch
from

Conversation

Bahati308
Copy link
Contributor

@Bahati308 Bahati308 commented Jan 28, 2025

[fix] Updated the patientEntry E2E

Screenshots

Screenshot from 2025-01-28 18-57-51

Related Issue

https://uwdigi.atlassian.net/browse/OGC-13

Other

https://uwdigi.atlassian.net/browse/OGC-28
[Add any additional information or notes here]

@Bahati308 Bahati308 changed the title [fixe] Updated the patientEntry E2E [fix] Updated the patientEntry E2E Jan 28, 2025
@Bahati308 Bahati308 marked this pull request as draft January 30, 2025 18:18
Copy link
Contributor

@CalebSLane CalebSLane left a comment

Choose a reason for hiding this comment

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

PR looks like it's coming along! I particularly like the use of the test-specific id selectors (data-testid, data-cy) It would be good if we could align on which specific one we want to use and stick to it. There's a few selectors that are still page-setup/class specific that I would like moved to ids if possible. And in general, updating function names to something that captures the updated functionality should always happen.

Individual comments are below. Great work!

}

getTestTypePriority(priority) {
cy.get("#select-1").select(priority);
}

getPrintWorkPlanButton() {
Copy link
Contributor

Choose a reason for hiding this comment

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

This methods should be renamed since it is no longer a "get" operation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

surely, lemme adjust accordingly. thanks

getWorkPlanResultsTable() {
return cy.get(".cds--data-table.cds--data-table--sm");

getFinalPrintWorkPlanButton() {
Copy link
Contributor

Choose a reason for hiding this comment

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

This methods should be renamed since it is no longer a "get" operation

acceptSample() {
//div.cds--form-item.cds--checkbox-wrapper > input[type="checkbox"]
cy.get(
'div.cds--form-item.cds--checkbox-wrapper > input[type="checkbox"]',
Copy link
Contributor

Choose a reason for hiding this comment

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

This still looks like it is using the page format selectors. Is there a reason why an id can't be used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

true, will harden it

}

selectPatient() {
cy.get("table tbody tr").first().find("td label span").click();
Copy link
Contributor

Choose a reason for hiding this comment

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

can an id selector be used instead of page format selectors here?

cy.getElement(
".navigationButtonsLayout [type='button']:nth-of-type(2)",
).click();
cy.get("button.forwardButton.cds--btn--primary")
Copy link
Contributor

Choose a reason for hiding this comment

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

can this be an id selector instead?

cy.fixture("result").then((res) => {
result.acceptSample();
result.expandSampleDetails();
result.selectTestMethod(0, res.pcrTestMethod);
cy.get(":nth-child(3) > .cds--form-item > .cds--checkbox-label").click();
Copy link
Contributor

Choose a reason for hiding this comment

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

missed selector

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.

3 participants