16 Commits

Author SHA1 Message Date
Johannes Zellner
8fdae7271a Bump version 2024-09-18 13:47:27 +02:00
Johannes Zellner
a37c8c398f Make tests language independent 2024-09-18 13:40:48 +02:00
Johannes Zellner
365763a684 Update test deps 2024-09-18 11:12:51 +02:00
Johannes Zellner
6ec68a57e5 Update to 6.5 2024-09-18 11:12:34 +02:00
Girish Ramakrishnan
8d35c6b967 Version 1.13.0 2024-08-10 10:17:09 +02:00
Girish Ramakrishnan
c9ed0c7342 Update test packages 2024-08-10 10:02:48 +02:00
Girish Ramakrishnan
eb246a1d9b Update Traccar to 6.4 2024-08-10 09:49:20 +02:00
Girish Ramakrishnan
f59f9b73da Version 1.12.0 2024-07-29 09:51:07 +02:00
Girish Ramakrishnan
fe4d7e7bb3 Update test packages 2024-07-29 09:50:11 +02:00
Girish Ramakrishnan
4999cf00b1 Update Traccar to 6.3 2024-07-29 08:39:22 +02:00
Girish Ramakrishnan
e507297c6e Version 1.11.1 2024-06-13 12:00:02 +02:00
Girish Ramakrishnan
734dd6c167 delete oidc config only on first run 2024-06-13 11:14:20 +02:00
Girish Ramakrishnan
fc14c89b3e Fix up tests 2024-06-13 10:56:00 +02:00
Girish Ramakrishnan
a0e893fbde do not delete oidc config in non-sso mode 2024-06-13 10:55:52 +02:00
Girish Ramakrishnan
8a4cdc2b03 Version 1.11.0 2024-06-06 14:58:20 +02:00
Vladimir D
b6945531b8 OIDC auth implemented, tests updated 2024-06-06 15:56:06 +04:00
9 changed files with 297 additions and 197 deletions

View File

@@ -110,3 +110,39 @@
* Terms and privacy policy option * Terms and privacy policy option
* Engine hours are now calculated after computed attributes * Engine hours are now calculated after computed attributes
* Default configuration file is now removed to avoid confusion and misconfiguration * Default configuration file is now removed to avoid confusion and misconfiguration
[1.11.0]
* Migrate to OIDC login
[1.11.1]
* Fix bug where OIDC configuration was cleared in non-sso mode
[1.12.0]
* Update traccar to 6.3
* [Full changelog](https://www.traccar.org/blog/traccar-6-3/)
* Health check on the volume of stored messages
* Fix push notifications for read-only users
* Use official Google Map tiles with an API key
* Add Google traffic overlay
* New reverse geocoding options
* Faster device removal without removing history
* Avoid duplicated tasks with horizontal scaling
* Add a users column to the device list
* Clear attribute on null computation result
[1.13.0]
* Update traccar to 6.4
* [Full changelog](https://www.traccar.org/blog/traccar-6-4/)
* critical fix for device freezing issue
[1.14.0]
* Update traccar to 6.5
* [Full changelog](https://www.traccar.org/blog/traccar-6-5/)
* Handling processing errors to fix freezing devices
* Option to use linked driver as the current driver
* Support multiple alarms in a single position
* Improve web app loading experience
* Google Maps fallback option with no API key
* Wialon position forwarding option
* Fix map attribution control

View File

@@ -5,8 +5,8 @@
"description": "file://DESCRIPTION.md", "description": "file://DESCRIPTION.md",
"changelog": "file://CHANGELOG.md", "changelog": "file://CHANGELOG.md",
"tagline": "Modern GPS Tracking Platform", "tagline": "Modern GPS Tracking Platform",
"version": "1.10.0", "version": "1.14.0",
"upstreamVersion": "6.2", "upstreamVersion": "6.5",
"minBoxVersion": "7.1.0", "minBoxVersion": "7.1.0",
"memoryLimit": 1073741824, "memoryLimit": 1073741824,
"healthCheckPath": "/", "healthCheckPath": "/",
@@ -20,10 +20,10 @@
} }
}, },
"addons": { "addons": {
"ldap": {},
"sendmail": { "supportsDisplayName": false }, "sendmail": { "supportsDisplayName": false },
"localstorage": {}, "localstorage": {},
"mysql": {} "mysql": {},
"oidc": { "loginRedirectUri": "/api/session/openid/callback" }
}, },
"optionalSso": true, "optionalSso": true,
"manifestVersion": 2, "manifestVersion": 2,

View File

@@ -3,7 +3,7 @@ FROM cloudron/base:4.2.0@sha256:46da2fffb36353ef714f97ae8e962bd2c212ca091108d768
RUN mkdir -p /app/code RUN mkdir -p /app/code
WORKDIR /app/code WORKDIR /app/code
ARG VERSION=6.2 ARG VERSION=6.5
RUN wget https://github.com/traccar/traccar/releases/download/v${VERSION}/traccar-linux-64-${VERSION}.zip -O traccar.zip && \ RUN wget https://github.com/traccar/traccar/releases/download/v${VERSION}/traccar-linux-64-${VERSION}.zip -O traccar.zip && \
unzip traccar.zip && \ unzip traccar.zip && \

View File

@@ -4,3 +4,7 @@ This app is pre-setup with an admin account. The initial credentials are:
**Password**: admin<br/> **Password**: admin<br/>
Please change the admin email and password credentials immediately. Please change the admin email and password credentials immediately.
<sso>
By default, Cloudron users have regular users permissions. Permissions can be updated on the user profile page in the admin back-end.
</sso>

View File

@@ -39,6 +39,7 @@ ensure_admin_account() {
echo "=> Ensure traccar.xml config" echo "=> Ensure traccar.xml config"
if [[ ! -f /app/data/traccar.xml ]]; then if [[ ! -f /app/data/traccar.xml ]]; then
cp /app/pkg/traccar.xml.template /app/data/traccar.xml cp /app/pkg/traccar.xml.template /app/data/traccar.xml
[[ -z "${CLOUDRON_OIDC_ISSUER:-}" ]] && sed -e 's/^.*openid\..*$//g' -i /app/data/traccar.xml # do this only first run
fi fi
echo "=> Ensure database settings" echo "=> Ensure database settings"
@@ -52,20 +53,17 @@ xmlstarlet ed --inplace \
# origin # origin
xmlstarlet ed --inplace --update '//properties/entry[@key="web.url"]' -v "${CLOUDRON_APP_ORIGIN}" /app/data/traccar.xml xmlstarlet ed --inplace --update '//properties/entry[@key="web.url"]' -v "${CLOUDRON_APP_ORIGIN}" /app/data/traccar.xml
# ldap # OIDC
if [[ -n "${CLOUDRON_LDAP_URL:-}" ]]; then if [[ -n "${CLOUDRON_OIDC_ISSUER:-}" ]]; then
echo "=> Ensure LDAP settings" echo "=> Ensure OIDC settings"
xmlstarlet ed --inplace \ xmlstarlet ed --inplace \
--update '//properties/entry[@key="ldap.enable"]' -v "true" \ --update '//properties/entry[@key="openid.clientId"]' -v "${CLOUDRON_OIDC_CLIENT_ID}" \
--update '//properties/entry[@key="ldap.url"]' -v "${CLOUDRON_LDAP_URL}" \ --update '//properties/entry[@key="openid.clientSecret"]' -v "${CLOUDRON_OIDC_CLIENT_SECRET}" \
--update '//properties/entry[@key="ldap.base"]' -v "${CLOUDRON_LDAP_USERS_BASE_DN}" \ --update '//properties/entry[@key="openid.issuerUrl"]' -v "${CLOUDRON_OIDC_ISSUER}" \
--update '//properties/entry[@key="ldap.idAttribute"]' -v "username" \ --update '//properties/entry[@key="openid.authUrl"]' -v "${CLOUDRON_OIDC_AUTH_ENDPOINT}" \
--update '//properties/entry[@key="ldap.searchFilter"]' -v '(|(username=:login)(mail=:login))' \ --update '//properties/entry[@key="openid.tokenUrl"]' -v "${CLOUDRON_OIDC_TOKEN_ENDPOINT}" \
--update '//properties/entry[@key="ldap.user"]' -v "${CLOUDRON_LDAP_BIND_DN}" \ --update '//properties/entry[@key="openid.userInfoUrl"]' -v "${CLOUDRON_OIDC_PROFILE_ENDPOINT}" \
--update '//properties/entry[@key="ldap.password"]' -v "${CLOUDRON_LDAP_BIND_PASSWORD}" \
/app/data/traccar.xml /app/data/traccar.xml
else
xmlstarlet ed --inplace --update '//properties/entry[@key="ldap.enable"]' -v "false" /app/data/traccar.xml
fi fi
# email # email

338
test/package-lock.json generated
View File

@@ -9,14 +9,20 @@
"version": "1.0.0", "version": "1.0.0",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"chromedriver": "^125.0.3" "chromedriver": "^128.0.3"
}, },
"devDependencies": { "devDependencies": {
"expect.js": "^0.3.1", "expect.js": "^0.3.1",
"mocha": "^10.4.0", "mocha": "^10.7.3",
"selenium-webdriver": "^4.21.0" "selenium-webdriver": "^4.24.1"
} }
}, },
"node_modules/@bazel/runfiles": {
"version": "5.8.1",
"resolved": "https://registry.npmjs.org/@bazel/runfiles/-/runfiles-5.8.1.tgz",
"integrity": "sha512-NDdfpdQ6rZlylgv++iMn5FkObC/QlBQvipinGLSOguTYpRywmieOyJ29XHvUilspwTFSILWpoE9CqMGkHXug1g==",
"dev": true
},
"node_modules/@testim/chrome-version": { "node_modules/@testim/chrome-version": {
"version": "1.1.4", "version": "1.1.4",
"resolved": "https://registry.npmjs.org/@testim/chrome-version/-/chrome-version-1.1.4.tgz", "resolved": "https://registry.npmjs.org/@testim/chrome-version/-/chrome-version-1.1.4.tgz",
@@ -54,9 +60,9 @@
} }
}, },
"node_modules/ansi-colors": { "node_modules/ansi-colors": {
"version": "4.1.1", "version": "4.1.3",
"resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz",
"integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": ">=6" "node": ">=6"
@@ -122,11 +128,11 @@
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
}, },
"node_modules/axios": { "node_modules/axios": {
"version": "1.6.7", "version": "1.7.7",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz", "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz",
"integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==", "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==",
"dependencies": { "dependencies": {
"follow-redirects": "^1.15.4", "follow-redirects": "^1.15.6",
"form-data": "^4.0.0", "form-data": "^4.0.0",
"proxy-from-env": "^1.1.0" "proxy-from-env": "^1.1.0"
} }
@@ -154,6 +160,15 @@
"node": ">=8" "node": ">=8"
} }
}, },
"node_modules/brace-expansion": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"dev": true,
"dependencies": {
"balanced-match": "^1.0.0"
}
},
"node_modules/braces": { "node_modules/braces": {
"version": "3.0.2", "version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
@@ -248,13 +263,13 @@
} }
}, },
"node_modules/chromedriver": { "node_modules/chromedriver": {
"version": "125.0.3", "version": "128.0.3",
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-125.0.3.tgz", "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-128.0.3.tgz",
"integrity": "sha512-Qzuk5Wian2o3EVGjtbz6V/jv+pT/AV9246HbG6kUljZXXjsKZLZxqJC+kHR3qEh/wdv4EJD0YwAOWV72v9hogw==", "integrity": "sha512-Xn/bknOpGlY9tKinwS/hVWeNblSeZvbbJbF8XZ73X1jeWfAFPRXx3fMLdNNz8DqruDbx3cKEJ5wR3mnst6G3iw==",
"hasInstallScript": true, "hasInstallScript": true,
"dependencies": { "dependencies": {
"@testim/chrome-version": "^1.1.4", "@testim/chrome-version": "^1.1.4",
"axios": "^1.6.7", "axios": "^1.7.4",
"compare-versions": "^6.1.0", "compare-versions": "^6.1.0",
"extract-zip": "^2.0.1", "extract-zip": "^2.0.1",
"proxy-agent": "^6.4.0", "proxy-agent": "^6.4.0",
@@ -328,9 +343,9 @@
} }
}, },
"node_modules/debug": { "node_modules/debug": {
"version": "4.3.4", "version": "4.3.6",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz",
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==",
"dependencies": { "dependencies": {
"ms": "2.1.2" "ms": "2.1.2"
}, },
@@ -382,9 +397,9 @@
} }
}, },
"node_modules/diff": { "node_modules/diff": {
"version": "5.0.0", "version": "5.2.0",
"resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz",
"integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": ">=0.3.1" "node": ">=0.3.1"
@@ -544,9 +559,9 @@
} }
}, },
"node_modules/follow-redirects": { "node_modules/follow-redirects": {
"version": "1.15.5", "version": "1.15.9",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz",
"integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==",
"funding": [ "funding": [
{ {
"type": "individual", "type": "individual",
@@ -949,32 +964,44 @@
"node": ">= 0.6" "node": ">= 0.6"
} }
}, },
"node_modules/mocha": { "node_modules/minimatch": {
"version": "10.4.0", "version": "5.1.6",
"resolved": "https://registry.npmjs.org/mocha/-/mocha-10.4.0.tgz", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz",
"integrity": "sha512-eqhGB8JKapEYcC4ytX/xrzKforgEc3j1pGlAXVy3eRwrtAy5/nIfT1SvgGzfN0XZZxeLq0aQWkOUAmqIJiv+bA==", "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"ansi-colors": "4.1.1", "brace-expansion": "^2.0.1"
"browser-stdout": "1.3.1", },
"chokidar": "3.5.3", "engines": {
"debug": "4.3.4", "node": ">=10"
"diff": "5.0.0", }
"escape-string-regexp": "4.0.0", },
"find-up": "5.0.0", "node_modules/mocha": {
"glob": "8.1.0", "version": "10.7.3",
"he": "1.2.0", "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.7.3.tgz",
"js-yaml": "4.1.0", "integrity": "sha512-uQWxAu44wwiACGqjbPYmjo7Lg8sFrS3dQe7PP2FQI+woptP4vZXSMcfMyFL/e1yFEeEpV4RtyTpZROOKmxis+A==",
"log-symbols": "4.1.0", "dev": true,
"minimatch": "5.0.1", "dependencies": {
"ms": "2.1.3", "ansi-colors": "^4.1.3",
"serialize-javascript": "6.0.0", "browser-stdout": "^1.3.1",
"strip-json-comments": "3.1.1", "chokidar": "^3.5.3",
"supports-color": "8.1.1", "debug": "^4.3.5",
"workerpool": "6.2.1", "diff": "^5.2.0",
"yargs": "16.2.0", "escape-string-regexp": "^4.0.0",
"yargs-parser": "20.2.4", "find-up": "^5.0.0",
"yargs-unparser": "2.0.0" "glob": "^8.1.0",
"he": "^1.2.0",
"js-yaml": "^4.1.0",
"log-symbols": "^4.1.0",
"minimatch": "^5.1.6",
"ms": "^2.1.3",
"serialize-javascript": "^6.0.2",
"strip-json-comments": "^3.1.1",
"supports-color": "^8.1.1",
"workerpool": "^6.5.1",
"yargs": "^16.2.0",
"yargs-parser": "^20.2.9",
"yargs-unparser": "^2.0.0"
}, },
"bin": { "bin": {
"_mocha": "bin/_mocha", "_mocha": "bin/_mocha",
@@ -984,15 +1011,6 @@
"node": ">= 14.0.0" "node": ">= 14.0.0"
} }
}, },
"node_modules/mocha/node_modules/brace-expansion": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"dev": true,
"dependencies": {
"balanced-match": "^1.0.0"
}
},
"node_modules/mocha/node_modules/glob": { "node_modules/mocha/node_modules/glob": {
"version": "8.1.0", "version": "8.1.0",
"resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz",
@@ -1012,18 +1030,6 @@
"url": "https://github.com/sponsors/isaacs" "url": "https://github.com/sponsors/isaacs"
} }
}, },
"node_modules/mocha/node_modules/minimatch": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz",
"integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==",
"dev": true,
"dependencies": {
"brace-expansion": "^2.0.1"
},
"engines": {
"node": ">=10"
}
},
"node_modules/mocha/node_modules/ms": { "node_modules/mocha/node_modules/ms": {
"version": "2.1.3", "version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
@@ -1262,23 +1268,24 @@
] ]
}, },
"node_modules/selenium-webdriver": { "node_modules/selenium-webdriver": {
"version": "4.21.0", "version": "4.24.1",
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.21.0.tgz", "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.24.1.tgz",
"integrity": "sha512-WaEJHZjOWNth1QG5FEpxpREER0qptZBMonFU6GtAqdCNLJVxbtC3E7oS/I/+Q1sf1W032Wg0Ebk+m46lANOXyQ==", "integrity": "sha512-fcK5BTI/54cSqIhiVtrd9li1YL6LW109yIwuVw6V+FlVE6y4riGiX2qdZxVzHq+sm2TJyps+D2sjzXrpDZe1Og==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@bazel/runfiles": "^5.8.1",
"jszip": "^3.10.1", "jszip": "^3.10.1",
"tmp": "^0.2.3", "tmp": "^0.2.3",
"ws": ">=8.16.0" "ws": "^8.18.0"
}, },
"engines": { "engines": {
"node": ">= 14.21.0" "node": ">= 14.21.0"
} }
}, },
"node_modules/serialize-javascript": { "node_modules/serialize-javascript": {
"version": "6.0.0", "version": "6.0.2",
"resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz",
"integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"randombytes": "^2.1.0" "randombytes": "^2.1.0"
@@ -1473,9 +1480,9 @@
"dev": true "dev": true
}, },
"node_modules/workerpool": { "node_modules/workerpool": {
"version": "6.2.1", "version": "6.5.1",
"resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz",
"integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==",
"dev": true "dev": true
}, },
"node_modules/wrap-ansi": { "node_modules/wrap-ansi": {
@@ -1501,9 +1508,9 @@
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
}, },
"node_modules/ws": { "node_modules/ws": {
"version": "8.16.0", "version": "8.18.0",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz",
"integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": ">=10.0.0" "node": ">=10.0.0"
@@ -1549,9 +1556,9 @@
} }
}, },
"node_modules/yargs-parser": { "node_modules/yargs-parser": {
"version": "20.2.4", "version": "20.2.9",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz",
"integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": ">=10" "node": ">=10"
@@ -1595,6 +1602,12 @@
} }
}, },
"dependencies": { "dependencies": {
"@bazel/runfiles": {
"version": "5.8.1",
"resolved": "https://registry.npmjs.org/@bazel/runfiles/-/runfiles-5.8.1.tgz",
"integrity": "sha512-NDdfpdQ6rZlylgv++iMn5FkObC/QlBQvipinGLSOguTYpRywmieOyJ29XHvUilspwTFSILWpoE9CqMGkHXug1g==",
"dev": true
},
"@testim/chrome-version": { "@testim/chrome-version": {
"version": "1.1.4", "version": "1.1.4",
"resolved": "https://registry.npmjs.org/@testim/chrome-version/-/chrome-version-1.1.4.tgz", "resolved": "https://registry.npmjs.org/@testim/chrome-version/-/chrome-version-1.1.4.tgz",
@@ -1629,9 +1642,9 @@
} }
}, },
"ansi-colors": { "ansi-colors": {
"version": "4.1.1", "version": "4.1.3",
"resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz",
"integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==",
"dev": true "dev": true
}, },
"ansi-regex": { "ansi-regex": {
@@ -1679,11 +1692,11 @@
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
}, },
"axios": { "axios": {
"version": "1.6.7", "version": "1.7.7",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz", "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz",
"integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==", "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==",
"requires": { "requires": {
"follow-redirects": "^1.15.4", "follow-redirects": "^1.15.6",
"form-data": "^4.0.0", "form-data": "^4.0.0",
"proxy-from-env": "^1.1.0" "proxy-from-env": "^1.1.0"
} }
@@ -1705,6 +1718,15 @@
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
"dev": true "dev": true
}, },
"brace-expansion": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"dev": true,
"requires": {
"balanced-match": "^1.0.0"
}
},
"braces": { "braces": {
"version": "3.0.2", "version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
@@ -1769,12 +1791,12 @@
} }
}, },
"chromedriver": { "chromedriver": {
"version": "125.0.3", "version": "128.0.3",
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-125.0.3.tgz", "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-128.0.3.tgz",
"integrity": "sha512-Qzuk5Wian2o3EVGjtbz6V/jv+pT/AV9246HbG6kUljZXXjsKZLZxqJC+kHR3qEh/wdv4EJD0YwAOWV72v9hogw==", "integrity": "sha512-Xn/bknOpGlY9tKinwS/hVWeNblSeZvbbJbF8XZ73X1jeWfAFPRXx3fMLdNNz8DqruDbx3cKEJ5wR3mnst6G3iw==",
"requires": { "requires": {
"@testim/chrome-version": "^1.1.4", "@testim/chrome-version": "^1.1.4",
"axios": "^1.6.7", "axios": "^1.7.4",
"compare-versions": "^6.1.0", "compare-versions": "^6.1.0",
"extract-zip": "^2.0.1", "extract-zip": "^2.0.1",
"proxy-agent": "^6.4.0", "proxy-agent": "^6.4.0",
@@ -1833,9 +1855,9 @@
"integrity": "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==" "integrity": "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw=="
}, },
"debug": { "debug": {
"version": "4.3.4", "version": "4.3.6",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz",
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==",
"requires": { "requires": {
"ms": "2.1.2" "ms": "2.1.2"
} }
@@ -1867,9 +1889,9 @@
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="
}, },
"diff": { "diff": {
"version": "5.0.0", "version": "5.2.0",
"resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz",
"integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==",
"dev": true "dev": true
}, },
"emoji-regex": { "emoji-regex": {
@@ -1975,9 +1997,9 @@
"dev": true "dev": true
}, },
"follow-redirects": { "follow-redirects": {
"version": "1.15.5", "version": "1.15.9",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz",
"integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==" "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ=="
}, },
"form-data": { "form-data": {
"version": "4.0.0", "version": "4.0.0",
@@ -2267,43 +2289,43 @@
"mime-db": "1.52.0" "mime-db": "1.52.0"
} }
}, },
"mocha": { "minimatch": {
"version": "10.4.0", "version": "5.1.6",
"resolved": "https://registry.npmjs.org/mocha/-/mocha-10.4.0.tgz", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz",
"integrity": "sha512-eqhGB8JKapEYcC4ytX/xrzKforgEc3j1pGlAXVy3eRwrtAy5/nIfT1SvgGzfN0XZZxeLq0aQWkOUAmqIJiv+bA==", "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
"dev": true, "dev": true,
"requires": { "requires": {
"ansi-colors": "4.1.1", "brace-expansion": "^2.0.1"
"browser-stdout": "1.3.1", }
"chokidar": "3.5.3", },
"debug": "4.3.4", "mocha": {
"diff": "5.0.0", "version": "10.7.3",
"escape-string-regexp": "4.0.0", "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.7.3.tgz",
"find-up": "5.0.0", "integrity": "sha512-uQWxAu44wwiACGqjbPYmjo7Lg8sFrS3dQe7PP2FQI+woptP4vZXSMcfMyFL/e1yFEeEpV4RtyTpZROOKmxis+A==",
"glob": "8.1.0", "dev": true,
"he": "1.2.0", "requires": {
"js-yaml": "4.1.0", "ansi-colors": "^4.1.3",
"log-symbols": "4.1.0", "browser-stdout": "^1.3.1",
"minimatch": "5.0.1", "chokidar": "^3.5.3",
"ms": "2.1.3", "debug": "^4.3.5",
"serialize-javascript": "6.0.0", "diff": "^5.2.0",
"strip-json-comments": "3.1.1", "escape-string-regexp": "^4.0.0",
"supports-color": "8.1.1", "find-up": "^5.0.0",
"workerpool": "6.2.1", "glob": "^8.1.0",
"yargs": "16.2.0", "he": "^1.2.0",
"yargs-parser": "20.2.4", "js-yaml": "^4.1.0",
"yargs-unparser": "2.0.0" "log-symbols": "^4.1.0",
"minimatch": "^5.1.6",
"ms": "^2.1.3",
"serialize-javascript": "^6.0.2",
"strip-json-comments": "^3.1.1",
"supports-color": "^8.1.1",
"workerpool": "^6.5.1",
"yargs": "^16.2.0",
"yargs-parser": "^20.2.9",
"yargs-unparser": "^2.0.0"
}, },
"dependencies": { "dependencies": {
"brace-expansion": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"dev": true,
"requires": {
"balanced-match": "^1.0.0"
}
},
"glob": { "glob": {
"version": "8.1.0", "version": "8.1.0",
"resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz",
@@ -2317,15 +2339,6 @@
"once": "^1.3.0" "once": "^1.3.0"
} }
}, },
"minimatch": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz",
"integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==",
"dev": true,
"requires": {
"brace-expansion": "^2.0.1"
}
},
"ms": { "ms": {
"version": "2.1.3", "version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
@@ -2512,20 +2525,21 @@
"dev": true "dev": true
}, },
"selenium-webdriver": { "selenium-webdriver": {
"version": "4.21.0", "version": "4.24.1",
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.21.0.tgz", "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.24.1.tgz",
"integrity": "sha512-WaEJHZjOWNth1QG5FEpxpREER0qptZBMonFU6GtAqdCNLJVxbtC3E7oS/I/+Q1sf1W032Wg0Ebk+m46lANOXyQ==", "integrity": "sha512-fcK5BTI/54cSqIhiVtrd9li1YL6LW109yIwuVw6V+FlVE6y4riGiX2qdZxVzHq+sm2TJyps+D2sjzXrpDZe1Og==",
"dev": true, "dev": true,
"requires": { "requires": {
"@bazel/runfiles": "^5.8.1",
"jszip": "^3.10.1", "jszip": "^3.10.1",
"tmp": "^0.2.3", "tmp": "^0.2.3",
"ws": ">=8.16.0" "ws": "^8.18.0"
} }
}, },
"serialize-javascript": { "serialize-javascript": {
"version": "6.0.0", "version": "6.0.2",
"resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz",
"integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==",
"dev": true, "dev": true,
"requires": { "requires": {
"randombytes": "^2.1.0" "randombytes": "^2.1.0"
@@ -2675,9 +2689,9 @@
"dev": true "dev": true
}, },
"workerpool": { "workerpool": {
"version": "6.2.1", "version": "6.5.1",
"resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz",
"integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==",
"dev": true "dev": true
}, },
"wrap-ansi": { "wrap-ansi": {
@@ -2697,9 +2711,9 @@
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
}, },
"ws": { "ws": {
"version": "8.16.0", "version": "8.18.0",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz",
"integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==",
"dev": true, "dev": true,
"requires": {} "requires": {}
}, },
@@ -2725,9 +2739,9 @@
} }
}, },
"yargs-parser": { "yargs-parser": {
"version": "20.2.4", "version": "20.2.9",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz",
"integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==",
"dev": true "dev": true
}, },
"yargs-unparser": { "yargs-unparser": {

View File

@@ -10,10 +10,10 @@
"license": "ISC", "license": "ISC",
"devDependencies": { "devDependencies": {
"expect.js": "^0.3.1", "expect.js": "^0.3.1",
"mocha": "^10.4.0", "mocha": "^10.7.3",
"selenium-webdriver": "^4.21.0" "selenium-webdriver": "^4.24.1"
}, },
"dependencies": { "dependencies": {
"chromedriver": "^125.0.3" "chromedriver": "^128.0.3"
} }
} }

View File

@@ -16,8 +16,8 @@ const execSync = require('child_process').execSync,
{ Builder, By, Key, until } = require('selenium-webdriver'), { Builder, By, Key, until } = require('selenium-webdriver'),
{ Options } = require('selenium-webdriver/chrome'); { Options } = require('selenium-webdriver/chrome');
if (!process.env.EMAIL || !process.env.PASSWORD) { if (!process.env.USERNAME || !process.env.EMAIL || !process.env.PASSWORD) {
console.log('EMAIL and PASSWORD env vars need to be set'); console.log('USERNAME, EMAIL and PASSWORD env vars need to be set');
process.exit(1); process.exit(1);
} }
@@ -25,16 +25,18 @@ describe('Application life cycle test', function () {
this.timeout(0); this.timeout(0);
const LOCATION = 'test'; const LOCATION = 'test';
const TEST_TIMEOUT = 10000; const TEST_TIMEOUT = 20000;
const EXEC_ARGS = { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' }; const EXEC_ARGS = { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' };
const DEVICE_NAME = 'FancyDevice'; const DEVICE_NAME = 'FancyDevice';
const DEVICE_IDENTIFIER = 'device1'; const DEVICE_IDENTIFIER = 'device1';
const ADMIN_USERNAME = 'admin@cloudron.local'; const ADMIN_USERNAME = 'admin@cloudron.local';
const ADMIN_PASSWORD = 'admin'; const ADMIN_PASSWORD = 'admin';
const USERNAME = process.env.USERNAME;
const EMAIL = process.env.EMAIL; const EMAIL = process.env.EMAIL;
const PASSWORD = process.env.PASSWORD; const PASSWORD = process.env.PASSWORD;
let browser, app; let browser, app;
let athenticated_by_oidc = false;
before(function () { before(function () {
const options = new Options().windowSize({ width: 1280, height: 1024 }); const options = new Options().windowSize({ width: 1280, height: 1024 });
@@ -61,10 +63,33 @@ describe('Application life cycle test', function () {
async function login(emailOrUsername, password) { async function login(emailOrUsername, password) {
await browser.get(`https://${app.fqdn}/login`); await browser.get(`https://${app.fqdn}/login`);
await waitForElement(By.xpath('//input[@name="email"]')); await waitForElement(By.xpath('//input[@name="email"]'));
await browser.findElement(By.xpath('//input[@name="email"]')).sendKeys(Key.CONTROL + 'a'); await browser.findElement(By.xpath('//input[@name="email"]')).sendKeys(Key.CONTROL + 'a' + Key.BACK_SPACE + Key.COMMAND + 'a' + Key.BACK_SPACE);
await browser.findElement(By.xpath('//input[@name="email"]')).sendKeys(emailOrUsername); await browser.findElement(By.xpath('//input[@name="email"]')).sendKeys(emailOrUsername);
await browser.findElement(By.xpath('//input[@name="password"]')).sendKeys(password); await browser.findElement(By.xpath('//input[@name="password"]')).sendKeys(password);
await browser.findElement(By.xpath('//button[text()="Login"]')).click(); await browser.findElement(By.xpath('//button[text()="Login"]')).click();
await browser.sleep(3000);
await waitForElement(By.xpath('//span[text()="Account"]'));
}
async function loginOIDC(username, password) {
browser.manage().deleteAllCookies();
await browser.get(`https://${app.fqdn}/login`);
await browser.sleep(2000);
await waitForElement(By.xpath('//button[contains(., "Login with OpenID")]'));
await browser.findElement(By.xpath('//button[contains(., "Login with OpenID")]')).click();
await browser.sleep(2000);
if (!athenticated_by_oidc) {
await waitForElement(By.id('inputUsername'));
await browser.findElement(By.id('inputUsername')).sendKeys(username);
await browser.findElement(By.id('inputPassword')).sendKeys(password);
await browser.findElement(By.id('loginSubmitButton')).click();
athenticated_by_oidc = true;
}
await browser.sleep(3000);
await waitForElement(By.xpath('//span[text()="Account"]')); await waitForElement(By.xpath('//span[text()="Account"]'));
} }
@@ -93,7 +118,8 @@ describe('Application life cycle test', function () {
} }
xit('build app', function () { execSync('cloudron build', EXEC_ARGS); }); xit('build app', function () { execSync('cloudron build', EXEC_ARGS); });
it('install app', function () { execSync(`cloudron install --location ${LOCATION}`, EXEC_ARGS); }); // no sso
it('install app (no sso)', function () { execSync(`cloudron install --no-sso --location ${LOCATION}`, EXEC_ARGS); });
it('can get app information', getAppInfo); it('can get app information', getAppInfo);
it('can login as admin', login.bind(null, ADMIN_USERNAME, ADMIN_PASSWORD)); it('can login as admin', login.bind(null, ADMIN_USERNAME, ADMIN_PASSWORD));
@@ -101,10 +127,22 @@ describe('Application life cycle test', function () {
it('device exists', deviceExists); it('device exists', deviceExists);
it('can logout', logout); it('can logout', logout);
it('can login as normal user with email', login.bind(null, process.env.EMAIL, process.env.PASSWORD)); it('uninstall app', async function () {
// ensure we don't hit NXDOMAIN in the mean time
await browser.get('about:blank');
execSync(`cloudron uninstall --app ${app.id}`, EXEC_ARGS);
});
// sso
it('install app (sso)', function () { execSync(`cloudron install --location ${LOCATION}`, EXEC_ARGS); });
it('can get app information', getAppInfo);
it('can login as admin', login.bind(null, ADMIN_USERNAME, ADMIN_PASSWORD));
it('can add device', addDevice);
it('device exists', deviceExists);
it('can logout', logout); it('can logout', logout);
it('can login as normal user with username', login.bind(null, process.env.USERNAME, process.env.PASSWORD)); it('can login as normal user via OIDC', loginOIDC.bind(null, process.env.USERNAME, process.env.PASSWORD));
it('can logout', logout); it('can logout', logout);
it('can restart app', function () { execSync(`cloudron restart --app ${app.id}`); }); it('can restart app', function () { execSync(`cloudron restart --app ${app.id}`); });
@@ -126,6 +164,9 @@ describe('Application life cycle test', function () {
it('device exists', deviceExists); it('device exists', deviceExists);
it('can logout', logout); it('can logout', logout);
it('can login as normal user via OIDC', loginOIDC.bind(null, process.env.USERNAME, process.env.PASSWORD));
it('can logout', logout);
it('move to different location', async function () { it('move to different location', async function () {
// ensure we don't hit NXDOMAIN in the mean time // ensure we don't hit NXDOMAIN in the mean time
await browser.get('about:blank'); await browser.get('about:blank');
@@ -137,6 +178,9 @@ describe('Application life cycle test', function () {
it('device exists', deviceExists); it('device exists', deviceExists);
it('can logout', logout); it('can logout', logout);
it('can login as normal user via OIDC', loginOIDC.bind(null, process.env.USERNAME, process.env.PASSWORD));
it('can logout', logout);
it('uninstall app', async function () { it('uninstall app', async function () {
// ensure we don't hit NXDOMAIN in the mean time // ensure we don't hit NXDOMAIN in the mean time
await browser.get('about:blank'); await browser.get('about:blank');
@@ -145,19 +189,24 @@ describe('Application life cycle test', function () {
// test update // test update
it('can install app for update', function () { execSync(`cloudron install --appstore-id org.traccar.cloudronapp --location ${LOCATION}`, EXEC_ARGS); }); it('can install app for update', function () { execSync(`cloudron install --appstore-id org.traccar.cloudronapp --location ${LOCATION}`, EXEC_ARGS); });
it('can get app information', getAppInfo); it('can get app information', getAppInfo);
it('can login', login.bind(null, ADMIN_USERNAME, ADMIN_PASSWORD)); it('can login', login.bind(null, ADMIN_USERNAME, ADMIN_PASSWORD));
it('can add device', addDevice); it('can add device', addDevice);
it('device exists', deviceExists); it('device exists', deviceExists);
it('can logout', logout); it('can logout', logout);
it('can login as normal user via OIDC', loginOIDC.bind(null, process.env.USERNAME, process.env.PASSWORD));
it('can logout', logout);
it('can update', function () { execSync(`cloudron update --app ${app.id}`, EXEC_ARGS); }); it('can update', function () { execSync(`cloudron update --app ${app.id}`, EXEC_ARGS); });
it('can login', login.bind(null, ADMIN_USERNAME, ADMIN_PASSWORD)); it('can login', login.bind(null, ADMIN_USERNAME, ADMIN_PASSWORD));
it('device exists', deviceExists); it('device exists', deviceExists);
it('can logout', logout); it('can logout', logout);
it('can login as normal user with username', login.bind(null, process.env.USERNAME, process.env.PASSWORD)); // OIDC login
it('can login as normal user via OIDC', loginOIDC.bind(null, process.env.USERNAME, process.env.PASSWORD));
it('can logout', logout); it('can logout', logout);
it('uninstall app', async function () { it('uninstall app', async function () {

View File

@@ -25,13 +25,12 @@
<entry key='web.url'>##CLOUDRON_APP_ORIGIN##</entry> <entry key='web.url'>##CLOUDRON_APP_ORIGIN##</entry>
<entry key='ldap.enable'>true</entry> <entry key='openid.clientId'>##CLOUDRON_OIDC_CLIENT_ID##</entry>
<entry key='ldap.url'>##CLOUDRON_LDAP_URL##</entry> <entry key='openid.clientSecret'>##CLOUDRON_OIDC_CLIENT_SECRET##</entry>
<entry key='ldap.base'>##CLOUDRON_LDAP_USERS_BASE_DN##</entry> <entry key='openid.issuerUrl'>##CLOUDRON_OIDC_ISSUER##</entry>
<entry key='ldap.idAttribute'>username</entry> <entry key='openid.authUrl'>##CLOUDRON_OIDC_AUTH_ENDPOINT##</entry>
<entry key='ldap.searchFilter'>username=:login</entry> <entry key='openid.tokenUrl'>##CLOUDRON_OIDC_TOKEN_ENDPOINT##</entry>
<entry key='ldap.user'>##CLOUDRON_LDAP_BIND_DN##</entry> <entry key='openid.userInfoUrl'>##CLOUDRON_OIDC_PROFILE_ENDPOINT##</entry>
<entry key='ldap.password'>##CLOUDRON_LDAP_BIND_PASSWORD##</entry>
<entry key='mail.smtp.host'>smtp.gmail.com</entry> <entry key='mail.smtp.host'>smtp.gmail.com</entry>
<entry key='mail.smtp.port'>587</entry> <entry key='mail.smtp.port'>587</entry>