I will eventually have to port my Red GUI database front end and so I was looking for testing tools. I came across https://cypress.io which seems to be fully featured though it may be more demanding of JS knowledge than I have.
Anyway, here's a short script to open up the replpad, and start the chess demo though I had to increase the default timeout from 4 to 5 seconds
describe('Test the replpad', () => {
it('Visits Replpad', () => {
cy.visit('http://hostilefork.com/media/shared/replpad-js/'
)
cy.get('.input').type('do <chess>{enter}')
})
})
So, it opens a browser instance to the replpad, waits until loading is complete, and then waits until the dom has the .input
element present. It then types the chess command. The chess board then pops up.
Here's a quick tutorial on how to select elements.
Installation is just simply
npm install cypress --save-dev
but of course on Windows, you'll need to install node.js
And there's information on how to use with GitHub actions