Fix not found and loading error screens

Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
This commit is contained in:
Rūdolfs Ošiņš
2023-08-16 09:35:44 +02:00
parent 0e33915e9a
commit 5736083d50
15 changed files with 240 additions and 155 deletions
+20 -2
View File
@@ -245,6 +245,24 @@ export function appConfigWithFixture() {
},
projects: {
pinned: [
{
name: "cobs",
id: "rad:z3fpY7nttPPa6MBnAv2DccHzQJnqe",
baseUrl: {
hostname: "127.0.0.1",
port: 8081,
scheme: "http",
},
},
{
name: "markdown",
id: "rad:z2tchH2Ti4LxRKdssPQYs6VHE5rsg",
baseUrl: {
hostname: "127.0.0.1",
port: 8081,
scheme: "http",
},
},
{
name: "source-browsing",
id: "rad:z4BwwjPCFNVP27FwVbDFgwVwkjcir",
@@ -349,11 +367,11 @@ export async function createSourceBrowsingFixture(
await bob.git(["push", "rad"], { cwd: bobProjectPath });
await bob.waitForEvent(
{ type: "refs-synced", remote: palm.nodeId, rid },
{ type: "refsSynced", remote: palm.nodeId, rid },
2000,
);
await bob.waitForEvent(
{ type: "refs-synced", remote: alice.nodeId, rid },
{ type: "refsSynced", remote: alice.nodeId, rid },
2000,
);
await alice.stopNode();
+13 -8
View File
@@ -24,29 +24,34 @@ export type RefsUpdate =
export type NodeEvent =
| {
type: "refs-fetched";
type: "refsFetched";
remote: string;
rid: string;
updated: RefsUpdate[];
}
| {
type: "refs-synced";
type: "refsSynced";
remote: string;
rid: string;
}
| {
type: "seed-discovered";
type: "seedDiscovered";
rid: string;
nid: string;
}
| {
type: "seed-dropped";
type: "seedDropped";
nid: string;
rid: string;
}
| {
type: "peer-connected";
type: "peerConnected";
nid: string;
}
| {
type: "peerDisconnected";
nid: string;
reason: string;
};
export interface RoutingEntry {
@@ -340,7 +345,7 @@ export class RadiclePeer {
});
await this.waitForEvent(
{ type: "seed-discovered", rid, nid: this.nodeId },
{ type: "seedDiscovered", rid, nid: this.nodeId },
6000,
);
}
@@ -356,11 +361,11 @@ export class RadiclePeer {
);
await this.waitForEvent(
{ type: "peer-connected", nid: remote.nodeId },
{ type: "peerConnected", nid: remote.nodeId },
1000,
);
await remote.waitForEvent(
{ type: "peer-connected", nid: this.nodeId },
{ type: "peerConnected", nid: this.nodeId },
1000,
);
}