Copy TestCafe commands and code...and stuff!
See it live @ https://byrne-greg.github.io/testcafe-cheat-sheet/
Provide a webapp that could be quickly searched to provide copy-able snippets of TestCafe code and commands
To pump out code and learn some more!
Not ideally!
The app renders a few ancillary components but the main action is in <CardContainer>
. This takes in every object of search_mappings.js
and renders. It will filter for particular components based on keyword matches from the search.
search_mappings.js
exports a simple array containing React.lazy
loaded card components along with keyword matches.
Each card component is a concrete card implementation of the cards purpose (e.g. click action card) that renders a base abstract component (e.g. <CodeCard>
). The concrete card imports json data from the snippets/
that relates to it's purpose (e.g. import { action_click } from snippets
). Each code snippet file contains the raw data used in each card (such as code examples, titles, full doc links, etc).