mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-03 10:40:30 +08:00
Update seed fixture to latest heartwood commit
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
This commit is contained in:
@@ -40,7 +40,7 @@ export RAD_HOME=$PALM_RAD_HOME
|
||||
export RAD_SEED=ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee
|
||||
|
||||
rad auth
|
||||
radicle-node --listen 0.0.0.0:3446 --git-daemon 0.0.0.0:4446 &
|
||||
radicle-node --listen 0.0.0.0:3446 --git-daemon 0.0.0.0:4446 --tracking-policy track --tracking-scope all &
|
||||
|
||||
### ALICE ###
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
REV=f1de61ad8897a845f2be49e3e2b2951bc678b678
|
||||
REV=646376828d0520035246ccbbfcb82127160cd184
|
||||
|
||||
REPO_ROOT=$(git rev-parse --show-toplevel)
|
||||
FIXTURE=$REPO_ROOT/tests/fixtures/seeds/palm.tar.bz2
|
||||
|
||||
+2
-2
@@ -11,7 +11,7 @@ export class Request {
|
||||
|
||||
constructor(path: string, api: Host) {
|
||||
this.port = api.port;
|
||||
this.base = `${api.scheme}://${api.host}/api`;
|
||||
this.base = `${api.scheme}://${api.host}/api/v1`;
|
||||
this.path = path.startsWith("/") ? path.slice(1) : path;
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ export class Request {
|
||||
|
||||
// Creates a URL with an eventual query string and port.
|
||||
private createUrl(search?: string): string {
|
||||
const baseUrl = this.path ? `${this.base}/v1/${this.path}` : this.base;
|
||||
const baseUrl = this.path ? `${this.base}/${this.path}` : this.base;
|
||||
|
||||
const url = new URL(search ? `${baseUrl}?${search}` : baseUrl);
|
||||
url.port = String(this.port);
|
||||
|
||||
+1
-1
@@ -77,7 +77,7 @@ export interface Person {
|
||||
|
||||
export interface Peer {
|
||||
id: string;
|
||||
person?: Person;
|
||||
heads: Branches;
|
||||
delegate: boolean;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -107,7 +107,7 @@ export function formatRepositoryId(id: string): string {
|
||||
}
|
||||
|
||||
export function truncateId(pubkey: string): string {
|
||||
return `${pubkey.substring(0, 6) + "…" + pubkey.slice(-6)}`;
|
||||
return `${pubkey.substring(0, 6)}…${pubkey.slice(-6)}`;
|
||||
}
|
||||
|
||||
export function formatCommit(oid: string): string {
|
||||
|
||||
@@ -94,7 +94,10 @@
|
||||
{/if}
|
||||
{:else if peer}
|
||||
<span class="peer-id">
|
||||
{formatNodeId(peer)}
|
||||
<span style="display: flex;">
|
||||
<span style="color: var(--color-secondary-5);">did:key:</span>
|
||||
{truncateId(peer)}
|
||||
</span>
|
||||
</span>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -94,7 +94,9 @@ test.describe("project page navigation", () => {
|
||||
});
|
||||
|
||||
test("navigate project paths with a selected peer", async ({ page }) => {
|
||||
const projectTreeURL = `/#${projectFixtureUrl}/remotes/${aliceRemote}`;
|
||||
const projectTreeURL = `/#${projectFixtureUrl}/remotes/${aliceRemote.substring(
|
||||
8,
|
||||
)}`;
|
||||
|
||||
await page.goto(projectTreeURL);
|
||||
await expect(page).toHaveURL(projectTreeURL);
|
||||
|
||||
@@ -90,7 +90,9 @@ test.describe("project page navigation", () => {
|
||||
});
|
||||
|
||||
test("navigate project paths with a selected peer", async ({ page }) => {
|
||||
const projectTreeURL = `${projectFixtureUrl}/remotes/${aliceRemote}`;
|
||||
const projectTreeURL = `${projectFixtureUrl}/remotes/${aliceRemote.substring(
|
||||
8,
|
||||
)}`;
|
||||
|
||||
await page.goto(projectTreeURL);
|
||||
await expect(page).toHaveURL(projectTreeURL);
|
||||
|
||||
+13
-10
@@ -256,16 +256,17 @@ test("peer and branch switching", async ({ page }) => {
|
||||
// Alice's peer.
|
||||
{
|
||||
await page.getByTitle("Change peer").click();
|
||||
await page.locator(`text=${aliceRemote.substring(0, 6)}`).click();
|
||||
await page.locator(`text=${aliceRemote}`).click();
|
||||
await expect(page.getByTitle("Change peer")).toHaveText(
|
||||
` did:key: ${aliceRemote.substring(0, 6)}…${aliceRemote.slice(-6)} `,
|
||||
` did:key: ${aliceRemote
|
||||
.substring(8)
|
||||
.substring(0, 6)}…${aliceRemote.slice(-6)} `,
|
||||
);
|
||||
await expect(
|
||||
page.locator(
|
||||
`text=source-browsing / did:key:${aliceRemote.substring(
|
||||
0,
|
||||
6,
|
||||
)}…${aliceRemote.slice(-6)}`,
|
||||
`text=source-browsing / did:key:${aliceRemote
|
||||
.substring(8)
|
||||
.substring(0, 6)}…${aliceRemote.slice(-6)}`,
|
||||
),
|
||||
).toBeVisible();
|
||||
|
||||
@@ -320,9 +321,11 @@ test("peer and branch switching", async ({ page }) => {
|
||||
// Bob's peer.
|
||||
{
|
||||
await page.getByTitle("Change peer").click();
|
||||
await page.locator(`text=${bobRemote.substring(0, 6)}`).click();
|
||||
await page.locator(`text=${bobRemote}`).click();
|
||||
await expect(page.getByTitle("Change peer")).toHaveText(
|
||||
` did:key: ${bobRemote.substring(0, 6)}…${bobRemote.slice(-6)} `,
|
||||
` did:key: ${bobRemote.substring(8).substring(0, 6)}…${bobRemote.slice(
|
||||
-6,
|
||||
)} `,
|
||||
);
|
||||
await expect(page.getByTitle("Change peer")).not.toHaveText("delegate");
|
||||
|
||||
@@ -341,7 +344,7 @@ test("only one modal can be open at a time", async ({ page }) => {
|
||||
await page.goto(projectFixtureUrl);
|
||||
|
||||
await page.getByTitle("Change peer").click();
|
||||
await page.locator(`text=${aliceRemote.substring(0, 6)}`).click();
|
||||
await page.locator(`text=${aliceRemote}`).click();
|
||||
|
||||
await page.getByText("Clone").click();
|
||||
await expect(page.locator("text=Code font")).not.toBeVisible();
|
||||
@@ -358,7 +361,7 @@ test("only one modal can be open at a time", async ({ page }) => {
|
||||
await page.getByTitle("Change peer").click();
|
||||
await expect(page.locator("text=Code font")).not.toBeVisible();
|
||||
await expect(page.locator("text=Use the Radicle CLI")).not.toBeVisible();
|
||||
await expect(page.locator(`text=${bobRemote.substring(0, 6)}`)).toBeVisible();
|
||||
await expect(page.locator(`text=${bobRemote}`)).toBeVisible();
|
||||
await expect(page.locator("text=feature/branch")).not.toBeVisible();
|
||||
|
||||
await page.locator('button[name="Settings"]').click();
|
||||
|
||||
@@ -5,12 +5,14 @@ import {
|
||||
bobRemote,
|
||||
} from "@tests/support/fixtures.js";
|
||||
|
||||
const modifiedFileFixture = `${projectFixtureUrl}/remotes/${bobRemote}/commits/${"1e0bb83a89b63da815f2fc24e7ae3c5ceb30e0eb"}`;
|
||||
const modifiedFileFixture = `${projectFixtureUrl}/remotes/${bobRemote.substring(
|
||||
8,
|
||||
)}/commits/1e0bb83a89b63da815f2fc24e7ae3c5ceb30e0eb`;
|
||||
|
||||
test("navigation from commit list", async ({ page }) => {
|
||||
await page.goto(projectFixtureUrl);
|
||||
await page.getByTitle("Change peer").click();
|
||||
await page.locator(`text=${bobRemote.substring(0, 6)}`).click();
|
||||
await page.locator(`text=${bobRemote}`).click();
|
||||
await page.locator('role=button[name="Commit count"]').click();
|
||||
|
||||
await page.locator("text=Update readme").click();
|
||||
|
||||
@@ -13,9 +13,11 @@ test("peer and branch switching", async ({ page }) => {
|
||||
// Alice's peer.
|
||||
{
|
||||
await page.getByTitle("Change peer").click();
|
||||
await page.locator(`text=${aliceRemote.substring(0, 6)}`).click();
|
||||
await page.locator(`text=${aliceRemote}`).click();
|
||||
await expect(page.getByTitle("Change peer")).toHaveText(
|
||||
`did:key: ${aliceRemote.substring(0, 6)}…${aliceRemote.slice(-6)} `,
|
||||
` did:key: ${aliceRemote
|
||||
.substring(8)
|
||||
.substring(0, 6)}…${aliceRemote.slice(-6)} `,
|
||||
);
|
||||
|
||||
await expect(page.getByText("Thursday, November 17, 2022")).toBeVisible();
|
||||
@@ -61,9 +63,11 @@ test("peer and branch switching", async ({ page }) => {
|
||||
// Bob's peer.
|
||||
{
|
||||
await page.getByTitle("Change peer").click();
|
||||
await page.locator(`text=${bobRemote.substring(0, 6)}`).click();
|
||||
await expect(page.getByTitle("Change peer")).toHaveText(
|
||||
`did:key: ${bobRemote.substring(0, 6)}…${bobRemote.slice(-6)} `,
|
||||
await page.locator(`text=${bobRemote}`).click();
|
||||
await expect(page.getByTitle("Change peer")).toContainText(
|
||||
` did:key: ${bobRemote.substring(8).substring(0, 6)}…${bobRemote.slice(
|
||||
-6,
|
||||
)} `,
|
||||
);
|
||||
|
||||
await expect(page.getByText("Tuesday, December 20, 2022")).toBeVisible();
|
||||
@@ -104,9 +108,11 @@ test("relative timestamps", async ({ page }) => {
|
||||
await page.locator('role=button[name="Commit count"]').click();
|
||||
|
||||
await page.getByTitle("Change peer").click();
|
||||
await page.locator(`text=${bobRemote.substring(0, 6)}`).click();
|
||||
await page.locator(`text=${bobRemote}`).click();
|
||||
await expect(page.getByTitle("Change peer")).toHaveText(
|
||||
`did:key: ${bobRemote.substring(0, 6)}…${bobRemote.slice(-6)} `,
|
||||
` did:key: ${bobRemote.substring(8).substring(0, 6)}…${bobRemote.slice(
|
||||
-6,
|
||||
)} `,
|
||||
);
|
||||
const latestCommit = page.locator(".commit-teaser").first();
|
||||
await expect(latestCommit).toContainText("Bob Belcher committed now");
|
||||
|
||||
Vendored
BIN
Binary file not shown.
@@ -170,10 +170,12 @@ export function appConfigWithFixture() {
|
||||
}
|
||||
|
||||
export const aliceMainHead = "fcc929424b82984b7cbff9c01d2e20d9b1249842";
|
||||
export const aliceRemote = "z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi";
|
||||
export const bobRemote = "z6MksMTThc1aDU2Ztc43jJUivuyBLNWiLsDf4X65rABe7HbA";
|
||||
export const aliceRemote =
|
||||
"did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi";
|
||||
export const bobRemote =
|
||||
"did:key:z6MksMTThc1aDU2Ztc43jJUivuyBLNWiLsDf4X65rABe7HbA";
|
||||
export const rid = "rad:zKtT7DmF9H34KkvcKj9PHW19WzjT";
|
||||
export const projectFixtureUrl = `/seeds/0.0.0.0/${rid}`;
|
||||
export const seedPort = 8080;
|
||||
export const seedVersion = "0.1.0";
|
||||
export const seedVersion = "0.1.0-6463768";
|
||||
export const seedRemote = "z6Mkk7oqY4pPxhMmGEotDYsFo97vhCj85BLY1H256HrJmjN8";
|
||||
|
||||
@@ -16,7 +16,7 @@ async function assertHttpApiRunning(): Promise<void> {
|
||||
let nodeId: string | undefined = undefined;
|
||||
|
||||
try {
|
||||
const response = await fetch(`http://0.0.0.0:${seedPort}/api`);
|
||||
const response = await fetch(`http://0.0.0.0:${seedPort}/api/v1`);
|
||||
const data = await response.json();
|
||||
nodeId = data.node.id;
|
||||
} catch (err) {
|
||||
|
||||
@@ -21,9 +21,12 @@ test("commits page", async ({ page }) => {
|
||||
};
|
||||
});
|
||||
|
||||
await page.goto(`${projectFixtureUrl}/remotes/${aliceRemote}/history`, {
|
||||
waitUntil: "networkidle",
|
||||
});
|
||||
await page.goto(
|
||||
`${projectFixtureUrl}/remotes/${aliceRemote.substring(8)}/history`,
|
||||
{
|
||||
waitUntil: "networkidle",
|
||||
},
|
||||
);
|
||||
|
||||
await expect(page).toHaveScreenshot({ fullPage: true });
|
||||
});
|
||||
@@ -40,7 +43,9 @@ test("commit page", async ({ page }) => {
|
||||
});
|
||||
|
||||
await page.goto(
|
||||
`${projectFixtureUrl}/remotes/${aliceRemote}/commits/d6318f7f3d9c15b8ac6dd52267c53220d00f0982`,
|
||||
`${projectFixtureUrl}/remotes/${aliceRemote.substring(
|
||||
8,
|
||||
)}/commits/d6318f7f3d9c15b8ac6dd52267c53220d00f0982`,
|
||||
);
|
||||
await expect(page.locator("text=subconscious.txt added")).toBeVisible();
|
||||
await expect(page).toHaveScreenshot({ fullPage: true });
|
||||
|
||||
Reference in New Issue
Block a user