Skip to content

Commit

Permalink
feat: update to drawio-desktop 25.0.2 (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
rlespinasse authored Dec 9, 2024
1 parent 54ce789 commit fce1b2c
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ apt-get update
apt-get install -y xvfb wget libgbm1 libasound2

# Drawio Desktop
DRAWIO_VERSION="24.7.17"
DRAWIO_VERSION="25.0.2"
wget -q https://github.com/jgraph/drawio-desktop/releases/download/v${DRAWIO_VERSION}/drawio-${TARGETARCH}-${DRAWIO_VERSION}.deb
apt-get install -y /opt/drawio-desktop/drawio-${TARGETARCH}-${DRAWIO_VERSION}.deb
rm -rf /opt/drawio-desktop/drawio-${TARGETARCH}-${DRAWIO_VERSION}.deb
Expand Down
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
= Draw.io Desktop Headless docker image

Dockerized headless version of https://github.com/jgraph/drawio-desktop[Draw.io Desktop v24.7.17]
Dockerized headless version of https://github.com/jgraph/drawio-desktop[Draw.io Desktop v25.0.2]

== What it does

Expand Down
4 changes: 1 addition & 3 deletions src/unwanted-security-warnings.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
Failed to call method
Failed to connect to the bus
Failed to post task
Floss manager not present
Init observer found at shutdown
Floss manager service not available
InitializeSandbox
extension not supported
4 changes: 2 additions & 2 deletions tests/base.bats
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ docker_test() {
[ "$status" -eq $status ]
# Test output
if [ -f "tests/expected/$output_file.log" ]; then
diff -u --strip-trailing-cr "tests/output/$output_file-comp.log" "tests/expected/$output_file.log" >"tests/output/$output_file-diff.log"
diff -u --strip-trailing-cr "tests/expected/$output_file.log" "tests/output/$output_file-comp.log" >"tests/output/$output_file-diff.log"
elif [ -f "tests/expected/uniq-$output_file.log" ]; then
diff -u --strip-trailing-cr <(sort -u "tests/output/$output_file-comp.log") "tests/expected/uniq-$output_file.log" >"tests/output/$output_file-diff.log"
diff -u --strip-trailing-cr "tests/expected/uniq-$output_file.log" <(sort -u "tests/output/$output_file-comp.log") >"tests/output/$output_file-diff.log"
fi
if [ -f "tests/output/$output_file-diff.log"]; then
[ "$(cat "tests/output/$output_file-diff.log")" = "" ]
Expand Down
4 changes: 2 additions & 2 deletions tests/output.bats → tests/error.bats
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
docker_test "" 1 "output-unknown-file" "tests/data" -x unknown.drawio
}

@test "Output electron security warning" {
docker_test "-e ELECTRON_DISABLE_SECURITY_WARNINGS=false" 0 "output-electron-security-warning" "tests/data" -x file1.drawio
@test "Output an error on unknown file with electron security warning" {
docker_test "-e ELECTRON_DISABLE_SECURITY_WARNINGS=false" 0 "output-unknown-file-electron-security-warning" "tests/data" -x unknown.drawio
}
2 changes: 1 addition & 1 deletion tests/expected/uniq-output-electron-security-warning.log
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
Floss manager not present, cannot set Floss enable/disable.
Floss manager service not available, cannot set Floss enable/disable.
InitializeSandbox() called with multiple threads in process gpu-process.
dri3 extension not supported.
file1.drawio -> file1.pdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Error: input file/directory not found
Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
Failed to post task from operator()@net/extras/sqlite/sqlite_persistent_shared_dictionary_store.cc:263 to client_task_runner_.
Floss manager service not available, cannot set Floss enable/disable.
InitializeSandbox() called with multiple threads in process gpu-process.
dri3 extension not supported.
16 changes: 10 additions & 6 deletions tests/export.bats
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@
docker_test "" 0 "export-file1" "tests/data" -x file1.drawio
}

@test "Export a drawio file with space in its name" {
docker_test "" 0 "export-file2" "tests/data" -x "file 2.drawio"
@test "Export a drawio file as pdf with electron security warning" {
docker_test "-e ELECTRON_DISABLE_SECURITY_WARNINGS=false" 0 "output-electron-security-warning" "tests/data" -x file1.drawio
}

@test "Export with check command" {
docker_test "" 1 "export-check-firstrun" "tests/data" -export --check file3.drawio
docker_test "" 1 "export-check-secondrun" "tests/data" -export --check file3.drawio
docker_test "" 1 "export-check-thirdrun" "tests/data" -export file3.drawio
@test "Export a drawio file with space in its name" {
docker_test "" 0 "export-file2" "tests/data" -x "file 2.drawio"
}

@test "Export as non-root" {
Expand All @@ -23,3 +21,9 @@
@test "Export using unknown argument" {
docker_test "" 0 "export-file1" "tests/data" --export file1.drawio --wrong-argument
}

@test "Export with check command" {
docker_test "" 1 "export-check-firstrun" "tests/data" -export --check file3.drawio
docker_test "" 1 "export-check-secondrun" "tests/data" -export --check file3.drawio
docker_test "" 1 "export-check-thirdrun" "tests/data" -export file3.drawio
}
2 changes: 1 addition & 1 deletion tests/issue-20.bats → tests/issues.bats
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

. tests/base.bats

@test "Issue 20 - frame bug / svg" {
@test "Issue 20 : frame bug / svg" {
docker_test "" 0 "export-issue-20" "tests/data" -x -f svg issue-20/frame-bug.drawio
diff <(xmllint --format tests/expected/issue-20-frame-bug.svg) <(xmllint --format tests/data/issue-20/frame-bug.svg)
}

0 comments on commit fce1b2c

Please sign in to comment.