|
@@ -37,7 +37,7 @@ test('create file on disk then delete', async ({ page, block, graphDir }) => {
|
|
|
const results = await searchPage(page, pageTitle);
|
|
|
const firstResultRow = await results[0].innerText()
|
|
|
expect(firstResultRow).toContain(pageTitle);
|
|
|
- expect(firstResultRow).not.toContain("New");
|
|
|
+ expect(firstResultRow).not.toContain("Create");
|
|
|
await closeSearchBox(page);
|
|
|
}
|
|
|
|
|
@@ -51,7 +51,7 @@ test('create file on disk then delete', async ({ page, block, graphDir }) => {
|
|
|
// Test that the page is deleted
|
|
|
const results = await searchPage(page, pageTitle);
|
|
|
const firstResultRow = await results[0].innerText()
|
|
|
- expect(firstResultRow).toContain("New");
|
|
|
+ expect(firstResultRow).toContain("Create");
|
|
|
await closeSearchBox(page);
|
|
|
}
|
|
|
});
|
|
@@ -62,7 +62,7 @@ test("Rename file on disk", async ({ page, block, graphDir }) => {
|
|
|
|
|
|
const testCases = [
|
|
|
// Normal -> NameSpace
|
|
|
- {pageTitle: "User:John", fileName: "User%3AJohn",
|
|
|
+ {pageTitle: "User:John", fileName: "User%3AJohn",
|
|
|
newPageTitle: "User/John", newFileName: "User___John"},
|
|
|
// NameSpace -> Normal
|
|
|
{pageTitle: "#/%23", fileName: "#___%2523",
|
|
@@ -87,7 +87,7 @@ test("Rename file on disk", async ({ page, block, graphDir }) => {
|
|
|
const results = await searchPage(page, pageTitle);
|
|
|
const firstResultRow = await results[0].innerText()
|
|
|
expect(firstResultRow).toContain(pageTitle);
|
|
|
- expect(firstResultRow).not.toContain("New");
|
|
|
+ expect(firstResultRow).not.toContain("Create");
|
|
|
await closeSearchBox(page);
|
|
|
}
|
|
|
|
|
@@ -104,7 +104,7 @@ test("Rename file on disk", async ({ page, block, graphDir }) => {
|
|
|
const firstResultRow = await results[0].innerText()
|
|
|
expect(firstResultRow).toContain(newPageTitle);
|
|
|
expect(firstResultRow).not.toContain(pageTitle);
|
|
|
- expect(firstResultRow).not.toContain("New");
|
|
|
+ expect(firstResultRow).not.toContain("Create");
|
|
|
await closeSearchBox(page);
|
|
|
}
|
|
|
})
|
|
@@ -112,7 +112,6 @@ test("Rename file on disk", async ({ page, block, graphDir }) => {
|
|
|
test('special page names', async ({ page, block, graphDir }) => {
|
|
|
const testCases = [
|
|
|
{pageTitle: "User:John", fileName: "User%3AJohn"},
|
|
|
- // FIXME: Logseq can't creat page starting with "#" in search panel
|
|
|
{pageTitle: "_#%ff", fileName: "_%23%25ff"},
|
|
|
{pageTitle: "_#%23", fileName: "_%23%2523"},
|
|
|
{pageTitle: "@!#%", fileName: "@!%23%"},
|
|
@@ -127,7 +126,7 @@ test('special page names', async ({ page, block, graphDir }) => {
|
|
|
const text = `content for ${pageTitle}`
|
|
|
await block.mustFill(text)
|
|
|
await page.keyboard.press("Enter")
|
|
|
-
|
|
|
+
|
|
|
// Wait for the file to be created on disk
|
|
|
await page.waitForTimeout(2000);
|
|
|
// Validate that the file is created on disk with the content
|