Ryan Mwangi
1bb1db7326
logging: log result.data as I debug. correct synta as wellx
2024-11-07 20:37:23 +03:00
Ryan Mwangi
73135dd9d4
refactor: use ical.js to generate calendar merged and refreshed calendars
2024-11-07 20:27:43 +03:00
Ryan Mwangi
41687e1e22
remove: tests directory
2024-11-07 20:17:37 +03:00
Ryan Mwangi
8e143df754
refactor: replace event addition with ical.js
...
- transition event processing from ical-generator to ical.js
- add logging for event addition to calendar component
- preserve event details (uid, summary, start, end) in new event components
2024-11-07 20:11:48 +03:00
Ryan Mwangi
ffd2fa5370
refactor: switch calendar component creation to ical.js
...
- replace ical-generator with ical.js for VCALENDAR creation
- add logging for component creation process
- set component metadata (prodid, version, name) using ical.js
2024-11-07 20:06:07 +03:00
Ryan Mwangi
1c241c0738
chore: add calendar directory to .gitignore
2024-11-07 16:05:18 +03:00
Ryan Mwangi
69f2f71a2d
test: add test for merging calendars in different timezones and merging date-based and time-based calendars
2024-11-07 16:04:21 +03:00
Ryan Mwangi
708144baa6
test: introduce new shorter calendar test files
2024-11-07 15:32:18 +03:00
Ryan Mwangi
b32696f14c
refactor: refactor endpoint to serve refreshed merge calendars
2024-11-07 14:43:41 +03:00
Ryan Mwangi
cdc25981b5
refactor: streamline calendar refresh logic with refreshCalendarData helper
2024-11-07 14:35:25 +03:00
Ryan Mwangi
1dde451f9d
refactor: refactor endpoint to merge calendars
2024-11-07 14:33:24 +03:00
Ryan Mwangi
00f5fedb2a
refactor: encapsulate calendar file saving with saveCalendarFile helper
2024-11-07 14:25:02 +03:00
Ryan Mwangi
1bc7119b08
refactor: modularize event merging with mergeCalendarEvents helper
2024-11-07 14:23:24 +03:00
Ryan Mwangi
0c61cb0e7c
refactor: centralize calendar data retrieval with fetchCalendarData helper
2024-11-07 14:20:56 +03:00
Ryan Mwangi
af74d809c4
refactor: refactor sanitizeFilename utility that ensures valid file names
2024-11-07 14:18:18 +03:00
Ryan Mwangi
cf10a62049
refactor: streamline static file serving
2024-11-07 14:11:09 +03:00
xeruf
495557e6c2
refactor: add starter script
2024-11-07 10:28:11 +01:00
xeruf
5b3a47a122
test: run tests and keep assets in subdirectory
2024-11-07 10:20:56 +01:00
xeruf
8eb44e18f6
fix(server.js): properly propagate errors
2024-11-07 10:15:37 +01:00
Ryan Mwangi
6c9fb1139f
fix(tests): ensure calendar file path is correct
...
- Updated file path in merge date-based calendar test to point to the 'calendar' directory within TEST_MERGED_CALENDARS_DIR.
2024-11-07 03:44:11 +03:00
Ryan Mwangi
188a2b713c
Merge remote-tracking branch 'contrib/master'
2024-11-07 02:22:18 +03:00
Ryan Mwangi
4fce46c57e
test: changes on temp folder
2024-11-07 02:18:12 +03:00
xeruf
2a9af9c1d5
test: rearrange test directories
...
WIP - need to adjust code to use proper working directory
2024-11-06 20:58:29 +01:00
Ryan Mwangi
9f036b43cd
chore: Remove debug log for merged calendars directory
...
- Eliminated console log statement that outputs the merged calendars directory path.
- Cleans up the server output and reduces unnecessary logging.
2024-11-06 15:30:19 +03:00
Ryan Mwangi
7bb3811a4d
refactor: Move expected_output folder into temp_test_calendar
...
- Relocated the expected_output directory to temp_test_calendar for better organization.
- Simplified test structure by consolidating test-related files within the temporary directory.
- Improved clarity and maintainability of test resources.
2024-11-06 15:27:39 +03:00
Ryan Mwangi
8a522377c8
fix: Improve cleanup process in test suite
...
- Ensured the server is properly closed before executing cleanup.
- Added a delay to allow for the release of any lingering file handles.
- Enhanced the cleanup logic to safely remove the merged calendars directory after tests.
- Prevented potential EBUSY errors during directory removal.
2024-11-06 15:23:30 +03:00
Ryan Mwangi
f5ff331f2f
fix: Ensure correct merged calendars directory path based on environment
...
- Updated MERGED_CALENDARS_DIR to use path.join for consistent path resolution.
- Ensured that the directory is correctly set to 'temp_test_calendar' during tests and 'calendar' in production.
2024-11-06 15:20:24 +03:00
Ryan Mwangi
488106b299
test: Change the working directory to the test-specific directory
2024-11-06 15:03:34 +03:00
Ryan Mwangi
e8dbc7a0b4
test: Isolate test environment by setting a temporary merged calendars directory
2024-11-06 15:01:33 +03:00
Ryan Mwangi
d6a470237c
feat(tests): implement whole output testing for calendar merging API
2024-11-05 16:02:59 +03:00
Ryan Mwangi
19af32da10
test(calendar.test.js): lead expected output
2024-11-05 15:57:10 +03:00
Ryan Mwangi
07eba543ae
test(expected output): create folder with expected output
2024-11-05 15:54:50 +03:00
Ryan Mwangi
6d4944991c
revert(tests): undo updates to URL assertions in calendar merging API tests
2024-11-05 15:30:41 +03:00
Ryan Mwangi
6bd83a7a56
fix(tests): update URL assertions in calendar merging API tests
2024-11-05 15:26:13 +03:00
Ryan Mwangi
a2468b7dfb
test(calendar.test.js):set us snapshot testing
2024-11-05 15:19:34 +03:00
Ryan Mwangi
6abaa4bd4b
fix(server.js): Determine the merged calendars directory based on the environment
2024-11-05 14:47:25 +03:00
Ryan Mwangi
f50c7a603b
test (calendar.test.js): define temp_test_calendar in server
2024-11-05 14:41:39 +03:00
Ryan Mwangi
996623b3d7
test (calendar.test.js): Add logging
2024-11-05 14:32:53 +03:00
Ryan Mwangi
54d3a35c43
test (calendar.test.js): Check if the file was created in the test directory
2024-11-05 13:43:22 +03:00
Ryan Mwangi
e44f8bf474
test (calendar.test.js): clean up TEST_MERGED_CALENDARS_DIR
2024-11-05 13:33:56 +03:00
Ryan Mwangi
0fc02c579d
test(calendar.test.js):Ensure the test merged calendars directory exists
2024-11-04 21:21:58 +03:00
Ryan Mwangi
b7a419f9cb
test(calendar.test.js):Set environment variable for the test directory
2024-11-04 21:20:33 +03:00
Ryan Mwangi
5cfd0955f1
chore(server.js):Update Server Code to Use Environment Variable
2024-11-04 21:14:31 +03:00
ryanmwangi
17c3fb7b85
Merge pull request 'Formatting adjustment in tests' ( #3 ) from janek/CalMerger:master into master
...
Reviewed-on: ryanmwangi/CalMerger#3
2024-11-04 15:50:40 +00:00
xeruf
d113975ef1
Formatting adjustment in tests
2024-11-04 16:35:10 +01:00
Ryan Mwangi
f67594e072
update other offline calendar for time based events
2024-11-04 15:35:14 +03:00
Ryan Mwangi
4d58b51458
remove previous code for parsing calendar data using ical
2024-11-04 15:26:36 +03:00
Ryan Mwangi
a752485d5e
check if calendar is date based or event based in calendar/:name endpoint
2024-11-04 15:24:33 +03:00
Ryan Mwangi
c264c6b842
parse calendar data in calendar/:name endpoint with ICAL
2024-11-04 15:23:21 +03:00
Ryan Mwangi
c78b0501ea
import ICAL from ical.js
2024-11-04 15:21:13 +03:00