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

Proposal : Tzatziki front module #242

Open
alexandrepa opened this issue Mar 22, 2024 · 7 comments
Open

Proposal : Tzatziki front module #242

alexandrepa opened this issue Mar 22, 2024 · 7 comments

Comments

@alexandrepa
Copy link
Collaborator

First draft of the new front module we want to develop for tzatziki can be found in wiki : https://github.com/Decathlon/tzatziki/wiki/Module-:-Tzatziki-front

Feel free to make suggestions or correction in comments.

I am open to discussion and I have possibly miss some use cases.

@PhilippeBabin53
Copy link

See the possibility to enable/disable the "take screenshot on error" and see how it's displayed in the report

@dkt-abarth
Copy link

What about mock operations steps ?

It would allow standalone testing rather than depending on a backend/BFF/etc and data consistency

@alexandrepa
Copy link
Collaborator Author

Thanks for your feedbacks, I've made the change in the proposal.

@brian-mulier-p
Copy link

brian-mulier-p commented Mar 26, 2024

Hello ! Tiny insights I can give:

What about mock operations steps ?

It would allow standalone testing rather than depending on a backend/BFF/etc and data consistency

Maybe reusing Mockfaster instead would be better and more resilient than rewriting the whole thing 🤔 Would only imply adding some environment variable so that the front targets the mocked API 🤔

Do we offer the possibility to the user to access to the internal browser engine (like playwright browser) in case user has a specific need not covered by the module.

If you plan to have a large open-source solution which covers most usecase, I'd advise not to add such step as it would discourage people to open an issue on this repo or contribute directly to it. Moreover, it would encourage people to add hacks in their tests which will require a ton of maintainability issue as well as maybe some breaking change upon dependencies upgrades (while having such feature embed inside tzatziki would allow to detect failure before releasing it and only require a single change in tzatziki).

@dkt-abarth
Copy link

What about mock operations steps ?
It would allow standalone testing rather than depending on a backend/BFF/etc and data consistency

Maybe reusing Mockfaster instead would be better and more resilient than rewriting the whole thing 🤔 Would only imply adding some environment variable so that the front targets the mocked API 🤔

It would also mean more coupling/deps to bring with for front testing, while it's a native Playwright feature. I feel like cover/wrap as much as possible Playwright's scope seems more logical.

Playwright's mock API has also a quite broad scope and covers feature that are not handled by Mockfaster implementation.

Moreover, as far I can see with some searches, it seems to be a better fit with front community way to go

@brian-mulier-p
Copy link

But then it would imply to provide an implementation for each front-testing modules so idk, I think both solutions have their counterpart.

If we see tzatziki as a whole, it's better to enhance Mockfaster to cover the need. Moreover it would bring easier context-switching from back to front and less headaches figuring out two syntaxes.

But no strong opinion and if you choose to go with Playwright's feature it's still a valid choice, just mind it may bring some overhead in maintainability and force to rewrite every mocking steps 👍

@alexandrepa
Copy link
Collaborator Author

I propose to considered this feature as a "bonus". For now we can used Mockfaster to easily mock external calls, we can rediscuss it when the time comes if we have time and identify the needs to add this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

4 participants