Skip to content

Instantly share code, notes, and snippets.

View hparcells's full-sized avatar
🏫
School

Hunter Parcells hparcells

🏫
School
View GitHub Profile
@hparcells
hparcells / 1-perspective-js-injection.md
Last active August 13, 2025 13:49
JavaScript injection and Perspective API notes for Ignition's Perspective module.

Ignition Automation Perspective JavaScript Injection

Preoccupied with whether thinking I could, instead of thinking if I should.

The Problem(s)

  • Implementations of certain features within Perspective can be hard, unintuitive, or flat out impossible.
    • Drag and drop, cookies and local storage, debounced input, clipboard, etc...
  • Perspective does not provide the user with all possible HTML events within a component's Event Configuration.
  • Perspective's Markdown component does not parse and run <script> tags, even with props.markdown.escapeHtml=false.
  • You cannot override the default page HTML to add a script to <body>'s onload attribute.
@hparcells
hparcells / jest-with-cypress.md
Last active August 7, 2025 15:27
Using Jest with Crypress

Using Jest with Crypress

If you've ever done unit testing with Jest and tried to configure end-to-end testing with Cypress, you'll know that there's type conflicts between the two.

The solution is quite simple but not entirely intuitive, and many solutions online are counterproductive or flat out don't work. Because I have had to do this process more than once, these are my notes for configuring these two testing libraries.

Configuration

The process includes following two steps, or three if you are using ESLint.