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

[TECH] Ajouter des tests sur le language switcher #442

Merged

Conversation

VincentHardouin
Copy link
Member

🦄 Problème

Le language switcher est à mon gout pas suffisament tester pour que je puisse le refactorer en toute aisance

🤖 Solution

Ajouter des tests snapshots pour couvrir l'affichage actuelle

🌈 Remarques

On peut relever qu'un test a été supprimé car il ne servait plus, n'ayant plus de différence entre pro.pix.org et pro.pix.fr

💯 Pour tester

  • Constater le bon fonctionnement de la CI

@pix-service
Copy link

I'm deploying this PR to these urls:

Please check it out!

@VincentHardouin VincentHardouin added the team-evaluation PR relatives à l'expérience d'évaluation label Dec 15, 2022
@yannbertrand yannbertrand force-pushed the tech-add-snapshot-test-for-language-switcher branch from 3426b7b to d38fd9b Compare December 22, 2022 10:43
const $i18n = { locale: 'fr-fr' }

// when
const wrapper = mount(LanguageSwitcher, {
Copy link
Member

@yannbertrand yannbertrand Dec 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question : pourquoi passer sur le mount plutôt que shallowMount ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mount permet d'avoir le dom des composants enfants, ce que ne fait pas shallowMount

@yannbertrand yannbertrand force-pushed the tech-add-snapshot-test-for-language-switcher branch from d38fd9b to 19f3747 Compare December 22, 2022 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚀 Ready to Merge team-evaluation PR relatives à l'expérience d'évaluation Tech Review OK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants