A template change can leave card text visible while changing where the card sends the visitor. Write down the navigation behavior you expect before you test the layout. This example uses a product category and one article card, but the same contract works for other internal links.
- Choose a fixture with a known destination, such as an article called “Size guide” that should point to
/guides/sizing/. - In the document response, check for an anchor with the expected href and recognizable text. A client-side click handler can be tested separately if it has its own purpose.
- In the browser, tab to the card link and activate it with Enter. Verify the final URL and the destination’s main heading. Repeat on mobile if the template has a distinct mobile navigation or layout.
- Add a regression fixture for a title with spaces or non-Latin characters. Use the expected stored slug as the comparison target so the test reflects how the CMS actually generates URLs.
When a check fails, preserve the source page URL, expected destination and actual destination. If the href is correct but the final URL is wrong, inspect the redirect chain. If the href is wrong before a click, start with the template or route builder. If the destination is right but a keyboard user cannot activate the link, check the markup and focus behavior.
A small test matrix can cover a current article, an older article and a destination with a known redirect. This makes it easier to tell whether the release changes URL generation, browser interaction or redirects.
This tutorial was drafted with AI assistance for NaslX.

