-
Notifications
You must be signed in to change notification settings - Fork 9
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
feat(tests): Include report section for when tests fail due to missing opportunity data (random mode) #647
Merged
lukehesluke
merged 18 commits into
master
from
feature/report-random-mode-ran-out-of-data
Mar 11, 2024
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
cd9f9ab
log when run out of data (but do not yet report it)
lukehesluke d3f26d8
wip
lukehesluke 2233174
Merge remote-tracking branch 'origin/master' into feature/report-rand…
lukehesluke 6c5d2f4
kinda works
lukehesluke 5138b0d
change it up. why not (change the groupings to be a bit more compact)
lukehesluke 476c3d8
cleanup
lukehesluke d1f4012
summarize the output
lukehesluke bade5dc
et finit
lukehesluke ae13a92
fix TS errors in report-generator
lukehesluke 10bbb28
.
lukehesluke 12e41ff
.
lukehesluke 69741df
.
lukehesluke 4da1972
Merge remote-tracking branch 'origin/master' into feature/report-rand…
lukehesluke bb1511f
wording fixes
lukehesluke fb8a33e
Merge branch 'master' into feature/report-random-mode-ran-out-of-data
lukehesluke 17d9e86
Merge branch 'master' into feature/report-random-mode-ran-out-of-data
lukehesluke 4139a3c
Merge branch 'master' into feature/report-random-mode-ran-out-of-data
lukehesluke 149e3fb
Merge branch 'master' into feature/report-random-mode-ran-out-of-data
lukehesluke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -448,8 +448,9 @@ class RequestHelper { | |
sellerId, | ||
sellerType, | ||
}) { | ||
const stage = `Local Microservice Test Interface for OrderItem ${orderItemPosition}`; | ||
const respObj = await this.post( | ||
`Local Microservice Test Interface for OrderItem ${orderItemPosition}`, | ||
stage, | ||
`${MICROSERVICE_BASE}/test-interface/datasets/${TEST_DATASET_IDENTIFIER}/opportunities`, | ||
createTestInterfaceOpportunity({ | ||
opportunityType, | ||
|
@@ -461,6 +462,19 @@ class RequestHelper { | |
timeout: OPEN_BOOKING_API_REQUEST_TIMEOUT, | ||
}, | ||
); | ||
const opportunityNotFound = ( | ||
respObj.response.statusCode === 404 | ||
&& respObj.body?.type === 'OpportunityNotFound' | ||
); | ||
if (opportunityNotFound) { | ||
this.logger.recordFlowStageEvent(stage, { | ||
type: 'OpportunityNotFound', | ||
opportunityType, | ||
testOpportunityCriteria, | ||
bookingFlow, | ||
sellerId, | ||
}); | ||
} | ||
Comment on lines
+465
to
+477
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is where the "opportunity missing" event is saved |
||
|
||
return respObj; | ||
} | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be a good issue to raise and do, for maintainability
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point @civsiv . I've created an issue to do that, and broadly fix all the ESLint sins, here: #648