1
0
mirror of https://git.cloudron.io/cloudron/gitea-app synced 2025-09-25 14:37:44 +00:00

Compare commits

...

32 Commits

Author SHA1 Message Date
Package Updates
c0384ea5db Update package version to 1.34.3 2025-02-19 12:29:02 +00:00
Renovate Bot
ffc49beb18 chore(deps): update dependency go-gitea/gitea to v1.23.4
| datasource      | package        | from   | to     |
| --------------- | -------------- | ------ | ------ |
| github-releases | go-gitea/gitea | 1.23.3 | 1.23.4 |
2025-02-19 12:16:25 +00:00
Package Updates
b51354ea67 Update package version to 1.34.2 2025-02-06 09:06:13 +00:00
Renovate Bot
3017db2ca3 chore(deps): update dependency go-gitea/gitea to v1.23.3
| datasource      | package        | from   | to     |
| --------------- | -------------- | ------ | ------ |
| github-releases | go-gitea/gitea | 1.23.1 | 1.23.3 |
2025-02-06 08:50:59 +00:00
Package Updates
afc6c1a336 Update package version to 1.34.1 2025-01-10 09:17:06 +00:00
Renovate Bot
856e8ffded chore(deps): update dependency go-gitea/gitea to v1.23.1
| datasource      | package        | from   | to     |
| --------------- | -------------- | ------ | ------ |
| github-releases | go-gitea/gitea | 1.23.0 | 1.23.1 |
2025-01-10 08:46:05 +00:00
Package Updates
0e8051524b Update package version to 1.34.0 2025-01-09 11:26:55 +00:00
Girish Ramakrishnan
343c4f4487 Fix tests 2025-01-09 12:17:46 +01:00
Renovate Bot
fa8b746489 chore(deps): update dependency go-gitea/gitea to v1.23.0
| datasource      | package        | from   | to     |
| --------------- | -------------- | ------ | ------ |
| github-releases | go-gitea/gitea | 1.22.6 | 1.23.0 |
2025-01-09 08:44:12 +00:00
Package Updates
e703139dad Update package version to 1.33.6 2024-12-13 23:00:14 +00:00
Renovate Bot
038c2634f7 chore(deps): update dependency go-gitea/gitea to v1.22.6
| datasource      | package        | from   | to     |
| --------------- | -------------- | ------ | ------ |
| github-releases | go-gitea/gitea | 1.22.5 | 1.22.6 |
2024-12-13 17:20:40 +00:00
Package Updates
506fc44188 Update package version to 1.33.5 2024-12-11 22:21:00 +00:00
Renovate Bot
b37adcbcba chore(deps): update dependency go-gitea/gitea to v1.22.5
| datasource      | package        | from   | to     |
| --------------- | -------------- | ------ | ------ |
| github-releases | go-gitea/gitea | 1.22.4 | 1.22.5 |
2024-12-11 22:10:56 +00:00
Johannes Zellner
d5b80c9393 Mention why CLOUDRON_OIDC_PROVIDER_NAME is not supported 2024-12-09 12:25:51 +01:00
Johannes Zellner
e180f84aef use checklists in manifest 2024-12-09 12:24:46 +01:00
Package Updates
090c4c43a8 Update package version to 1.33.4 2024-11-26 04:08:17 +00:00
Renovate Bot
ce1c328a27 chore(deps): update dependency go-gitea/gitea to v1.22.4
| datasource      | package        | from   | to     |
| --------------- | -------------- | ------ | ------ |
| github-releases | go-gitea/gitea | 1.22.3 | 1.22.4 |
2024-11-26 02:34:19 +00:00
Girish Ramakrishnan
e76784cb8f Update renovate.json5 2024-11-04 17:10:01 +00:00
Girish Ramakrishnan
64d8d5b661 Add renovate.json5 2024-11-04 17:02:57 +00:00
Girish Ramakrishnan
bf30c8e13b Delete renovate.json 2024-11-04 16:56:47 +00:00
Girish Ramakrishnan
381562f347 Delete .gitlab-ci.yml 2024-11-04 08:37:59 +00:00
Girish Ramakrishnan
ffa9d52206 Version 1.33.3 2024-10-09 09:43:30 +02:00
Girish Ramakrishnan
7d0d52ceae change perms 2024-10-09 09:36:48 +02:00
Girish Ramakrishnan
f19465b3d6 Fix test 2024-10-09 09:28:39 +02:00
Girish Ramakrishnan
662cfae820 Update test packages 2024-10-09 09:19:11 +02:00
Renovate Bot
e365f033d1 chore(deps): update dependency go-gitea/gitea to v1.22.3 2024-10-09 07:14:02 +00:00
Renovate Bot
b8e5fcc22d chore(deps): add renovate.json 2024-10-09 07:13:02 +00:00
Girish Ramakrishnan
a176ab5f20 Add renovate 2024-10-09 07:11:32 +00:00
Girish Ramakrishnan
9b773524ce add ci files 2024-10-09 09:08:28 +02:00
Girish Ramakrishnan
9c4088e812 Version 1.33.2 2024-09-05 21:34:44 +02:00
Girish Ramakrishnan
c956c27334 Update test packages 2024-09-05 21:30:47 +02:00
Girish Ramakrishnan
75aa1f09a5 Update Gitea to 1.22.2 2024-09-05 21:29:09 +02:00
9 changed files with 870 additions and 242 deletions

View File

@@ -1615,3 +1615,98 @@
* Update Gitea to 1.22.1 * Update Gitea to 1.22.1
* [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.22.1) * [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.22.1)
[1.33.2]
* Update Gitea to 1.22.2
* [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.22.2)
* Replace v-html with v-text in search inputbox (#31966) (#31973)
* Fix nuget/conan/container packages upload bugs (#31967) (#31982)
* Refactor the usage of batch catfile (#31754) (#31889)
* Fix overflowing content in action run log (#31842) (#31853)
* Scroll images in project issues separately from the remaining issue (#31683) (#31823)
* Add :focus-visible style to buttons (#31799) (#31819)
* Fix the display of project type for deleted projects (#31732) (#31734)
* Fix API owner ID should be zero when created repo secret (#31715) (#31811)
* Set owner id to zero when GetRegistrationToken for repo (#31725) (#31729)
* Fix API endpoint for registration-token (#31722) (#31728)
* Add permission check when creating PR (#31033) (#31720)
[1.33.3]
* Update Gitea to 1.22.3
* [Full changelog](https://github.com/go-gitea/gitea/releases/tag/v1.22.3)
* Fix bug when a token is given public only (#32204) (#32218)
* Increase cacheContextLifetime to reduce false reports (#32011) (#32023)
* Don't join repository when loading action table data (#32127) (#32143)
* Fix javascript error when an anonymous user visits migration page (#32144) (#32179)
* Don't init signing keys if oauth2 provider is disabled (#32177)
* Fix wrong status of Set up Job when first step is skipped (#32120) (#32125)
* Fix bug when deleting a migrated branch (#32075) (#32123)
* Truncate commit message during Discord webhook push events (#31970) (#32121)
* Allow to set branch protection in an empty repository (#32095) (#32119)
* Fix panic when cloning with wrong ssh format. (#32076) (#32118)
[1.33.4]
* Update gitea to 1.22.4
* [Full Changelog](https://github.com/go-gitea/gitea/releases/tag/v1.22.4)
* Fix basic auth with webauthn (#32531) (#32536)
* Refactor internal routers (partial backport, auth token const time comparing) (#32473) (#32479)
[1.33.5]
* Update gitea to 1.22.5
* [Full Changelog](https://github.com/go-gitea/gitea/releases/tag/v1.22.5)
* Upgrade crypto library ([#​32791](https://github.com/go-gitea/gitea/issues/32791))
* Fix delete branch perm checking ([#​32654](https://github.com/go-gitea/gitea/issues/32654)) ([#​32707](https://github.com/go-gitea/gitea/issues/32707))
* Add standard-compliant route to serve outdated R packages ([#​32783](https://github.com/go-gitea/gitea/issues/32783)) ([#​32789](https://github.com/go-gitea/gitea/issues/32789))
* Fix internal server error when updating labels without write permission ([#​32776](https://github.com/go-gitea/gitea/issues/32776)) ([#​32785](https://github.com/go-gitea/gitea/issues/32785))
* Add Swift login endpoint ([#​32693](https://github.com/go-gitea/gitea/issues/32693)) ([#​32701](https://github.com/go-gitea/gitea/issues/32701))
* Fix fork page branch selection ([#​32711](https://github.com/go-gitea/gitea/issues/32711)) ([#​32725](https://github.com/go-gitea/gitea/issues/32725))
* Fix word overflow in file search page ([#​32695](https://github.com/go-gitea/gitea/issues/32695)) ([#​32699](https://github.com/go-gitea/gitea/issues/32699))
* Fix gogit `GetRefCommitID` ([#​32705](https://github.com/go-gitea/gitea/issues/32705)) ([#​32712](https://github.com/go-gitea/gitea/issues/32712))
* Fix race condition in mermaid observer ([#​32599](https://github.com/go-gitea/gitea/issues/32599)) ([#​32673](https://github.com/go-gitea/gitea/issues/32673))
* Fixe a keystring misuse and refactor duplicates keystrings ([#​32668](https://github.com/go-gitea/gitea/issues/32668)) ([#​32792](https://github.com/go-gitea/gitea/issues/32792))
* Bump relative-time-element to v4.4.4 ([#​32739](https://github.com/go-gitea/gitea/issues/32739))
* Make wiki pages visit fast ([#​32732](https://github.com/go-gitea/gitea/issues/32732)) ([#​32745](https://github.com/go-gitea/gitea/issues/32745))
* Don't create action when syncing mirror pull refs ([#​32659](https://github.com/go-gitea/gitea/issues/32659)) ([#​32664](https://github.com/go-gitea/gitea/issues/32664))
[1.33.6]
* Update gitea to 1.22.6
* [Full Changelog](https://github.com/go-gitea/gitea/releases/tag/v1.22.6)
* Fix misuse of PublicKeyCallback([#​32810](https://github.com/go-gitea/gitea/issues/32810))
* Fix lfs migration ([#​32812](https://github.com/go-gitea/gitea/issues/32812)) ([#​32818](https://github.com/go-gitea/gitea/issues/32818))
* Add missing two sync feed for refs/pull ([#​32815](https://github.com/go-gitea/gitea/issues/32815))
* Avoid MacOS keychain dialog in integration tests ([#​32813](https://github.com/go-gitea/gitea/issues/32813)) ([#​32816](https://github.com/go-gitea/gitea/issues/32816))
[1.34.0]
* Update gitea to 1.23.0
* [Full Changelog](https://github.com/go-gitea/gitea/releases/tag/v1.23.0)
* Rename config option `[camo].Allways` to `[camo].Always` ([#​32097](https://github.com/go-gitea/gitea/issues/32097))
* Remove SHA1 for support for SSH RSA signing ([#​31857](https://github.com/go-gitea/gitea/issues/31857))
* Use UTC as the default timezone when scheduling Actions cron tasks ([#​31742](https://github.com/go-gitea/gitea/issues/31742))
* Delete Actions logs older than 1 year by default ([#​31735](https://github.com/go-gitea/gitea/issues/31735))
* Make OIDC introspection authentication strictly require Client ID and secret ([#​31632](https://github.com/go-gitea/gitea/issues/31632))
* Include file extension checks in attachment API ([#​32151](https://github.com/go-gitea/gitea/issues/32151))
[1.34.1]
* Update gitea to 1.23.1
* [Full Changelog](https://github.com/go-gitea/gitea/releases/tag/v1.23.1)
* Move repo size to sidebar ([#​33155](https://github.com/go-gitea/gitea/issues/33155))
* Fix editor markdown not incrementing in a numbered list ([#​33187](https://github.com/go-gitea/gitea/issues/33187)) [#​33193](https://github.com/go-gitea/gitea/issues/33193)
[1.34.2]
* Update gitea to 1.23.3
* [Full Changelog](https://github.com/go-gitea/gitea/releases/tag/v1.23.3)
* Build Gitea with Golang v1.23.6 to fix security bugs
* Fix a bug caused by status webhook template #33512
[1.34.3]
* Update gitea to 1.23.4
* [Full Changelog](https://github.com/go-gitea/gitea/releases/tag/v1.23.4)
* Enhance routers for the Actions variable operations (#33547) (#33553)
* Enhance routers for the Actions runner operations (#33549) (#33555)
* Fix project issues list and counting (#33594) #33619
* Add a transaction to pickTask (#33543) (#33563)
* Fix mirror bug (#33597) (#33607)
* Use default Git timeout when checking repo health (#33593) (#33598)
* Fix PR's target branch dropdown (#33589) (#33591)
* Fix various problems (artifact order, api empty slice, assignee check, fuzzy prompt, mirror proxy, adopt git) (#33569) (#33577)
* Rework suggestion backend (#33538) (#33546)
* Fix context usage (#33554) (#33557)

View File

@@ -4,16 +4,20 @@
"author": "Gitea developers", "author": "Gitea developers",
"description": "file://DESCRIPTION.md", "description": "file://DESCRIPTION.md",
"tagline": "A painless self-hosted Git Service", "tagline": "A painless self-hosted Git Service",
"version": "1.33.1", "version": "1.34.3",
"upstreamVersion": "1.22.1", "upstreamVersion": "1.23.4",
"healthCheckPath": "/explore", "healthCheckPath": "/explore",
"httpPort": 3000, "httpPort": 3000,
"memoryLimit": 536870912, "memoryLimit": 536870912,
"addons": { "addons": {
"mysql": { }, "mysql": {},
"sendmail": { "supportsDisplayName": true }, "sendmail": {
"localstorage": { }, "supportsDisplayName": true
"oidc": { "loginRedirectUri": "/user/oauth2/cloudron/callback" } },
"localstorage": {},
"oidc": {
"loginRedirectUri": "/user/oauth2/cloudron/callback"
}
}, },
"tcpPorts": { "tcpPorts": {
"SSH_PORT": { "SSH_PORT": {
@@ -34,10 +38,23 @@
"https://screenshots.cloudron.io/io.gitea.cloudronapp/4.png", "https://screenshots.cloudron.io/io.gitea.cloudronapp/4.png",
"https://screenshots.cloudron.io/io.gitea.cloudronapp/5.png" "https://screenshots.cloudron.io/io.gitea.cloudronapp/5.png"
], ],
"tags": [ "version control", "git", "code hosting", "development", "github", "bitbucket", "gitlab" ], "tags": [
"version control",
"git",
"code hosting",
"development",
"github",
"bitbucket",
"gitlab"
],
"changelog": "file://CHANGELOG.md", "changelog": "file://CHANGELOG.md",
"postInstallMessage": "file://POSTINSTALL.md", "postInstallMessage": "file://POSTINSTALL.md",
"minBoxVersion": "7.5.1", "checklist": {
"change-default-password": {
"message": "Change the default admin password"
}
},
"minBoxVersion": "8.1.0",
"forumUrl": "https://forum.cloudron.io/category/19/gitea", "forumUrl": "https://forum.cloudron.io/category/19/gitea",
"documentationUrl": "https://docs.cloudron.io/apps/gitea/" "documentationUrl": "https://docs.cloudron.io/apps/gitea/"
} }

View File

@@ -19,9 +19,10 @@ WORKDIR /home/git
# for autosign feature # for autosign feature
ENV GNUPGHOME="/app/data/gnupg" ENV GNUPGHOME="/app/data/gnupg"
ARG VERSION=1.22.1 # renovate: datasource=github-releases depName=go-gitea/gitea versioning=semver extractVersion=^v(?<version>.+)$
ARG GITEA_VERSION=1.23.4
RUN curl -L https://dl.gitea.io/gitea/${VERSION}/gitea-${VERSION}-linux-amd64 -o /home/git/gitea/gitea \ RUN curl -L https://dl.gitea.io/gitea/${GITEA_VERSION}/gitea-${GITEA_VERSION}-linux-amd64 -o /home/git/gitea/gitea \
&& chmod +x /home/git/gitea/gitea && chmod +x /home/git/gitea/gitea
# setup config paths # setup config paths

View File

@@ -3,8 +3,6 @@ This app is pre-setup with an admin account. The initial credentials are:
**Username**: root<br/> **Username**: root<br/>
**Password**: changeme<br/> **Password**: changeme<br/>
Please change the admin password immediately.
<sso> <sso>
Use the `Local` authentication source for logging in as admin. Use the `Local` authentication source for logging in as admin.
</sso> </sso>

4
renovate.json5 Normal file
View File

@@ -0,0 +1,4 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["local>devops/renovator//default.renovate.json5"]
}

View File

@@ -4,6 +4,7 @@ set -eu -o pipefail
mkdir -p /run/gitea/tmp/uploads /run/sshd /run/gitea/sessions mkdir -p /run/gitea/tmp/uploads /run/sshd /run/gitea/sessions
# CLOUDRON_OIDC_PROVIDER_NAME not supported as it will be used in rest route!
setup_oidc_source() { setup_oidc_source() {
set -eu set -eu

877
test/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -9,10 +9,10 @@
"author": "", "author": "",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"chromedriver": "^126.0.4", "chromedriver": "^133.0.1",
"expect.js": "^0.3.1", "expect.js": "^0.3.1",
"mocha": "^10.6.0", "mocha": "^11.1.0",
"selenium-webdriver": "^4.22.0", "selenium-webdriver": "^4.28.1",
"superagent": "^9.0.2" "superagent": "^10.1.1"
} }
} }

View File

@@ -1,11 +1,7 @@
#!/usr/bin/env node #!/usr/bin/env node
/* jshint esversion: 8 */ /* jshint esversion: 8 */
/* global it:false */ /* global it, xit, describe, before, after, afterEach */
/* global xit:false */
/* global describe:false */
/* global before:false */
/* global after:false */
'use strict'; 'use strict';
@@ -29,21 +25,22 @@ describe('Application life cycle test', function () {
const TIMEOUT = parseInt(process.env.TIMEOUT, 10) || 5000; const TIMEOUT = parseInt(process.env.TIMEOUT, 10) || 5000;
const EXEC_ARGS = { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' }; const EXEC_ARGS = { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' };
const LOCATION = 'test'; const LOCATION = process.env.LOCATION || 'test';
const SSH_PORT = 29420; const SSH_PORT = 29420;
let app, browser; let app, browser;
var athenticated_by_oidc = false;
const repodir = '/tmp/testrepo'; const repodir = '/tmp/testrepo';
const reponame = 'testrepo'; const reponame = 'testrepo';
const username = process.env.USERNAME; const username = process.env.USERNAME;
const password = process.env.PASSWORD; const password = process.env.PASSWORD;
const email = process.env.EMAIL;
before(function () { before(function () {
browser = new Builder().forBrowser('chrome').setChromeOptions(new Options().windowSize({ width: 1280, height: 1024 })).build(); 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 () { after(function () {
@@ -51,8 +48,19 @@ describe('Application life cycle test', function () {
fs.rmSync(repodir, { recursive: true, force: true }); fs.rmSync(repodir, { recursive: true, force: true });
}); });
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');
});
function getAppInfo() { function getAppInfo() {
var inspect = JSON.parse(execSync('cloudron inspect')); const inspect = JSON.parse(execSync('cloudron inspect'));
app = inspect.apps.filter(function (a) { return a.location.indexOf(LOCATION) === 0; })[0]; app = inspect.apps.filter(function (a) { return a.location.indexOf(LOCATION) === 0; })[0];
expect(app).to.be.an('object'); expect(app).to.be.an('object');
} }
@@ -99,7 +107,7 @@ describe('Application life cycle test', function () {
await login('root', 'changeme'); await login('root', 'changeme');
} }
async function loginOIDC(username, password) { async function loginOIDC(username, password, alreadyAuthenticated = true) {
browser.manage().deleteAllCookies(); browser.manage().deleteAllCookies();
await browser.get(`https://${app.fqdn}/user/login`); await browser.get(`https://${app.fqdn}/user/login`);
await browser.sleep(2000); await browser.sleep(2000);
@@ -108,15 +116,13 @@ describe('Application life cycle test', function () {
await browser.findElement(By.xpath('//a[contains(@class, "openidConnect") and contains(., "Sign in with cloudron")]')).click(); await browser.findElement(By.xpath('//a[contains(@class, "openidConnect") and contains(., "Sign in with cloudron")]')).click();
await browser.sleep(2000); await browser.sleep(2000);
if (!athenticated_by_oidc) { if (!alreadyAuthenticated) {
await waitForElement(By.xpath('//input[@name="username"]')); await waitForElement(By.id('inputUsername'));
await browser.findElement(By.xpath('//input[@name="username"]')).sendKeys(username); await browser.findElement(By.id('inputUsername')).sendKeys(username);
await browser.findElement(By.xpath('//input[@name="password"]')).sendKeys(password); await browser.findElement(By.id('inputPassword')).sendKeys(password);
await browser.sleep(2000); await browser.sleep(2000);
await browser.findElement(By.id('loginSubmitButton')).click(); await browser.findElement(By.id('loginSubmitButton')).click();
await browser.sleep(2000); await browser.sleep(2000);
athenticated_by_oidc = true;
} }
await waitForElement(By.xpath('//img[contains(@class, "avatar")]')); await waitForElement(By.xpath('//img[contains(@class, "avatar")]'));
@@ -132,7 +138,8 @@ describe('Application life cycle test', function () {
} }
async function addPublicKey() { async function addPublicKey() {
var publicKey = fs.readFileSync(__dirname + '/id_ed25519.pub', 'utf8'); const publicKey = fs.readFileSync(__dirname + '/id_ed25519.pub', 'utf8');
execSync(`chmod g-rw,o-rw ${__dirname}/id_ed25519`); // ssh will complain about perms later
await browser.get('https://' + app.fqdn + '/user/settings/keys'); await browser.get('https://' + app.fqdn + '/user/settings/keys');
@@ -147,25 +154,9 @@ describe('Application life cycle test', function () {
await browser.wait(until.elementLocated(By.xpath('//p[contains(text(), "has been added.")]')), TIMEOUT); await browser.wait(until.elementLocated(By.xpath('//p[contains(text(), "has been added.")]')), TIMEOUT);
} }
async function addPublicKeyOld() {
var publicKey = fs.readFileSync(__dirname + '/id_ed25519.pub', 'utf8');
await browser.get('https://' + app.fqdn + '/user/settings/keys');
await browser.wait(until.elementLocated(By.id('add-ssh-button')), TIMEOUT);
await browser.findElement(By.id('add-ssh-button')).click();
await browser.findElement(By.id('ssh-key-title')).sendKeys('testkey');
await browser.findElement(By.id('ssh-key-content')).sendKeys(publicKey.trim()); // #3480
var button = browser.findElement(By.xpath('//button[contains(text(), "Add Key")]'));
await browser.executeScript('arguments[0].scrollIntoView(false)', button);
await browser.findElement(By.xpath('//button[contains(text(), "Add Key") and contains(@class, "green")]')).click();
await browser.wait(until.elementLocated(By.xpath('//p[contains(text(), "has been added.")]')), TIMEOUT);
}
async function createRepo() { async function createRepo() {
var getRepoPage = await browser.get('https://' + app.fqdn + '/repo/create'); await browser.get(`https://${app.fqdn}/repo/create`);
await browser.wait(until.elementLocated(By.id('repo_name')));
await browser.findElement(By.id('repo_name')).sendKeys(reponame); await browser.findElement(By.id('repo_name')).sendKeys(reponame);
var button = browser.findElement(By.xpath('//button[contains(text(), "Create Repository")]')); var button = browser.findElement(By.xpath('//button[contains(text(), "Create Repository")]'));
await browser.executeScript('arguments[0].scrollIntoView(true)', button); await browser.executeScript('arguments[0].scrollIntoView(true)', button);
@@ -179,14 +170,6 @@ describe('Application life cycle test', function () {
}, TIMEOUT); }, TIMEOUT);
} }
async function checkCloneUrl() {
await browser.get('https://' + app.fqdn + '/' + username + '/' + reponame);
await browser.findElement(By.id('repo-clone-ssh')).click();
var cloneUrl = await browser.findElement(By.id('repo-clone-url')).getAttribute('value');
expect(cloneUrl).to.be(`ssh://git@${app.fqdn}:${SSH_PORT}/${username}/${reponame}.git`);
}
function cloneRepo() { function cloneRepo() {
fs.rmSync(repodir, { recursive: true, force: true }); fs.rmSync(repodir, { recursive: true, force: true });
var env = Object.create(process.env); var env = Object.create(process.env);
@@ -207,13 +190,13 @@ describe('Application life cycle test', function () {
} }
async function sendMail() { async function sendMail() {
await browser.get(`https://${app.fqdn}/admin/config`); await browser.get(`https://${app.fqdn}/-/admin/config`);
await browser.sleep(3000);
var button = await browser.findElement(By.xpath('//button[contains(text(), "Send")]')); const button = await browser.findElement(By.xpath('//button[contains(., "Send")]'));
await browser.executeScript('arguments[0].scrollIntoView(true)', button); await browser.executeScript('arguments[0].scrollIntoView(true)', button);
await browser.findElement(By.xpath('//input[@name="email"]')).sendKeys('test@cloudron.io'); await browser.findElement(By.xpath('//input[@name="email"]')).sendKeys('test@cloudron.io');
await browser.findElement(By.xpath('//button[contains(text(), "Send")]')).click(); await browser.findElement(By.xpath('//button[contains(., "Send")]')).click();
await browser.wait(until.elementLocated(By.xpath('//p[contains(text(), "A testing email has been sent")]')), TIMEOUT); await browser.wait(until.elementLocated(By.xpath('//p[contains(., "A testing email has been sent")]')), TIMEOUT);
} }
xit('build app', function () { execSync('cloudron build', EXEC_ARGS); }); xit('build app', function () { execSync('cloudron build', EXEC_ARGS); });
@@ -225,7 +208,7 @@ describe('Application life cycle test', function () {
it('can send mail', sendMail); it('can send mail', sendMail);
it('can logout', logout); it('can logout', logout);
it('can login', loginOIDC.bind(null, username, password)); it('can login', loginOIDC.bind(null, username, password, false));
it('can set avatar', setAvatar); it('can set avatar', setAvatar);
it('can get avatar', checkAvatar); it('can get avatar', checkAvatar);
@@ -233,8 +216,6 @@ describe('Application life cycle test', function () {
it('can create repo', createRepo); it('can create repo', createRepo);
it('displays correct clone url', checkCloneUrl);
it('can clone the url', cloneRepo); it('can clone the url', cloneRepo);
it('can add and push a file', pushFile); it('can add and push a file', pushFile);
@@ -242,7 +223,6 @@ describe('Application life cycle test', function () {
it('can restart app', function () { execSync('cloudron restart --app ' + app.id); }); it('can restart app', function () { execSync('cloudron restart --app ' + app.id); });
xit('can login', loginOIDC.bind(null, username, password)); // no need to relogin since session persists xit('can login', loginOIDC.bind(null, username, password)); // no need to relogin since session persists
it('displays correct clone url', checkCloneUrl);
it('can clone the url', cloneRepo); it('can clone the url', cloneRepo);
it('file exists in repo', fileExists); it('file exists in repo', fileExists);
@@ -265,7 +245,6 @@ describe('Application life cycle test', function () {
it('can login', loginOIDC.bind(null, username, password)); it('can login', loginOIDC.bind(null, username, password));
it('can get avatar', checkAvatar); it('can get avatar', checkAvatar);
it('displays correct clone url', checkCloneUrl);
it('can clone the url', cloneRepo); it('can clone the url', cloneRepo);
it('file exists in repo', function () { expect(fs.existsSync(repodir + '/newfile')).to.be(true); }); it('file exists in repo', function () { expect(fs.existsSync(repodir + '/newfile')).to.be(true); });