Commit Graph

12 Commits

Author SHA1 Message Date
Teriuihi f68a96c089 Add CORS support for production server
Updated the CORS configuration to include the production server URL. This change ensures that requests from the production environment are properly handled.
2024-08-05 00:23:06 +02:00
Teriuihi 8cb22aae08 Configure system property for conditional test execution
Added a system property 'doNotRunDatabaseTests' in the test configuration to allow conditional skipping of database tests. This helps in running tests selectively during different build scenarios.
2024-08-04 22:54:48 +02:00
Teriuihi 405c2a73bd Fix typo in Gradle build command in Jenkinsfile
Corrected the parameter for skipping database tests from `dontRunDatabaseTests` to `doNotRunDatabaseTests` in the Gradle build step. This ensures the intended tests are skipped during the build process.
2024-08-04 22:53:35 +02:00
Teriuihi cb7bb60178 Disable database tests in Jenkins
Disabled tests that require a database connection to prevent failures in Jenkins where there isn't a database. Updated Jenkinsfile to include a property that skips these tests during the build process.
2024-08-04 22:52:01 +02:00
Teriuihi 4c70082f67 Add Jenkins pipeline for Gradle build and notifications
This commit introduces a new Jenkinsfile configured to build the project using Gradle and archive the resulting artifacts. Additionally, it includes a stage to send build notifications to Discord with details about the build status.
2024-08-04 22:44:13 +02:00
Teriuihi ab9ec4127c Add DB config via command-line arguments
A new setup allows specifying database properties path using command-line arguments during startup. The `DatabaseConnection.initialize()` method signature has been updated to accept a path argument. Methods in `PropertiesLoader`, `PropertiesWriter`, and `MailSettings` classes, along with tests in the `TestForm` class, were adjusted accordingly.
2024-08-04 22:44:03 +02:00
Teriuihi 49af4a3067 Add database configuration via command-line arguments
A new configuration setup now allows specifying a path for database properties via command-line arguments during application startup. This update also changes the call signature for `DatabaseConnection.initialize()` method to accept a path argument. Similarly, methods in `PropertiesLoader`, `PropertiesWriter`, and `MailSettings` classes were also updated to use the specified path when working with properties files. The `TestForm` class's tests were updated accordingly to handle these changes.
2024-04-28 21:25:09 +02:00
Teriuihi 2f1d24598b Update Form HTML output and disable validation auto-configuration
The form-to-HTML output process has been switched from a `<div>` approach to using a `StringBuilder` with a table structure in `ContactFormData.java`. Also, the spring validation auto-configuration has been disabled by adding `exclude = ValidationAutoConfiguration.class` in the `@SpringBootApplication` annotation of `Main.java`. Some changes in `.idea/workspace.xml` and `VerifyController.java` were made as well.
2024-04-28 17:58:43 +02:00
Teriuihi 4ec41d8a7e Mark fields as final in VerificationData and ContactFormData
The 'code', 'eMail' fields in the VerificationData class and 'username', 'email', 'question' fields in the ContactFormData class are now marked as 'final'. At the same time, some unused imports from ContactController, ContactFormData, FormQuery, and VerifyController have been removed for code cleanliness.
2024-01-14 11:20:08 +01:00
Teriuihi 917965a33d Add TestForm class and set up related unit tests
The changes add a new TestForm class to implement unit tests for form handling in the application. The included tests verify the storing, retrieving, and verification of forms from a database, as well as form object creation and confirmation of form data. This is a step towards improving the code's reliability and making it easier to catch potential bugs or issues.
2024-01-14 11:09:35 +01:00
Teriuihi 0464281a38 Refactor code to use Form objects instead of JSON strings
Several parts of the code have been altered to use Form objects instead of JSON strings. Changes include updating the FormQueryResult record type to hold an Optional<Form> instead of an Optional<String>, altering methods in the StoreFormQuery class to insert Form data into the database and replacing JSON handling methods in the FormQuery class with Form object oriented methods. A 'form_class' field has also been added to the 'form' table in the database to aid form identification and reconstruction from stored data.
2024-01-14 11:09:22 +01:00
Teriuihi 2b908b4e94 Initial commit for site for forms 2024-01-13 16:24:54 +01:00