{"id":20595992,"url":"https://github.com/jsplumb-demonstrations/react-nextjs-testing","last_synced_at":"2026-07-08T17:31:16.031Z","repository":{"id":245782100,"uuid":"819189964","full_name":"jsplumb-demonstrations/react-nextjs-testing","owner":"jsplumb-demonstrations","description":"An example of how to use Cypress to test JsPlumb's React integration","archived":false,"fork":false,"pushed_at":"2024-06-24T03:27:01.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"6.x","last_synced_at":"2025-01-17T00:47:18.387Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jsplumb-demonstrations.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-24T02:37:50.000Z","updated_at":"2024-06-24T03:27:28.000Z","dependencies_parsed_at":"2024-06-24T05:34:45.047Z","dependency_job_id":"217b08f0-c850-48d8-b045-febfb89d588b","html_url":"https://github.com/jsplumb-demonstrations/react-nextjs-testing","commit_stats":null,"previous_names":["jsplumb-demonstrations/react-nextjs-testing"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsplumb-demonstrations%2Freact-nextjs-testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsplumb-demonstrations%2Freact-nextjs-testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsplumb-demonstrations%2Freact-nextjs-testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsplumb-demonstrations%2Freact-nextjs-testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsplumb-demonstrations","download_url":"https://codeload.github.com/jsplumb-demonstrations/react-nextjs-testing/tar.gz/refs/heads/6.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242231436,"owners_count":20093636,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T08:14:45.033Z","updated_at":"2025-10-26T14:39:39.170Z","avatar_url":"https://github.com/jsplumb-demonstrations.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Next.js + Cypress + JsPlumb\n\nThis example shows how to configure Cypress to work with Next.js and JsPlumb.\n\n## Key Points\n\n- Ensure you have included the app CSS in the Cypress config located at `cypress/support/component.ts`. In this app we have this declaration:\n\n```javascript\nimport '../../styles/globals.css'  // for JSPLUMB test\n```\n\nThis is important as `globals.css` itself imports JsPlumb's stylesheet, which contains various sane defaults that JsPlumb requires in order to function correctly.  You may also be able to just import JsPlumb's stylesheet:\n\n```javascript\nimport '../../node_modules/@jsplumbtoolkit/browser-ui/css/jsplumbtoolkit.css'  // for JSPLUMB test\n```\n\n- We wrote a couple of helper functions to access the component under test and create a `jsPlumbToolkitTestHarness` from it. These functions are in `components/canvas-component.cy.tsx`; if you wanted to test multiple components a good approach would be to extract this to a common module.  If there is sufficient interest we could ship these helper functions as a separate `@jsplumbtoolkit/browser-ui-react-cypress` package. Drop us a line if that's something you're interested in.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsplumb-demonstrations%2Freact-nextjs-testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsplumb-demonstrations%2Freact-nextjs-testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsplumb-demonstrations%2Freact-nextjs-testing/lists"}