You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING-docs.md
-65
Original file line number
Diff line number
Diff line change
@@ -64,71 +64,6 @@ After you have been assigned to an issue, fork the [json-schema-org/website](htt
64
64
65
65
To propose modifications to our documentation that do not have an issue in the [documentation board](https://github.com/orgs/json-schema-org/projects/16), you can [create a GitHub issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/creating-an-issue#creating-an-issue-from-a-repository) and use the *Documentation* template to describe the changes. After that, you can decide whether you want to work on the changes yourself or let someone else claim the issue. If you decide to work on the issue, assign it to yourself and commit the changes to a new branch.
66
66
67
-
### Writing Tests
68
-
69
-
To ensure the quality and consistency of our documentation, we encourage contributors to write and update tests as part of their contributions. Below is a quick guide to writing tests:
70
-
71
-
### Guidelines for Writing Tests
72
-
73
-
1. Understand the Scope: Identify the purpose of the test and the specific functionality it should validate.
74
-
75
-
-`For new features, write tests that cover all potential scenarios`.
76
-
77
-
-`For bug fixes, include regression tests to prevent reoccurrence`.
78
-
79
-
2. Structure Your Test Cases: A well-structured test includes the following:
80
-
81
-
-`Title`: A concise name describing the purpose of the test.
82
-
83
-
-`Steps`: A clear sequence of actions to execute.
84
-
85
-
-`Expected Results`: The outcomes that confirm the functionality works as intended.
86
-
87
-
3. Use Consistent Naming Conventions: Follow the naming conventions already established in the project. Use meaningful names for test files and methods.
88
-
89
-
4. Run Existing Tests: Before adding new tests, ensure all current tests pass. This helps confirm a stable baseline.
90
-
91
-
5. Iterate and Refactor: Optimize your test cases for readability and maintainability. Avoid duplicating test logic when possible.
92
-
93
-
### Writing Tests with Cypress
94
-
95
-
-`Component Tests`: Add tests for new components in cypress/components.
96
-
97
-
-`E2E Tests`: Add tests for new features or bug fixes in cypress/e2e.
98
-
99
-
-`Enhance Existing Tests`: Improve coverage and robustness of existing tests.
100
-
101
-
Running Tests
102
-
103
-
## Run all tests before submitting a pull request:
104
-
```
105
-
yarn cypress:run:all
106
-
```
107
-
108
-
### Reporting Test Issues
109
-
110
-
If you encounter test problems, open an issue describing the issue and steps to reproduce it.
111
-
112
-
### Resources
113
-
114
-
For additional guidance on writing effective tests, refer to these resources:
115
-
116
-
1.[How to Write Test Cases](https://www.coursera.org/articles/how-to-write-test-cases) - Coursera
117
-
118
-
2.[Manual Test Cases](https://www.testrail.com/blog/manual-test-cases/) - Testrail
119
-
120
-
3.[Effective Test Cases](https://www.testrail.com/blog/effective-test-cases-templates/) - Testrail
121
-
122
-
### Submitting Your Tests
123
-
124
-
When submitting a pull request that includes tests:
125
-
126
-
-`Ensure the test results are included in the pull request description.`
127
-
128
-
-`Highlight any areas of concern or cases where additional review is needed.`
129
-
130
-
-`Tag @json-schema-org/docs-team for assistance if required.`
131
-
132
67
## Create a Pull Request
133
68
134
69
To submit your work to review by the community, open a draft pull request to the `main` upstream branch, and add the issue your pull request solves. Add @json-schema-org/docs-team as a reviewer of your pull request, and let us know in the #documentation Slack channel your pull request is ready for review.
0 commit comments