Compare commits
33 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2bc7648a68 | ||
|
|
1a2af0e566 | ||
|
|
62a12ea30b | ||
|
|
6bcba878fd | ||
|
|
231ee9b187 | ||
|
|
d9420c319d | ||
|
|
050f4d8a26 | ||
|
|
e6d1f16b1d | ||
|
|
3991b28ba5 | ||
|
|
467685dee3 | ||
|
|
5a60a8b057 | ||
|
|
c8ed7b7882 | ||
|
|
3b5069dd3e | ||
|
|
bb28b946d2 | ||
|
|
99117698a6 | ||
|
|
b279638c84 | ||
|
|
c9c9259808 | ||
|
|
91b6c529e3 | ||
|
|
d2bfffb179 | ||
|
|
4692c12d60 | ||
|
|
6bcfb0a0c6 | ||
|
|
f6997147c6 | ||
|
|
e4a405a5f1 | ||
|
|
e475e1ec34 | ||
|
|
5f17b33dbc | ||
|
|
0a64acf236 | ||
|
|
1b20ba1a1a | ||
|
|
16414ae13c | ||
|
|
55935f194f | ||
|
|
7cbe157dbd | ||
|
|
46f25d776d | ||
|
|
1e9400ab2e | ||
|
|
c8b81a87b3 |
@@ -1,5 +0,0 @@
|
|||||||
include:
|
|
||||||
- project: devops/pipeline-components
|
|
||||||
ref: main
|
|
||||||
file: cloudron-app.gitlab-ci.yml
|
|
||||||
|
|
||||||
82
CHANGELOG.md
82
CHANGELOG.md
@@ -1287,3 +1287,85 @@
|
|||||||
* Update Synapse to 1.118.0
|
* Update Synapse to 1.118.0
|
||||||
* [Full changelog](https://github.com/element-hq/synapse/releases/tag/v1.118.0)
|
* [Full changelog](https://github.com/element-hq/synapse/releases/tag/v1.118.0)
|
||||||
|
|
||||||
|
[1.98.1]
|
||||||
|
* Update S3 Storage Provider to 1.5.0
|
||||||
|
[1.99.0]
|
||||||
|
* Update synapse to 1.119.0
|
||||||
|
* [Full Changelog](https://github.com/element-hq/synapse/releases/tag/v1.118.0)
|
||||||
|
* Support [MSC4151](https://github.com/matrix-org/matrix-spec-proposals/pull/4151)'s stable report room API. ([#​17374](https://github.com/element-hq/synapse/issues/17374))
|
||||||
|
* Add experimental support for [MSC4222](https://github.com/matrix-org/matrix-spec-proposals/pull/4222) (Adding `state_after` to sync v2). ([#​17888](https://github.com/element-hq/synapse/issues/17888))
|
||||||
|
* Fix bug with sliding sync where `$LAZY`-loading room members would not return `required_state` membership in incremental syncs. ([#​17809](https://github.com/element-hq/synapse/issues/17809))
|
||||||
|
* Check if user has membership in a room before tagging it. Contributed by Lama Alosaimi. ([#​17839](https://github.com/element-hq/synapse/issues/17839))
|
||||||
|
* Fix a bug in the admin redact endpoint where the background task would not run if a worker was specified in
|
||||||
|
* Fix bug where some presence and typing timeouts can expire early. ([#​17850](https://github.com/element-hq/synapse/issues/17850))
|
||||||
|
* Fix detection when the built Rust library was outdated when using source installations. ([#​17861](https://github.com/element-hq/synapse/issues/17861))
|
||||||
|
* Fix a long-standing bug in Synapse which could cause one-time keys to be issued in the incorrect order, causing message decryption failures. ([#​17903](https://github.com/element-hq/synapse/pull/17903))
|
||||||
|
* Fix experimental support for [MSC4222](https://github.com/matrix-org/matrix-spec-proposals/pull/4222) (Adding `state_after` to sync v2) where we would return the full state on incremental syncs when using lazy loaded members and there were no new events in the timeline. ([#​17915](https://github.com/element-hq/synapse/pull/17915))
|
||||||
|
* Remove support for python 3.8. ([#​17908](https://github.com/element-hq/synapse/issues/17908))
|
||||||
|
* Add a test for downloading and thumbnailing a CMYK JPEG. ([#​17786](https://github.com/element-hq/synapse/issues/17786))
|
||||||
|
* Refactor database calls to remove `Generator` usage. ([#​17813](https://github.com/element-hq/synapse/issues/17813), [#​17814](https://github.com/element-hq/synapse/issues/17814), [#​17815](https://github.com/element-hq/synapse/issues/17815), [#​17816](https://github.com/element-hq/synapse/issues/17816), [#​17817](https://github.com/element-hq/synapse/issues/17817), [#​17818](https://github.com/element-hq/synapse/issues/17818), [#​17890](https://github.com/element-hq/synapse/issues/17890))
|
||||||
|
* Include the destination in the error of 'Destination mismatch' on federation requests. ([#​17830](https://github.com/element-hq/synapse/issues/17830))
|
||||||
|
* The nix flake inside the repository no longer tracks nixpkgs/master to not catch the latest bugs from a MR merged 5 minutes ago. ([#​17852](https://github.com/element-hq/synapse/issues/17852))
|
||||||
|
* Minor speed-up of sliding sync by computing extensions results in parallel. ([#​17884](https://github.com/element-hq/synapse/issues/17884))
|
||||||
|
* Bump the default Python version in the Synapse Dockerfile from 3.11 -> 3.12. ([#​17887](https://github.com/element-hq/synapse/issues/17887))
|
||||||
|
* Remove usage of internal header encoding API. ([#​17894](https://github.com/element-hq/synapse/issues/17894))
|
||||||
|
* Use unique name for each os.arch variant when uploading Wheel artifacts. ([#​17905](https://github.com/element-hq/synapse/issues/17905))
|
||||||
|
* Fix tests to run with latest Twisted. ([#​17906](https://github.com/element-hq/synapse/pull/17906), [#​17907](https://github.com/element-hq/synapse/pull/17907), [#​17911](https://github.com/element-hq/synapse/pull/17911))
|
||||||
|
* Update version constraint to allow the latest poetry-core 1.9.1. ([#​17902](https://github.com/element-hq/synapse/pull/17902))
|
||||||
|
* Update the portdb CI to use Python 3.13 and Postgres 17 as latest dependencies. ([#​17909](https://github.com/element-hq/synapse/pull/17909))
|
||||||
|
* Add an index to `current_state_delta_stream` table. ([#​17912](https://github.com/element-hq/synapse/issues/17912))
|
||||||
|
* Fix building and attaching release artifacts during the release process. ([#​17921](https://github.com/element-hq/synapse/issues/17921))
|
||||||
|
|
||||||
|
[1.100.0]
|
||||||
|
* Update synapse to 1.120.0
|
||||||
|
* [Full Changelog](https://github.com/element-hq/synapse/releases/tag/v1.118.0)
|
||||||
|
* Fix a bug introduced in Synapse v1.120rc1 which would cause the newly-introduced `delete_old_otks` job to fail in worker-mode deployments. ([#​17960](https://github.com/element-hq/synapse/issues/17960))
|
||||||
|
|
||||||
|
[1.100.1]
|
||||||
|
* Update synapse to 1.120.2
|
||||||
|
* [Full Changelog](https://github.com/element-hq/synapse/releases/tag/v1.118.0)
|
||||||
|
|
||||||
|
[1.101.0]
|
||||||
|
* Update synapse to 1.121.1
|
||||||
|
* [Full Changelog](https://github.com/element-hq/synapse/releases/tag/v1.121.0)
|
||||||
|
* Support for MSC4190: device management for Application Services. (#17705)
|
||||||
|
* Update MSC4186 Sliding Sync to include invite, ban, kick, targets when $LAZY-loading room members. (#17947)
|
||||||
|
* Use stable M_USER_LOCKED error code for locked accounts, as per Matrix 1.12. (#17965)
|
||||||
|
* MSC4076: Add disable_badge_count to pusher configuration. (#17975)
|
||||||
|
|
||||||
|
|
||||||
|
[1.101.1]
|
||||||
|
* CLOUDRON_OIDC_PROVIDER_NAME implemented
|
||||||
|
|
||||||
|
[1.102.0]
|
||||||
|
* Update synapse to 1.122.0
|
||||||
|
* [Full Changelog](https://github.com/element-hq/synapse/releases/tag/v1.122.0)
|
||||||
|
|
||||||
|
[1.103.0]
|
||||||
|
* Update synapse to 1.123.0
|
||||||
|
* [Full Changelog](https://github.com/element-hq/synapse/releases/tag/v1.123.0)
|
||||||
|
|
||||||
|
[1.104.0]
|
||||||
|
* Update synapse to 1.124.0
|
||||||
|
* [Full Changelog](https://github.com/element-hq/synapse/releases/tag/v1.124.0)
|
||||||
|
|
||||||
|
[1.105.0]
|
||||||
|
* Update synapse to 1.125.0
|
||||||
|
* [Full Changelog](https://github.com/element-hq/synapse/releases/tag/v1.125.0)
|
||||||
|
* Add functionality to be able to use multiple values in SSO feature attribute_requirements. (#17949)
|
||||||
|
* Add experimental config options admin_token_path and client_secret_path for MSC3861. (#18004)
|
||||||
|
* Add get_current_time_msec() method to the module API for sound time comparisons with Synapse. (#18144)
|
||||||
|
* Update the response when a client attempts to add an invalid email address to the user's account from a 500, to a 400 with error text. (#18125)
|
||||||
|
* Fix user directory search when using a legacy module with a check_username_for_spam callback. Broke in v1.122.0. (#18135)
|
||||||
|
|
||||||
|
[1.106.0]
|
||||||
|
* Update synapse to 1.126.0
|
||||||
|
* [Full Changelog](https://github.com/element-hq/synapse/releases/tag/v1.126.0)
|
||||||
|
* Define ratelimit configuration for delayed event management. (#18019)
|
||||||
|
* Add form_secret_path config option. (#18090)
|
||||||
|
* Add the --no-secrets-in-config command line option. (#18092)
|
||||||
|
* Add background job to clear unreferenced state groups. (#18154)
|
||||||
|
* Add support for specifying/overriding id_token_signing_alg_values_supported for an OpenID identity provider. (#18177)
|
||||||
|
* Add worker_replication_secret_path config option. (#18191)
|
||||||
|
* Add support for specifying/overriding redirect_uri in the authorization and token requests against an OpenID identity provider. (#18197)
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
"description": "file://DESCRIPTION.md",
|
"description": "file://DESCRIPTION.md",
|
||||||
"changelog": "file://CHANGELOG.md",
|
"changelog": "file://CHANGELOG.md",
|
||||||
"tagline": "Secure & decentralized communication",
|
"tagline": "Secure & decentralized communication",
|
||||||
"version": "1.98.0",
|
"version": "1.106.0",
|
||||||
"upstreamVersion": "1.117.0",
|
"upstreamVersion": "1.126.0",
|
||||||
"healthCheckPath": "/",
|
"healthCheckPath": "/",
|
||||||
"httpPort": 8008,
|
"httpPort": 8008,
|
||||||
"memoryLimit": 536870912,
|
"memoryLimit": 536870912,
|
||||||
|
|||||||
@@ -10,10 +10,10 @@ ENV VIRTUAL_ENV=/app/code/env
|
|||||||
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
||||||
|
|
||||||
# renovate: datasource=github-releases depName=element-hq/synapse versioning=semver extractVersion=^v(?<version>.+)$
|
# renovate: datasource=github-releases depName=element-hq/synapse versioning=semver extractVersion=^v(?<version>.+)$
|
||||||
ARG SYNAPSE_VERSION=1.117.0
|
ARG SYNAPSE_VERSION=1.126.0
|
||||||
|
|
||||||
# renovate: datasource=github-releases depName=matrix-org/synapse-s3-storage-provider versioning=semver extractVersion=^v(?<version>.+)$
|
# renovate: datasource=github-releases depName=matrix-org/synapse-s3-storage-provider versioning=semver extractVersion=^v(?<version>.+)$
|
||||||
ARG S3PROVIDER_VERSION=1.4.0
|
ARG S3PROVIDER_VERSION=1.5.0
|
||||||
|
|
||||||
# Synapse (https://github.com/matrix-org/synapse/blob/master/INSTALL.md)
|
# Synapse (https://github.com/matrix-org/synapse/blob/master/INSTALL.md)
|
||||||
# lxml - required for previews
|
# lxml - required for previews
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
|
||||||
"extends": [
|
|
||||||
"local>devops/renovator//config/app/default.json5"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
4
renovate.json5
Normal file
4
renovate.json5
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
|
"extends": ["local>devops/renovator//default.renovate.json5"]
|
||||||
|
}
|
||||||
2
start.sh
2
start.sh
@@ -70,7 +70,7 @@ if [[ -n "${CLOUDRON_OIDC_ISSUER:-}" ]]; then
|
|||||||
yq eval -i "del(.password_providers)" /app/data/configs/homeserver.yaml # remove old ldap config
|
yq eval -i "del(.password_providers)" /app/data/configs/homeserver.yaml # remove old ldap config
|
||||||
echo " ==> Configuring OIDC auth"
|
echo " ==> Configuring OIDC auth"
|
||||||
yq eval -i ".oidc_providers[0].idp_id=\"cloudron\"" /app/data/configs/homeserver.yaml
|
yq eval -i ".oidc_providers[0].idp_id=\"cloudron\"" /app/data/configs/homeserver.yaml
|
||||||
yq eval -i ".oidc_providers[0].idp_name=\"Cloudron\"" /app/data/configs/homeserver.yaml
|
yq eval -i ".oidc_providers[0].idp_name=\"${CLOUDRON_OIDC_PROVIDER_NAME:-Cloudron}\"" /app/data/configs/homeserver.yaml
|
||||||
yq eval -i ".oidc_providers[0].issuer=\"${CLOUDRON_OIDC_ISSUER}\"" /app/data/configs/homeserver.yaml
|
yq eval -i ".oidc_providers[0].issuer=\"${CLOUDRON_OIDC_ISSUER}\"" /app/data/configs/homeserver.yaml
|
||||||
yq eval -i ".oidc_providers[0].client_id=\"${CLOUDRON_OIDC_CLIENT_ID}\"" /app/data/configs/homeserver.yaml
|
yq eval -i ".oidc_providers[0].client_id=\"${CLOUDRON_OIDC_CLIENT_ID}\"" /app/data/configs/homeserver.yaml
|
||||||
yq eval -i ".oidc_providers[0].client_secret=\"${CLOUDRON_OIDC_CLIENT_SECRET}\"" /app/data/configs/homeserver.yaml
|
yq eval -i ".oidc_providers[0].client_secret=\"${CLOUDRON_OIDC_CLIENT_SECRET}\"" /app/data/configs/homeserver.yaml
|
||||||
|
|||||||
2129
test/package-lock.json
generated
2129
test/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -9,9 +9,9 @@
|
|||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chromedriver": "^129.0.2",
|
"chromedriver": "^134.0.2",
|
||||||
"expect.js": "^0.3.1",
|
"expect.js": "^0.3.1",
|
||||||
"mocha": "^10.7.3",
|
"mocha": "^11.1.0",
|
||||||
"selenium-webdriver": "^4.25.0"
|
"selenium-webdriver": "^4.29.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
122
test/test.js
122
test/test.js
@@ -91,6 +91,7 @@ describe('Application life cycle test', function () {
|
|||||||
|
|
||||||
async function updateSynapseConfig() {
|
async function updateSynapseConfig() {
|
||||||
console.log(`Setting Synapse Matrix server location to "https://${app.fqdn}"`);
|
console.log(`Setting Synapse Matrix server location to "https://${app.fqdn}"`);
|
||||||
|
|
||||||
execSync(`cloudron exec --app ${ELEMENT_LOCATION} -- bash -c "jq '.default_server_config[\\"m.homeserver\\"].base_url = \\"https://${app.fqdn}\\"' /app/data/config.json | sponge /app/data/config.json"`);
|
execSync(`cloudron exec --app ${ELEMENT_LOCATION} -- bash -c "jq '.default_server_config[\\"m.homeserver\\"].base_url = \\"https://${app.fqdn}\\"' /app/data/config.json | sponge /app/data/config.json"`);
|
||||||
execSync(`cloudron restart --app ${ELEMENT_LOCATION}`);
|
execSync(`cloudron restart --app ${ELEMENT_LOCATION}`);
|
||||||
// wait when all services are up and running
|
// wait when all services are up and running
|
||||||
@@ -106,61 +107,91 @@ describe('Application life cycle test', function () {
|
|||||||
await browser.get(`https://${elementApp.fqdn}/#/register`);
|
await browser.get(`https://${elementApp.fqdn}/#/register`);
|
||||||
await waitForElement(By.xpath('//input[@label="Username"]'));
|
await waitForElement(By.xpath('//input[@label="Username"]'));
|
||||||
await browser.findElement(By.xpath('//input[@label="Username"]')).sendKeys(USERNAME);
|
await browser.findElement(By.xpath('//input[@label="Username"]')).sendKeys(USERNAME);
|
||||||
await browser.sleep(2000);
|
|
||||||
await browser.findElement(By.xpath('//input[@label="Password"]')).sendKeys(PASSWORD);
|
await browser.findElement(By.xpath('//input[@label="Password"]')).sendKeys(PASSWORD);
|
||||||
await browser.sleep(2000);
|
|
||||||
await browser.findElement(By.xpath('//input[@label="Confirm password"]')).sendKeys(PASSWORD);
|
await browser.findElement(By.xpath('//input[@label="Confirm password"]')).sendKeys(PASSWORD);
|
||||||
await browser.sleep(2000);
|
|
||||||
await browser.findElement(By.xpath('//input[@value="Register"]')).click();
|
await browser.findElement(By.xpath('//input[@value="Register"]')).click();
|
||||||
await browser.sleep(2000);
|
|
||||||
await waitForElement(By.xpath('//h1[text()="You\'re in"]'));
|
await waitForElement(By.xpath('//h1[text()="You\'re in"] | //h1[contains(., "Welcome")]'));
|
||||||
await browser.sleep(2000);
|
if (await browser.findElements(By.xpath('//div[@role="button" and text()="Skip"]')).then(found => !!found.length)) {
|
||||||
await browser.findElement(By.xpath('//div[@role="button" and text()="Skip"]')).click();
|
await browser.findElement(By.xpath('//div[@role="button" and text()="Skip"]')).click();
|
||||||
await browser.sleep(2000);
|
}
|
||||||
|
|
||||||
await waitForElement(By.xpath(`//h1[contains(., "Welcome")]`));
|
await waitForElement(By.xpath(`//h1[contains(., "Welcome")]`));
|
||||||
}
|
}
|
||||||
|
|
||||||
async function loginOIDC(username, password, hasSession, proceedWithReset) {
|
async function loginOIDC(username, password, alreadyAuthenticated, proceedWithReset) {
|
||||||
browser.manage().deleteAllCookies();
|
browser.manage().deleteAllCookies();
|
||||||
await browser.get(`https://${elementApp.fqdn}/#/login`);
|
await browser.get(`https://${elementApp.fqdn}/#/login`);
|
||||||
await browser.sleep(6000);
|
|
||||||
|
|
||||||
await waitForElement(By.xpath('//div[@role="button" and contains(., "Continue with Cloudron")]'));
|
|
||||||
await browser.findElement(By.xpath('//div[@role="button" and contains(., "Continue with Cloudron")]')).click();
|
|
||||||
await browser.sleep(2000);
|
await browser.sleep(2000);
|
||||||
|
|
||||||
if (!hasSession) {
|
await waitForElement(By.css('.mx_Dropdown_arrow'));
|
||||||
|
await browser.findElement(By.css('.mx_Dropdown_arrow')).click();
|
||||||
|
await waitForElement(By.id('mx_LanguageDropdown__en'));
|
||||||
|
await browser.findElement(By.id('mx_LanguageDropdown__en')).click();
|
||||||
|
await browser.sleep(3000);
|
||||||
|
|
||||||
|
await waitForElement(By.xpath('//div[@role="button" and contains(., "Continue with")]'));
|
||||||
|
await browser.findElement(By.xpath('//div[@role="button" and contains(., "Continue with")]')).click();
|
||||||
|
if (!alreadyAuthenticated) {
|
||||||
await waitForElement(By.xpath('//input[@name="username"]'));
|
await waitForElement(By.xpath('//input[@name="username"]'));
|
||||||
await browser.findElement(By.xpath('//input[@name="username"]')).sendKeys(username);
|
await browser.findElement(By.xpath('//input[@name="username"]')).sendKeys(username);
|
||||||
await browser.findElement(By.xpath('//input[@name="password"]')).sendKeys(password);
|
await browser.findElement(By.xpath('//input[@name="password"]')).sendKeys(password);
|
||||||
await browser.sleep(2000);
|
|
||||||
await browser.findElement(By.id('loginSubmitButton')).click();
|
await browser.findElement(By.id('loginSubmitButton')).click();
|
||||||
await browser.sleep(2000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
await waitForElement(By.xpath('//p[@class="confirm-trust" and contains(., "Continuing will grant ")]'));
|
await waitForElement(By.xpath('//p[@class="confirm-trust" and contains(., "Continuing will grant ")]'));
|
||||||
await browser.findElement(By.xpath('//a[contains(., "Continue")]')).click();
|
await browser.findElement(By.xpath('//a[contains(., "Continue")]')).click();
|
||||||
await browser.sleep(2000);
|
|
||||||
|
|
||||||
if (proceedWithReset) {
|
if (proceedWithReset) {
|
||||||
|
await waitForElement(By.xpath('//div[text()="Proceed with reset" or text()="Reset all"]'));
|
||||||
|
|
||||||
|
if (await browser.findElements(By.xpath('//div[text()="Reset all"]')).then(found => !!found.length)) {
|
||||||
|
await browser.findElement(By.xpath('//div[text()="Reset all"]')).click();
|
||||||
|
}
|
||||||
|
|
||||||
|
await waitForElement(By.xpath('//div[text()="Proceed with reset"]'));
|
||||||
await browser.findElement(By.xpath('//div[text()="Proceed with reset"]')).click();
|
await browser.findElement(By.xpath('//div[text()="Proceed with reset"]')).click();
|
||||||
|
|
||||||
await waitForElement(By.xpath('//button[text()="Continue"]'));
|
await waitForElement(By.xpath('//button[@class="mx_Dialog_primary" and text()="Continue"]'));
|
||||||
await browser.findElement(By.xpath('//button[text()="Continue"]')).click();
|
await browser.findElement(By.xpath('//button[@class="mx_Dialog_primary" and text()="Continue"]')).click();
|
||||||
|
|
||||||
await waitForElement(By.xpath('//div[text()="Copy"]'));
|
await waitForElement(By.xpath('//div[text()="Copy"]'));
|
||||||
await browser.findElement(By.xpath('//div[text()="Copy"]')).click();
|
await browser.findElement(By.xpath('//div[text()="Copy"]')).click();
|
||||||
|
|
||||||
await browser.sleep(1000);
|
await waitForElement(By.xpath('//button[@class="mx_Dialog_primary" and text()="Continue"]'));
|
||||||
|
await browser.findElement(By.xpath('//button[@class="mx_Dialog_primary" and text()="Continue"]')).click();
|
||||||
|
await waitForElement(By.xpath('//button[text()="Done"] | //div[text()="Single Sign On"]'));
|
||||||
|
|
||||||
await waitForElement(By.xpath('//button[text()="Continue"]'));
|
if (await browser.findElements(By.xpath('//div[text()="Single Sign On"]')).then(found => !!found.length)) {
|
||||||
await browser.findElement(By.xpath('//button[text()="Continue"]')).click();
|
|
||||||
|
await browser.findElement(By.xpath('//div[text()="Single Sign On"]')).click();
|
||||||
|
|
||||||
|
const originalWindowHandle = await browser.getWindowHandle();
|
||||||
|
await browser.wait(async () => (await browser.getAllWindowHandles()).length === 2, 10000);
|
||||||
|
//Loop through until we find a new window handle
|
||||||
|
const windows = await browser.getAllWindowHandles();
|
||||||
|
windows.forEach(async handle => {
|
||||||
|
if (handle !== originalWindowHandle) {
|
||||||
|
await browser.switchTo().window(handle);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
await waitForElement(By.xpath('//a[contains(., "Continue with")]'));
|
||||||
|
await browser.findElement(By.xpath('//a[contains(., "Continue with")]')).click();
|
||||||
|
|
||||||
|
// switch back to the main window
|
||||||
|
await browser.switchTo().window(originalWindowHandle);
|
||||||
|
|
||||||
|
await waitForElement(By.xpath('//div[text()="Confirm"]'));
|
||||||
|
await browser.findElement(By.xpath('//div[text()="Confirm"]')).click();
|
||||||
|
}
|
||||||
|
|
||||||
await waitForElement(By.xpath('//button[text()="Done"]'));
|
await waitForElement(By.xpath('//button[text()="Done"]'));
|
||||||
await browser.findElement(By.xpath('//button[text()="Done"]')).click();
|
await browser.findElement(By.xpath('//button[text()="Done"]')).click();
|
||||||
|
|
||||||
await waitForElement(By.xpath('//div[text()="Cancel"]'));
|
await waitForElement(By.xpath('//div[text()="Cancel"] | //h1[contains(., "Welcome")]'));
|
||||||
await browser.findElement(By.xpath('//div[text()="Cancel"]')).click();
|
if (await browser.findElements(By.xpath('//div[text()="Cancel"]')).then(found => !!found.length)) {
|
||||||
|
await browser.findElement(By.xpath('//div[text()="Cancel"]')).click();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await browser.sleep(3000);
|
await browser.sleep(3000);
|
||||||
@@ -214,18 +245,23 @@ describe('Application life cycle test', function () {
|
|||||||
|
|
||||||
async function createRoom() {
|
async function createRoom() {
|
||||||
await browser.get(`https://${elementApp.fqdn}/#/home`);
|
await browser.get(`https://${elementApp.fqdn}/#/home`);
|
||||||
await browser.sleep(4000);
|
await browser.sleep(2000);
|
||||||
await waitForElement(By.xpath('//div[@role="button" and @aria-label="Add room"]'));
|
await waitForElement(By.xpath('//div[@role="button" and @aria-label="Add room"]'));
|
||||||
await browser.findElement(By.xpath('//div[@role="button" and @aria-label="Add room"]')).click();
|
await browser.findElement(By.xpath('//div[@role="button" and @aria-label="Add room"]')).click();
|
||||||
await browser.sleep(2000);
|
await browser.sleep(1000);
|
||||||
|
await waitForElement(By.xpath('//li[@role="menuitem" and @aria-label="New room"]'));
|
||||||
await browser.findElement(By.xpath('//li[@role="menuitem" and @aria-label="New room"]')).click();
|
await browser.findElement(By.xpath('//li[@role="menuitem" and @aria-label="New room"]')).click();
|
||||||
await browser.sleep(2000);
|
await browser.sleep(1000);
|
||||||
|
|
||||||
|
await waitForElement(By.xpath('//input[@label="Name"]'));
|
||||||
await browser.findElement(By.xpath('//input[@label="Name"]')).sendKeys(ROOM_NAME);
|
await browser.findElement(By.xpath('//input[@label="Name"]')).sendKeys(ROOM_NAME);
|
||||||
await browser.sleep(2000);
|
|
||||||
|
|
||||||
|
await browser.sleep(1000);
|
||||||
|
|
||||||
|
await waitForElement(By.xpath('//button[text()="Create room"]'));
|
||||||
await browser.findElement(By.xpath('//button[text()="Create room"]')).click();
|
await browser.findElement(By.xpath('//button[text()="Create room"]')).click();
|
||||||
await browser.sleep(2000);
|
|
||||||
|
await browser.sleep(1000);
|
||||||
|
|
||||||
await waitForElement(By.xpath('//div[@role="button" and @aria-label="Add room"]'));
|
await waitForElement(By.xpath('//div[@role="button" and @aria-label="Add room"]'));
|
||||||
|
|
||||||
@@ -263,6 +299,7 @@ describe('Application life cycle test', function () {
|
|||||||
|
|
||||||
it('can get Element app info', getElementAppInfo);
|
it('can get Element app info', getElementAppInfo);
|
||||||
it('can register new user', registerUser);
|
it('can register new user', registerUser);
|
||||||
|
|
||||||
it('create room', createRoom);
|
it('create room', createRoom);
|
||||||
it('can send message', sendMessage);
|
it('can send message', sendMessage);
|
||||||
it('can logout', logout); // from auto-login
|
it('can logout', logout); // from auto-login
|
||||||
@@ -285,12 +322,12 @@ describe('Application life cycle test', function () {
|
|||||||
it('can get Element app info', getElementAppInfo);
|
it('can get Element app info', getElementAppInfo);
|
||||||
it('update element-app config', updateSynapseConfig);
|
it('update element-app config', updateSynapseConfig);
|
||||||
|
|
||||||
it('can login via OIDC', loginOIDC.bind(null, USERNAME, PASSWORD, false, false /* proceedWithReset */));
|
it('can login via OIDC', loginOIDC.bind(null, USERNAME, PASSWORD, false, false));
|
||||||
it('create room', createRoom);
|
it('create room', createRoom);
|
||||||
it('can send message', sendMessage);
|
it('can send message', sendMessage);
|
||||||
it('can get app info', getAppInfo);
|
it('can get app info', getAppInfo);
|
||||||
|
|
||||||
it('can restart app', function () { execSync(`cloudron restart ${app.id}`); });
|
it('can restart app', function () { execSync(`cloudron restart --app ${app.id}`); });
|
||||||
|
|
||||||
it('backup app', function () { execSync(`cloudron backup create --app ${app.id}`, EXEC_ARGS); });
|
it('backup app', function () { execSync(`cloudron backup create --app ${app.id}`, EXEC_ARGS); });
|
||||||
|
|
||||||
@@ -315,7 +352,8 @@ describe('Application life cycle test', function () {
|
|||||||
it('can logout', logout);
|
it('can logout', logout);
|
||||||
it('can get app info', getAppInfo);
|
it('can get app info', getAppInfo);
|
||||||
|
|
||||||
it('move to different location', async function () {
|
// web ui also throws random errors after changing domain
|
||||||
|
xit('move to different location (skipped since no matrix support)', async function () {
|
||||||
browser.manage().deleteAllCookies();
|
browser.manage().deleteAllCookies();
|
||||||
await browser.get('about:blank');
|
await browser.get('about:blank');
|
||||||
|
|
||||||
@@ -323,13 +361,11 @@ describe('Application life cycle test', function () {
|
|||||||
getAppInfo();
|
getAppInfo();
|
||||||
await browser.sleep(15000);
|
await browser.sleep(15000);
|
||||||
});
|
});
|
||||||
|
xit('update element-app config', updateSynapseConfig);
|
||||||
it('update element-app config', updateSynapseConfig);
|
xit('can get Element app info', getElementAppInfo);
|
||||||
|
xit('can login via OIDC', loginOIDC.bind(null, USERNAME, PASSWORD, true, true));
|
||||||
it('can get Element app info', getElementAppInfo);
|
xit('check room', checkRoom);
|
||||||
it('can login via OIDC', loginOIDC.bind(null, USERNAME, PASSWORD, true, true /* proceedWithReset */));
|
xit('can send message', sendMessage);
|
||||||
it('check room', checkRoom);
|
|
||||||
it('can send message', sendMessage);
|
|
||||||
|
|
||||||
it('uninstall app', async function () {
|
it('uninstall app', async function () {
|
||||||
await browser.get('about:blank');
|
await browser.get('about:blank');
|
||||||
@@ -347,14 +383,14 @@ describe('Application life cycle test', function () {
|
|||||||
|
|
||||||
it('can install element-web app (update)', function () { execSync('cloudron install --appstore-id im.riot.cloudronapp --location ' + ELEMENT_LOCATION, EXEC_ARGS); });
|
it('can install element-web app (update)', function () { execSync('cloudron install --appstore-id im.riot.cloudronapp --location ' + ELEMENT_LOCATION, EXEC_ARGS); });
|
||||||
it('can get Element app info', getElementAppInfo);
|
it('can get Element app info', getElementAppInfo);
|
||||||
|
|
||||||
it('update element-app config', updateSynapseConfig);
|
it('update element-app config', updateSynapseConfig);
|
||||||
|
|
||||||
it('can login via OIDC', loginOIDC.bind(null, USERNAME, PASSWORD, false, false /* proceedWithReset */));
|
it('can login via OIDC', loginOIDC.bind(null, USERNAME, PASSWORD, false, false));
|
||||||
it('is logged in', isLoggedIn);
|
it('is logged in', isLoggedIn);
|
||||||
it('create room', createRoom);
|
it('create room', createRoom);
|
||||||
it('can send message', sendMessage);
|
it('can send message', sendMessage);
|
||||||
it('can logout', logout);
|
it('can logout', logout);
|
||||||
|
it('clear cache', clearCache);
|
||||||
|
|
||||||
it('can update', async function () {
|
it('can update', async function () {
|
||||||
await browser.get('about:blank');
|
await browser.get('about:blank');
|
||||||
@@ -363,9 +399,11 @@ describe('Application life cycle test', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('can get Element app info', getElementAppInfo);
|
it('can get Element app info', getElementAppInfo);
|
||||||
it('can login via OIDC', loginOIDC.bind(null, USERNAME, PASSWORD, true, true /* proceedWithReset */));
|
it('can login via OIDC', loginOIDC.bind(null, USERNAME, PASSWORD, false, true));
|
||||||
|
|
||||||
it('is logged in', isLoggedIn);
|
it('is logged in', isLoggedIn);
|
||||||
it('check room', checkRoom);
|
it('check room', checkRoom);
|
||||||
|
|
||||||
it('can send message', sendMessage);
|
it('can send message', sendMessage);
|
||||||
it('can get app info', getAppInfo);
|
it('can get app info', getAppInfo);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user