Testing kit: agree to the hosts a plugin takes from its own settings

Abierto
#682 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
52/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
laravel, php

Línea de trabajo

Start in packages/teme-testing at PluginUnderTest::changeSettings() and follow the settings-save path to where the "Agree to let the plugin connect to <host>" check rejects hosts listed in the manifest's hostsFrom. Find how the real admin agreement is recorded (who agreed, for which host) so the kit can replay it, then expose it as an agreeHosts argument or an agreeToHosts() step. Done means a plugin test can save a url/urls setting through the kit and reach the real outbound door without a hand-written fake.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

area/tests type/enhancement when/later

A plugin that talks to a server its owner chooses (a Mastodon server, another site, a hub) takes that host from one of its own url or urls settings, listed under hostsFrom in its manifest. On a real site, saving a new host in such a setting asks the person to tick "Saving lets the plugin connect to ...".

In a test, PluginUnderTest::changeSettings() saves the setting as an administrator, but the kit has no way to tick that agreement, so the save is refused with "Agree to let the plugin connect to , or remove them." The setting can't be saved, so the outbound door never allows the host, and the plugin's main path (the call to that server) can't be tested through the kit's outbound fake.

Expected: a way to agree to the host as an administrator does, for example changeSettings([...], agreeHosts: true) or an agreeToHosts() step that records the agreement and who gave it, running the same checks.

Where: packages/teme-testing, PluginUnderTest::changeSettings().

The plugin's own tests currently fall back to a hand-written fake of the outbound door for that path, which skips the door's checks.

🤖 Generated with Claude Code

Lenguaje dominante
PHP
Estrellas
1
Forks
1
Merge medio
1 h 40 min
PR fusionados (30 d)
143

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de temecms/teme

Todos los issues de temecms/teme

Issues similares

Más issues de PHP

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.