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

Permet la gestion de contributeurs sur les billets #6551

Merged

Conversation

Arnaud-D
Copy link
Contributor

Permet la gestion (ajout, suppression) des contributeurs sur les billets. Encore une partie du découpage de #6441.

On voit que la refactorisation des templates de publication porte ses fruits. La partie template a pu être gérée en modifiant une seule ligne de configuration.

Contrôle qualité

Créer des billets et jouer avec les contributeurs.
Constater qu'ils sont bien ajoutés, supprimés.
Constater qu'ils sont bien affichés comme sur les autres contenus.

@Arnaud-D Arnaud-D added C-Back Concerne le back-end Django hacktoberfest-accepted Pull request approuvée pour le Hacktoberfest labels Oct 28, 2023
@Arnaud-D Arnaud-D added this to En développement in Suivi des PR via automation Oct 28, 2023
@Arnaud-D Arnaud-D moved this from En développement to En attente de QA in Suivi des PR Oct 28, 2023
@Arnaud-D Arnaud-D force-pushed the permet-contributeurs-billets branch 3 times, most recently from 38c735b to dba1872 Compare October 29, 2023 06:37
@coveralls
Copy link

coveralls commented Oct 29, 2023

Coverage Status

coverage: 88.821% (+0.004%) from 88.817%
when pulling faeef97 on Arnaud-D:permet-contributeurs-billets
into 19f13c8 on zestedesavoir:dev.

Copy link
Member

@philippemilink philippemilink left a comment

Choose a reason for hiding this comment

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

Pas encore testé, mais déjà deux petits retours sur le code.

Comment on lines 66 to 71
types = ["TUTORIAL", "ARTICLE", "OPINION"]
for type in types:
self.content.type = type
self.content.save()
response = self.client.post(self.form_url, self.form_data)
self.assertRedirects(response, self.content_url)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
types = ["TUTORIAL", "ARTICLE", "OPINION"]
for type in types:
self.content.type = type
self.content.save()
response = self.client.post(self.form_url, self.form_data)
self.assertRedirects(response, self.content_url)
for type in CONTENT_TYPE_LIST:
with self.subTest(type):
self.content.type = type
self.content.save()
response = self.client.post(self.form_url, self.form_data)
self.assertRedirects(response, self.content_url)

En rajoutant

from zds.tutorialv2.models import CONTENT_TYPE_LIST

Comme ça, le jour où on rajoute un autre type de contenu, ce sera transparent. Le subTest permet de voir plus facilement quel cas fait planter le test.

Copy link
Contributor Author

@Arnaud-D Arnaud-D Dec 9, 2023

Choose a reason for hiding this comment

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

Bonne idée, c'est fait.

Suivi des PR automation moved this from En attente de QA to Modification demandée Nov 1, 2023
@Arnaud-D Arnaud-D moved this from Modification demandée to En attente de QA in Suivi des PR Dec 9, 2023
@Arnaud-D Arnaud-D force-pushed the permet-contributeurs-billets branch 3 times, most recently from 64a7c95 to 911a76a Compare March 9, 2024 09:57
@Arnaud-D Arnaud-D force-pushed the permet-contributeurs-billets branch from 911a76a to 631c430 Compare March 16, 2024 08:41
@Arnaud-D Arnaud-D force-pushed the permet-contributeurs-billets branch 2 times, most recently from e82d5ff to 4a0ce89 Compare March 29, 2024 22:36
@Arnaud-D Arnaud-D force-pushed the permet-contributeurs-billets branch from 4a0ce89 to e77c2d5 Compare April 28, 2024 06:04
Copy link
Member

@philippemilink philippemilink left a comment

Choose a reason for hiding this comment

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

QA OK ✔️

Suivi des PR automation moved this from En attente de QA to Fusionnable après rebase Apr 28, 2024
@philippemilink philippemilink merged commit d3c7fee into zestedesavoir:dev Apr 28, 2024
12 checks passed
Suivi des PR automation moved this from Fusionnable après rebase to Fusionnée Apr 28, 2024
@Arnaud-D Arnaud-D deleted the permet-contributeurs-billets branch April 28, 2024 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Back Concerne le back-end Django hacktoberfest-accepted Pull request approuvée pour le Hacktoberfest
Projects
Status: Fusionnée
Suivi des PR
  
Fusionnée
Development

Successfully merging this pull request may close these issues.

None yet

3 participants