question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

check_links.js does not find bad hyperlinks to bookmarks

See original GitHub issue

Where to find the issue

cypress/integration/check_links.js

Describe the issue

check_links.js does not find bad links to bookmarks.

Steps to reproduce

  1. Introduce a bookmark hyperlink error into one of the .json source files For instance, in faq.json change the first occurrence of #international_phone_numbers to #international_phone_number (remove last letter)
  2. run npm run test:open
  3. select check_links.js to run in cypress console
  4. Note that the error is not found. Instead the test shows a success

Link: http://localhost:8000/en/faq/#international_phone_number: expected 200 to equal 200

The bad link <a href='#international_phone_number' target='_blank' rel='noopener noreferrer'>click here to see the phone numbers</a> shows as success.

In the next paragraph the link is correct <a href='#international_phone_numbers' target='_blank' rel='noopener noreferrer'>click here to see the phone numbers</a>

Both the bad link and the good link show as success.

wrong success check links

Suggested change

Since there is a lot of use of hyperlinks to bookmarks (aka anchors) in faq.json and faq_de.json, implement a link check for these hyperlinks either in check_links.js or in a separate cypress JavaScript script.

This is an enhancement request.


Internal Tracking ID: EXPOSUREAPP-9752

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
MikeMcC399commented, Oct 7, 2021

I found an example of a bad hyperlink to a bookmark in

https://github.com/corona-warn-app/cwa-website/blob/master/science/2021-07-08-science-blog-2/index.md on line 22 1. [Basic survey](#24-basic-surveys)

The target should be #24-basic-survey with no “s” at the end.

I found this manually.

Edit: Unfortunately there are several more broken hyperlinks in the science 2 blog in both the English and German versions. I will document these in a separate issue and then submit a PR to correct them.

1reaction
MikeMcC399commented, Oct 21, 2021

The previous https://github.com/corona-warn-app/cwa-website/issues/1836#issuecomment-948488964 has been remediated by PR #1943, so this issue is now completely resolved and ready for closure.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Find Broken Links Using The SEO Spider
Below is a very quick and easy tutorial on how to use the tool as a broken link checker. First of all, you'll...
Read more >
Writing a broken link checker in Swift to analyze my bookmarks
According to the program I ended up writing called Bookmark Tester, I have 1,078 bookmarks and am eager to see how many of...
Read more >
How to Find and Fix Broken Links (5 Methods) - Kinsta
Broken links are bad for user experience and SEO. Check out these different methods to find and fix broken links, without harming ...
Read more >
Troubleshoot links - Adobe Support
Find broken, external, and orphaned links ... Use the Check Links feature to search for broken links and orphaned files (files that still...
Read more >
Find broken links on your site with Xenu's Link Sleuth (TM)
A free multi-threaded link checking software to analyze web sites to find broken links. Runs on Windows 95, 98, NT, 2000, XP, Vista,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found