title: How to get full list of Gatsby.js routes/endpoints in Cypress tests
body: <p>I am currently writing some E2E tests with Cypress for a Gatsby based project.</p>
  
  <p>For one test in particular, i'd like to loop through all pages of my Gatsby site, and in order to achieve this, I need a test fixture (e.g. <code>endpoints.json</code>) which includes an array of all urls.</p>
  
  <p>I've tried the following methods (but all have limitations):</p>
  
  <p><strong>1. Running a node script to check the folder structure in the <code>src/pages</code> folder</strong> </p>
  
  <p>Limitation - This doesn't account for dynamically generated pages in <code>gatsby-node.js</code> with <code>graphql</code> </p>
  
  <p><strong>2. Running a node script to scrape URLs in the <code>sitemap.xml</code> file generated with <code>gatsby-plugin-sitemap</code></strong></p>
  
  <p>Limitation - The plugin only generated a sitemap.xml file in prod builds and not in dev (cypress runs a dev server)</p>
  
  <p>Would be more than grateful if anyone has a suggestion for how we would get a full list of Gatsby endpoints in this environment. </p>