Add Heartwood translation layer for file diffs

Co-authored-by: xphoniex <dj.2dixx@gmail.com>
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
This commit is contained in:
Rūdolfs Ošiņš
2022-12-29 09:58:59 +01:00
co-authored by xphoniex
parent ca10a69ee5
commit 4bb34023c2
8 changed files with 69 additions and 34 deletions
+8 -4
View File
@@ -48,7 +48,9 @@ test("modified file", async ({ page }) => {
// Diff header.
await expect(
page.locator("text=1 file(s) changed with 1 addition(s) and 4 deletion(s)"),
page.locator(
"text=1 file(s) changed with 1 insertion(s) and 4 deletion(s)",
),
).toBeVisible();
// Diff.
@@ -61,9 +63,9 @@ test("created file", async ({ page }) => {
`${projectFixtureUrl}/remotes/${bobRemote}/commits/d6318f7f3d9c15b8ac6dd52267c53220d00f0982`,
);
await expect(
page.locator("text=1 file(s) created with 9 addition(s) and 0 deletion(s)"),
page.locator("text=1 file(s) added with 9 insertion(s) and 0 deletion(s)"),
).toBeVisible();
await expect(page.locator("text=subconscious.txt created")).toBeVisible();
await expect(page.locator("text=subconscious.txt added")).toBeVisible();
});
test("deleted file", async ({ page }) => {
@@ -71,7 +73,9 @@ test("deleted file", async ({ page }) => {
`${projectFixtureUrl}/remotes/${bobRemote}/commits/cd13c2d9a8a930d64a82b6134b44d1b872e33662`,
);
await expect(
page.locator("text=1 file(s) deleted with 0 addition(s) and 1 deletion(s)"),
page.locator(
"text=1 file(s) deleted with 0 insertion(s) and 1 deletion(s)",
),
).toBeVisible();
await expect(page.locator("text=.hidden deleted")).toBeVisible();
});