-
Notifications
You must be signed in to change notification settings - Fork 15
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
Allow Provider State to be set dynamically instead of hard code #55
Comments
The relevant line of code is here, providerState isn't set
Feel free to drop a PR or suggest how you wish the provider state to be set, as in what information you actually want it it. I hadn't built the tool with the idea of working with providerStates/matchers to work with traditional CDCT testing, but would be happy to see someone extend the tool to do so |
We are on the same boat as @TKDMaster12 😄 We would like to have provider states passed in. Happy to push a PR to get this feature in. But was wondering if you have any thoughts on how we might pass the states in. Given this gets initialised early on, I believe we lose context from an individual test point of view. I was wondering if we can pass a generic provider state PER pactMswAdapter for a given provider. Hope that makes sense. Would love some brainstorming on how we can do it to see if I'm missing anything. Thoughts ? |
I figured out a work a round. I added an extra header to the calls. Then in the afterAll method pull that header and use that as the state. Hope this helps.
|
See also pactflow/pact-cypress-adapter#22. |
Checklist
Before making a feature request, I have:
Feature description
I have a bunch of pacts for one project. I would like to add states to make the provider side of the pact work better.
The text was updated successfully, but these errors were encountered: