Skip to content

Add Cypress test scaffolding#56

Open
SoryRawyer wants to merge 2 commits intoOpenRefine:masterfrom
SoryRawyer:add-cypress-scaffolding
Open

Add Cypress test scaffolding#56
SoryRawyer wants to merge 2 commits intoOpenRefine:masterfrom
SoryRawyer:add-cypress-scaffolding

Conversation

@SoryRawyer
Copy link
Copy Markdown
Member

Fixes #2

Adds a basic Cypress test suite with a test to ensure the OpenRefine instance under test has the target extension installed. The README, spec.cy.js, and .gitignore files were edited by me and the rest were generated as part of the Cypress installation process.

Adds a basic Cypress test suite with a test to ensure the OpenRefine
instance under test has the target extension installed.
@SoryRawyer SoryRawyer requested a review from tfmorris February 10, 2026 20:03
@magdmartin
Copy link
Copy Markdown
Member

@tfmorris @SoryRawyer It will be nice if we can have this merged prior to the April 23rd community call

Copy link
Copy Markdown
Member

@tfmorris tfmorris left a comment

Choose a reason for hiding this comment

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

I'm not sure this leads the developer far enough down the path that they're likely to implement e2e tests. It seems like they need to build & package the extension by hand, install a test instance of OpenRefine, install the extension in the test instance, start the server, then run the e2e tests by hand. That's a lot of steps.

I think ideally this would be part of a CI workflow which downloads the latest production OpenRefine, installs the freshly built extension in that instance, then runs the extension e2e tests with an empty test workspace. Bonus points for running the main e2e tests to make sure the extension doesn't break any functionality there.

I haven't looked at it, so I have no idea how much work this would be.

@@ -0,0 +1,25 @@
// ***********************************************
// This example commands.js shows you how to
// create various custom commands and overwrite
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
// create various custom commands and overwrite
// create various custom Cypress commands and overwrite

//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })

missing a trailing newline

// ***********************************************************

// Import commands.js using ES2015 syntax:
import './commands' No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
import './commands'
import './commands'

add missing trailing newline

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.

Add Cypress test suite

3 participants