From 0deb5df11dacade2fcb7768f161fab66e51f891c Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sat, 10 Aug 2024 00:26:39 +0300 Subject: [PATCH] docs: Use nicer links to Wiki (dynamic) --- integration-tests/help.spec.ts | 14 ++++++++++++++ src/public/app/services/glob.js | 2 +- src/public/app/services/utils.js | 2 +- .../widgets/attribute_widgets/attribute_detail.js | 4 ++-- src/public/app/widgets/dialogs/add_link.js | 2 +- src/public/app/widgets/dialogs/branch_prefix.js | 2 +- src/public/app/widgets/dialogs/clone_to.js | 2 +- src/public/app/widgets/dialogs/help.js | 2 +- .../widgets/dialogs/protected_session_password.js | 2 +- src/public/app/widgets/dialogs/revisions.js | 2 +- .../app/widgets/search_options/search_string.js | 2 +- src/public/app/widgets/shared_switch.js | 2 +- .../app/widgets/type_widgets/attachment_detail.js | 2 +- .../app/widgets/type_widgets/attachment_list.js | 2 +- .../app/widgets/type_widgets/options/sync.js | 2 +- 15 files changed, 29 insertions(+), 15 deletions(-) create mode 100644 integration-tests/help.spec.ts diff --git a/integration-tests/help.spec.ts b/integration-tests/help.spec.ts new file mode 100644 index 000000000..aa0087328 --- /dev/null +++ b/integration-tests/help.spec.ts @@ -0,0 +1,14 @@ +import test, { expect } from "@playwright/test"; + +test('Complete help in search', async ({ page }) => { + await page.goto('http://localhost:8082'); + + // Clear all tabs + await page.locator('.note-tab:first-of-type').locator("div").nth(1).click({ button: 'right' }); + await page.getByText('Close all tabs').click(); + + await page.locator('#launcher-container').getByRole('button', { name: '' }).first().click(); + await page.getByRole('cell', { name: ' ' }).locator('span').first().click(); + await page.getByRole('button', { name: 'complete help on search syntax' }).click(); + expect((await page.waitForEvent('popup')).url()).toBe("https://triliumnext.github.io/Docs/Wiki/search.html"); +}); \ No newline at end of file diff --git a/src/public/app/services/glob.js b/src/public/app/services/glob.js index 925feaf82..7177a6f95 100644 --- a/src/public/app/services/glob.js +++ b/src/public/app/services/glob.js @@ -27,7 +27,7 @@ function setupGlobs() { window.glob.importMarkdownInline = async () => appContext.triggerCommand("importMarkdownInline"); window.glob.SEARCH_HELP_TEXT = ` - Search tips - also see + Search tips - also see