Skip to content

Pepper 1251 playwright place an order in mercury #2412

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

Open
wants to merge 37 commits into
base: develop
Choose a base branch
from

Conversation

Rinchan20
Copy link
Contributor

Getting the process for placing a clinical order checked out by playwright

REQUEST = 'Request',
RECEIVED = 'Received',
EXACT_MATCH = 'Exact Match',
LOST_TO_FOLLOWUP = 'Lost to Followup',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

just moved things into alphabetical order

const numberOfReturnedParticipants = await participantTable.getRowsCount();
expect(numberOfReturnedParticipants).toBeGreaterThanOrEqual(1);

//Randomly chose a participant to get a clinical order who had previously had an order placed
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reason for choosing a ptp who previously had an order placed: test is a bit smaller if it does not need to send+receive a kit and accession sm-ids

@Rinchan20
Copy link
Contributor Author

currently just looks at OS2, planning on having it run in LMS too - once above initial circleci checks are done, will run tests in dev and test env to make sure no unintended errors are occurring

@Rinchan20
Copy link
Contributor Author

checks have passed - will run in dev and test soon - pic below is example of result of one test case (checking mercury order can be placed for lost to followup up ptp located in US Territory)
dsm-dev datadonationplatform org_(Desktop) (9)

@Rinchan20 Rinchan20 requested a review from zyme October 11, 2024 20:29
@Rinchan20 Rinchan20 marked this pull request as ready for review October 11, 2024 20:29
@Rinchan20
Copy link
Contributor Author

running tests in dev and test to make sure it passes

@@ -149,3 +149,7 @@ export const calculateAge = (month: string, day: string, year: string): number =

return resultAge;
};

export const getTodayInEastCoastDateTimeFormat = (): string => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: this is the time zone, not the time format.

@@ -9,6 +9,12 @@ echo "export SITE_PASSWORD=$sitePwd" >> playwright-env/envvars
export bspToken=$(vault read --format=json secret/pepper/test/v1/e2e | jq -r ".data.bsp | .[] | select(.env==\"$ENV\") | .token")
echo "export BSP_TOKEN=$bspToken" >> playwright-env/envvars

export pubsubTopicName=$(vault read --format=json secret/pepper/test/v1/e2e | jq -r ".data.mercury | .[] | select(.env==\"$ENV\") | .pubsubTopicName")
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like we aren't dipping into pubsub for these tests. Do we need these values for testing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep - I use them in placeMercuryOrder():
Screenshot 2024-10-15 at 6 00 18 AM

I'm using the method shown here: https://cloud.google.com/pubsub/docs/publisher#node.js_1

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you say a bit more about why we need to interact with pubsub directly when there's a "place order" button on the UI?

Copy link
Contributor Author

@Rinchan20 Rinchan20 Oct 15, 2024

Choose a reason for hiding this comment

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

yeah - the "place order" button usually just fills the Latest Sequencing Order Date column and the Latest Order Number column. I need to use pubsub in order to make sure that the Latest Order Status and Latest PDO Number are also filled out.
Below is state of the orders with just "place order" used (see the ones with "10/15/2024" as the Latest Sequencing Order Date):
Screenshot 2024-10-15 at 9 51 11 AM

Below is after using pubsub (Latest Order Status and Latest PDO Number are now filled out):
Screenshot 2024-10-15 at 9 53 36 AM

attaching the doc that has the testing steps since video reference is too big to attach: https://docs.google.com/document/d/1TGCnJGNz-HPYo1zO7wEeVHjkhm0NEgOEQHwyoCU12aI/edit?tab=t.0

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