From 11f60da66db41cda010c40c2364e4918d088f64b Mon Sep 17 00:00:00 2001 From: Duncan Paterson Date: Fri, 11 Apr 2025 12:21:13 +0200 Subject: [PATCH 1/7] Update ci.yml close #76 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9410a7c..096b684 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,7 @@ jobs: - name: Add expath dependencies working-directory: target run: | - wget http://exist-db.org/exist/apps/public-repo/public/templating-1.1.0.xar -O 001.xar + wget http://exist-db.org/exist/apps/public-repo/public/templating-1.2.1.xar -O 001.xar # Install From 911ff6a7e06d85c46fbffb255c56c60a757435fd Mon Sep 17 00:00:00 2001 From: duncdrum Date: Sun, 13 Apr 2025 15:41:27 +0200 Subject: [PATCH 2/7] chore(gitignore): ignore screenshots --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 4fbafcd..ea9d59d 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ node/ .settings/ .vscode/ .DS_Store +src/test/cypress/screenshots/ \ No newline at end of file From 873a282426154138648d8066e74b71f7f8109937 Mon Sep 17 00:00:00 2001 From: duncdrum Date: Sun, 13 Apr 2025 16:12:55 +0200 Subject: [PATCH 3/7] refactor(test): move index to e2e remove from bats --- src/test/bats/smoke-test.bats | 6 ------ src/test/cypress/integration/fundoc_spec.cy.js | 13 +++++++++++++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/test/bats/smoke-test.bats b/src/test/bats/smoke-test.bats index 8217393..ce4b3e0 100644 --- a/src/test/bats/smoke-test.bats +++ b/src/test/bats/smoke-test.bats @@ -44,9 +44,3 @@ result=$(docker logs exist | grep -ow -c 'Unable to open cgroup memory limit file' || true ) [ "$result" -eq 0 ] } - -@test "Reindex db" { - run curl -s -u 'admin:' 'http://127.0.0.1:8080/exist/rest/db/apps/fundocs/modules/reindex.xql' - [ "$status" -eq 0 ] - echo '# ' $output >&3 -} diff --git a/src/test/cypress/integration/fundoc_spec.cy.js b/src/test/cypress/integration/fundoc_spec.cy.js index 3cde740..2d5bb6c 100644 --- a/src/test/cypress/integration/fundoc_spec.cy.js +++ b/src/test/cypress/integration/fundoc_spec.cy.js @@ -2,6 +2,19 @@ /// context('Function Documentation', () => { + before (() => { + // Creat Index before running test + cy.request({ + url: 'http://127.0.0.1:8080/exist/rest/db/apps/fundocs/modules/reindex.xql', + auth: { + user: 'admin', + password: '' + } + }) + .its('body') + .should('equal', '{ "status" : "ok", "message" : "Scan completed! " }') + }) + beforeEach(() => { cy.visit('') }) From 50728cda76212383581824c7cc28b562868cdcc2 Mon Sep 17 00:00:00 2001 From: duncdrum Date: Sun, 13 Apr 2025 16:26:28 +0200 Subject: [PATCH 4/7] fix(test): activate selection make sure app modules are selected upon load close #76 --- src/test/cypress/integration/fundoc_spec.cy.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/test/cypress/integration/fundoc_spec.cy.js b/src/test/cypress/integration/fundoc_spec.cy.js index 2d5bb6c..e60dcbd 100644 --- a/src/test/cypress/integration/fundoc_spec.cy.js +++ b/src/test/cypress/integration/fundoc_spec.cy.js @@ -56,6 +56,10 @@ context('Function Documentation', () => { .click() cy.get('.form-inline > .btn') .should('be.visible') + cy.get('[name=appmodules]') + .check() + cy.get('.form-inline > .btn') + .click() // check module from fundocs itself cy.get('#modules') .contains('http://exist-db.org/xquery/docs') From b41ecc66d3d4ca259d6221719009ffae4c7002aa Mon Sep 17 00:00:00 2001 From: Joe Wicentowski Date: Sat, 13 May 2023 16:14:17 -0400 Subject: [PATCH 5/7] Remove unnecessary type cast --- src/main/xar-resources/modules/app.xql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/xar-resources/modules/app.xql b/src/main/xar-resources/modules/app.xql index 6918417..0acbcd5 100644 --- a/src/main/xar-resources/modules/app.xql +++ b/src/main/xar-resources/modules/app.xql @@ -108,7 +108,7 @@ function app:module($node as node(), $model as map(*), $details as xs:boolean) { order by $order return - app:print-module($module, $funcsInModule, boolean($details)) + app:print-module($module, $funcsInModule, $details) }; declare %private function app:print-module($module as element(xqdoc:xqdoc), $functions as element(xqdoc:function)*, From c442d22a82814b41239e8829eac6167f0fb275e3 Mon Sep 17 00:00:00 2001 From: duncdrum Date: Sun, 13 Apr 2025 16:45:17 +0200 Subject: [PATCH 6/7] chore(pom): bump templating 1.1.0 doesn't run properly on 7 and up see #66 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ca3f960..14d5b2d 100644 --- a/pom.xml +++ b/pom.xml @@ -49,7 +49,7 @@ 1.8 6.2.0 - 1.1.0 + 1.2.1 v18.18.2 10.2.1 From 555ff38a230811aadb309d059032b002497fc707 Mon Sep 17 00:00:00 2001 From: duncdrum Date: Sun, 13 Apr 2025 17:25:50 +0200 Subject: [PATCH 7/7] ci(yml): set lib ver from pom bump java to 21 for exist 7 dynamically set expath dep versions from pom for testing ensure both exist6 and 7 are tested to completion --- .github/workflows/ci.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 096b684..4ed0b57 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,14 +4,14 @@ jobs: build: name: Exist ${{ matrix.exist-version }} (Java ${{ matrix.java-version }}) build and test strategy: - fail-fast: true + fail-fast: false matrix: exist-version: [latest, 6.2.0] - java-version: ['8', '17'] + java-version: ['8', '21'] os: [ubuntu-latest] exclude: - exist-version: 6.2.0 - java-version: 17 + java-version: 21 - exist-version: latest java-version: 8 @@ -28,13 +28,18 @@ jobs: run: | sudo apt-get update sudo apt-get install -y bats + - name: Maven Build run: mvn clean package + - name: set min templating version from pom + run: | + echo "TEMPLATING_VERSION=$(mvn help:evaluate -Dexpression=templating.version -q -DforceStdout)" >> $GITHUB_ENV + - name: Add expath dependencies working-directory: target run: | - wget http://exist-db.org/exist/apps/public-repo/public/templating-1.2.1.xar -O 001.xar + wget http://exist-db.org/exist/apps/public-repo/public/templating-${{ env.TEMPLATING_VERSION }}.xar -O 001.xar # Install