Radish alpha
r
Radicle web interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
Add spec for expanding commit message
Sebastian Martinez committed 2 years ago
commit 742a8eb1ef473080345f758ab9823d8fb7c513a4
parent f971d777f2d0385f35b0cdb8ca423b76584a5501
1 file changed +18 -0
modified tests/e2e/project/commits.spec.ts
@@ -87,6 +87,24 @@ test("peer and branch switching", async ({ page }) => {
  }
});

+
test("expand commit message", async ({ page }) => {
+
  await page.goto(sourceBrowsingUrl);
+
  await page.locator('role=link[name="6 commits"]').click();
+
  const commitToggle = page
+
    .locator("div")
+
    .filter({ hasText: /^Add a C source file and its binary …$/ })
+
    .getByRole("button", { name: "…" });
+
  await commitToggle.click();
+
  const expandedCommit = page.getByText(
+
    "The binary was compiled with: `gcc -Oz -O3 true.c`. Signed-off-by: Alice Liddell",
+
  );
+

+
  await expect(expandedCommit).toBeVisible();
+
  await commitToggle.click();
+

+
  await expect(expandedCommit).toBeHidden();
+
});
+

test("relative timestamps", async ({ page }) => {
  await page.addInitScript(() => {
    window.initializeTestStubs = () => {