Skip to content

Conversation

@reidbarber
Copy link
Member

@reidbarber reidbarber commented Jul 24, 2024

This scripts loads every docs page in a browser and logs any runtime warnings/errors on page load.

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

yarn test:docs

Optionally specify the browser as an argument (i.e. yarn test:docs webkit), support chromium (default), webkit, and firefox.

🧢 Your Project:

@rspbot
Copy link

rspbot commented Jul 24, 2024

@adobe adobe deleted a comment from rspbot Jul 24, 2024
@ktabors
Copy link
Member

ktabors commented Jul 24, 2024

If you use something like puppeteer-cluster you should be able to parallelize. docs-differ crawls the site using this, but I didn't find much benefit to parallelization, probably because taking the screenshot was too intensive to gain much benefit from multiple threads.

@reidbarber reidbarber changed the title WIP: add script to test docs for warnings/errors add script to test docs for warnings/errors Jul 25, 2024
@reidbarber
Copy link
Member Author

@ktabors Yeah, was going to look into it to potentially speed it up a bit, but probably not needed since this doesn't need to be run too often.

@rspbot
Copy link

rspbot commented Jul 25, 2024

@adobe adobe deleted a comment from rspbot Jul 25, 2024
@rspbot
Copy link

rspbot commented Jul 25, 2024

@adobe adobe deleted a comment from rspbot Jul 25, 2024
@rspbot
Copy link

rspbot commented Jul 29, 2024

@rspbot
Copy link

rspbot commented Jul 30, 2024

snowystinger
snowystinger previously approved these changes Jul 30, 2024
Copy link
Member

@snowystinger snowystinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, not nearly as many issues as I thought there'd be. Question, should the process finish when the errors are collected and done? It appears to stay active.

@rspbot
Copy link

rspbot commented Jul 30, 2024

@adobe adobe deleted a comment from rspbot Jul 31, 2024
});
}

async function getPageLinks() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason you're scanning the raw files instead of the pages from the server for URLs? Less links to look at because you're not having to deal with the sidebar or header navigation? We talked about having the list of links from the start being an intentional optimization.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it seemed a little more organized and you can see the progress as it's running.

if (server && server.process) {
server.process.kill();
}
process.exit(0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!!!

@rspbot
Copy link

rspbot commented Aug 1, 2024

@rspbot
Copy link

rspbot commented Aug 1, 2024

## API Changes

unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any', access: 'private' }
unknown top level export { type: 'any', access: 'private' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }

@reidbarber reidbarber merged commit 617ad2e into main Aug 1, 2024
@reidbarber reidbarber deleted the test-docs branch August 1, 2024 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants