Bump heartwood version

This fixes the landing page not showing local projects anymore.
This commit is contained in:
Rūdolfs Ošiņš
2024-01-25 11:58:53 +00:00
parent 9ee2a4578f
commit 65e906fd07
8 changed files with 45 additions and 20 deletions
+1 -1
View File
@@ -172,7 +172,7 @@ export class Client {
}
public async getAll(
query?: { page?: number; perPage?: number },
query?: { page?: number; perPage?: number; show?: "pinned" | "all" },
options?: RequestOptions,
): Promise<Project[]> {
return this.#fetcher.fetchOk(
+1 -1
View File
@@ -210,7 +210,7 @@ describe("project", () => {
test("#getPatchById(id, patchId)", async () => {
await api.project.getPatchById(
cobRid,
"7db70f2ed80235db7f0ab9e5537e76572a304991",
"59aa91a1d63a3a1d05292abe6292356a34ea1480",
);
});
+6 -4
View File
@@ -27,10 +27,12 @@ export async function loadHomeRoute(): Promise<
> {
let projects: ProjectBaseUrl[] = [];
if (get(httpdStore).state !== "stopped") {
projects = (await api.project.getAll({ perPage: 30 })).map(project => ({
project,
baseUrl: api.baseUrl,
}));
projects = (await api.project.getAll({ perPage: 30, show: "all" })).map(
project => ({
project,
baseUrl: api.baseUrl,
}),
);
} else {
projects = await getProjectsFromNodes(config.projects.pinned);
}
+1 -1
View File
@@ -50,7 +50,7 @@ export async function loadProjects(
const [nodeStats, projects] = await Promise.all([
api.getStats(),
api.project.getAll({ page, perPage: PROJECTS_PER_PAGE }),
api.project.getAll({ page, perPage: PROJECTS_PER_PAGE, show: "all" }),
]);
const results = await Promise.all(
+17 -8
View File
@@ -49,7 +49,7 @@ test("navigate to project", async ({ page }) => {
await expect(page.getByText("Git test repository")).toBeVisible();
// Number of nodes seeding this project.
await expect(page.getByText("Seed 3")).toBeVisible();
await expect(page.getByText("Seed 4")).toBeVisible();
});
test("show source tree at specific revision", async ({ page }) => {
@@ -475,11 +475,20 @@ test("internal file markdown link", async ({ page }) => {
});
test("diff selection de-select", async ({ page }) => {
await page.goto(
`${cobUrl}/patches/7db70f2ed80235db7f0ab9e5537e76572a304991?tab=changes#README.md:H0L0H0L3`,
);
await page.getByText("Add subtitle to README").click();
await expect(page).toHaveURL(
`${cobUrl}/patches/7db70f2ed80235db7f0ab9e5537e76572a304991?tab=changes`,
);
await page.goto(`${cobUrl}/patches`);
await page
.getByRole("link", { name: "Taking another stab at the README" })
.click();
await page.getByRole("link", { name: "Changes" }).click();
await page
.getByRole("row", { name: "+ # Cobs Repo" })
.locator("div")
.first()
.click();
await expect(page).toHaveURL(new RegExp("tab=changes#README.md:H0L1$"));
// Click outside.
await page
.getByText("1 file changed with 5 insertions and 1 deletion")
.click();
await expect(page).toHaveURL(new RegExp("tab=changes$"));
});
+1 -1
View File
@@ -59,7 +59,7 @@ test("navigate through revision diffs", async ({ page }) => {
.click();
const firstRevision = page.locator(".revision").first();
const firstRevisionId = "a27a6b7";
const firstRevisionId = "59aa91a";
const secondRevision = page.locator(".revision").nth(1);
// Second revision
+1 -1
View File
@@ -1 +1 @@
5dbd9bb2a32dca6aafbd2b4a50dd73d237ca025d
49584f4e732fb0039d2089f3c39fd56fc34a2ee3
+17 -3
View File
@@ -64,9 +64,23 @@ test("diff selection", async ({ page }) => {
};
});
await page.goto(
`${cobUrl}/patches/a27a6b77246e6ada5e81bc8764b5f5c593be80a5?tab=changes#README.md:H0L0H0L3`,
);
await page.goto(`${cobUrl}/patches`);
await page
.getByRole("link", { name: "Taking another stab at the README" })
.click();
await page.getByRole("link", { name: "Changes" }).click();
await page
.getByRole("row", { name: "- # Cobs Repo" })
.locator("div")
.first()
.click();
await page.keyboard.down("Shift");
await page
.getByRole("row", { name: "+ ## Better?" })
.locator("div")
.first()
.click();
await page.keyboard.up("Shift");
await expect(page).toHaveScreenshot({ fullPage: true });
});