Pepper 1251 playwright place an order in mercury#2412
Pepper 1251 playwright place an order in mercury#2412
Conversation
| REQUEST = 'Request', | ||
| RECEIVED = 'Received', | ||
| EXACT_MATCH = 'Exact Match', | ||
| LOST_TO_FOLLOWUP = 'Lost to Followup', |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
|
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 |
|
running tests in dev and test to make sure it passes |
playwright-e2e/utils/date-utils.ts
Outdated
| return resultAge; | ||
| }; | ||
|
|
||
| export const getTodayInEastCoastDateTimeFormat = (): string => { |
There was a problem hiding this comment.
Nit: this is the time zone, not the time format.
| 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") |
There was a problem hiding this comment.
It looks like we aren't dipping into pubsub for these tests. Do we need these values for testing?
There was a problem hiding this comment.
yep - I use them in placeMercuryOrder():

I'm using the method shown here: https://cloud.google.com/pubsub/docs/publisher#node.js_1
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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):

Below is after using pubsub (Latest Order Status and Latest PDO Number are now filled out):

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

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