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

ETQ Admin, je peux ajouter/supprimer des experts notifiables #6041

Merged
merged 12 commits into from Apr 6, 2021
Merged

Conversation

kara22
Copy link
Contributor

@kara22 kara22 commented Mar 30, 2021

#5813

La vue administrateur lorsque le feature flag est activé
image

Flag désactivé : l'instructeur peut demander l'avis aux experts de son choix
image

Flag activé : l'instructeur peut demander l'avis uniquement aux experts de la liste de l'administrateur
image

Important : Si le flag est activé, un expert ne peut pas demander l'avis d'un autre expert.

@kara22 kara22 changed the title Feat/5813 ETQ Admin, je peux ajouter/supprimer des experts notifiables Mar 30, 2021
@kara22 kara22 requested review from kemenaran and tchak March 30, 2021 15:57
@kara22 kara22 force-pushed the feat/5813 branch 6 times, most recently from 358aa08 to ebacc87 Compare April 1, 2021 13:53
@kara22 kara22 requested review from kemenaran and tchak April 1, 2021 14:10
Copy link
Contributor

@kemenaran kemenaran left a comment

Choose a reason for hiding this comment

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

LGTM.

Est-ce qu'on essaie quand même de séparer les deux actions dans un ExpertsProcedureController, ou tu penses que c'est pas la peine ?

@@ -206,7 +208,7 @@ def log_out
end

def ask_confidential_avis(to, introduction)
fill_in 'avis_emails', with: to
page.execute_script("document.querySelector('#avis_emails').value = '#{to}'")
Copy link
Contributor

Choose a reason for hiding this comment

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

@krichtof tu avais eu besoin de faire ça, toi, pour que les tests utilisent le ComboMultipleDropdownList ?

Copy link
Contributor

Choose a reason for hiding this comment

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

J'ai même fait pire, pour arriver à faire passer un test :

    # hack because for unknown reason, the click on input doesn't show combobox-popover with selenium driver
    script = "document.evaluate(\"//input[@aria-label='#{champ}']//ancestor::div[@data-reach-combobox]/div[@data-reach-combobox-popover]\", document, null, XPathResult.UNORDERED_NODE_ITERATOR_TYPE, null).iterateNext().removeAttribute(\"hidden\")"
    execute_script(script)

C'est par ici : https://github.com/betagouv/demarches-simplifiees.fr/blob/6845aa69f16ebcc2212b32631183de7665813a5d/spec/support/feature_helpers.rb#L111

Copy link
Contributor

Choose a reason for hiding this comment

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

Hooo, je vois :)

Ok, donc ici on peut utiliser ton helper select_multi, si je comprends bien.

Copy link
Contributor

Choose a reason for hiding this comment

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

Tout à fait !

@kara22
Copy link
Contributor Author

kara22 commented Apr 2, 2021

@kemenaran c'est good j'ai ajouté le experts_procedures_controller dans new_administrateur 👍

@kara22 kara22 requested a review from kemenaran April 2, 2021 14:07
@kara22 kara22 requested a review from tchak April 6, 2021 07:16
@kara22 kara22 force-pushed the feat/5813 branch 2 times, most recently from ac85441 to 8bab293 Compare April 6, 2021 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants