- Infrastructure test : StreamlitApp helper, réinitialisation session, serveur dédié port 8502 - Scénario Fiches : sélection dossier Assemblage + fiche casques VR - Scénario Analyse : Serveur→Pays géo, Germanium, Chine, filtre IHH Pays, vérification Sankey - Scénario Plan d'action : Serveur + Germanium, vérification dashboard criticités Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
36 lines
1.2 KiB
Python
36 lines
1.2 KiB
Python
"""Test E2E – Scénario 3 : Plan d'action Serveur + Germanium."""
|
||
|
||
import pytest
|
||
from playwright.sync_api import expect
|
||
|
||
pytestmark = pytest.mark.integration
|
||
|
||
|
||
def test_plan_action_serveur_germanium(app):
|
||
"""Soumet Serveur + Germanium et vérifie le dashboard de résultats."""
|
||
page = app.page
|
||
|
||
# Naviguer vers l'onglet Plan d'action
|
||
app.naviguer_vers("Plan d'action")
|
||
expect(page.get_by_role("heading", name="Analyse du graphe pour action")).to_be_visible(timeout=15000)
|
||
|
||
# Sélectionner le produit final : Serveur
|
||
app.ajouter_multiselect("noeuds de départ", "Serveur")
|
||
|
||
# Ajouter le minerai : Germanium
|
||
app.ajouter_multiselect("minerais", "Germanium")
|
||
|
||
# Soumettre la demande
|
||
app.cliquer_bouton("Soumettre")
|
||
|
||
# Vérifier le dashboard (stage 1)
|
||
expect(page.get_by_text("Panneau de sélection")).to_be_visible(timeout=30000)
|
||
expect(page.get_by_text("Top chaînes critiques")).to_be_visible()
|
||
|
||
# Vérifier la chaîne critique principale
|
||
expect(page.get_by_text("Serveur ↔ Carte mère ↔ Germanium").first).to_be_visible()
|
||
|
||
# Vérifier les criticités
|
||
expect(page.get_by_text("Synthèse des criticités")).to_be_visible()
|
||
expect(page.get_by_text("Criticité globale").first).to_be_visible()
|