aboutsummaryrefslogtreecommitdiffstats
path: root/cypress/fixtures/testapp
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2023-11-10 21:28:56 +0100
committerFerdinand Thiessen <opensource@fthiessen.de>2023-11-12 01:13:21 +0100
commitb2d999fd6835e5c59b6086c658330ce7360a780f (patch)
tree0850dcfce7194176c7537ae0b00fa69a617dbf8d /cypress/fixtures/testapp
parent3ce31fc1bff99af87f6b9bd3ce74bd41011ce768 (diff)
downloadnextcloud-server-b2d999fd6835e5c59b6086c658330ce7360a780f.tar.gz
nextcloud-server-b2d999fd6835e5c59b6086c658330ce7360a780f.zip
fix(cypress): Do not install calendar app from app store for testing but use locally provided test app
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'cypress/fixtures/testapp')
-rw-r--r--cypress/fixtures/testapp/appinfo/info.xml31
-rw-r--r--cypress/fixtures/testapp/appinfo/routes.php11
-rw-r--r--cypress/fixtures/testapp/img/app.svg56
-rw-r--r--cypress/fixtures/testapp/lib/AppInfo/Application.php17
-rw-r--r--cypress/fixtures/testapp/lib/Controller/PageController.php26
-rw-r--r--cypress/fixtures/testapp/templates/main.php6
6 files changed, 147 insertions, 0 deletions
diff --git a/cypress/fixtures/testapp/appinfo/info.xml b/cypress/fixtures/testapp/appinfo/info.xml
new file mode 100644
index 00000000000..2e4eecfbdca
--- /dev/null
+++ b/cypress/fixtures/testapp/appinfo/info.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<info xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd">
+ <!--
+ SPDX-FileCopyrightText: Ferdinand Thiessen <opensource@fthiessen.de>
+ SPDX-License-Identifier: CC0-1.0
+ -->
+ <id>testapp</id>
+ <name>Test App</name>
+ <summary>Test App</summary>
+ <description><![CDATA[A simple test app]]></description>
+ <version>0.0.1</version>
+ <licence>agpl</licence>
+ <author mail="opensource@fthiessen.de" >Ferdinand Thiessen</author>
+ <namespace>TestApp</namespace>
+ <category>games</category>
+ <bugs>https://github.com/nextcloud/server/issues</bugs>
+ <dependencies>
+ <nextcloud min-version="28" max-version="28"/>
+ </dependencies>
+ <navigations>
+ <navigation>
+ <name>Test App</name>
+ <route>testapp.page.index</route>
+ </navigation>
+ <navigation>
+ <name>Test App 2</name>
+ <route>testapp.page.index</route>
+ </navigation>
+ </navigations>
+</info>
diff --git a/cypress/fixtures/testapp/appinfo/routes.php b/cypress/fixtures/testapp/appinfo/routes.php
new file mode 100644
index 00000000000..cd54acdc083
--- /dev/null
+++ b/cypress/fixtures/testapp/appinfo/routes.php
@@ -0,0 +1,11 @@
+<?php
+
+declare(strict_types=1);
+// SPDX-FileCopyrightText: Ferdinand Thiessen <opensource@fthiessen.de>
+// SPDX-License-Identifier: AGPL-3.0-or-later
+
+return [
+ 'routes' => [
+ ['name' => 'page#index', 'url' => '/', 'verb' => 'GET'],
+ ]
+];
diff --git a/cypress/fixtures/testapp/img/app.svg b/cypress/fixtures/testapp/img/app.svg
new file mode 100644
index 00000000000..fe370f80daf
--- /dev/null
+++ b/cypress/fixtures/testapp/img/app.svg
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ height="32"
+ width="32"
+ version="1"
+ viewBox="0 0 32 32"
+ id="svg4"
+ sodipodi:docname="app.svg"
+ inkscape:version="0.92.1 r">
+ <metadata
+ id="metadata10">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs8" />
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="789"
+ inkscape:window-height="480"
+ id="namedview6"
+ showgrid="false"
+ inkscape:zoom="7.375"
+ inkscape:cx="-8.3389831"
+ inkscape:cy="16"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="0"
+ inkscape:current-layer="svg4" />
+ <path
+ d="M13.733 0a.915.915 0 0 0-.933.934V3.6c-1.182.304-2.243.794-3.267 1.4L7.6 3.068a.93.93 0 0 0-1.334 0l-3.2 3.2a.93.93 0 0 0 0 1.334L5 9.535c-.607 1.024-1.097 2.085-1.4 3.267H.933a.915.915 0 0 0-.933.934v4.533c0 .53.403.934.933.934H3.6c.303 1.182.793 2.243 1.4 3.267l-1.934 1.935a.93.93 0 0 0 0 1.333l3.2 3.2a.93.93 0 0 0 1.333 0L9.532 27c1.024.61 2.085 1.097 3.266 1.4v2.667c0 .53.402.933.932.933h4.534c.53 0 .933-.403.933-.935V28.4c1.18-.305 2.24-.795 3.265-1.4L24.4 28.93a.93.93 0 0 0 1.332 0l3.2-3.2a.93.93 0 0 0 0-1.333L27 22.465c.607-1.024 1.096-2.085 1.4-3.266h2.665a.915.915 0 0 0 .935-.933v-4.534a.915.915 0 0 0-.934-.933H28.4c-.304-1.182-.792-2.243-1.4-3.267L28.932 7.6a.93.93 0 0 0 0-1.334l-3.2-3.2a.93.93 0 0 0-1.333 0L22.465 5c-1.024-.607-2.084-1.097-3.266-1.4V.933A.915.915 0 0 0 18.267 0zM16 8.87A7.134 7.134 0 0 1 23.13 16 7.134 7.134 0 0 1 16 23.133c-3.936 0-7.13-3.196-7.13-7.132S12.063 8.87 16 8.87z"
+ display="block"
+ fill="#fff"
+ id="path2"
+ style="fill:#ffffff" />
+</svg>
diff --git a/cypress/fixtures/testapp/lib/AppInfo/Application.php b/cypress/fixtures/testapp/lib/AppInfo/Application.php
new file mode 100644
index 00000000000..7647889f784
--- /dev/null
+++ b/cypress/fixtures/testapp/lib/AppInfo/Application.php
@@ -0,0 +1,17 @@
+<?php
+
+declare(strict_types=1);
+// SPDX-FileCopyrightText: Ferdinand Thiessen <opensource@fthiessen.de>
+// SPDX-License-Identifier: AGPL-3.0-or-later
+
+namespace OCA\TestApp\AppInfo;
+
+use OCP\AppFramework\App;
+
+class Application extends App {
+ public const APP_ID = 'testapp';
+
+ public function __construct() {
+ parent::__construct(self::APP_ID);
+ }
+}
diff --git a/cypress/fixtures/testapp/lib/Controller/PageController.php b/cypress/fixtures/testapp/lib/Controller/PageController.php
new file mode 100644
index 00000000000..2a9dec885a7
--- /dev/null
+++ b/cypress/fixtures/testapp/lib/Controller/PageController.php
@@ -0,0 +1,26 @@
+<?php
+
+declare(strict_types=1);
+// SPDX-FileCopyrightText: Ferdinand Thiessen <opensource@fthiessen.de>
+// SPDX-License-Identifier: AGPL-3.0-or-later
+
+namespace OCA\TestApp\Controller;
+
+use OCA\TestApp\AppInfo\Application;
+use OCP\AppFramework\Controller;
+use OCP\AppFramework\Http\TemplateResponse;
+use OCP\IRequest;
+
+class PageController extends Controller {
+ public function __construct(IRequest $request) {
+ parent::__construct(Application::APP_ID, $request);
+ }
+
+ /**
+ * @NoAdminRequired
+ * @NoCSRFRequired
+ */
+ public function index(): TemplateResponse {
+ return new TemplateResponse(Application::APP_ID, 'main');
+ }
+}
diff --git a/cypress/fixtures/testapp/templates/main.php b/cypress/fixtures/testapp/templates/main.php
new file mode 100644
index 00000000000..abe4bf041de
--- /dev/null
+++ b/cypress/fixtures/testapp/templates/main.php
@@ -0,0 +1,6 @@
+<?php
+declare(strict_types=1);
+// SPDX-FileCopyrightText: Ferdinand Thiessen <opensource@fthiessen.de>
+// SPDX-License-Identifier: AGPL-3.0-or-later
+?>
+<div id="content"></div>