Compare commits
38 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
300930e918
|
|||
|
6ff25b270e
|
|||
|
9794023747
|
|||
| 8f49ea4d0f | |||
| 97626dff0e | |||
| 328ad861d6 | |||
| 9cc1be9a85 | |||
| 8253db53eb | |||
| e63dc9c3eb | |||
| 36b5369565 | |||
| ecdf7aebad | |||
| 7a016b4afa | |||
| 366937e335 | |||
| 88aa7bbda2 | |||
| e656d4229b | |||
| 2945851e06 | |||
| 312f2f48d2 | |||
| 61235820f1 | |||
| 468fb5a435 | |||
| 89a6177023 | |||
| 6feba78bf6 | |||
| 0bf99cc7ae | |||
| 33a68f9aee | |||
| 09434e0870 | |||
| 45d54349ad | |||
| 27dfee230e | |||
| efc8b6a524 | |||
| 7a7c2064d1 | |||
| 9ac8c1d244 | |||
| f0df8acb0b | |||
| cd4d6efee4 | |||
| 43b6dbc74a | |||
| bc83ba4461 | |||
| 59f704c23f | |||
| 7fa8ee5e78 | |||
| 313909cda6 | |||
| 221d35d8cd | |||
| 9c8b00428b |
@@ -1,3 +1,4 @@
|
||||
node_modules
|
||||
mastodon
|
||||
.idea
|
||||
tmp/
|
||||
|
||||
@@ -820,3 +820,115 @@
|
||||
* Fix URI generation for reblogs by accounts with numerical ActivityPub identifiers ([#37415](https://github.com/tootsuite/mastodon/issues/37415) by [@oneiros](https://github.com/oneiros))
|
||||
* Fix SignatureParser accepting duplicate parameters in HTTP Signature header ([#37375](https://github.com/tootsuite/mastodon/issues/37375) by [@shleeable](https://github.com/shleeable))
|
||||
|
||||
[1.17.6]
|
||||
* Update mastodon to 4.5.6
|
||||
* [Full Changelog](https://github.com/mastodon/mastodon/releases/tag/v4.5.6)
|
||||
* Fix relationship cache not being cleared when handling account migrations ([#​37664](https://github.com/tootsuite/mastodon/issues/37664) by [@​ClearlyClaire](https://github.com/ClearlyClaire))
|
||||
* Fix quote cancel button not appearing after edit then delete-and-redraft ([#​37066](https://github.com/tootsuite/mastodon/issues/37066) by [@​PGrayCS](https://github.com/PGrayCS))
|
||||
* Fix followers with profile subscription (bell icon) being notified of post edits ([#​37646](https://github.com/tootsuite/mastodon/issues/37646) by [@​ClearlyClaire](https://github.com/ClearlyClaire))
|
||||
* Fix error when encountering invalid tag in updated object ([#​37635](https://github.com/tootsuite/mastodon/issues/37635) by [@​ClearlyClaire](https://github.com/ClearlyClaire))
|
||||
* Fix cross-server conversation tracking ([#​37559](https://github.com/tootsuite/mastodon/issues/37559) by [@​ClearlyClaire](https://github.com/ClearlyClaire))
|
||||
* Fix recycled connections not being immediately closed ([#​37335](https://github.com/tootsuite/mastodon/issues/37335) and [#​37674](https://github.com/tootsuite/mastodon/issues/37674) by [@​ClearlyClaire](https://github.com/ClearlyClaire) and [@​shleeable](https://github.com/shleeable))
|
||||
|
||||
[1.17.7]
|
||||
* Update mastodon to 4.5.7
|
||||
* [Full Changelog](https://github.com/mastodon/mastodon/releases/tag/v4.5.7)
|
||||
* Add `--suspended-only` option to `tootctl emoji purge` ([#​37828](https://github.com/tootsuite/mastodon/issues/37828) and [#​37861](https://github.com/tootsuite/mastodon/issues/37861) by [@​ClearlyClaire](https://github.com/ClearlyClaire) and [@​mjankowski](https://github.com/mjankowski))
|
||||
* Fix emoji data not being properly cached ([#​37858](https://github.com/tootsuite/mastodon/issues/37858) by [@​ChaosExAnima](https://github.com/ChaosExAnima))
|
||||
* Fix delete & redraft of pending posts ([#​37839](https://github.com/tootsuite/mastodon/issues/37839) by [@​ClearlyClaire](https://github.com/ClearlyClaire))
|
||||
* Fix processing separate key documents without the ActivityStreams context ([#​37826](https://github.com/tootsuite/mastodon/issues/37826) by [@​ClearlyClaire](https://github.com/ClearlyClaire))
|
||||
* Fix custom emojis not being purged on domain suspension ([#​37808](https://github.com/tootsuite/mastodon/issues/37808) by [@​ClearlyClaire](https://github.com/ClearlyClaire))
|
||||
* Fix users without special permissions being able to stream disabled timelines ([#​37791](https://github.com/tootsuite/mastodon/issues/37791) by [@​ClearlyClaire](https://github.com/ClearlyClaire))
|
||||
* Fix processing of object updates with duplicate hashtags ([#​37756](https://github.com/tootsuite/mastodon/issues/37756) by [@​ClearlyClaire](https://github.com/ClearlyClaire))
|
||||
|
||||
[1.17.8]
|
||||
* Update mastodon to 4.5.8
|
||||
* [Full Changelog](https://github.com/mastodon/mastodon/releases/tag/v4.5.8)
|
||||
* Fix insufficient checks on quote authorizations ([GHSA-q4g8-82c5-9h33](https://github.com/mastodon/mastodon/security/advisories/GHSA-q4g8-82c5-9h33))
|
||||
* Fix open redirect in legacy path handler ([GHSA-xqw8-4j56-5hj6](https://github.com/mastodon/mastodon/security/advisories/GHSA-xqw8-4j56-5hj6))
|
||||
* Add for searching already-known private GtS posts ([#​38057](https://github.com/tootsuite/mastodon/issues/38057) by [@​ClearlyClaire](https://github.com/ClearlyClaire))
|
||||
* Change media description length limit for remote media attachments from 1500 to 10000 characters ([#​37921](https://github.com/tootsuite/mastodon/issues/37921) by [@​ClearlyClaire](https://github.com/ClearlyClaire))
|
||||
* Change HTTP signatures to skip the `Accept` header ([#​38132](https://github.com/tootsuite/mastodon/issues/38132) by [@​ClearlyClaire](https://github.com/ClearlyClaire))
|
||||
* Change numeric AP endpoints to redirect to short account URLs when HTML is requested ([#​38056](https://github.com/tootsuite/mastodon/issues/38056) by [@​ClearlyClaire](https://github.com/ClearlyClaire))
|
||||
* Fix some model definitions in `tootctl maintenance fix-duplicates` ([#​38214](https://github.com/tootsuite/mastodon/issues/38214) by [@​ClearlyClaire](https://github.com/ClearlyClaire))
|
||||
* Fix overly strict checks for current username on account migration page ([#​38183](https://github.com/tootsuite/mastodon/issues/38183) by [@​mjankowski](https://github.com/mjankowski))
|
||||
* Fix OpenStack Swift Keystone token rate limiting ([#​38145](https://github.com/tootsuite/mastodon/issues/38145) by [@​hugogameiro](https://github.com/hugogameiro))
|
||||
* Fix poll expiration notification being re-triggered on implicit updates ([#​38078](https://github.com/tootsuite/mastodon/issues/38078) by [@​ClearlyClaire](https://github.com/ClearlyClaire))
|
||||
|
||||
[1.17.9]
|
||||
* Update mastodon to 4.5.9
|
||||
* [Full Changelog](https://github.com/mastodon/mastodon/releases/tag/v4.5.9)
|
||||
* Insufficient verification of email addresses ([GHSA-5r37-qpwq-2jhh](https://github.com/mastodon/mastodon/security/advisories/GHSA-5r37-qpwq-2jhh))
|
||||
* Updated dependencies
|
||||
* Add trademark warning to `mastodon:setup` task ([#38548](https://github.com/tootsuite/mastodon/issues/38548) by [@ClearlyClaire](https://github.com/ClearlyClaire))
|
||||
* Fix definition for `quote` in JSON-LD context ([#38686](https://github.com/tootsuite/mastodon/issues/38686) by [@ClearlyClaire](https://github.com/ClearlyClaire))
|
||||
* Fix being unable to disable sound for quote update notification ([#38537](https://github.com/tootsuite/mastodon/issues/38537) by [@ClearlyClaire](https://github.com/ClearlyClaire))
|
||||
* Fix being able to quote someone you blocked ([#38608](https://github.com/tootsuite/mastodon/issues/38608) by [@ClearlyClaire](https://github.com/ClearlyClaire))
|
||||
|
||||
[1.17.10]
|
||||
* fix: update doc links from /apps/ to /packages/
|
||||
|
||||
[1.17.11]
|
||||
* Update mastodon to 4.5.10
|
||||
* [Full Changelog](https://github.com/mastodon/mastodon/releases/tag/v4.5.10)
|
||||
* Fix SSRF protection bypass ([GHSA-crr4-7rm4-8gpw](https://github.com/mastodon/mastodon/security/advisories/GHSA-crr4-7rm4-8gpw), [GHSA-xx55-4rrg-8xg6](https://github.com/mastodon/mastodon/security/advisories/GHSA-xx55-4rrg-8xg6))
|
||||
* Fix Linked-Data Signature bypass through JSON-LD graph restructuring features ([GHSA-53m7-2wrh-q839](https://github.com/mastodon/mastodon/security/advisories/GHSA-53m7-2wrh-q839), [GHSA-chgx-jx3p-rf73](https://github.com/mastodon/mastodon/security/advisories/GHSA-chgx-jx3p-rf73))
|
||||
* Updated dependencies
|
||||
* Fix type of `interactingObject`, `interactionTarget` and add missing `QuoteAuthorization` ([#38940](https://github.com/tootsuite/mastodon/issues/38940) by [@ClearlyClaire](https://github.com/ClearlyClaire))
|
||||
* Remove unused devise strategies ([#38795](https://github.com/tootsuite/mastodon/issues/38795) by [@ClearlyClaire](https://github.com/ClearlyClaire))
|
||||
|
||||
[1.17.12]
|
||||
* Update mastodon to 4.5.11
|
||||
* [Full Changelog](https://github.com/mastodon/mastodon/releases/tag/v4.5.11)
|
||||
* Fix allowed attribution domains spoofing ([GHSA-rwcw-vq68-g34p](https://github.com/mastodon/mastodon/security/advisories/GHSA-rwcw-vq68-g34p))
|
||||
* Fix uncaught exception in message sanitization causing Denial of Service ([GHSA-qrgq-9fx2-vf2r](https://github.com/mastodon/mastodon/security/advisories/GHSA-qrgq-9fx2-vf2r))
|
||||
* Update dependencies
|
||||
* Fix remote statuses with large media descriptions being rejected ([#39135](https://github.com/tootsuite/mastodon/issues/39135) by [@ClearlyClaire](https://github.com/ClearlyClaire))
|
||||
|
||||
[1.18.0]
|
||||
* Update mastodon to 4.6.0
|
||||
* [Full Changelog](https://github.com/mastodon/mastodon/releases/tag/v4.6.0)
|
||||
* Add collections ([#37992](https://github.com/tootsuite/mastodon/issues/37992) and others) - Create collections with up to 25 accounts each, then share them with others.
|
||||
* Add email subscriptions ([#38163](https://github.com/tootsuite/mastodon/issues/38163) and others) - Admins can allow specific roles to enable email subscriptions on their profile.
|
||||
* Add new overview landing page setting ([#39074](https://github.com/tootsuite/mastodon/issues/39074) and others) - Admins can choose a new frontpage for anonymous visitors.
|
||||
* Add ability to require 2FA for specific roles (including Everybody) ([#37701](https://github.com/tootsuite/mastodon/issues/37701) and others)
|
||||
* Remove support for EOL Node version 20 ([#38926](https://github.com/tootsuite/mastodon/issues/38926) by [@mjankowski](https://github.com/mjankowski))
|
||||
* Remove support for Ruby 3.2 ([#37476](https://github.com/tootsuite/mastodon/issues/37476) by [@mjankowski](https://github.com/mjankowski))
|
||||
* Remove support for ImageMagick ([#37488](https://github.com/tootsuite/mastodon/issues/37488) by [@mjankowski](https://github.com/mjankowski))
|
||||
* Change invitations to only bypass sign-up approval setting when the issuer of the invitation has the `invite_bypass_approval` permission ([#38278](https://github.com/tootsuite/mastodon/issues/38278) by [@ClearlyClaire](https://github.com/ClearlyClaire))
|
||||
* Fix filters not being applied to search results in web UI ([#36346](https://github.com/tootsuite/mastodon/issues/36346) by [@ClearlyClaire](https://github.com/ClearlyClaire))
|
||||
* Fix remote posts with large media descriptions being rejected ([#39135](https://github.com/tootsuite/mastodon/issues/39135) by [@ClearlyClaire](https://github.com/ClearlyClaire))
|
||||
|
||||
[1.18.1]
|
||||
* Update mastodon to 4.6.1
|
||||
* [Full Changelog](https://github.com/mastodon/mastodon/releases/tag/v4.6.1)
|
||||
* Add `avatar_description` and `header_description` to `/api/v1/accounts/update_credentials` ([#39547](https://github.com/tootsuite/mastodon/issues/39547) and [#39574](https://github.com/tootsuite/mastodon/issues/39574) by [@ClearlyClaire](https://github.com/ClearlyClaire) and [@mkljczk](https://github.com/mkljczk))
|
||||
* Fix combobox menu not closing after a selection ([#39595](https://github.com/tootsuite/mastodon/issues/39595) by [@diondiondion](https://github.com/diondiondion))
|
||||
* Fix Emoji IndexedDB upgrades when multiple tabs are open ([#39576](https://github.com/tootsuite/mastodon/issues/39576) by [@ChaosExAnima](https://github.com/ChaosExAnima))
|
||||
* Fix combobox listbox not scrolling up when new suggestions have loaded ([#39588](https://github.com/tootsuite/mastodon/issues/39588) by [@diondiondion](https://github.com/diondiondion))
|
||||
* Fix media modal navigation in RTL languages ([#39587](https://github.com/tootsuite/mastodon/issues/39587) by [@diondiondion](https://github.com/diondiondion))
|
||||
* Fix accounts not visible in collection editor in advanced web interface ([#39586](https://github.com/tootsuite/mastodon/issues/39586) by [@diondiondion](https://github.com/diondiondion))
|
||||
* Fix error on login with certain LDAP configurations ([#39571](https://github.com/tootsuite/mastodon/issues/39571) by [@oneiros](https://github.com/oneiros))
|
||||
* Fix simplified layout applying to other pages in web UI ([#39570](https://github.com/tootsuite/mastodon/issues/39570) by [@Gargron](https://github.com/Gargron))
|
||||
* Fix emoji database loading in web worker ([#39558](https://github.com/tootsuite/mastodon/issues/39558) and [#39562](https://github.com/tootsuite/mastodon/issues/39562) by [@ChaosExAnima](https://github.com/ChaosExAnima))
|
||||
* Fix display name length limit being incorrectly enforced in web UI ([#39499](https://github.com/tootsuite/mastodon/issues/39499) by [@shleeable](https://github.com/shleeable))
|
||||
|
||||
[1.18.2]
|
||||
* Update mastodon to 4.6.2
|
||||
* [Full Changelog](https://github.com/mastodon/mastodon/releases/tag/v4.6.2)
|
||||
* Update FFMpeg version used in the container image to fix [CVE-2026-8461](https://github.com/advisories/GHSA-qff7-4q6c-m8h6) (critical severity)
|
||||
|
||||
[1.18.3]
|
||||
* Update mastodon to 4.6.3
|
||||
* [Full Changelog](https://github.com/mastodon/mastodon/releases/tag/v4.6.3)
|
||||
* Update dependencies
|
||||
* Add "Update available" navigation item at top of navbar when new Mastodon versions are available ([#39705](https://github.com/tootsuite/mastodon/issues/39705) by [@ClearlyClaire](https://github.com/ClearlyClaire))
|
||||
* Add rendering of post images in emails ([#39636](https://github.com/tootsuite/mastodon/issues/39636) by [@diondiondion](https://github.com/diondiondion))
|
||||
* Fix "view collection" menu item appearing on collection page ([#39694](https://github.com/tootsuite/mastodon/issues/39694) by [@mkljczk](https://github.com/mkljczk))
|
||||
* Fix incorrect filter cache key sometimes causing incorrect filters to be applied ([#39698](https://github.com/tootsuite/mastodon/issues/39698) by [@ClearlyClaire](https://github.com/ClearlyClaire))
|
||||
* Fix missing `to_json` to publish announcement reaction worker ([#39685](https://github.com/tootsuite/mastodon/issues/39685) by [@mjankowski](https://github.com/mjankowski))
|
||||
* Fix duplicate "clear" button shown in main search input in Chrome ([#39679](https://github.com/tootsuite/mastodon/issues/39679) by [@diondiondion](https://github.com/diondiondion))
|
||||
* Fix visual glitch with the spoiler button ([#39677](https://github.com/tootsuite/mastodon/issues/39677) by [@ChaosExAnima](https://github.com/ChaosExAnima))
|
||||
* Fix invisible username during post highlight animation ([#39659](https://github.com/tootsuite/mastodon/issues/39659) by [@diondiondion](https://github.com/diondiondion))
|
||||
* Fix follow button floating on profiles when overview landing page is enabled ([#39650](https://github.com/tootsuite/mastodon/issues/39650) by [@FFederi](https://github.com/FFederi))
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
"description": "file://DESCRIPTION.md",
|
||||
"changelog": "file://CHANGELOG",
|
||||
"tagline": "Federated social network",
|
||||
"version": "1.17.5",
|
||||
"upstreamVersion": "4.5.5",
|
||||
"version": "1.18.3",
|
||||
"upstreamVersion": "4.6.3",
|
||||
"healthCheckPath": "/about",
|
||||
"httpPort": 8000,
|
||||
"memoryLimit": 1610612736,
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ RUN mkdir -p /app/code /app/pkg
|
||||
WORKDIR /app/code
|
||||
|
||||
# renovate: datasource=github-releases depName=tootsuite/mastodon versioning=semver extractVersion=^v(?<version>.+)$
|
||||
ARG MASTODON_VERSION=4.5.5
|
||||
ARG MASTODON_VERSION=4.6.3
|
||||
|
||||
ENV RAILS_ENV production
|
||||
ENV NODE_ENV production
|
||||
|
||||
+4
-4
@@ -1,17 +1,17 @@
|
||||
Accounts are created with the username and the subdomain under which this app is installed e.g. `@$CLOUDRON-USERNAME@$CLOUDRON-APP-FQDN`.
|
||||
Mastodon does not allow changing the domain part of the account later.
|
||||
See [the docs](https://docs.cloudron.io/apps/mastodon/#federation) for more information, f you want to change this domain.
|
||||
See [the docs](https://docs.cloudron.io/packages/mastodon/#federation) for more information, f you want to change this domain.
|
||||
|
||||
<sso>
|
||||
**NOTE:**
|
||||
* Mastodon has [restrictions](https://docs.cloudron.io/apps/mastodon/#username-restriction) on usernames that might prevent some users from logging in.
|
||||
* Mastodon has [restrictions](https://docs.cloudron.io/packages/mastodon/#username-restriction) on usernames that might prevent some users from logging in.
|
||||
|
||||
* External registration [does not work well](https://github.com/mastodon/mastodon/issues/20655) when Cloudron user management is enabled.
|
||||
</sso>
|
||||
|
||||
<nosso>
|
||||
**NOTE:**
|
||||
* Open registration is disabled by default. To enable this, see the [docs](https://docs.cloudron.io/apps/mastodon/#registration)
|
||||
* Open registration is disabled by default. To enable this, see the [docs](https://docs.cloudron.io/packages/mastodon/#registration)
|
||||
|
||||
* To add an initial account follow those [instructions](https://docs.cloudron.io/apps/mastodon/#adding-users)
|
||||
* To add an initial account follow those [instructions](https://docs.cloudron.io/packages/mastodon/#adding-users)
|
||||
</nosso>
|
||||
|
||||
Generated
-3370
File diff suppressed because it is too large
Load Diff
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"name": "test",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "test.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"expect.js": "^0.3.1",
|
||||
"mocha": "^11.7.5",
|
||||
"selenium-webdriver": "^4.40.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"chromedriver": "^143.0.4"
|
||||
}
|
||||
}
|
||||
Executable → Regular
+41
-158
@@ -1,143 +1,47 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/* jshint esversion: 8 */
|
||||
/* global describe */
|
||||
/* global before */
|
||||
/* global after */
|
||||
/* global afterEach */
|
||||
/* global it */
|
||||
/* global xit */
|
||||
import { app, clearCache, click, cloudronCli, goto, loginOIDC, sendKeys, setupBrowser, takeScreenshot, teardownBrowser, waitFor } from '@cloudron/charlie';
|
||||
|
||||
'use strict';
|
||||
|
||||
require('chromedriver');
|
||||
|
||||
const execSync = require('child_process').execSync,
|
||||
expect = require('expect.js'),
|
||||
fs = require('fs'),
|
||||
path = require('path'),
|
||||
{ Builder, By, until } = require('selenium-webdriver'),
|
||||
{ Options } = require('selenium-webdriver/chrome');
|
||||
|
||||
if (!process.env.USERNAME || !process.env.PASSWORD) {
|
||||
console.log('USERNAME and PASSWORD env vars need to be set');
|
||||
process.exit(1);
|
||||
}
|
||||
/* global it, describe, before, after, afterEach */
|
||||
|
||||
describe('Application life cycle test', function () {
|
||||
this.timeout(0);
|
||||
|
||||
const LOCATION = process.env.LOCATION || 'test';
|
||||
const TEST_TIMEOUT = parseInt(process.env.TIMEOUT) || 10000;
|
||||
const EXEC_ARGS = { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' };
|
||||
|
||||
let browser, app;
|
||||
const username = process.env.USERNAME;
|
||||
const password = process.env.PASSWORD;
|
||||
|
||||
before(function () {
|
||||
const chromeOptions = new Options().windowSize({ width: 1280, height: 1024 });
|
||||
if (process.env.CI) chromeOptions.addArguments('no-sandbox', 'disable-dev-shm-usage', 'headless');
|
||||
browser = new Builder().forBrowser('chrome').setChromeOptions(chromeOptions).build();
|
||||
if (!fs.existsSync('./screenshots')) fs.mkdirSync('./screenshots');
|
||||
});
|
||||
|
||||
after(function () {
|
||||
browser.quit();
|
||||
});
|
||||
before(setupBrowser);
|
||||
after(teardownBrowser);
|
||||
|
||||
afterEach(async function () {
|
||||
if (!process.env.CI || !app) return;
|
||||
|
||||
const currentUrl = await browser.getCurrentUrl();
|
||||
if (!currentUrl.includes(app.domain)) return;
|
||||
expect(this.currentTest.title).to.be.a('string');
|
||||
|
||||
const screenshotData = await browser.takeScreenshot();
|
||||
fs.writeFileSync(`./screenshots/${new Date().getTime()}-${this.currentTest.title.replaceAll(' ', '_')}.png`, screenshotData, 'base64');
|
||||
await takeScreenshot(this.currentTest);
|
||||
});
|
||||
|
||||
async function waitForElement(elem) {
|
||||
await browser.wait(until.elementLocated(elem), TEST_TIMEOUT);
|
||||
await browser.wait(until.elementIsVisible(browser.findElement(elem)), TEST_TIMEOUT);
|
||||
async function checkRegistrationClosed() {
|
||||
await goto(`https://${app.fqdn}`, 'Create account');
|
||||
await click('Create account');
|
||||
await waitFor(/is currently not possible/);
|
||||
}
|
||||
|
||||
async function exists(selector) {
|
||||
await browser.wait(until.elementLocated(selector), TEST_TIMEOUT);
|
||||
async function login(addr, pass) {
|
||||
await goto(`https://${app.fqdn}/auth/sign_in`, 'Log in');
|
||||
await sendKeys('label=E-mail address', addr);
|
||||
await sendKeys('label=Password', pass);
|
||||
await click('Log in');
|
||||
}
|
||||
|
||||
async function visible(selector) {
|
||||
await exists(selector);
|
||||
await browser.wait(until.elementIsVisible(browser.findElement(selector)), TEST_TIMEOUT);
|
||||
}
|
||||
|
||||
async function checkRegistration(mode) {
|
||||
if (mode === 'none') {
|
||||
await browser.get('https://' + app.fqdn);
|
||||
await browser.sleep(2000);
|
||||
await browser.findElement(By.xpath('//div[@class="sign-in-banner"]/descendant::button/span[contains(text(), "Create account")] | //div[@class="sign-in-banner"]/descendant::a/span[contains(text(), "Create account")]')).click();
|
||||
await visible(By.xpath('//span[contains(text()[2], "is currently not possible")]'));
|
||||
} else if (mode === 'open') {
|
||||
await browser.get('https://' + app.fqdn + '/auth/sign_up');
|
||||
await visible(By.xpath('//button[contains(text(), "Sign up")]'));
|
||||
}
|
||||
}
|
||||
|
||||
async function login(username, password) {
|
||||
await browser.get('https://' + app.fqdn + '/auth/sign_in'); // there is also separate login page at /users/sign_in
|
||||
await visible(By.xpath('//button[contains(text(), "Log in")]'));
|
||||
await browser.findElement(By.id('user_email')).sendKeys(username);
|
||||
await browser.findElement(By.id('user_password')).sendKeys(password);
|
||||
await browser.findElement(By.xpath('//button[contains(text(), "Log in")]')).click();
|
||||
await browser.sleep(3000); // can be wizard or timeline at this point
|
||||
}
|
||||
|
||||
async function loginOIDC(username, password, hasSession) {
|
||||
browser.manage().deleteAllCookies();
|
||||
await browser.get(`https://${app.fqdn}/auth/sign_in`);
|
||||
await browser.sleep(4000);
|
||||
|
||||
await browser.findElement(By.xpath('//a[contains(@class, "button") and text()="Cloudron"]')).click();
|
||||
await browser.sleep(4000);
|
||||
|
||||
if (!hasSession) {
|
||||
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();
|
||||
}
|
||||
|
||||
await waitForElement(By.xpath('//span[contains(., "Bookmarks")] | //strong[text()="Successfully authenticated from Cloudron account."]'));
|
||||
}
|
||||
|
||||
async function logout() {
|
||||
await browser.get('https://' + app.fqdn + '/settings/preferences/appearance'); // there is also separate login page at /users/sign_in
|
||||
await browser.wait(until.elementLocated(By.id('logout')), TEST_TIMEOUT);
|
||||
await browser.findElement(By.id('logout')).click();
|
||||
await visible(By.id('user_email'));
|
||||
async function loginOidc() {
|
||||
await goto(`https://${app.fqdn}/auth/sign_in`, 'Cloudron');
|
||||
await click('Cloudron');
|
||||
await loginOIDC(/Bookmarks|Successfully authenticated from Cloudron account\./);
|
||||
}
|
||||
|
||||
async function checkTimeline() {
|
||||
await browser.get('https://' + app.fqdn + '/home');
|
||||
await visible(By.xpath('//span[contains(text(), "Your home timeline is empty")]'));
|
||||
await goto(`https://${app.fqdn}/home`, /Your home timeline is empty/);
|
||||
}
|
||||
|
||||
function getAppInfo() {
|
||||
const inspect = JSON.parse(execSync('cloudron inspect'));
|
||||
app = inspect.apps.filter(function (a) { return a.location === LOCATION || a.location === LOCATION + '2'; })[0];
|
||||
expect(app).to.be.an('object');
|
||||
}
|
||||
|
||||
xit('build app', function () { execSync('cloudron build', 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('install app (no sso)', function () { cloudronCli.install({ noSso: true }); });
|
||||
|
||||
it('has registration open', checkRegistration.bind(null, 'none'));
|
||||
it('has registration closed', checkRegistrationClosed);
|
||||
let testPassword;
|
||||
it('create a user with CLI', function () {
|
||||
const output = execSync('cloudron exec --app ' + LOCATION + ' -- bin/tootctl accounts create test --email=test@cloudron.io', { cwd: path.resolve(__dirname, '..'), encoding: 'utf8' });
|
||||
const output = cloudronCli.exec('bin/tootctl accounts create test --email=test@cloudron.io').toString();
|
||||
console.log(output);
|
||||
testPassword = output.slice(output.indexOf('New password: ') + 'New password: '.length).trim();
|
||||
console.log(testPassword);
|
||||
@@ -148,64 +52,43 @@ describe('Application life cycle test', function () {
|
||||
});
|
||||
|
||||
it('shows confirmation page', async function () {
|
||||
await waitForElement(By.xpath('//a[@href="/auth/confirmation/new"] | //form[@id="edit_user_1"]'));
|
||||
await waitFor('Check your inbox');
|
||||
});
|
||||
|
||||
it('uninstall app (no sso)', async function () {
|
||||
await browser.get('about:blank');
|
||||
execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS);
|
||||
});
|
||||
it('uninstall app (no sso)', cloudronCli.uninstall);
|
||||
|
||||
// SSO
|
||||
it('install app (sso)', function () { execSync('cloudron install --location ' + LOCATION, EXEC_ARGS); });
|
||||
it('install app (sso)', cloudronCli.install);
|
||||
|
||||
it('can get app information', getAppInfo);
|
||||
it('registration is disabled', checkRegistration.bind(null, 'none'));
|
||||
it('can OIDC login', loginOIDC.bind(null, username, password, false));
|
||||
it('registration is disabled', checkRegistrationClosed);
|
||||
it('can OIDC login', loginOidc);
|
||||
it('can see timeline', checkTimeline);
|
||||
it('can logout', logout);
|
||||
it('can logout', clearCache);
|
||||
|
||||
it('backup app', function () { execSync('cloudron backup create --app ' + app.id, EXEC_ARGS); });
|
||||
it('restore app', function () {
|
||||
const backups = JSON.parse(execSync('cloudron backup list --raw'));
|
||||
execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS);
|
||||
execSync('cloudron install --location ' + LOCATION, EXEC_ARGS);
|
||||
getAppInfo();
|
||||
execSync(`cloudron restore --backup ${backups[0].id} --app ${app.id}`, EXEC_ARGS);
|
||||
});
|
||||
it('backup app', cloudronCli.createBackup);
|
||||
it('restore app', cloudronCli.restoreFromLatestBackup);
|
||||
|
||||
it('can OIDC login', loginOIDC.bind(null, username, password, true));
|
||||
it('can OIDC login', loginOidc);
|
||||
it('can see timeline', checkTimeline);
|
||||
|
||||
it('can restart app', function () { execSync('cloudron restart --app ' + app.id, EXEC_ARGS); });
|
||||
it('can restart app', cloudronCli.restart);
|
||||
it('can see timeline', checkTimeline);
|
||||
|
||||
it('move to different location', async function () {
|
||||
await browser.get('about:blank');
|
||||
execSync('cloudron configure --location ' + LOCATION + '2 --app ' + app.id, EXEC_ARGS);
|
||||
});
|
||||
it('can get app information', getAppInfo);
|
||||
it('move to different location', cloudronCli.changeLocation);
|
||||
|
||||
it('can OIDC login', loginOIDC.bind(null, username, password, true));
|
||||
it('can OIDC login', loginOidc);
|
||||
it('can see timeline', checkTimeline);
|
||||
|
||||
it('uninstall app', async function () {
|
||||
await browser.get('about:blank');
|
||||
execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS);
|
||||
});
|
||||
it('uninstall app', cloudronCli.uninstall);
|
||||
|
||||
// test update
|
||||
it('can install app', function () { execSync('cloudron install --appstore-id org.joinmastodon.cloudronapp --location ' + LOCATION, EXEC_ARGS); });
|
||||
it('can get app information', getAppInfo);
|
||||
it('can OIDC login', loginOIDC.bind(null, username, password, true));
|
||||
it('can logout', logout);
|
||||
it('can install app for update', cloudronCli.appstoreInstall);
|
||||
it('can OIDC login', loginOidc);
|
||||
it('can logout', clearCache);
|
||||
|
||||
it('can update', async function () {
|
||||
await browser.get('about:blank');
|
||||
execSync('cloudron update --app ' + LOCATION, EXEC_ARGS);
|
||||
});
|
||||
it('can update', cloudronCli.update);
|
||||
|
||||
it('can OIDC login', loginOIDC.bind(null, username, password, true));
|
||||
it('can OIDC login', loginOidc);
|
||||
|
||||
it('uninstall app', function () { execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS); });
|
||||
it('uninstall app', cloudronCli.uninstall);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user