coveo / ui-kit

Coveo UI kit repository, home of @coveo/headless, @coveo/atomic, and more.
Apache License 2.0
51 stars 34 forks source link

experiment: pact with playwright #4461

Open louis-bompart opened 6 days ago

louis-bompart commented 6 days ago

tinker with one playwright test to see if we could cram Pact in there...

Mayyybe? Lot of effort to implement on our side, but if we tool ourselves up, and we document Pact ('cause sorry, the DX of their matches is pretty poor and doesn't do any effort to play nice with frontend developers' brains)

@y-lakhdar , just throwing that here as 'yep, that's possible, but', if that helps ya. @acote-coveo , poking you as the 'contract-guru' 🧙, I'm mostly interested to see if there's value for an API maintainer such as yourself in pacts/Atomic-SearchUI.json

@lvu285 , if you discuss contract testing with other teams, we have a (very dirty) POC.

Why in Playwright? If we look at Headless's test landscape, we don't have much E2E. They are done at the level of Atomic (so Atomic+Headless+API, the whole whammy).

Decoupling Headless from Atomic would be another ordeal, so for the sake of the POC, I went with 'Headless&Atomic' and put the API aside.

Next steps:

github-actions[bot] commented 6 days ago

Pull Request Report

PR Title

:x: Title should follow the conventional commit spec:
<type>(optional scope): <description>

Example: feat(headless): add result-list controller

Live demo links

Bundle Size

File Old (kb) New (kb) Change (%)
case-assist 235.9 235.9 0
commerce 339.1 339.1 0
search 409.5 409.5 0
insight 395.4 395.4 0
recommendation 248.5 248.5 0
ssr 403.5 403.5 0
ssr-commerce 351.4 351.4 0

SSR Progress

Use case SSR (#) CSR (#) Progress (%)
search 39 44 89
recommendation 0 4 0
case-assist 0 6 0
insight 0 27 0
commerce 0 15 0
Detailed logs search : buildInteractiveResult
search : buildInteractiveInstantResult
search : buildInteractiveRecentResult
search : buildInteractiveCitation
search : buildGeneratedAnswer
recommendation : missing SSR support
case-assist : missing SSR support
insight : missing SSR support
commerce : missing SSR support