Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions scripts/preview-browser.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,24 @@ try {
assert.equal(await panes.nth(1).locator('svg > g').getAttribute('filter'), `url(#${filterId})`);
assert.equal(await panes.nth(1).locator('feColorMatrix').count(), 1);
assert.equal(await panes.nth(1).locator('feGaussianBlur').count(), 1);
const pageFooter = page.getByRole('contentinfo');
const copyright = pageFooter.getByText('© 2026 Chenhao Wang', {exact:true});
const repository = pageFooter.getByRole('link', {name:'GitHub repository',exact:true});
assert.equal(await repository.getAttribute('href'), 'https://github.com/implexrr/KindPath');
await landing.getByRole('button', {name:'Scan website',exact:true}).focus();
await page.keyboard.press('Tab');
assert.ok(await repository.evaluate(node => node === document.activeElement && node.matches(':focus-visible')));
await repository.blur();
const landingImages = {};
for (const [size, width, height] of [['desktop', 1200, 720], ['mobile', 390, 740]]) {
await page.setViewportSize({width, height});
const [left, right] = await panes.evaluateAll(nodes => nodes.map(node => node.getBoundingClientRect().toJSON()));
const form = await landing.locator('form').boundingBox();
const owner = await copyright.boundingBox();
const link = await repository.boundingBox();
assert.ok(owner.x + owner.width < link.x, 'Footer items must sit apart');
assert.ok(Math.abs(owner.y + owner.height / 2 - link.y - link.height / 2) < 1, 'Footer items must align on the same row');
assert.ok(link.height >= (size === 'mobile' ? 44 : 24), 'The link must have a usable target height');
assert.equal(left.top, right.top);
assert.ok(left.right < right.left);
if (size === 'mobile') assert.ok(left.top > form.y + form.height);
Expand Down
5 changes: 4 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ export function App() {
</div>
</section>}
</main>
<footer>KindPath</footer>
<footer>
<span>© 2026 Chenhao Wang</span>
<a href="https://github.com/implexrr/KindPath">GitHub repository <span aria-hidden="true">↗</span></a>
</footer>
</>;
}
6 changes: 4 additions & 2 deletions src/styles.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading