Yannick Bungers
79dd9af988
Added await to wait for completion of note creation in tests
...
Signed-off-by: Yannick Bungers <git@innay.de>
2020-09-26 23:40:15 +02:00
Yannick Bungers
6a98412285
Added tests test functions for /me routes
...
Note that they don't contain the functions from the services yet.
Signed-off-by: Yannick Bungers <git@innay.de>
2020-09-26 23:27:24 +02:00
Renovate Bot
ad81c18c4c
Update dependency markmap-lib to v0.8.1
2020-09-26 21:34:05 +02:00
David Mehren
776c230877
NotesService: Add TODO that createNote
still needs to calculate a proper patch
...
Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-26 16:01:01 +02:00
David Mehren
ab4ecf6a8f
UsersService: Merge if-statements and add null
to return type in toUserDto
...
Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-26 16:00:17 +02:00
Renovate Bot
85d01ec874
Update dependency @cypress/webpack-preprocessor to v5.4.6
2020-09-26 10:50:13 +02:00
Renovate Bot
25d2518906
Update dependency vega to v5.16.1
2020-09-26 10:12:46 +02:00
Renovate Bot
abeed703ae
Update dependency codemirror to v5.58.1
2020-09-26 10:06:57 +02:00
Renovate Bot
7c066c4618
Pin dependency webpack-bundle-analyzer to 3.9.0
2020-09-26 10:06:21 +02:00
Renovate Bot
7706dea5a6
Update JS test packages
2020-09-26 10:05:04 +02:00
Renovate Bot
ade44d0fab
Update dependency i18next-http-backend to v1.0.21
2020-09-26 10:03:58 +02:00
Renovate Bot
a602b43e0e
Update dependency moment to v2.29.0
2020-09-26 09:59:57 +02:00
Renovate Bot
5c9a073d43
Update dependency react-i18next to v11.7.3
2020-09-26 09:59:04 +02:00
Renovate Bot
4d268c0329
Update dependency vega-lite to v4.16.2
2020-09-26 09:55:14 +02:00
mrdrogdrog
101292da92
Feature/lazy load components ( #590 )
2020-09-26 09:54:17 +02:00
David Mehren
5bd1259949
RevisionsService: Asynchronously inject NotesService to resolve circular dependency while testing
...
Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-25 20:42:35 +02:00
Philip Molares
9c38655a92
fixed highlight fence in regard to '=' (showLines) and '!' (wrapLines) ( #594 )
...
this was just a simple index problem. The 0. entry of a regex result is the whole string and not the first capture group
added e2e tests to fix this in the future
cypress does currently not support copy to clipboard in firefox so this part of the test is commented out (for the time being)
2020-09-22 23:17:19 +02:00
David Mehren
b9b5af8b7f
Add various missing imports and provider overrides to fix unit tests.
...
Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-22 21:59:09 +02:00
David Mehren
a61127dbd6
Note E2E tests: Use response.body
to get the note content
...
Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-22 21:46:32 +02:00
David Mehren
3c711e8cb8
Note E2E tests: Use the correct revision-id when checking GET /notes/{note}/revisions/{revision-id}
...
Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-22 21:45:56 +02:00
David Mehren
4cf31c1bcb
NotesService: Implement getNoteContent
and getNoteMetdata
...
Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-22 21:45:20 +02:00
David Mehren
bc1c8448df
NotesService: Let createNote
create an actual Note
and introduce createNoteDto
to create & convert in one step.
...
It might be handy to have access to the original `Note` after creating one, so the creation and conversion to a `NoteDto` is now split.
Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-22 21:44:53 +02:00
David Mehren
446d6dec06
RevisionsService: Get note revision from database
...
Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-22 21:42:17 +02:00
David Mehren
4649b6e796
Note E2E tests: The response for the /notes/<id>/revision route does not contain a revisions
property
...
Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-22 21:11:56 +02:00
David Mehren
711358ec0c
Note E2E tests: Await all note-creations and fix test for note-deletion.
...
Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-22 21:10:09 +02:00
David Mehren
05a62b31ee
RevisionService: Implement getNoteRevisionMetadatas
...
Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-22 21:09:14 +02:00
David Mehren
3d4e9a9b92
NotesController: revisionId
is a number
...
Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-22 21:08:14 +02:00
David Mehren
706f3a2360
Public API spec: Update NoteRevisionsMetadata and timestamp definition
...
NoteRevisionsMetadata is an array containing revision data and not an object with a single property containing an array.
Revision timestamps are ISO strings, not UNIX timestamps.
Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-22 21:07:41 +02:00
David Mehren
2140faab07
RevisionMetadataDto: Rename attribute updatedAt
to createdAt
...
Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-22 21:04:55 +02:00
David Mehren
2030141c66
Note E2E tests: Use on-disk sqlite to aid debugging
...
It was helpful to inspect database contents while the code was stopped by the debugger. Therefore the E2E test database is now persisted on disk and cleared before every test-run.
Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-22 20:09:36 +02:00
David Mehren
cf88cde551
NotesService: Use the database for delete and update actions.
...
Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-22 20:07:36 +02:00
David Mehren
05f25b92aa
NotesController: Get text from request body when updating and deleting a note.
...
Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-22 20:06:56 +02:00
David Mehren
d462a571d8
RevisionEntity: Change primary key type from UUID to number
...
The precision of sqlites datetime() timestamp is only one second (see https://www.sqlite.org/lang_datefunc.html ). Therefore we could not order revisions of one note that were created in the same second. To remedy this, the primary key was changed to a monotonically increasing number, which solves the ordering problem.
Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-22 20:06:16 +02:00
David Mehren
1abb472621
NotesController: Get text from request body when creating a named note.
...
Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-22 18:31:20 +02:00
David Mehren
cccd52d1b0
Note E2E tests: Set a non-JSON content-type to avoid Nest trying to parse markdown to JSON.
...
Nest automatically tries to parse incoming requests with application/json as content-type and responds with HTTP 400 if the parsing fails. As our test-note-content is not valid JSON, we need to set another content-type.
Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-22 18:30:22 +02:00
David Mehren
c43448624b
Restructure test setup in Note E2E tests to not load the whole application
...
Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-22 18:27:35 +02:00
David Mehren
8145fc48d1
Update Note E2E tests to use new getNoteDtoByIdOrAlias
method
...
Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-22 17:53:17 +02:00
David Mehren
5d1cc6c339
NotesService: Find note by ID or alias in database
...
This commit also introduces the `getNoteDtoByIdOrAlias` method, that converts a `Note` entity to a `NoteDto`
Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-22 17:34:33 +02:00
David Mehren
21f4cda27c
NoteEntity: Lazy-load revisions
relation
...
Using a `Promise` type in a TypeORM entity automatically enables lazy-loading of that relation.
See https://typeorm.io/#/eager-and-lazy-relations/lazy-relations
Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-22 17:32:35 +02:00
David Mehren
b1cb8025a5
RevisionsService: Implement getLatestRevision
and createRevision
methods
...
Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-22 17:29:59 +02:00
David Mehren
615bd6496b
UsersService: Add null
check to toUserDto()
converter
...
Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-22 17:28:57 +02:00
Erik Michelson
23972ffb16
Add webpack-bundle-analyzer as dev-tool ( #591 )
...
* Add webpack-bundle-analyzer as dev-tool
* Add README information about bundle analysis
2020-09-20 23:22:37 +02:00
mrdrogdrog
985abe230e
Remove unused prop ( #589 )
...
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-09-20 22:55:31 +02:00
mrdrogdrog
cece089a54
fix badges in readme ( #588 )
2020-09-20 16:28:54 +02:00
renovate[bot]
0cebb29ec6
Pin dependencies ( #587 )
...
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-09-19 22:28:25 +02:00
Philip Molares
8e8190b800
Add copy-to-clipboard-button to all code blocks ( #566 )
...
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
Co-authored-by: mrdrogdrog <mr.drogdrog@gmail.com>
Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-09-19 22:24:49 +02:00
Philip Molares
005c80ff55
added markmap support to the markdown-renderer ( #572 )
...
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-09-19 20:34:44 +02:00
renovate[bot]
204f2deb5a
Pin dependencies ( #585 )
...
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-09-19 20:15:33 +02:00
Philip Molares
cac9b7ea37
Expand image button ( #570 )
...
added full-screen image modal when clicking on img's
Co-authored-by: Erik Michelson <github@erik.michelson.eu>
2020-09-19 20:12:57 +02:00
Philip Molares
553cd3577d
add vega-lite diagram ( #574 )
...
added vega-lite diagrams
Update CHANGELOG.md
Co-authored-by: mrdrogdrog <mr.drogdrog@gmail.com>
2020-09-19 19:34:24 +02:00