Actions}
description="Description"
leading={Leading}
metadata={Metadata}
title="Header title"
/>
);
assert.match(html, /]*>Header title<\/h1>/);
assert.match(html, /Description/);
assert.match(html, /Leading/);
assert.match(html, /Metadata/);
assert.match(html, /Actions/);
});
test("RdxPageHeader omits optional wrappers when content is absent", () => {
const html = renderToStaticMarkup();
assert.match(html, /]*>Only title<\/h1>/);
assert.equal((html.match(/
{
const html = renderToStaticMarkup(
Actions}
backLabel="Volver"
onBack={() => undefined}
showStatus
statusLabel="Modificada"
sticky
title="Editar proforma"
>
Secondary content
);
assert.match(html, /sticky top-0/);
assert.match(html, /aria-label="Volver"/);
assert.match(html, /Editar proforma/);
assert.match(html, /Modificada/);
assert.match(html, /Actions/);
assert.match(html, /Secondary content/);
});
test("RdxPageActions renders only populated regions in the expected order", () => {
const html = renderToStaticMarkup(
Overflow}
primary={Primary}
secondary={Secondary}
/>
);
assert.ok(html.indexOf("Secondary") < html.indexOf("Primary"));
assert.ok(html.indexOf("Primary") < html.indexOf("Overflow"));
});
test("RdxPageActions returns null when all regions are empty", () => {
const html = renderToStaticMarkup();
assert.equal(html, "");
});