Commit Graph
1714 Commits
Author SHA1 Message Date
Thomas Scholtes 999a3a4c30 Use non-dev port for webserver during end-to-end tests
The end-to-end tests no run against the app served on port 3001 so that
we don’t need to shut down the development server.

Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
2023-07-09 13:54:24 +02:00
Thomas Scholtes d7442d23ae Add tests for projectRouteToPath
Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
2023-07-09 13:34:11 +02:00
Thomas Scholtes 2386b7c154 Move project route to path code into project router module
Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
2023-07-09 13:34:11 +02:00
Thomas Scholtes 092f8ad774 Don’t leave line selected when switching blobs
Fixes #906

Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
2023-07-07 07:41:51 +02:00
Thomas Scholtes e0e659f54a Only log errors when something unexpected happens in local node connection
We remove a couple of calls to `console.error()` in the code for the
local node connection. It’s not necessary to log errors that are
expected, for example, if the node is down.

Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
2023-07-06 10:14:34 +02:00
Thomas Scholtes d94b78a784 Simplify branch loading in project route
* Don’t load branches in `commits` view. We the branch selector is not
  enabled there.
* Don’t silently swallow errors when fetching branches. Let the route
  loading mechanism handle errors.
* Don’t use the default branch as the fallback for `branches`. They are
  allowed to be empty and the empty case is handled properly now.

Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
2023-07-05 17:06:42 +02:00
Thomas Scholtes db778f97b1 Remove unnecessary logic in BranchSelector
We remove logic used in the `BranchSelector` component. Instead we
restructure the component properties and rely on the `Browser`,
`History` and `Commit` components to pass values that result in the same
behavior.

Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
2023-07-05 17:06:39 +02:00
Rūdolfs Ošiņš 44e55415d4 Slim down Project header props
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
2023-07-05 14:07:05 +02:00
Rūdolfs Ošiņš 70a876b65f Move SourceBrowsingHeader into the respective sub views
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
2023-07-05 14:07:05 +02:00
Sebastian Martinez 91f5abafd3 Add a UI test flow for issues
Tests:
- Authentication
- Issue creation
- Title editing
- Commenting
- Reply to comment
- Issue state change

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-07-05 13:48:42 +02:00
Sebastian Martinez 8e7e94c896 Add padding to reviews without comment
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-07-04 16:52:18 +02:00
Sebastian Martinez 555d4da30c Fix some style regressions in patch view
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-07-04 16:33:17 +02:00
Rūdolfs Ošiņš 92f6d58dfc Use Link instead of ProjectLink in Issues/Patches/Commits
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
2023-07-04 15:45:05 +02:00
Sebastian Martinez 33594b732f Change some ProjectLink components into Link
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-07-04 14:52:51 +02:00
Sebastian Martinez fc05770775 Split patch revision creation from patch revision events
Also uses same border-radius on comment and other events, and removes
the revision creation as a timeline event.

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-07-04 14:52:51 +02:00
Sebastian Martinez e0261fe69e Add more comments and replies and a rejected review to the test fixtures
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-07-04 14:52:51 +02:00
Sebastian Martinez d91591c908 Make the action var in Issue.svelte reactive to the httpd state
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-07-04 14:14:29 +02:00
Sebastian Martinez 0cd42908e5 Add error handling for issue creation and commenting
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-07-04 14:14:29 +02:00
Sebastian Martinez 3e797a2d08 Make a globalSetup for the httpd-client tests
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-07-04 09:56:23 +02:00
Sebastian Martinez 78663937d1 Add ability to stop test nodes and httpds
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-07-04 09:56:23 +02:00
Sebastian Martinez e5dccba3ff Teardown hanging processes in Vitest
After setting up the global env for the httpd:api tests, there were
tests hanging until the timeout of 10 seconds killed them.

By returning an async function from the globalSetup we can kill them
preemptively.

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-07-04 09:56:23 +02:00
Sebastian Martinez 82941440b9 Replace patch author with revision author in Revision component
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-07-03 22:44:56 +02:00
Thomas Scholtes 1547e4fc39 Restrict parameters for updating project route
We restricted the allowed parameters that are used for project-relative
navigation. This allows us to better understand which of the parameters
are used.

Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
2023-07-03 15:03:53 +02:00
Thomas Scholtes 5d535ff604 Use dedicated commitId parameter for commits route
We use the new parameter instead of the shared revision parameter.

Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
2023-07-03 15:03:53 +02:00
Thomas Scholtes b11e4840f9 Eliminate top-level search parameter from project route
Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
2023-07-03 13:42:26 +02:00
Rūdolfs Ošiņš e95419831a Pass down the search prop only where necessary
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
2023-07-03 13:42:26 +02:00
Thomas Scholtes c6afc56beb Test that route building and parsing leave routes invariant
We replace the tests for `routeToPath` with a test that calls
`pathToRoute(routeToPath(route))`. These test do not only cover the
assertions of the previous tests but also check an important invariant
for route parsing and building.

I’m not using `test.each` here because this makes the tests less
readable.

Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
2023-07-03 13:24:00 +02:00
Sebastian Martinez 9f40fd85b7 Sort projects in seed project listing visual test
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-06-30 10:02:02 +02:00
Sebastian Martinez c04d399cf3 Revert HTML tag escaping
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-06-30 10:01:14 +02:00
Thomas Scholtes 8ef8ce5b81 Run source highlighting in router to prevent showing intermediate state
Fixes #709

Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
2023-06-30 09:52:08 +02:00
Sebastian Martinez dbad9ddeef Remove hack for happy-dom
The update to happy-dom 8.0 did remove the need to do the assignment
hack in `setupVitest`

source: https://github.com/vitest-dev/vitest/issues/2305#issuecomment-1396387954

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-06-30 07:24:30 +02:00
Thomas Scholtes 40f2b3e516 Tests automatically use heartwood binaries from local test folder
It’s not necessary anymore to add the folder with the heartwood test
binaries to `PATH` before running the end-to-end tests.

Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
2023-06-29 11:34:53 +02:00
Rūdolfs Ošiņš 4c101c2567 Move Blob loading into router
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
2023-06-28 17:07:04 +02:00
Sebastian Martinez 742a8eb1ef Add spec for expanding commit message
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-06-28 15:45:01 +02:00
Sebastian Martinez f971d777f2 Add missing moved and copied file operations to Changeset
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2022-11-17 17:50:19 +01:00
Rūdolfs Ošiņš becfd5d8c5 Upgrade dependencies
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
2023-06-28 12:07:33 +02:00
Rūdolfs Ošiņš 3f7a58c489 Handle app URL translation into seed BaseUrl in one place
To make the code easier to reason about we handle all app URL encoding
and decoding and the related seed BaseUrl extraction in a single place.

Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
2023-06-28 10:51:59 +02:00
Rūdolfs Ošiņš bc25367ecb Add remote count to PeerSelector
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
2023-06-28 09:31:08 +02:00
Rūdolfs Ošiņš eba977e14e Add icon to Source tab
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
2023-06-28 09:31:08 +02:00
Rūdolfs Ošiņš 149a5d6fb5 Fix comment schema
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
2023-06-27 18:21:21 +02:00
Sebastian Martinez 72bcfdee5a Add ability to expand a commit message
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-06-27 17:47:55 +02:00
Sebastian Martinez 0e6be19373 Add patch reviewers in sidebar
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-06-27 17:23:37 +02:00
Sebastian Martinez 31be78144f Fix padding issues of project headers on mobile
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-06-27 10:19:56 +02:00
Sebastian Martinez ba57506d6d Update svelte to version 4
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-06-26 14:13:22 +02:00
Sebastian Martinez d51f08d6af Expand browser tree when navigation through relative file links
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-06-26 13:48:49 +02:00
Sebastian Martinez ecabe9b7a8 Escape html tags in marked found outside of code blocks
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-06-26 13:00:20 +02:00
Sebastian Martinez ab222edc52 Reverse commit ordering in patch revisions
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-06-23 13:06:40 +02:00
Sebastian Martinez 44a76ea74f Removing CODEOWNERS file
We currently match all files, so it isn't useful at the moment.

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-06-23 12:39:05 +02:00
Rūdolfs Ošiņš d4650ab482 Simplify project view component
We refactor the project view by moving all sub-view related variables
into the respective sub-views.

Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
2023-06-20 14:59:58 +02:00
Sebastian Martinez 7dab02c273 Change .eslintrc file format to js and add tsconfigRootDir
Depending on the environment and the code editor, there can be issues
for eslint to find the tsconfig.json file.
To avoid that we can define the base folder with `tsconfigRootDir`

refs: https://github.com/typescript-eslint/typescript-eslint/issues/251

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-06-19 15:36:17 +02:00