json-schema-org / json-schema-org/website
Parent Issue: Implement Comprehensive Test Suite for JSON Schema Website (GSoC)
Open
@aialok is already working on this.
Since Jul 19, 2024.
GSoC
Status: Do not close
Status: In Progress
- Dominant language
- HTML
- Stars
- 169
- Forks
- 484
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 6
Description
Overview
Description:
To ensure 100% reliability of the JSON Schema website codebase, we need to achieve 100% code coverage through a comprehensive test suite.
This parent issue tracks the overall progress of creating and implementing a robust testing strategy.
Objectives
- Develop a complete test suite covering all components and functionalities
- Achieve 100% code coverage across the entire codebase
- Implement various types of tests (Unit Testing, UI Testing, etc.)
- Establish continuous integration and automated testing processes
Testing Tools
- Cypress: All types of testing (UI/Component Testing, Unit Testing, etc.)
- Codecov: Code coverage analytics and reports
- GitHub Actions: Running automated testing on pull requests
Implementation Plan
1. Set Up Initial Testing Infrastructure
- #827
- Set up Codecov and integrate with Cypress
- Configure GitHub Actions for automated testing on pull requests
2. Component Tests
- #828
- Create tests for components/Code.tsx
- Create tests for components/DarkModeToggle.tsx
- Create tests for components/DocsHelp.tsx
- Create tests for components/Headlines.tsx
- Create tests for components/JsonEditor.tsx
- Create tests for components/Remember.tsx
- Create tests for components/ScrollButton.tsx
- Create tests for components/Layout.tsx
- Create tests for components/Sidebar.tsx
- Create tests for components/StyledMarkdown.tsx
3. Page Tests ( E2E Tests)
- Homepage
- Specification Page
- Docs Page
- Tools Page
- Blog Page
- Community Page
4. Test Library Utilities (Unit Tests)
- Create tests for lib/config.ts
- Create tests for lib/extractPathWithoutFragment.ts
- Create tests for lib/getFindResultsByGlobalRegEx.ts
- Create tests for lib/getPartsOfJson.ts
- Create tests for lib/getScopesOfParsedJsonSchema.ts
- Create tests for lib/getStaticMarkdownPaths.ts
- Create tests for lib/getStaticMarkdownProps.ts
- Create tests for lib/getStaticPropsFromSingleMarkdownFile.ts
- Create tests for lib/slugifyMarkdownHeadline.ts
- Create tests for lib/useSetUrlParam.ts
Note: This is an initial testing outline. We may need to add or remove files as we progress.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.