fix: make CHRNX header fully progressive
This commit is contained in:
13 files changed
+414
-36
No files matched your search
@@ -43,3 +43,15 @@ test('footer user-facing copy lives in an extractable PHP render block', async (
|
||||
assert.ok(render.includes(`'${text}', 'chrnx'`), `${text} must use the chrnx text domain`);
|
||||
}
|
||||
});
|
||||
|
||||
test('header navigation and search copy lives in one extractable PHP render block', async () => {
|
||||
const part = await readProjectFile('parts/header.html');
|
||||
const render = await readProjectFile('blocks/header-tools/render.php');
|
||||
assert.match(part, /<!-- wp:chrnx\/header-tools \/-->/);
|
||||
assert.doesNotMatch(part, /wp:navigation|wp:navigation-link|wp:search|Journal|Primary navigation/);
|
||||
for (const text of ['Primary navigation', 'Journal', 'Projects', 'Music', 'Podcasts', 'About', 'Search', 'Open search']) {
|
||||
assert.ok(render.includes(`'${text}', 'chrnx'`), `${text} must use the chrnx text domain`);
|
||||
}
|
||||
assert.match(render, /home_url\( '\/journal\/' \)/);
|
||||
assert.match(render, /home_url\( '\/' \)/);
|
||||
});
|
||||
Reference in new issue
Block a user