test(webui): cover contextual help in the browser
This commit is contained in:
@@ -26,6 +26,7 @@ import WorkspaceFrame from "../src/components/WorkspaceFrame";
|
||||
import WorkspaceLayout from "../src/components/WorkspaceLayout";
|
||||
import WorkspaceActionBar from "../src/components/WorkspaceActionBar";
|
||||
import BreadcrumbBar from "../src/layout/BreadcrumbBar";
|
||||
import HelpMenu from "../src/layout/HelpMenu";
|
||||
import { useGuardedNavigate } from "../src/components/UnsavedChangesGuard";
|
||||
import {
|
||||
createQuickAccessLaunchContext,
|
||||
@@ -149,6 +150,7 @@ export default function ConformanceApp() {
|
||||
</section>
|
||||
|
||||
<LaunchContextScenario />
|
||||
{new URLSearchParams(location.search).has("help") ? <HelpConformanceScenario /> : null}
|
||||
</PageLayout>
|
||||
|
||||
<Dialog
|
||||
@@ -170,6 +172,32 @@ export default function ConformanceApp() {
|
||||
);
|
||||
}
|
||||
|
||||
function HelpConformanceScenario() {
|
||||
return (
|
||||
<section className="conformance-section" aria-labelledby="help-heading">
|
||||
<h2 id="help-heading">Kontextsensitive Hilfe</h2>
|
||||
<p>F1 löst den Hilfekontext des fokussierten Bedienelements auf und kehrt nach dem Schließen dorthin zurück.</p>
|
||||
<ActionToolbar surface="subtle">
|
||||
<Button
|
||||
variant="danger"
|
||||
data-testid="f1-retention-action"
|
||||
helpContextId="policy.retention.action.apply"
|
||||
helpModuleId="policy"
|
||||
>
|
||||
Aufbewahrungsregeln anwenden
|
||||
</Button>
|
||||
<Button
|
||||
data-testid="f1-fallback-action"
|
||||
interfaceId="core.conformance.action.review"
|
||||
>
|
||||
Allgemeine Aktion prüfen
|
||||
</Button>
|
||||
<HelpMenu auth={null} />
|
||||
</ActionToolbar>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
function QuickAccessScenario() {
|
||||
const location = useLocation();
|
||||
const mode = new URLSearchParams(location.search).get("quick-access");
|
||||
|
||||
Reference in New Issue
Block a user