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
All contributions to `SpringUserFramework`**must include appropriate unit tests**. This ensures that the library remains stable, reliable, and maintainable as it grows.
118
+
119
+
### Requirements
120
+
121
+
-**All new features** must include unit tests that thoroughly cover the new functionality.
122
+
-**Bug fixes** should include tests that demonstrate the issue and confirm the fix.
123
+
- If you are **modifying existing code**, you should update or expand the relevant tests to reflect those changes.
124
+
-**All tests must pass** before a pull request will be considered for merging.
125
+
126
+
### Running Tests Locally
127
+
128
+
Before submitting a PR, run the full test suite to ensure your changes do not introduce regressions:
129
+
130
+
```bash
131
+
./gradlew test
132
+
```
133
+
134
+
If you are using an IDE like VSCode or IntelliJ, you can also run the tests from the IDE directly.
135
+
136
+
We may add code coverage reporting tools in the future to help enforce this, but for now, maintainers will review tests as part of the code review process.
137
+
138
+
114
139
## Submitting a Pull Request
115
140
116
141
Once your changes are pushed to your fork, submit a pull request (PR) to the original repository:
@@ -123,6 +148,71 @@ Once your changes are pushed to your fork, submit a pull request (PR) to the ori
123
148
124
149
Your PR will be reviewed by the maintainers. Please be responsive to feedback and willing to make adjustments as needed.
125
150
151
+
152
+
## Contributing to the Demo Frontend
153
+
154
+
If your change involves a **frontend component**, or if it requires a user interface to **showcase or test the functionality** (such as login flows, authentication UIs, or session behavior), you'll also need to contribute to the companion frontend project:
This project is a lightweight web application used to **demonstrate and test** features of the `SpringUserFramework` library.
158
+
159
+
### What You Need to Do
160
+
161
+
1.**Fork the `SpringUserFrameworkDemoApp` repository** as well.
162
+
2. Make changes or add test pages in the demo app to support or demonstrate your backend work.
163
+
3. Submit a separate pull request to the `SpringUserFrameworkDemoApp` repository.
164
+
4. Reference your demo app PR in your main `SpringUserFramework` pull request description, so reviewers can test your changes end-to-end.
165
+
166
+
Keeping the demo app up to date with relevant examples helps others understand how to use the library and ensures that all features are properly tested in a real-world scenario.
167
+
168
+
169
+
170
+
## Testing Local Changes with the Demo App
171
+
172
+
Since `SpringUserFramework` is a **library**, the best way to test your changes is by using the companion project:
This demo app allows you to see how the library behaves in a real application context.
176
+
177
+
### How to Test Your Changes Locally
178
+
179
+
To test updates to the library before submitting a pull request, follow these steps:
180
+
181
+
1.**Install Maven (if not already installed)**
182
+
You'll need Maven installed locally because Gradle publishes the library into your **local Maven cache**.
183
+
184
+
2.**Build and publish the library locally**
185
+
In your fork of `SpringUserFramework`, run:
186
+
187
+
```bash
188
+
./gradlew publishToMavenLocal
189
+
```
190
+
191
+
This will compile the project and publish it as a `.jar` file with a `-SNAPSHOT` version into your local Maven cache (usually located at `~/.m2/repository`).
192
+
193
+
3.**Update the demo app to use your local library**
194
+
In your fork of [`SpringUserFrameworkDemoApp`](https://github.com/devondragon/SpringUserFrameworkDemoApp):
195
+
196
+
- Open `build.gradle`.
197
+
- Update the library dependency to match the `SNAPSHOT` version defined in the `gradle.properties` file from your local library project.
The demo app should now load and use your locally built version of the library. This allows you to interactively test your changes before pushing them upstream.
212
+
213
+
> 💡 Make sure not to commit any version changes to `build.gradle` or `gradle.properties` as the project maintainer is the only one to update versions.
0 commit comments