Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
ci: run ckeditor5-utils as a browser-mode suite with chromedriver
Elian Doranf804609745e4
diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.ymlindex 3baeb9d15a..75cfc462b5 100644--- a/.github/workflows/dev.yml+++ b/.github/workflows/dev.yml@@ -153,6 +153,29 @@ jobs:flags: ckeditor5fail_ci_if_error: false+ - name: Run the CKEditor 5 utils tests+ run: |+ export CHROMEDRIVER_PATH=$(which chromedriver || find /usr/local/share -name chromedriver -type f 2>/dev/null | head -1)+ echo "Using chromedriver at: $CHROMEDRIVER_PATH"+ pnpm run --filter=ckeditor5-utils test --coverage++ - name: Upload ckeditor5-utils coverage to Codecov+ uses: codecov/codecov-action@v7+ if: always()+ with:+ files: packages/ckeditor5-utils/test-output/vitest/coverage/lcov.info+ flags: ckeditor5-utils+ fail_ci_if_error: false++ - name: Upload ckeditor5-utils test results to Codecov+ uses: codecov/test-results-action@v1+ if: ${{ !cancelled() }}+ with:+ token: ${{ secrets.CODECOV_TOKEN }}+ files: packages/ckeditor5-utils/test-output/vitest/junit.xml+ flags: ckeditor5-utils+ fail_ci_if_error: false+- name: Run the desktop testsrun: pnpm run --filter=desktop test --coverage@@ -194,7 +217,7 @@ jobs:fail_ci_if_error: false- name: Run the rest of the tests- run: pnpm run --filter=\!client --filter=\!standalone --filter=\!server --filter=\!desktop --filter=\!commons --filter=\!ckeditor5-mermaid --filter=\!ckeditor5-math --filter=\!ckeditor5 test+ run: pnpm run --filter=\!client --filter=\!standalone --filter=\!server --filter=\!desktop --filter=\!commons --filter=\!ckeditor5-mermaid --filter=\!ckeditor5-math --filter=\!ckeditor5 --filter=\!ckeditor5-utils testbuild_docker:name: Build Docker imagediff --git a/packages/ckeditor5-utils/src/content_hint_manager.spec.ts b/packages/ckeditor5-utils/src/content_hint_manager.spec.tsindex e4ef66198f..b56cd83ec1 100644--- a/packages/ckeditor5-utils/src/content_hint_manager.spec.ts+++ b/packages/ckeditor5-utils/src/content_hint_manager.spec.ts@@ -230,6 +230,20 @@ describe("ContentHintManager", () => {scoped.destroy();});+ it("preserves a function-form customClass, prepending the content-hint marker class", () => {+ // Bootstrap accepts `customClass` as a function; the manager must keep that+ // shape (rather than coercing to a string) and still stamp CONTENT_HINT_CLASS.+ // The wrapper is invoked by Bootstrap when the popup is shown.+ const scoped = new ContentHintManager({+ tooltipOptions: { customClass: () => "fn-scope" }+ });+ const handle = scoped.createHandle(a, "hello");+ handle.show();+ expect(livePopup()?.classList.contains("fn-scope")).toBe(true);+ expect(livePopup()?.classList.contains(CONTENT_HINT_CLASS)).toBe(true);+ scoped.destroy();+ });+it("marks the popup as a content hint even when the consumer passes no customClass", () => {// Zen mode hides content hints as a group via this class, so it can't depend on// consumers opting in — the collapsible drag-handle hints pass no customClass.