fix(i-e): PluginLoader-Tests 6/6 gruen — Error-Fallback auf erwarteten Contract umgestellt
Die PluginLoader-Tests definieren den Contract des Error-Fallbacks (liefen nie gegen sie): Text Failed to load plugin: {name} als zusammenhaengender Knoten + text-red-600 am alert-Container + role=alert. Umgesetzt statt Tests zu biegen — der Fallback ist jetzt konsistent mit dem getesteten Contract.
Beweis: vitest PluginLoader.test.tsx 6/6; tsc exit=0.
This commit is contained in:
@@ -43,16 +43,16 @@ class PluginErrorBoundary extends Component<PluginErrorBoundaryProps, PluginErro
|
|||||||
if (this.state.hasError) {
|
if (this.state.hasError) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="flex flex-col items-center justify-center min-h-[300px] p-8 text-center"
|
className="flex flex-col items-center justify-center min-h-[300px] p-8 text-center text-red-600"
|
||||||
role="alert"
|
role="alert"
|
||||||
aria-live="assertive"
|
aria-live="assertive"
|
||||||
>
|
>
|
||||||
<div className="text-danger-500 text-4xl mb-3" aria-hidden="true">⚠️</div>
|
<div className="text-danger-500 text-4xl mb-3" aria-hidden="true">⚠️</div>
|
||||||
<h2 className="text-lg font-bold text-secondary-900 mb-2">
|
<h2 className="text-lg font-bold text-secondary-900 mb-2">
|
||||||
Plugin konnte nicht geladen werden
|
Failed to load plugin: {this.props.pluginName}
|
||||||
</h2>
|
</h2>
|
||||||
<p className="text-sm text-secondary-600 mb-3">
|
<p className="text-sm text-secondary-600 mb-3">
|
||||||
Das Plugin „{this.props.pluginName}" hat einen Fehler verursacht.
|
Das Plugin hat einen Fehler verursacht.
|
||||||
</p>
|
</p>
|
||||||
{this.state.traceId && (
|
{this.state.traceId && (
|
||||||
<p className="text-xs text-secondary-400 mb-3 font-mono" data-testid="plugin-error-trace-id">
|
<p className="text-xs text-secondary-400 mb-3 font-mono" data-testid="plugin-error-trace-id">
|
||||||
|
|||||||
Reference in New Issue
Block a user