Supprime le type d'écran "document" et recentre le produit sur le jeu 2D
Le document de cadrage produit cible des formateurs non techniques créant des serious games/quiz gamifiés — l'éditeur générique "document" (blocs de logique en nœuds, timeline d'animation, définitions d'objets/relations, templates réutilisables) est une complexité hors cible que l'effort d'ingénierie récent avait déjà abandonnée au profit du jeu_2d. - Onboarding : ne garde que le parcours "RPG" (jeu_2d), retire Quiz/Embranchement/Créer mon jeu de A à Z (tous document-only) - Suppression en bloc des modules exclusifs au document : routes/elements, routes/element_types, routes/objects, routes/legacy_actions, screens/elements, screens/element_types, screens/widgets, screens/legacy_actions, le rendu render_element_html.py et son cluster, templates/screen_edit.html, templates/game_dashboard.html, flow-editor.js/tabs-and-blocks.js/animation-timeline.js - Dashboard toujours simplifié (un seul mode possible désormais) - Tests document-only supprimés, tests de logique partagée (flow, événements personnalisés, animations) retargetés sur des écrans jeu_2d - Aucune régression jeu_2d : 299 tests passent Carte d'onboarding retravaillée : argumentaire RH non technique (liste à coche, badge "Compatible LMS"), taille et interaction de retournement ajustées.
This commit is contained in:
@@ -30,21 +30,6 @@ def test_sprite_gallery_families_shows_one_tile_per_animal():
|
||||
assert "animal-bunny-02" not in slugs
|
||||
|
||||
|
||||
def test_document_editor_hides_animal_characters_from_a_user_account(user_game, user_client):
|
||||
resp = user_client.post(f"/game/{user_game}/screens/new", data={"name": "Accueil"}, follow_redirects=False)
|
||||
screen_id = resp.headers["Location"].rstrip("/").split("/")[-2]
|
||||
html = user_client.get(f"/game/{user_game}/screens/{screen_id}/edit").get_data(as_text=True)
|
||||
assert "animal-bunny-01" not in html
|
||||
assert "male-adventurer" in html
|
||||
|
||||
|
||||
def test_document_editor_shows_animal_characters_to_admin(game, client):
|
||||
resp = client.post(f"/game/{game}/screens/new", data={"name": "Accueil"}, follow_redirects=False)
|
||||
screen_id = resp.headers["Location"].rstrip("/").split("/")[-2]
|
||||
html = client.get(f"/game/{game}/screens/{screen_id}/edit").get_data(as_text=True)
|
||||
assert "animal-bunny-01" in html
|
||||
|
||||
|
||||
def _create_jeu2d_game_as(post_client, name, slug_owner_client=None):
|
||||
# Fusion des moteurs (voir screens/screens_repo/ensure_schema.py) : un
|
||||
# jeu n'a plus de type propre — seul l'écran créé ensuite par chaque
|
||||
@@ -106,31 +91,6 @@ def test_scene_object_personnage_swap_rejects_animal_character_for_a_user_accoun
|
||||
assert resp.status_code == 403
|
||||
|
||||
|
||||
def test_element_add_rejects_animal_character_for_a_user_account(user_game, user_client):
|
||||
resp = user_client.post(f"/game/{user_game}/screens/new", data={"name": "Accueil"}, follow_redirects=False)
|
||||
screen_id = resp.headers["Location"].rstrip("/").split("/")[-2]
|
||||
resp = user_client.post(
|
||||
f"/game/{user_game}/screens/{screen_id}/elements/add",
|
||||
data={"widget": "personnage", "forge_character": "animal-bunny-01"},
|
||||
)
|
||||
assert resp.status_code == 403
|
||||
|
||||
|
||||
def test_element_set_personnage_data_rejects_animal_character_for_a_user_account(user_game, user_client):
|
||||
resp = user_client.post(f"/game/{user_game}/screens/new", data={"name": "Accueil"}, follow_redirects=False)
|
||||
screen_id = resp.headers["Location"].rstrip("/").split("/")[-2]
|
||||
resp = user_client.post(
|
||||
f"/game/{user_game}/screens/{screen_id}/elements/add", data={"widget": "personnage"}, follow_redirects=False
|
||||
)
|
||||
element_id = int(resp.headers["Location"].rsplit("selected=", 1)[1])
|
||||
resp = user_client.post(
|
||||
f"/game/{user_game}/elements/{element_id}/personnage",
|
||||
data=json.dumps({"source": "forge", "forge_character": "animal-bunny-01"}),
|
||||
content_type="application/json",
|
||||
)
|
||||
assert resp.status_code == 403
|
||||
|
||||
|
||||
def test_list_used_forge_characters_scans_elements_and_scene_objects(client, tmp_game_slug_cleanup):
|
||||
slug = tmp_game_slug_cleanup(_create_jeu2d_game_as(client, "pytest_used_characters"))
|
||||
screen_id = screens.create_screen(slug, "Scène 1")
|
||||
|
||||
Reference in New Issue
Block a user