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

Aperta
#682 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
52/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
laravel, php

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
PHP
Stelle
1
Fork
1
Merge medio
1h 40m
PR unite (30g)
143

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di temecms/teme

Tutte le issue di temecms/teme

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.