mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-09-16 21:36:17 +02:00

[TASK] Remove the ancient acceptance tests (#512)

The acceptance tests have not been testing the extension itself,
have not been maintained for quite some time, and do not serve
as a good example anymore.

Until we have a proper set of example acceptance tests, we should
remove them.

Also drop the now-unused dependency on Codeception.
This commit is contained in:
Oliver Klee 2022-08-28 09:33:50 +02:00 committed by GitHub
parent 75ae59b28a
commit be838adde5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 3 additions and 136 deletions

1
.gitattributes vendored
View file

@ -11,7 +11,6 @@
/.phpstorm.meta.php export-ignore
/.prettierrc.js export-ignore
/Tests/ export-ignore
/codeception.yml export-ignore
/package.json export-ignore
/phive.xml export-ignore
/phpcs.xml export-ignore

View file

@ -14,6 +14,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
### Deprecated
### Removed
- Remove the ancient acceptance tests (#512)
### Fixed
- Have all extension dependencies in the `ext_emconf.php` as well (#515)

View file

@ -259,23 +259,3 @@ settings:
- (*) Use alternative configuration file.
- Use
`.Build/vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTests.xml`.
.. _running-acceptance-tests:
Running acceptance tests
========================
1. Make sure you have Chrome installed on your machine.
2. `Download the latest version of ChromeDriver <https://chromedriver.chromium.org/downloads>`__.
3. Unzip it.
4. Execute `chromedriver --url-base=wd/hub`.
5. In another terminal, run `.Build/vendor/bin/codecept run`.
.. _running-acceptance-tests-in-phpstorm:
Running acceptance tests in PhpStorm
====================================
1. Make sure the "Codeception Framework" plugin is activated.
2. Right-click on `Tests/Acceptance/StarterCest.php`.
3. Run 'Acceptance (Codeception)'.

View file

@ -1,28 +0,0 @@
<?php
declare(strict_types=1);
namespace TTN\Tea\Tests\Acceptance;
/**
* Test case.
*/
class StarterCest
{
public function _before(\AcceptanceTester $I): void
{
$I->amOnPage('/');
}
public function seeAuthorName(\AcceptanceTester $I): void
{
$I->see('Oliver Klee');
}
public function canNavigateToPastWorkshops(\AcceptanceTester $I): void
{
$I->click('Workshops');
$I->click('Rückblick');
$I->see('2017 (17)');
}
}

View file

@ -1,25 +0,0 @@
<?php
declare(strict_types=1);
/**
* Inherited Methods.
* @method void wantToTest($text)
* @method void wantTo($text)
* @method void execute($callable)
* @method void expectTo($prediction)
* @method void expect($prediction)
* @method void amGoingTo($argumentation)
* @method void am($role)
* @method void lookForwardTo($achieveValue)
* @method void comment($description)
* @method \Codeception\Lib\Friend haveFriend($name, $actorClass = null)
*
* @SuppressWarnings(PHPMD)
*/
class AcceptanceTester extends \Codeception\Actor
{
use _generated\AcceptanceTesterActions;
// Define custom actions here
}

View file

@ -1,12 +0,0 @@
<?php
declare(strict_types=1);
namespace Helper;
// here you can define custom actions
// all public methods declared in helper class will be available in $I
class Acceptance extends \Codeception\Module
{
}

View file

@ -1,2 +0,0 @@
*
!.gitignore

View file

@ -1,37 +0,0 @@
---
suites:
acceptance:
actor: AcceptanceTester
modules:
enabled:
- WebDriver:
browser: chrome
url: "https://www.oliverklee.de"
- \Helper\Acceptance
path: "."
extensions:
enabled:
- Codeception\Extension\RunFailed
gherkin: [ ]
modules:
config:
WebDriver:
browser: chrome
capabilities:
chromeOptions:
args:
- "--headless"
- "--disable-gpu"
port: 9515
window_size: false
params:
- env
paths:
data: .Build/public/typo3temp/var/tests/_data
envs: .Build/public/typo3temp/var/tests/_envs
output: .Build/public/typo3temp/var/tests/_output
support: Tests/Acceptance/_support
tests: Tests/Acceptance
settings:
lint: true
shuffle: false

View file

@ -34,7 +34,6 @@
"typo3/cms-frontend": "^10.4 || ^11.5.2"
},
"require-dev": {
"codeception/codeception": "^4.2.2",
"doctrine/dbal": "^2.13.8",
"ergebnis/composer-normalize": "^2.19.0",
"friendsofphp/php-cs-fixer": "^3.4.0",
@ -187,7 +186,6 @@
"rm .prettierrc.js",
"rm package.json",
"rm stylelint.config.js",
"rm codeception.yml",
"rm phive.xml",
"rm phpstan-baseline.neon",
"rm phpstan.neon",

View file

@ -16,9 +16,7 @@
<!-- Classes -->
<rule ref="Generic.Classes.DuplicateClassName"/>
<rule ref="PSR1.Classes.ClassDeclaration">
<exclude-pattern>Tests/Acceptance/_support/</exclude-pattern>
</rule>
<rule ref="PSR1.Classes.ClassDeclaration"/>
<rule ref="Squiz.Classes.ClassFileName"/>
<rule ref="Squiz.Classes.DuplicateProperty"/>
<rule ref="Squiz.Classes.LowercaseClassKeywords"/>
@ -67,9 +65,7 @@
<rule ref="Squiz.Functions.GlobalFunction"/>
<!-- Methods -->
<rule ref="PSR2.Methods.MethodDeclaration.Underscore">
<exclude-pattern>Tests/Acceptance/</exclude-pattern>
</rule>
<rule ref="PSR2.Methods.MethodDeclaration.Underscore"/>
<!-- Metrics -->
<rule ref="Generic.Metrics.CyclomaticComplexity"/>

View file

@ -20,6 +20,3 @@ parameters:
- Classes
- Configuration
- Tests
excludePaths:
- Tests/Acceptance/