Skip to content

Commit

Permalink
Render project description in Source view
Browse files Browse the repository at this point in the history
This avoids diplaying escaped characters like & in a description
  • Loading branch information
sebastinez committed Jul 5, 2024
1 parent 7347d03 commit 507580b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/views/projects/Source/ProjectNameHeader.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,5 @@
</div>
</div>
<div class="description" use:twemoji>
{render(project.description)}
{@html render(project.description)}
</div>
13 changes: 12 additions & 1 deletion tests/e2e/project.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
sourceBrowsingUrl,
test,
} from "@tests/support/fixtures.js";
import { changeBranch } from "@tests/support/project";
import { changeBranch, createProject } from "@tests/support/project";
import { expectUrlPersistsReload } from "@tests/support/router";

test("navigate to project", async ({ page }) => {
Expand Down Expand Up @@ -58,6 +58,17 @@ test("navigate to project", async ({ page }) => {
await expect(page.getByText("Git test repository")).toBeVisible();
});

test("project description", async ({ page, peer }) => {
const { rid } = await createProject(peer, {
name: "heartwood",
description: "Radicle Heartwood Protocol & Stack",
});
await page.goto(peer.ridUrl(rid));
await expect(
page.getByText("Radicle Heartwood Protocol & Stack"),
).toBeVisible();
});

test("show source tree at specific revision", async ({ page }) => {
await page.goto(sourceBrowsingUrl);
await page
Expand Down

0 comments on commit 507580b

Please sign in to comment.