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

single-seller - no-other-sellers-in-opportunity-data - Assert that there are no other sellers in data when this feature is implemented #641

Open
lukehesluke opened this issue Feb 21, 2024 · 0 comments
Labels
test-request Request for a new test

Comments

@lukehesluke
Copy link
Contributor

Feature

single-seller

Use Case

When the single-seller feature is implemented, this test will ensure that all of the opportunity data only belongs to the seller configured in .sellers.primary.

The value is that this will ensure that a Booking System will use the multiple-sellers feature, and thus get that test coverage, if their Booking System actually has multiple sellers.

Why this hasn't been covered by existing tests

It isn't 🦄

Additional context

In theory, it may be possible that a system has opportunity data for multiple sellers but that only one is bookable. This is a very specific scenario, but should technically be considered ok. The multiple-sellers tests ensure that booking fails in the correct ways when multiple seller bookings are performed incorrectly and therefore it's concern is only with bookings and not opportunity.

All this to say that the test should only throw an error if there is BOOKABLE opportunity data belonging to another seller.


It may actually make the most sense to put this in the multiple-sellers feature as a not-implemented test


The solution should use something like FeatureHelper.describeUnmatchedCriteriaFeature(..), which will need to be extended to make it possible to specify that the unmatched criteria constraint should be { criteria: TestOpportunityBookable, sellerNot: SELLER_CONFIG.primary['@id'] }.

This will require changes to Broker Microservice, either extending POST /assert-unmatched-criteria or adding a new similar route for this more complex functionality (a cursory glance suggests the former approach, but this may be incorrect)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test-request Request for a new test
Projects
Status: 💡Ideas
Development

No branches or pull requests

1 participant