Commit Graph
90 Commits
Author SHA1 Message Date
Sebastian Martinez bac15bfdc7 Rename tracking to seeding
Following the heartwood release 6ca7da2 we also rename tracking
to seeding, and update our `radicle-httpd` endpoints and configs.

Also updates test suites to handle new CLI commands.
2023-12-07 09:45:06 +01:00
Sebastian Martinez 0ab1d1ba41 Replace exit-hook with custom event listeners
Instead of relying on the `exit-hook` dependency, we should listen to
`exit`, `SIGINT`, `SIGTERM` and other exceptions, and kill all running
processes.
2023-12-04 20:14:27 +01:00
Sebastian Martinez 3c72bfad48 Update createProject test support function
To pass in more specific props, it's nicer to have it as an opts object.
2023-12-04 11:59:12 +01:00
Thomas Scholtes 3717a18fc8 Consolidate duplicate code to start global HTTP API server 2023-12-04 10:44:58 +01:00
Thomas Scholtes fe39475403 Update heartwood 2023-12-04 10:44:37 +01:00
Sebastian Martinez 095b99fcec Fix issue text horizonal overflow 2023-12-01 12:28:27 +01:00
Sebastian Martinez 575f44e434 Unify lodash imports
We currently use all three ways of importing lodash.
The one that provides us with the smalles bundle size is.

```
import isEqual from "lodash/isEqual";
```

So we should use that everywhere
2023-11-28 09:25:13 +01:00
Thomas Scholtes 999adff9c1 Ensure correct order when setting up fixtures
When setting up the global fixtures we need to ensure that the peers
that create changes sync their changes to the seed (palm). The only
thing necessary is for the peer to discover palm as the seed for the
project. Then `git push rad --all` will sync all changes to palm.

It’s not necessary to listen for any other event and we remove the
corresponding calls to `waitForEvent` or `waitForRoutes`.

In fact, these calls never did anything besides sleep since the
implementation of `waitForEvent` was faulty. We fix that, too.

Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
2023-11-25 06:40:30 +01:00
Thomas Scholtes 456a4287fd Always timeout when waiting for services
We want the tests to fail when one of the services fails to start or
stop.

Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
2023-11-25 06:40:30 +01:00
Thomas Scholtes 72fd099ecd Stop confirming removal of test tmp files
We stop asking for confirmation to remove the folders containing the
static generated fixtures. All the data is programatically generated so
it’s not a big deal if it is lost. In any case the data is retained
after a test run and only deleted before the next test run.

Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
2023-11-23 16:47:14 +01:00
Thomas Scholtes b979862b08 Reuse log prefix colors if we run out
Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
2023-11-23 09:37:13 +01:00
Thomas Scholtes c568757675 tests: Improve peer manager logging
* The log prefix now includes the command name in addition to the peer
  name. This allows us to distinguish `radicle-node` and `radicle-httpd`
  logs as well as the output of commands.
* We also log prettify the JSON event log so it is easier to debug.
* Don’t log ouput of `waitForRoutes`

Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
2023-11-23 09:37:13 +01:00
Thomas Scholtes de64d7c151 Use more descriptive name for making log prefixes
Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
2023-11-23 09:37:13 +01:00
Thomas Scholtes 72352835eb Update heartwood version
The update resulted in changes to all issue and patch IDs. We adapt the
tests so that they do not rely on fixed IDs.

Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
2023-11-23 09:21:37 +01:00
Sebastian Martinez e6c560b58b Fix cob commit listing borderline not expanding 2023-11-20 15:12:34 +01:00
Sebastian Martinez b331f446ee Remove not allowed cursor from Contributors and BranchSelector
Adds also HoverPopover tooltips, with some hints
2023-11-17 10:19:57 +01:00
Sebastian Martinez 0f8bd0d1dc Fix flakiness in comment and reply e2e test 2023-11-15 16:21:47 +01:00
Sebastian Martinez 84addf467d Show node state indicator 2023-11-15 16:21:47 +01:00
Sebastian Martinez 56c87787ed Add e2e tests for editing patches, issues, comments, labels and assignees 2023-11-15 09:32:12 +01:00
Sebastian MartinezandRūdolfs Ošiņš 38fbddeb21 Update test suite to latest heartwood
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
Co-authored-by: Rūdolfs Ošiņš <rudolfs@osins.org>
2023-11-03 15:34:16 +01:00
Rūdolfs Ošiņšanddnlklmn d914710396 Implement new design
Co-authored-by: dnlklmn <pelicansinberlin@gmail.com>
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
2023-10-13 18:05:19 +02:00
Sebastian Martinez 288f55da76 Add syntax highlighting to patch and commit changesets
- This commit doesn't change the way syntax highlighting is done.
- But due to changes in `radicle-httpd` we can highlight the entire
  files of a changeset, and then replace the plain text lines with
  highlighted ones.
- Also highlights only the files currently visible of a changeset.

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-10-05 13:55:00 +02:00
Sebastian Martinez ed5a0b382b Update heartwood
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-09-27 16:40:49 +02:00
Sebastian Martinez 1ef0f9dfd1 Add issue embeds
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-09-27 16:40:49 +02:00
Sebastian Martinez 800a9767d6 Update heartwood version
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-09-18 23:38:13 +02:00
Sebastian Martinez 45830f6cd9 Show local projects instead of network to landing page, if available
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-09-04 12:06:03 +02:00
Sebastian Martinez 7edd6dcdf0 Enable adding and removing reactions
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-08-24 09:23:36 +02:00
Sebastian Martinez 289cf24800 Update heartwood-version
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-08-22 09:54:41 +02:00
Sebastian Martinez cccee12477 Add a NodeConfigurator class, to modify a config.json
Since Heartwood is removing some of the radicle-node options we were
relying on when starting nodes for our tests, we need to move those to
the `config.json` file.

To make it more DX friendly, I added a `NodeConfigurator` class which
reads the correspondig `config.json`, stores it and allows to configure
it before starting a node.

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-08-22 09:54:34 +02:00
Rūdolfs Ošiņš 492ff5b07c Properly handle event streams with readline
The stream would otherwise split longer events into multiple chunks
which would fail to parse.

Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
2023-08-16 09:41:43 +02:00
Rūdolfs Ošiņš 5736083d50 Fix not found and loading error screens
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
2023-08-16 09:35:44 +02:00
Sebastian Martinez 18a5d40b0a Modify network property in config.json to test
To avoid the test nodes to try to connect to the main network,
we need to modify the `config.json` of each node to use the `test`
network

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-08-15 13:25:42 +02:00
Rūdolfs Ošiņš 0146ca00b5 Update the UI to work with the new COB schema
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
2023-08-08 10:53:49 +02:00
Rūdolfs Ošiņš 0d024759d3 Upgrade to the latest heartwood version
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
2023-08-01 16:41:22 +02:00
Sebastian Martinez 4525771264 Use /nodes/ in URL instead of /seeds/
We still allow already published URLs with `/seeds/` in them to be
resolved.

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
2023-07-31 16:58:45 +02:00
Sebastian Martinez 8d798cc93f Adding a new defaultLocalHttpdPort property to the config.json
We use `defaultHttpdPort` for both exposed ports like on
seed.radicle.xyz as also for local ports e.g. radicle.local.
This worked fine, for now but has shown the first issues, when external
ports like 443 show up in the radicle.local connection dashboard.

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-07-31 15:38:36 +02:00
Sebastian Martinez 14ba807e55 Set the httpd port for the test suite to be 8081.
Also where possible use the `config.seeds.defaultHttpdPort` instead of
hardcoding it.

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-07-17 15:19:31 +02:00
Thomas Scholtes 684700a24d Don’t flood Playwright traces with route.continue()
We determine URLs to mock with a URL matcher instead of mocking every
URL and determining the behavior in the route handler. This should be
slightly faster and should result in better debugging experience because
we don’t come across the `route.continue()` event that often.

Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
2023-07-14 09:29:19 +02:00
Sebastian Martinez 205fc814bc Bring reactions to comments and issues
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-07-12 15:36:02 +02:00
Sebastian Martinez 28718ba0cf Add --alias to rad auth
To avoid the popping up of a terminal input field during the
globalFixture setup, we need to pass the wanted alias as a flag.

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-07-12 15:36:02 +02:00
Sebastian Martinez 6e3bcc1998 Update heartwood version
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-07-12 15:36:02 +02:00
Sebastian Martinez 145169d03d Changes necessary for heartwood update
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-07-11 13:59:23 +02:00
Sebastian Martinez db94969f8a Allow httpd API ports to be generated randomly.
To avoid port collisions between tests that can eventually run in
parallel, we need to be able to generate random port numbers.

This commit generates random httpd port numbers for inline tests,
while keeping the current palm seed with the default port number 8080.

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-07-09 14:19:47 +02:00
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
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 555d4da30c Fix some style regressions in patch view
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-07-04 16:33:17 +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 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