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

(PC-33066) feat(Achievements): hide locked badge title #7275

Merged
merged 14 commits into from
Nov 26, 2024

Conversation

mleduc-pass
Copy link
Contributor

@mleduc-pass mleduc-pass commented Nov 25, 2024

Link to JIRA ticket: https://passculture.atlassian.net/browse/PC-33066

Flakiness

If I had to re-run tests in the CI due to flakiness, I add the incident on Notion

Checklist

I have:

  • Made sure my feature is working on web.
  • Made sure my feature is working on mobile (depending on relevance : real or virtual devices)
  • Written unit tests native (and web when implementation is different) for my feature.
  • Added a screenshot for UI tickets or deleted the screenshot section if no UI change
  • If my PR is a bugfix, I add the link of the "résolution de problème sur le bug" on Notion
  • I am aware of all the best practices and respected them.

Screenshots

delete if no UI change

Platform Mockup/Before After
iOS image image
Android
Phone - Chrome
Desktop - Chrome

Best Practices

Click to expand
  • Remove non-null assertion operators (just like other type assertions, this doesn’t change the runtime behavior of your code, so it’s important to only use ! when you know that the value can’t be null or undefined).

Test specific:

  • When you see a local variable that is over-written in every test, mock it.
  • Prefer user to fireEvent.

@mleduc-pass mleduc-pass marked this pull request as ready for review November 25, 2024 14:09
@mleduc-pass
Copy link
Contributor Author

J'ai refacto useAchievements pour que ca soit fait sans mutation de variable et j'ai rajouté quelques tests au passage

@mleduc-pass mleduc-pass force-pushed the PC-33066-hide-locked-badge-title branch from a82b716 to 02e2f5e Compare November 26, 2024 09:43
])
})

it('achivements are sorted by name', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Copy link

sonarcloud bot commented Nov 26, 2024

Copy link

sonarcloud bot commented Nov 26, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
1 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@mleduc-pass mleduc-pass merged commit b8f07a6 into master Nov 26, 2024
52 of 53 checks passed
@mleduc-pass mleduc-pass deleted the PC-33066-hide-locked-badge-title branch November 26, 2024 10:10
fcarre-pass added a commit that referenced this pull request Nov 28, 2024
* Achievement name is Badge non délboqué when not completed

* Refacto

* Use badge name from useAchievements

* Add test for remainingAchievementsText

* Refacto

* Refacto tests

* Refacto

* Add tests for sorting

* Refacto

* Refacto

* Remove achievement name in modal when achievement is not completed

* Update snapshot

* Remove description and update snapshot

* Update snapshot
fcarre-pass added a commit that referenced this pull request Nov 28, 2024
* Achievement name is Badge non délboqué when not completed

* Refacto

* Use badge name from useAchievements

* Add test for remainingAchievementsText

* Refacto

* Refacto tests

* Refacto

* Add tests for sorting

* Refacto

* Refacto

* Remove achievement name in modal when achievement is not completed

* Update snapshot

* Remove description and update snapshot

* Update snapshot
fcarre-pass added a commit that referenced this pull request Nov 28, 2024
* Achievement name is Badge non délboqué when not completed

* Refacto

* Use badge name from useAchievements

* Add test for remainingAchievementsText

* Refacto

* Refacto tests

* Refacto

* Add tests for sorting

* Refacto

* Refacto

* Remove achievement name in modal when achievement is not completed

* Update snapshot

* Remove description and update snapshot

* Update snapshot
fcarre-pass added a commit that referenced this pull request Nov 28, 2024
* Achievement name is Badge non délboqué when not completed

* Refacto

* Use badge name from useAchievements

* Add test for remainingAchievementsText

* Refacto

* Refacto tests

* Refacto

* Add tests for sorting

* Refacto

* Refacto

* Remove achievement name in modal when achievement is not completed

* Update snapshot

* Remove description and update snapshot

* Update snapshot
fcarre-pass added a commit that referenced this pull request Nov 28, 2024
* Achievement name is Badge non délboqué when not completed

* Refacto

* Use badge name from useAchievements

* Add test for remainingAchievementsText

* Refacto

* Refacto tests

* Refacto

* Add tests for sorting

* Refacto

* Refacto

* Remove achievement name in modal when achievement is not completed

* Update snapshot

* Remove description and update snapshot

* Update snapshot
fcarre-pass added a commit that referenced this pull request Nov 28, 2024
* Achievement name is Badge non délboqué when not completed

* Refacto

* Use badge name from useAchievements

* Add test for remainingAchievementsText

* Refacto

* Refacto tests

* Refacto

* Add tests for sorting

* Refacto

* Refacto

* Remove achievement name in modal when achievement is not completed

* Update snapshot

* Remove description and update snapshot

* Update snapshot
fcarre-pass added a commit that referenced this pull request Nov 28, 2024
* Achievement name is Badge non délboqué when not completed

* Refacto

* Use badge name from useAchievements

* Add test for remainingAchievementsText

* Refacto

* Refacto tests

* Refacto

* Add tests for sorting

* Refacto

* Refacto

* Remove achievement name in modal when achievement is not completed

* Update snapshot

* Remove description and update snapshot

* Update snapshot
fcarre-pass added a commit that referenced this pull request Nov 28, 2024
* Achievement name is Badge non délboqué when not completed

* Refacto

* Use badge name from useAchievements

* Add test for remainingAchievementsText

* Refacto

* Refacto tests

* Refacto

* Add tests for sorting

* Refacto

* Refacto

* Remove achievement name in modal when achievement is not completed

* Update snapshot

* Remove description and update snapshot

* Update snapshot
fcarre-pass added a commit that referenced this pull request Nov 28, 2024
* Achievement name is Badge non délboqué when not completed

* Refacto

* Use badge name from useAchievements

* Add test for remainingAchievementsText

* Refacto

* Refacto tests

* Refacto

* Add tests for sorting

* Refacto

* Refacto

* Remove achievement name in modal when achievement is not completed

* Update snapshot

* Remove description and update snapshot

* Update snapshot
fcarre-pass added a commit that referenced this pull request Nov 28, 2024
* Achievement name is Badge non délboqué when not completed

* Refacto

* Use badge name from useAchievements

* Add test for remainingAchievementsText

* Refacto

* Refacto tests

* Refacto

* Add tests for sorting

* Refacto

* Refacto

* Remove achievement name in modal when achievement is not completed

* Update snapshot

* Remove description and update snapshot

* Update snapshot
fcarre-pass added a commit that referenced this pull request Nov 28, 2024
* Achievement name is Badge non délboqué when not completed

* Refacto

* Use badge name from useAchievements

* Add test for remainingAchievementsText

* Refacto

* Refacto tests

* Refacto

* Add tests for sorting

* Refacto

* Refacto

* Remove achievement name in modal when achievement is not completed

* Update snapshot

* Remove description and update snapshot

* Update snapshot
fcarre-pass added a commit that referenced this pull request Nov 28, 2024
* Achievement name is Badge non délboqué when not completed

* Refacto

* Use badge name from useAchievements

* Add test for remainingAchievementsText

* Refacto

* Refacto tests

* Refacto

* Add tests for sorting

* Refacto

* Refacto

* Remove achievement name in modal when achievement is not completed

* Update snapshot

* Remove description and update snapshot

* Update snapshot
fcarre-pass added a commit that referenced this pull request Nov 28, 2024
* Achievement name is Badge non délboqué when not completed

* Refacto

* Use badge name from useAchievements

* Add test for remainingAchievementsText

* Refacto

* Refacto tests

* Refacto

* Add tests for sorting

* Refacto

* Refacto

* Remove achievement name in modal when achievement is not completed

* Update snapshot

* Remove description and update snapshot

* Update snapshot
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

Successfully merging this pull request may close these issues.

2 participants