Add basic setup for acceptance tests within GitLab

This commit is contained in:
Daniel Siepmann 2019-08-21 18:13:00 +02:00
parent 80fff4c214
commit 0f56c2a93b
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
23 changed files with 2739 additions and 191 deletions

5
.gitignore vendored
View file

@ -1,4 +1,3 @@
/public /web
/vendor /vendor
/app/* /app
!/app/typo3conf/sites/default/config.yaml

View file

@ -13,10 +13,10 @@ setup:composer:
paths: paths:
- .composer/cache - .composer/cache
artifacts: artifacts:
expire_in: 1 hour expire_in: 30 mins
paths: paths:
- app - app
- public - web
- vendor - vendor
test:acceptance: test:acceptance:
@ -24,18 +24,22 @@ test:acceptance:
stage: test stage: test
services: services:
- mysql:5.7 - mysql:5.7
- selenium/standalone-chrome
variables: variables:
MYSQL_DATABASE: workshopgitlabtesting MYSQL_ROOT_PASSWORD: "dev"
MYSQL_ROOT_PASSWORD: testing MYSQL_DATABASE: "dev"
dependencies: MYSQL_USER: "dev"
- setup:composer MYSQL_PASSWORD: "dev"
before_script: before_script:
- docker-php-ext-install pdo pdo_mysql - docker-php-ext-install pdo pdo_mysql mysqli
- cp public/index.php app/index.php - export LOCAL_IP=$(ip a | grep inet | sed -n 2p | xargs | cut -d" " -f2 | cut -d"/" -f1)
- cp public/typo3/index.php app/typo3/index.php - export TESTING_DOMAIN="$LOCAL_IP:8080"
- cp public/typo3/install.php app/typo3/install.php - export TYPO3_CONTEXT=Testing/Acceptance
- sed -i.bak -e '133,136d' vendor/typo3/testing-framework/Classes/Core/Testbase.php - php -S "$TESTING_DOMAIN" -t web &
- mkdir -p app/typo3temp/var/tests/acceptance
- env TYPO3_PATH_ROOT="$CI_PROJECT_DIR/app/typo3temp/var/tests/acceptance" TYPO3_PATH_APP="$CI_PROJECT_DIR/app/typo3temp/var/tests/acceptance" php -S 127.0.0.1:8080 -t app/typo3temp/var/tests/acceptance &
script: script:
- ./vendor/bin/codecept run - ./vendor/bin/codecept run --env=gitlab-ci
artifacts:
when: on_failure
expire_in: 10 mins
paths:
- tests/_output/

View file

@ -0,0 +1,44 @@
<?php
if (getenv('TYPO3_ADDITIONAL_CONFIGURATION')) {
require_once getenv('TYPO3_ADDITIONAL_CONFIGURATION');
}
$appContext = \TYPO3\CMS\Core\Utility\GeneralUtility::getApplicationContext();
if ((string) $appContext === 'Testing/Acceptance') {
\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule(
$GLOBALS['TYPO3_CONF_VARS'],
[
'SYS' => [
'trustedHostsPattern' => 'localhost:8080',
],
'DB' => [
'Connections' => [
'Default' => [
'dbname' => 'own_workshopgitlabacceptance_testing',
],
],
],
]
);
}
if ((string) $appContext === 'Testing/Acceptance' && getenv('CI') === 'true') {
\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule(
$GLOBALS['TYPO3_CONF_VARS'],
[
'SYS' => [
'trustedHostsPattern' => getenv('TESTING_DOMAIN'),
],
'DB' => [
'Connections' => [
'Default' => [
'dbname' => 'dev',
'password' => 'dev',
'user' => 'dev',
'host' => 'mysql',
],
],
],
]
);
}

View file

@ -0,0 +1,95 @@
<?php
return [
'BE' => [
'debug' => true,
'explicitADmode' => 'explicitAllow',
'installToolPassword' => '$argon2i$v=19$m=65536,t=16,p=2$UzAyaTZoVEpFMmV2M1piSQ$TywI+4PRhqx2ggtTrV+R7BNrb0oheW6tr/SThHr6HgM',
'loginSecurityLevel' => 'normal',
'passwordHashing' => [
'className' => 'TYPO3\\CMS\\Core\\Crypto\\PasswordHashing\\Argon2iPasswordHash',
'options' => [],
],
],
'DB' => [
'Connections' => [
'Default' => [
'charset' => 'utf8mb4',
'dbname' => 'own_workshopgitlabacceptance',
'driver' => 'mysqli',
'host' => '127.0.0.1',
'password' => 'dev',
'port' => 3306,
'tableoptions' => [
'charset' => 'utf8mb4',
'collate' => 'utf8mb4_unicode_ci',
],
'unix_socket' => '/var/run/mysqld/mysqld.sock',
'user' => 'dev',
],
],
],
'EXT' => [
'extConf' => [
'backend' => 'a:6:{s:9:"loginLogo";s:0:"";s:19:"loginHighlightColor";s:0:"";s:20:"loginBackgroundImage";s:0:"";s:13:"loginFootnote";s:0:"";s:11:"backendLogo";s:0:"";s:14:"backendFavicon";s:0:"";}',
'extensionmanager' => 'a:2:{s:21:"automaticInstallation";s:1:"1";s:11:"offlineMode";s:1:"0";}',
'scheduler' => 'a:2:{s:11:"maxLifetime";s:4:"1440";s:15:"showSampleTasks";s:1:"1";}',
],
],
'EXTENSIONS' => [
'backend' => [
'backendFavicon' => '',
'backendLogo' => '',
'loginBackgroundImage' => '',
'loginFootnote' => '',
'loginHighlightColor' => '',
'loginLogo' => '',
],
'extensionmanager' => [
'automaticInstallation' => '1',
'offlineMode' => '0',
],
'scheduler' => [
'maxLifetime' => '1440',
'showSampleTasks' => '1',
],
],
'FE' => [
'debug' => true,
'loginSecurityLevel' => 'normal',
'passwordHashing' => [
'className' => 'TYPO3\\CMS\\Core\\Crypto\\PasswordHashing\\Argon2iPasswordHash',
'options' => [],
],
],
'GFX' => [
'processor' => 'ImageMagick',
'processor_allowTemporaryMasksAsPng' => false,
'processor_colorspace' => 'sRGB',
'processor_effects' => true,
'processor_enabled' => true,
'processor_path' => '/usr/bin/',
'processor_path_lzw' => '/usr/bin/',
],
'MAIL' => [
'transport' => 'sendmail',
'transport_sendmail_command' => '/usr/sbin/sendmail -t -i ',
'transport_smtp_encrypt' => '',
'transport_smtp_password' => '',
'transport_smtp_server' => '',
'transport_smtp_username' => '',
],
'SYS' => [
'devIPmask' => '*',
'displayErrors' => 1,
'encryptionKey' => 'fc4441867ae5c425bd55676e01d6d14fd2ae17ed8fd5682b495e74518eda4d437c0c48917772dc848fff31f5cea3c3eb',
'exceptionalErrors' => 12290,
'features' => [
'unifiedPageTranslationHandling' => true,
],
'sitename' => 'New TYPO3 Console site',
'systemLogLevel' => 0,
'systemMaintainers' => [
1,
],
],
];

View file

@ -0,0 +1,40 @@
rootPageId: 1
base: /
languages:
-
title: English
enabled: true
languageId: '0'
base: /
typo3Language: default
locale: en_US.UTF-8
iso-639-1: en
navigationTitle: English
hreflang: en-us
direction: ltr
flag: us
errorHandling: {}
routes: {}
baseVariants: {}
# routeEnhancers:
# ExamplePlugin:
# type: Extbase
# extension: ExampleExtension
# plugin: Address
# defaultController: 'Address::index'
# routes:
# -
# routePath: '/edit/{address}'
# _controller: 'Address::edit'
# _arguments:
# 'address': 'address'
# -
# routePath: '/update'
# _controller: 'Address::update'
# aspects:
# address:
# type: PersistedAliasMapper
# tableName: 'tx_exampleextension_domain_model_address'
# routeFieldName: 'slug'
# routeValuePrefix: '/'

View file

@ -1,10 +1,31 @@
suites:
acceptance:
actor: AcceptanceTester
path: .
modules:
enabled:
- WebDriver:
url: https://workshop-gitlab-acceptance.own.localhost/
browser: chrome
- Db:
dump: tests/_data/typo3.sql
populate: true
cleanup: true
- \Helper\Acceptance
step_decorators:
- Codeception\Step\ConditionalAssertion
- Codeception\Step\TryTo
- Codeception\Step\Retry
extensions:
enabled: [Codeception\Extension\RunFailed]
params:
- env
paths: paths:
tests: tests tests: tests
output: tests/_output output: tests/_output
data: tests/_data data: tests/_data
support: tests/_support support: tests/_support
envs: tests/_envs envs: tests/_envs
actor_suffix: Tester
extensions:
enabled:
- Codeception\Extension\RunFailed

View file

@ -10,7 +10,7 @@
} }
], ],
"name": "website/typo3-extension-workshop", "name": "website/typo3-extension-workshop",
"description": "Example TYPO3 installation for workshop", "description": "Example TYPO3 installation for Acceptance Testing",
"license": "GPL-2.0-or-later", "license": "GPL-2.0-or-later",
"require": { "require": {
"helhum/typo3-console": "^5.5.5", "helhum/typo3-console": "^5.5.5",
@ -31,14 +31,9 @@
}, },
"require-dev": { "require-dev": {
"typo3/cms-lowlevel": "*", "typo3/cms-lowlevel": "*",
"codeception/codeception": "^2.5", "codeception/codeception": "^3.1.0",
"typo3/testing-framework": "^4.11" "typo3/testing-framework": "^4.11"
}, },
"autoload-dev": {
"psr-4": {
"Codappix\\Tests\\": "tests/Classes"
}
},
"config": { "config": {
"platform": { "platform": {
"php": "7.2" "php": "7.2"
@ -48,7 +43,7 @@
"typo3/cms": { "typo3/cms": {
"app-dir": "app", "app-dir": "app",
"root-dir": "app", "root-dir": "app",
"web-dir": "public" "web-dir": "web"
} }
}, },
"minimum-stability": "dev", "minimum-stability": "dev",

589
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "f53279fe7ba361096d04062806b72848", "content-hash": "5770c0e541ee89e208e3aa77b5eeabb7",
"packages": [ "packages": [
{ {
"name": "algo26-matthias/idna-convert", "name": "algo26-matthias/idna-convert",
@ -4036,28 +4036,29 @@
}, },
{ {
"name": "codeception/codeception", "name": "codeception/codeception",
"version": "2.5.6", "version": "3.1.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/Codeception/Codeception.git", "url": "https://github.com/Codeception/Codeception.git",
"reference": "b83a9338296e706fab2ceb49de8a352fbca3dc98" "reference": "9ed9146567770e564fdd2b656edb385330f7fae7"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/Codeception/Codeception/zipball/b83a9338296e706fab2ceb49de8a352fbca3dc98", "url": "https://api.github.com/repos/Codeception/Codeception/zipball/9ed9146567770e564fdd2b656edb385330f7fae7",
"reference": "b83a9338296e706fab2ceb49de8a352fbca3dc98", "reference": "9ed9146567770e564fdd2b656edb385330f7fae7",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"behat/gherkin": "^4.4.0", "behat/gherkin": "^4.4.0",
"codeception/phpunit-wrapper": "^6.0.9|^7.0.6", "codeception/phpunit-wrapper": ">6.0.15 <6.1.0 | ^6.6.1 | ^7.7.1 | ^8.0.3",
"codeception/stub": "^2.0", "codeception/stub": "^2.0 | ^3.0",
"ext-curl": "*", "ext-curl": "*",
"ext-json": "*", "ext-json": "*",
"ext-mbstring": "*", "ext-mbstring": "*",
"facebook/webdriver": ">=1.1.3 <2.0", "facebook/webdriver": "^1.6.0",
"guzzlehttp/guzzle": ">=4.1.4 <7.0", "guzzlehttp/guzzle": "^6.3.0",
"guzzlehttp/psr7": "~1.0", "guzzlehttp/psr7": "~1.4",
"hoa/console": "~3.0",
"php": ">=5.6.0 <8.0", "php": ">=5.6.0 <8.0",
"symfony/browser-kit": ">=2.7 <5.0", "symfony/browser-kit": ">=2.7 <5.0",
"symfony/console": ">=2.7 <5.0", "symfony/console": ">=2.7 <5.0",
@ -4069,7 +4070,9 @@
}, },
"require-dev": { "require-dev": {
"codeception/specify": "~0.3", "codeception/specify": "~0.3",
"facebook/graph-sdk": "~5.3", "doctrine/annotations": "^1",
"doctrine/data-fixtures": "^1",
"doctrine/orm": "^2",
"flow/jsonpath": "~0.2", "flow/jsonpath": "~0.2",
"monolog/monolog": "~1.8", "monolog/monolog": "~1.8",
"pda/pheanstalk": "~3.0", "pda/pheanstalk": "~3.0",
@ -4124,7 +4127,7 @@
"functional testing", "functional testing",
"unit testing" "unit testing"
], ],
"time": "2019-04-24T11:28:19+00:00" "time": "2019-08-18T16:44:20+00:00"
}, },
{ {
"name": "codeception/phpunit-wrapper", "name": "codeception/phpunit-wrapper",
@ -4171,20 +4174,21 @@
}, },
{ {
"name": "codeception/stub", "name": "codeception/stub",
"version": "2.1.0", "version": "3.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/Codeception/Stub.git", "url": "https://github.com/Codeception/Stub.git",
"reference": "853657f988942f7afb69becf3fd0059f192c705a" "reference": "eea518711d736eab838c1274593c4568ec06b23d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/Codeception/Stub/zipball/853657f988942f7afb69becf3fd0059f192c705a", "url": "https://api.github.com/repos/Codeception/Stub/zipball/eea518711d736eab838c1274593c4568ec06b23d",
"reference": "853657f988942f7afb69becf3fd0059f192c705a", "reference": "eea518711d736eab838c1274593c4568ec06b23d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"codeception/phpunit-wrapper": ">6.0.15 <6.1.0 | ^6.6.1 | ^7.7.1 | ^8.0.3" "codeception/phpunit-wrapper": "^6.6.1 | ^7.7.1 | ^8.0.3",
"phpunit/phpunit": ">=6.5 <9.0"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@ -4197,7 +4201,7 @@
"MIT" "MIT"
], ],
"description": "Flexible Stub wrapper for PHPUnit's Mock Builder", "description": "Flexible Stub wrapper for PHPUnit's Mock Builder",
"time": "2019-03-02T15:35:10+00:00" "time": "2019-08-10T16:20:53+00:00"
}, },
{ {
"name": "facebook/webdriver", "name": "facebook/webdriver",
@ -4259,6 +4263,555 @@
], ],
"time": "2019-06-13T08:02:18+00:00" "time": "2019-06-13T08:02:18+00:00"
}, },
{
"name": "hoa/consistency",
"version": "1.17.05.02",
"source": {
"type": "git",
"url": "https://github.com/hoaproject/Consistency.git",
"reference": "fd7d0adc82410507f332516faf655b6ed22e4c2f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/hoaproject/Consistency/zipball/fd7d0adc82410507f332516faf655b6ed22e4c2f",
"reference": "fd7d0adc82410507f332516faf655b6ed22e4c2f",
"shasum": ""
},
"require": {
"hoa/exception": "~1.0",
"php": ">=5.5.0"
},
"require-dev": {
"hoa/stream": "~1.0",
"hoa/test": "~2.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"Hoa\\Consistency\\": "."
},
"files": [
"Prelude.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Ivan Enderlin",
"email": "ivan.enderlin@hoa-project.net"
},
{
"name": "Hoa community",
"homepage": "https://hoa-project.net/"
}
],
"description": "The Hoa\\Consistency library.",
"homepage": "https://hoa-project.net/",
"keywords": [
"autoloader",
"callable",
"consistency",
"entity",
"flex",
"keyword",
"library"
],
"time": "2017-05-02T12:18:12+00:00"
},
{
"name": "hoa/console",
"version": "3.17.05.02",
"source": {
"type": "git",
"url": "https://github.com/hoaproject/Console.git",
"reference": "e231fd3ea70e6d773576ae78de0bdc1daf331a66"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/hoaproject/Console/zipball/e231fd3ea70e6d773576ae78de0bdc1daf331a66",
"reference": "e231fd3ea70e6d773576ae78de0bdc1daf331a66",
"shasum": ""
},
"require": {
"hoa/consistency": "~1.0",
"hoa/event": "~1.0",
"hoa/exception": "~1.0",
"hoa/file": "~1.0",
"hoa/protocol": "~1.0",
"hoa/stream": "~1.0",
"hoa/ustring": "~4.0"
},
"require-dev": {
"hoa/test": "~2.0"
},
"suggest": {
"ext-pcntl": "To enable hoa://Event/Console/Window:resize.",
"hoa/dispatcher": "To use the console kit.",
"hoa/router": "To use the console kit."
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.x-dev"
}
},
"autoload": {
"psr-4": {
"Hoa\\Console\\": "."
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Ivan Enderlin",
"email": "ivan.enderlin@hoa-project.net"
},
{
"name": "Hoa community",
"homepage": "https://hoa-project.net/"
}
],
"description": "The Hoa\\Console library.",
"homepage": "https://hoa-project.net/",
"keywords": [
"autocompletion",
"chrome",
"cli",
"console",
"cursor",
"getoption",
"library",
"option",
"parser",
"processus",
"readline",
"terminfo",
"tput",
"window"
],
"time": "2017-05-02T12:26:19+00:00"
},
{
"name": "hoa/event",
"version": "1.17.01.13",
"source": {
"type": "git",
"url": "https://github.com/hoaproject/Event.git",
"reference": "6c0060dced212ffa3af0e34bb46624f990b29c54"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/hoaproject/Event/zipball/6c0060dced212ffa3af0e34bb46624f990b29c54",
"reference": "6c0060dced212ffa3af0e34bb46624f990b29c54",
"shasum": ""
},
"require": {
"hoa/consistency": "~1.0",
"hoa/exception": "~1.0"
},
"require-dev": {
"hoa/test": "~2.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"Hoa\\Event\\": "."
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Ivan Enderlin",
"email": "ivan.enderlin@hoa-project.net"
},
{
"name": "Hoa community",
"homepage": "https://hoa-project.net/"
}
],
"description": "The Hoa\\Event library.",
"homepage": "https://hoa-project.net/",
"keywords": [
"event",
"library",
"listener",
"observer"
],
"time": "2017-01-13T15:30:50+00:00"
},
{
"name": "hoa/exception",
"version": "1.17.01.16",
"source": {
"type": "git",
"url": "https://github.com/hoaproject/Exception.git",
"reference": "091727d46420a3d7468ef0595651488bfc3a458f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/hoaproject/Exception/zipball/091727d46420a3d7468ef0595651488bfc3a458f",
"reference": "091727d46420a3d7468ef0595651488bfc3a458f",
"shasum": ""
},
"require": {
"hoa/consistency": "~1.0",
"hoa/event": "~1.0"
},
"require-dev": {
"hoa/test": "~2.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"Hoa\\Exception\\": "."
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Ivan Enderlin",
"email": "ivan.enderlin@hoa-project.net"
},
{
"name": "Hoa community",
"homepage": "https://hoa-project.net/"
}
],
"description": "The Hoa\\Exception library.",
"homepage": "https://hoa-project.net/",
"keywords": [
"exception",
"library"
],
"time": "2017-01-16T07:53:27+00:00"
},
{
"name": "hoa/file",
"version": "1.17.07.11",
"source": {
"type": "git",
"url": "https://github.com/hoaproject/File.git",
"reference": "35cb979b779bc54918d2f9a4e02ed6c7a1fa67ca"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/hoaproject/File/zipball/35cb979b779bc54918d2f9a4e02ed6c7a1fa67ca",
"reference": "35cb979b779bc54918d2f9a4e02ed6c7a1fa67ca",
"shasum": ""
},
"require": {
"hoa/consistency": "~1.0",
"hoa/event": "~1.0",
"hoa/exception": "~1.0",
"hoa/iterator": "~2.0",
"hoa/stream": "~1.0"
},
"require-dev": {
"hoa/test": "~2.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"Hoa\\File\\": "."
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Ivan Enderlin",
"email": "ivan.enderlin@hoa-project.net"
},
{
"name": "Hoa community",
"homepage": "https://hoa-project.net/"
}
],
"description": "The Hoa\\File library.",
"homepage": "https://hoa-project.net/",
"keywords": [
"Socket",
"directory",
"file",
"finder",
"library",
"link",
"temporary"
],
"time": "2017-07-11T07:42:15+00:00"
},
{
"name": "hoa/iterator",
"version": "2.17.01.10",
"source": {
"type": "git",
"url": "https://github.com/hoaproject/Iterator.git",
"reference": "d1120ba09cb4ccd049c86d10058ab94af245f0cc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/hoaproject/Iterator/zipball/d1120ba09cb4ccd049c86d10058ab94af245f0cc",
"reference": "d1120ba09cb4ccd049c86d10058ab94af245f0cc",
"shasum": ""
},
"require": {
"hoa/consistency": "~1.0",
"hoa/exception": "~1.0"
},
"require-dev": {
"hoa/test": "~2.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.x-dev"
}
},
"autoload": {
"psr-4": {
"Hoa\\Iterator\\": "."
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Ivan Enderlin",
"email": "ivan.enderlin@hoa-project.net"
},
{
"name": "Hoa community",
"homepage": "https://hoa-project.net/"
}
],
"description": "The Hoa\\Iterator library.",
"homepage": "https://hoa-project.net/",
"keywords": [
"iterator",
"library"
],
"time": "2017-01-10T10:34:47+00:00"
},
{
"name": "hoa/protocol",
"version": "1.17.01.14",
"source": {
"type": "git",
"url": "https://github.com/hoaproject/Protocol.git",
"reference": "5c2cf972151c45f373230da170ea015deecf19e2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/hoaproject/Protocol/zipball/5c2cf972151c45f373230da170ea015deecf19e2",
"reference": "5c2cf972151c45f373230da170ea015deecf19e2",
"shasum": ""
},
"require": {
"hoa/consistency": "~1.0",
"hoa/exception": "~1.0"
},
"require-dev": {
"hoa/test": "~2.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"Hoa\\Protocol\\": "."
},
"files": [
"Wrapper.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Ivan Enderlin",
"email": "ivan.enderlin@hoa-project.net"
},
{
"name": "Hoa community",
"homepage": "https://hoa-project.net/"
}
],
"description": "The Hoa\\Protocol library.",
"homepage": "https://hoa-project.net/",
"keywords": [
"library",
"protocol",
"resource",
"stream",
"wrapper"
],
"time": "2017-01-14T12:26:10+00:00"
},
{
"name": "hoa/stream",
"version": "1.17.02.21",
"source": {
"type": "git",
"url": "https://github.com/hoaproject/Stream.git",
"reference": "3293cfffca2de10525df51436adf88a559151d82"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/hoaproject/Stream/zipball/3293cfffca2de10525df51436adf88a559151d82",
"reference": "3293cfffca2de10525df51436adf88a559151d82",
"shasum": ""
},
"require": {
"hoa/consistency": "~1.0",
"hoa/event": "~1.0",
"hoa/exception": "~1.0",
"hoa/protocol": "~1.0"
},
"require-dev": {
"hoa/test": "~2.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"Hoa\\Stream\\": "."
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Ivan Enderlin",
"email": "ivan.enderlin@hoa-project.net"
},
{
"name": "Hoa community",
"homepage": "https://hoa-project.net/"
}
],
"description": "The Hoa\\Stream library.",
"homepage": "https://hoa-project.net/",
"keywords": [
"Context",
"bucket",
"composite",
"filter",
"in",
"library",
"out",
"protocol",
"stream",
"wrapper"
],
"time": "2017-02-21T16:01:06+00:00"
},
{
"name": "hoa/ustring",
"version": "4.17.01.16",
"source": {
"type": "git",
"url": "https://github.com/hoaproject/Ustring.git",
"reference": "e6326e2739178799b1fe3fdd92029f9517fa17a0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/hoaproject/Ustring/zipball/e6326e2739178799b1fe3fdd92029f9517fa17a0",
"reference": "e6326e2739178799b1fe3fdd92029f9517fa17a0",
"shasum": ""
},
"require": {
"hoa/consistency": "~1.0",
"hoa/exception": "~1.0"
},
"require-dev": {
"hoa/test": "~2.0"
},
"suggest": {
"ext-iconv": "ext/iconv must be present (or a third implementation) to use Hoa\\Ustring::transcode().",
"ext-intl": "To get a better Hoa\\Ustring::toAscii() and Hoa\\Ustring::compareTo()."
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.x-dev"
}
},
"autoload": {
"psr-4": {
"Hoa\\Ustring\\": "."
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Ivan Enderlin",
"email": "ivan.enderlin@hoa-project.net"
},
{
"name": "Hoa community",
"homepage": "https://hoa-project.net/"
}
],
"description": "The Hoa\\Ustring library.",
"homepage": "https://hoa-project.net/",
"keywords": [
"library",
"search",
"string",
"unicode"
],
"time": "2017-01-16T07:08:25+00:00"
},
{ {
"name": "mikey179/vfsstream", "name": "mikey179/vfsstream",
"version": "v1.6.7", "version": "v1.6.7",

View file

@ -1,9 +1,40 @@
<?php <?php
(function () { (function ($extensionKey, $tableName) {
$langPath = 'LLL:EXT:' . $extensionKey . '/Resources/Private/Language/locallang.xlf:' . $tableName . '.';
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
'Workshop.ExampleExtension', 'Workshop.ExampleExtension',
'Address', 'Address',
'Address Plugin' 'Address Plugin',
'content-store'
); );
})();
\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule(
$GLOBALS['TCA'][$tableName],
[
'ctrl' => [
'typeicon_classes' => [
'exampleextension_address' => 'content-store',
],
],
'types' => [
'exampleextension_address' => [
'showitem' => implode(',', [
// phpcs:disable Generic.Files.LineLength.TooLong
// Keep original code from ext:frontend
'--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general',
'--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.general;general',
'--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.headers;headers',
'pages;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:pages.ALT.list_formlabel',
'recursive,',
'--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access',
'--palette--;;hidden',
'--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.access;access',
// phpcs:enable
]),
],
],
]
);
})('example_extension', 'tt_content');

View file

@ -10,6 +10,7 @@ return (function (
return [ return [
'ctrl' => [ 'ctrl' => [
'label' => 'company_name', 'label' => 'company_name',
'iconfile' => 'EXT:core/Resources/Public/Icons/T3Icons/content/content-store.svg',
'default_sortby' => 'company_name', 'default_sortby' => 'company_name',
'tstamp' => 'tstamp', 'tstamp' => 'tstamp',
'crdate' => 'crdate', 'crdate' => 'crdate',
@ -24,7 +25,7 @@ return (function (
'searchFields' => 'company_name, street, city' 'searchFields' => 'company_name, street, city'
], ],
'interface' => [ 'interface' => [
'showRecordFieldList' => 'company_name, street, house_number, zip, city, country' 'showRecordFieldList' => 'company_name, street, house_number, zip, city, country, slug'
], ],
'palettes' => [ 'palettes' => [
'address' => [ 'address' => [
@ -42,6 +43,7 @@ return (function (
'showitem' => implode(',', [ 'showitem' => implode(',', [
'--div--;' . $coreLanguagePrefix . 'general', '--div--;' . $coreLanguagePrefix . 'general',
'company_name;;address', 'company_name;;address',
'slug',
]), ]),
], ],
], ],
@ -96,6 +98,18 @@ return (function (
'eval' => 'trim,required', 'eval' => 'trim,required',
], ],
], ],
'slug' => [
'label' => $extensionLanguagePrefix . 'slug',
'config' => [
'type' => 'slug',
'generatorOptions' => [
'fields' => ['company_name'],
'prefixParentPageSlug' => true,
],
'fallbackCharacter' => '-',
'eval' => 'uniqueInSite',
],
],
], ],
]; ];
})(); })();

View file

@ -0,0 +1,3 @@
config {
contentObjectExceptionHandler = 0
}

View file

@ -0,0 +1 @@
@import 'EXT:fluid_styled_content/Configuration/TypoScript/setup.typoscript'

View file

@ -0,0 +1,4 @@
page = PAGE
page {
10 < styles.content.get
}

View file

@ -9,18 +9,24 @@
], ],
[ [
'Address' => 'update' 'Address' => 'update'
] ],
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT
); );
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup(trim('
@import "EXT:example_extension/Configuration/TypoScript/*.typoscript"
'));
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(' \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('
mod { mod {
wizards { wizards {
newContentElement { newContentElement {
wizardItems { wizardItems {
plugins { common {
show = *
elements { elements {
exampleElement { exampleElement {
iconIdentifier = content-coffee iconIdentifier = content-store
title = Example title title = Example title
description = Example Description description = Example Description
tt_content_defValues { tt_content_defValues {

View file

@ -5,4 +5,5 @@ CREATE TABLE tx_exampleextension_domain_model_address (
zip varchar(255) DEFAULT '' NOT NULL, zip varchar(255) DEFAULT '' NOT NULL,
city varchar(255) DEFAULT '' NOT NULL, city varchar(255) DEFAULT '' NOT NULL,
country varchar(255) DEFAULT '' NOT NULL, country varchar(255) DEFAULT '' NOT NULL,
slug varchar(2048),
); );

View file

@ -28,7 +28,7 @@ class AddressCest
$I->see('Edit'); $I->see('Edit');
$I->click('Edit'); $I->click('Edit');
$I->see('Editing: TYPO3 Camp Rhein Ruhr'); $I->see('Editing: Codappix GmbH');
$I->fillField(['id' => 'zip'], '123'); $I->fillField(['id' => 'zip'], '123');
$I->click('Update'); $I->click('Update');

View file

@ -1,61 +0,0 @@
<?php
namespace Codappix\Tests\Acceptance;
/*
* Copyright (C) 2018 Daniel Siepmann <coding@daniel-siepmann.de>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/
use Codeception\Event\TestEvent;
use Codeception\Event\SuiteEvent;
use Codeception\Events;
use PHPUnit\Framework\TestSuite;
use TYPO3\CMS\Core\Utility\ArrayUtility;
use TYPO3\TestingFramework\Core\Acceptance\Extension\BackendEnvironment;
class Typo3Environment extends BackendEnvironment
{
public function _initialize()
{
ArrayUtility::mergeRecursiveWithOverrule($this->config, [
// 'typo3DatabaseDriver' => 'pdo_sqlite',
// 'typo3DatabaseName' => 'workshopgitlabtesting.sqlite',
'typo3DatabaseDriver' => 'pdo_mysql',
'typo3DatabaseHost' => 'mysql',
'typo3DatabaseUsername' => 'root',
'typo3DatabasePassword' => 'testing',
'typo3DatabaseName' => 'workshopgitlabtesting',
'coreExtensionsToLoad' => [
'core',
'extbase',
'fluid',
'fluid_styled_content',
'frontend',
'backend',
],
'testExtensionsToLoad' => [
'typo3conf/ext/example_extension',
],
'xmlDatabaseFixtures' => [
dirname(__FILE__) . '/../../acceptance/fixtures/full.xml',
],
]);
parent::_initialize();
}
}

1855
tests/_data/typo3.sql Normal file

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,9 @@
modules:
config:
WebDriver:
url: http://%TESTING_DOMAIN%/
host: selenium__standalone-chrome
Db:
dsn: 'mysql:host=mysql;dbname=dev'
user: 'dev'
password: 'dev'

8
tests/_envs/local.yml Normal file
View file

@ -0,0 +1,8 @@
modules:
config:
WebDriver:
url: http://localhost:8080/
Db:
dsn: 'mysql:host=localhost;dbname=own_workshopgitlabacceptance_testing'
user: 'dev'
password: 'dev'

View file

@ -12,7 +12,7 @@
* @method void am($role) * @method void am($role)
* @method void lookForwardTo($achieveValue) * @method void lookForwardTo($achieveValue)
* @method void comment($description) * @method void comment($description)
* @method \Codeception\Lib\Friend haveFriend($name, $actorClass = NULL) * @method void pause()
* *
* @SuppressWarnings(PHPMD) * @SuppressWarnings(PHPMD)
*/ */

View file

@ -1,18 +0,0 @@
# Codeception Test Suite Configuration
#
# Suite for acceptance tests.
# Perform tests in browser using the WebDriver or PhpBrowser.
# If you need both WebDriver and PHPBrowser tests - create a separate suite.
actor: AcceptanceTester
modules:
enabled:
-
PhpBrowser:
url: http://127.0.0.1:8080
-
\Helper\Acceptance
extensions:
enabled:
- Codappix\Tests\Acceptance\Typo3Environment

View file

@ -1,56 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<dataset>
<pages>
<uid>1</uid>
<pid>0</pid>
<title>Plugin page</title>
<doktype>1</doktype>
<deleted>0</deleted>
<perms_everybody>15</perms_everybody>
<slug>/plugin</slug>
</pages>
<sys_template>
<uid>1</uid>
<pid>1</pid>
<title>Main TypoScript Rendering</title>
<sitetitle>New TYPO3 site</sitetitle>
<hidden>0</hidden>
<starttime>0</starttime>
<endtime>0</endtime>
<root>1</root>
<clear>1</clear>
<include_static_file>EXT:fluid_styled_content/Configuration/TypoScript/,EXT:fluid_styled_content/Configuration/TypoScript/Styling/</include_static_file>
<config><![CDATA[page = PAGE
page.100 =< styles.content.get
]]></config>
<nextLevel></nextLevel>
<basedOn></basedOn>
<deleted>0</deleted>
<includeStaticAfterBasedOn>0</includeStaticAfterBasedOn>
<static_file_mode>0</static_file_mode>
</sys_template>
<tt_content>
<uid>1</uid>
<pid>1</pid>
<hidden>0</hidden>
<sorting>256</sorting>
<CType>list</CType>
<colPos>0</colPos>
<pages>1</pages>
<list_type>exampleextension_address</list_type>
<header>Address Plugin</header>
</tt_content>
<tx_exampleextension_domain_model_address>
<uid>1</uid>
<pid>1</pid>
<company_name>Codappix GmbH</company_name>
<street>Hövelstraße</street>
<house_number>32</house_number>
<zip>41238</zip>
<city>Mönchengladbach</city>
<country>Deutschland</country>
</tx_exampleextension_domain_model_address>
</dataset>