flowpack / flowpack.behat Goto Github PK
View Code? Open in Web Editor NEW[READ-ONLY] Behat support package for Neos Flow
[READ-ONLY] Behat support package for Neos Flow
How is the correct Setup to use Behat with Saucelabs?
The headless scenarios with Behat works, but scenarios marked mit @javascript
ends up with the message:
[Symfony\Component\Config\Definition\Exception\InvalidConfigurationException]
Unrecognized options "saucelabs" under "behat.extensions.behat_minkextension_extension"
Running tests that reset/prepare some fixtures, I see the following red error message within the CLI output of Behat:
[TYPO3\Flow\Object\Exception\UnknownObjectException]
Exception has been thrown in "beforeScenario" hook, defined in FeatureContext::resetFixtures()
Object "TYPO3\Flow\Security\Policy\RoleRepository" is not registered.
I tracked it down to the Flowpack\Behat\Tests\Behat\FlowContext
class on line 229:
/**
* Reset policy service and role repository
*
* This is needed to remove cached role entities after resetting the database.
*
* @return void
*/
protected function resetRolesAndPolicyService() {
$this->objectManager->get('TYPO3\Flow\Security\Policy\PolicyService')->reset();
$roleRepository = $this->objectManager->get('TYPO3\Flow\Security\Policy\RoleRepository');
\TYPO3\Flow\Reflection\ObjectAccess::setProperty($roleRepository, 'newRoles', array(), TRUE);
}
If I just comment the last two lines of code within this method, it seems to work and no Error is shown again.
I'm seeing this with Flow 3.0.0-rc1 and I guess the commit that causes this was: https://git.typo3.org/Packages/TYPO3.Flow.git/commitdiff/7e33515840cbe94f0e578bd2444442ac5d1586da
Hi,
I'm just getting started with behat and noticed a small "bug":
The behat:setup command depends on wget, which is not supported on any Mac OS X version
I would just change it to curl, but I don't know if that would cause some other incompatibilities without auto-detection.
See minkphp/MinkGoutteDriver#56 (comment) for details, basicly the composer json has to be changed a bit to reflect the new versions, otherwise checkbox behaviour can't be tested reliable
use behat/mink ~1.6
use behat/mink-goutte-driver ~1.1
We have type hint that is too strict in the beforeScenario hook:
Exception has been thrown in "beforeScenario" hook, defined in Flowpack\Behat\Tests\Behat\FlowContext::resetTestFixtures() Catchable Fatal Error: Argument 1 passed to Flowpack\Behat\Tests\Behat\FlowContext::resetTestFixtures() must be an instance of Behat\Behat\Event\ScenarioEvent, instance of Behat\Behat\Event\OutlineExampleEvent
The selenium-server is no longer available through http://selenium.googlecode.com/files/ ("404"). So behat:setup ends with:
Warning: rename(/data/www/typo3-app/selenium-server-standalone-2.39.0.jar,/data/www/typo3-app/bin/selenium-server.jar): No such file or directory in /data/www/typo3-app/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/Flowpack_Behat_Command_BehatCommandController.php line 56
Which will fail docker builds that try to do that (i.e. million12 images).
Latest version seems to be downloadeable here:
http://selenium-release.storage.googleapis.com/index.html?path=2.53/
I seem to have trouble with running Behat tests:
As far as I see, the CLI execution runs in the FLOW_CONTEXT "Testing/Behat". Calling the application via the webserver fails constantly with the following exception (configured to the same context):
#1222268609: Access denied (0 denied, 0 granted, 1 abstained)
When I switch the web-server config to context "Development/Behat" and add the proper DB credentials it seems to work.
What's the proper setup? Which context should actually be used a) for the CLI and b) for accessing the web-based app via the webserver (e.g. via the browser, but also via Behat that accesses the application via the webserver).
After updating from v2.4.0 to v2.4.1 today, I've ran into the following issue when executing the tests:
PHP Fatal error: Call to a member function disableOutput() on a non-object in /var/www/XYZ/Packages/Application/Flowpack.Behat/Tests/Behat/FlowContext.php on line 99
This happens while resetting the fixtures via a CLI command within the to-be-tested application package which is executed like:
/**
* Resets the database and creates some basic data set for testing
*
* @BeforeScenario
*/
public function resetFixtures() {
$this->flowContext->iRunTheCommand('foo.bar:testing:resetapplicationfortesting');
}
With behat version 2.4 the tests in the neos package don't work. The version should be updated accordingly to the versions in the neos distribution (https://git.typo3.org/Neos/Distributions/Base.git/blob/HEAD:/Build/Behat/composer.json).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.