refactor(divi): DiviTab geht im Reiter „Compatibility“ auf
Der eigene Divi-Reiter entfällt. DiviAdminExtras behält Admin-Hinweis, Orphan-Bereinigung vor der Ausgabe (lit_mcp_compat_profile_load), Hinweis zum nächsten Schritt und zur privaten Testseite (lit_mcp_compat_profile_intro), Zustandstexte mit Quelle (lit_mcp_compat_explanation), Automatik-Notiz und Visual-Builder-Hinweis (lit_mcp_compat_profile_extra) sowie die Spalten Quelle, Probleme und Betroffene Tools über die neue, gegen fehlerhafte Callbacks abgesicherte Erweiterung lit_mcp_compat_capability_columns. Texte, Doku, CSS (lit-mcp-compat-*) und Smoke auf den neuen Reiter umgestellt, tote divi_*-Hinweise entfernt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
85f4138b36
commit
b40b81f585
@@ -85,7 +85,7 @@ pass "lit-site-status: sixteen features released (code), each with its tools"
|
||||
APP_PASSWORD=$(wp user application-password create "$ADMIN_LOGIN" lit-mcp-integration-test --porcelain)
|
||||
HEADERS=$(curl -s -o /dev/null -D - -X POST -H "Host: $HOST" -H 'X-Forwarded-Proto: https' -u "$ADMIN_LOGIN:$APP_PASSWORD" "$BASE/wp-json/lit-mcp/v1/divi-check")
|
||||
echo "$HEADERS" | grep -qi '^HTTP/[0-9.]* 303' || fail "check route must answer 303: $HEADERS"
|
||||
echo "$HEADERS" | grep -qi '^location:.*tab=divi.*lit_mcp_notice=divi_checked' || fail "redirect to the tab: $HEADERS"
|
||||
echo "$HEADERS" | grep -qi '^location:.*tab=compatibility.*lit_mcp_notice=compat_checked' || fail "redirect to the tab: $HEADERS"
|
||||
REPORT=$(wp option get lit_mcp_divi_check_report --format=json)
|
||||
echo "$REPORT" | jq -e '[.steps[] | (.problems == [] and .skipped == false)] | all and length == 5' >/dev/null \
|
||||
|| fail "every check step must be green: $REPORT"
|
||||
@@ -162,31 +162,21 @@ echo (int) $wpdb->get_var($wpdb->prepare(
|
||||
pass "site status: only page-write incompatible (problem and tools named), refusal logged"
|
||||
|
||||
# The admin sees the same table and a notice with a link to the tab (rendered here without a browser).
|
||||
# The tab is taken from the settings page filter, as the plugin wires it (with the tools of every integration).
|
||||
NOTICE=$(wp --user="$ADMIN_LOGIN" eval '$tab = null;
|
||||
foreach (apply_filters(LIT\MCP\Admin\SettingsPage::TABS_FILTER, []) as $candidate) {
|
||||
if ($candidate instanceof LIT\MCP\Integrations\Divi\Admin\DiviTab) {
|
||||
$tab = $candidate;
|
||||
}
|
||||
}
|
||||
$tab ?? exit(1);
|
||||
$tab->renderNotice();')
|
||||
# The notice is the Divi admin extra; the tab is the generic one over the Divi profile (the plugin wires the same
|
||||
# hooks: Divi's columns and notes come through lit_mcp_compat_capability_columns / lit_mcp_compat_profile_extra).
|
||||
NOTICE=$(wp --user="$ADMIN_LOGIN" eval '(new LIT\MCP\Integrations\Divi\Admin\DiviAdminExtras())->renderNotice();')
|
||||
echo "$NOTICE" | grep -q 'Seiten schreiben' || fail "admin notice must name the feature: $NOTICE"
|
||||
echo "$NOTICE" | grep -q 'tab=divi' || fail "admin notice must link to the Divi tab: $NOTICE"
|
||||
echo "$NOTICE" | grep -q 'tab=compatibility' || fail "admin notice must link to the tab Compatibility: $NOTICE"
|
||||
TAB=$(wp --user="$ADMIN_LOGIN" eval '
|
||||
require_once ABSPATH . "wp-admin/includes/template.php";
|
||||
$tab = null;
|
||||
foreach (apply_filters(LIT\MCP\Admin\SettingsPage::TABS_FILTER, []) as $candidate) {
|
||||
if ($candidate instanceof LIT\MCP\Integrations\Divi\Admin\DiviTab) {
|
||||
$tab = $candidate;
|
||||
}
|
||||
}
|
||||
$tab ?? exit(1);
|
||||
$tab->render();')
|
||||
echo "$TAB" | grep -q 'lit-mcp-divi-features' || fail "Divi tab must list the features: $TAB"
|
||||
echo "$TAB" | grep -q 'lit-divi-insert' || fail "Divi tab must name the affected tools: $TAB"
|
||||
echo "$TAB" | grep -q 'lit_mcp_divi_auto_release' || fail "Divi tab must explain the filter: $TAB"
|
||||
pass "admin notice and Divi tab show the incompatible feature with its tools"
|
||||
(new LIT\MCP\Admin\CompatibilityTab(
|
||||
new LIT\MCP\Compatibility\Compatibility([LIT\MCP\Integrations\Divi\Release\DiviProfile::profile()])
|
||||
))->render();')
|
||||
echo "$TAB" | grep -q 'lit-mcp-compat-features' || fail "tab Compatibility must list the features: $TAB"
|
||||
echo "$TAB" | grep -q 'lit-divi-insert' || fail "tab Compatibility must name the affected tools: $TAB"
|
||||
echo "$TAB" | grep -q 'Smoke: Seiten schreiben geändert' || fail "tab Compatibility must show the problem: $TAB"
|
||||
echo "$TAB" | grep -q 'lit_mcp_divi_auto_release' || fail "tab Compatibility must explain the filter: $TAB"
|
||||
pass "admin notice and tab Compatibility show the incompatible feature with its tools"
|
||||
|
||||
# 4. Back to released: writes work again
|
||||
wp transient delete lit_mcp_divi_state >/dev/null
|
||||
@@ -196,14 +186,7 @@ echo "$INSERT" | jq -e '.ok == true' >/dev/null || fail "write must work when re
|
||||
STATUS=$(tool lit-site-status '{}')
|
||||
echo "$STATUS" | jq -e '.components[] | select(.id == "divi") | .features | all(.state == "released")' >/dev/null \
|
||||
|| fail "every feature must be released again: $STATUS"
|
||||
[ -z "$(wp --user="$ADMIN_LOGIN" eval '$tab = null;
|
||||
foreach (apply_filters(LIT\MCP\Admin\SettingsPage::TABS_FILTER, []) as $candidate) {
|
||||
if ($candidate instanceof LIT\MCP\Integrations\Divi\Admin\DiviTab) {
|
||||
$tab = $candidate;
|
||||
}
|
||||
}
|
||||
$tab ?? exit(1);
|
||||
$tab->renderNotice();')" ] \
|
||||
[ -z "$(wp --user="$ADMIN_LOGIN" eval '(new LIT\MCP\Integrations\Divi\Admin\DiviAdminExtras())->renderNotice();')" ] \
|
||||
|| fail "no admin notice while every feature is usable"
|
||||
pass "released again: writing works, matrix green, no admin notice"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user