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

[FEATURE] Créer une alerte en cas de non détection de l'extension Companion lors de la certification sur Pix App (PIX-14727). #10303

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

AndreiaPena
Copy link
Member

@AndreiaPena AndreiaPena commented Oct 11, 2024

🦄 Problème

En certification, lorsque Pix App ne détecte plus l'extension, la page Blocker s'affiche mais ça n'entraîne rien de plus.
On souhaiterait pouvoir bloquer l'utilisateur sur la question en cours tant que le surveillant n'a pas confirmé l'activation de l'extension. Pour cela nous avons besoin d'enregistrer une alerte en BDD.

🤖 Proposition

Créer une alerte spécifique à Companion.

🌈 Remarques

Création d'une nouvelle table 'certfication-companion-live-alerts'

💯 Pour tester

  • Activer l'extension Companion
  • Se connecter sur App avec certif-success@example.net
  • Remplir le formulaire d'entrée en session de certif (7402 firstname0... 01/01/2000)
  • Entrer en session
  • Désactiver l'extension
  • Vérifier en BDD l'enregistrement d'une alerte en cours ('ongoing')

@pix-bot-github
Copy link

Une fois les applications déployées, elles seront accessibles via les liens suivants :

Les variables d'environnement seront accessibles via les liens suivants :

@AndreiaPena AndreiaPena force-pushed the pix-14727-companion-live-alert branch 2 times, most recently from 10f6a86 to 62e7c60 Compare October 11, 2024 15:21
@nlepage nlepage force-pushed the pix-14727-companion-live-alert branch from 62e7c60 to 3656f36 Compare October 11, 2024 15:25
@nlepage nlepage removed the request for review from a team October 14, 2024 07:33
@P-Jeremy
Copy link
Contributor

Test func ✅

Après désactivation de l'extension

image

image

Copy link
Contributor

@Steph0 Steph0 left a comment

Choose a reason for hiding this comment

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

J'ai fais pas mal de retour sur la definition des model, et du coup ca risque d'impacter la partie Front qu'il faudrait que je relise.

@nlepage nlepage force-pushed the pix-14727-companion-live-alert branch from 9fb9b04 to 5efe444 Compare October 14, 2024 10:18
@nlepage nlepage force-pushed the pix-14727-companion-live-alert branch 2 times, most recently from 3a484e9 to 9dd057a Compare October 14, 2024 14:18
Copy link
Contributor

@Steph0 Steph0 left a comment

Choose a reason for hiding this comment

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

Je mets le Approve en anticipation du deplacement vers evaluation (vu que on est en live sur le meet) 😊 !

Test func avec un warning

Cela fonctionne mais warning sur l'enum qui est pas toujorus enregistre avec la meme casse
image

await knex.schema.createTable(TABLE_NAME, function (table) {
table.increments().primary().notNullable();
table.integer('assessmentId').notNullable().unsigned().references('assessments.id').index();
table.string('status').notNullable().defaultTo('ONGOING');
Copy link
Contributor

Choose a reason for hiding this comment

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

Merci pour le commentaire sur la table, DATA est aussi interesse sur la definition fonctionnelle aussi des colonnes. Typiquement que veut dire cleared et ongoing. :)

Copy link
Member Author

Choose a reason for hiding this comment

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

j'ai tenté ! à confirmer :)

async function ({ assessmentId, certificationCompanionAlertRepository }) {
const companionAlert = new CertificationCompanionLiveAlert({
assessmentId,
status: 'ONGOING',
Copy link
Contributor

Choose a reason for hiding this comment

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

CertificationCompanionLiveAlertStatus.ONGOING (autant utiliser l'enumeration cree pour l'occaz ce qui evite les magic strings).

Autre version que j'aime bien, mais ptet overkill, une factory (j'ai pas cherche d'article en node) : CertificationCompanionLiveAlert.createOngoing()

@AndreiaPena AndreiaPena force-pushed the pix-14727-companion-live-alert branch 2 times, most recently from 13e9288 to 75d4edf Compare October 14, 2024 16:51
nlepage and others added 2 commits October 14, 2024 19:05
Co-authored-by: Andreia Pena Ferreira <andreia.pena@pix.fr>
Co-authored-by: Andreia Pena Ferreira <andreia.pena@pix.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants