Oh doesn't work with less than 8, yeah that makes ...
# pactflow
y
Oh doesn't work with less than 8, yeah that makes sense, I believe cypress was version 8 when the adapter was built
Fair few http logging improvements in 8.2.0 https://github.com/cypress-io/cypress/releases/tag/v8.2.0 so it's plausible it won't work prior but would need to dig into the code. Just on mobile atm
j
From what I've tested the only part that seem to throw errors is that the adapter tries to pull the test name using
Copy code
const testCaseTitle = Cypress.currentTest.title
on line 41 of index.ts. From what I've gathered here currentTest was only added in 8.2. I've actually tested locally filling that field manually with a string and everything else seems to work properly.
I wish it could allow for a blank string if it pulls None from that value, but I understand not wanting to support backwards compatibility that far. As for 10 I've not tried yet but as you said I've seen they've significantly changed the configs for Cypress so I imagine as-is it may need some messing about to get working.
y
You can raise a PR to support it, if you have a need to use versions lower than 8.2, otherwise even adding to the readme to state the correct versions supported from would be a great start 👍🏽
👍 1
j
@Yousaf Nabi (pactflow.io) Hi Yousaf, I've made a PR here for you to review whenever you have a chance. It just locks the currentTest usage behind and if statement to allow for older Cypress versions to use usePactWait and getPactGet.
Hi @Yousaf Nabi (pactflow.io) absolutely no rush but just so I know how to plan our QA teams path going forward. Does this seem to be a change you would approve or should we aim to await the Cypress 10 release?
y
Hi buddy, I'm away this week at a conference but will hope to have a look on Tuesday ( Monday is a bank holiday ) I think I would be okay supporting the change, but just need some time to test. Will try and get Cypress 10 on the radar soon, feel free to raise an issue to track. Are you able to publish a scoped version and use that as an interim?
j
Sounds great, thank you! We're not under a huge crunch to get this implemented, my manager just wanted to know if were should start considering alternative approaches if this is unlikely to be our solution. Have a great time at the conference!
Hey @Yousaf Nabi (pactflow.io) thanks for making the change and merging! Would you be able to publish the newest tag when you have the chance so we can start importing the changes? Appreciate it!
y
Hey v1.3.0 is now out rockon Will get some time to look at cypress 10 at some point, thanks for the support on this
1
j
Thank you! Everything is working great and this should be all we need to get online with Pact. Appreciate it.