Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement behat --init @<module> #1

Closed
chillu opened this issue Nov 15, 2012 · 2 comments
Closed

Implement behat --init @<module> #1

chillu opened this issue Nov 15, 2012 · 2 comments

Comments

@chillu
Copy link
Member

chillu commented Nov 15, 2012

See https://github.com/Behat/Symfony2Extension/blob/master/src/Behat/Symfony2Extension/Console/Processor/InitProcessor.php

srizzling pushed a commit to srizzling/silverstripe-behat-extension that referenced this issue Nov 15, 2013
IgorNadj added a commit to IgorNadj/silverstripe-behat-extension that referenced this issue Apr 7, 2015
When you try to call getRegionObj with a string starting with a number, e.g. "60 NZ Minutes", the getRegionObj function will fail with a syntax exception, and not fall back to looking at the data-title attribute as designed.

Stack trace of the exception thrown:

|  #0 /var/www/public/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Parser.php(281): Symfony\Component\CssSelector\Exception\SyntaxErrorException::unexpectedToken('selector', Object(Symfony\Component\CssSelector\Parser\Token))
|  silverstripe#1 /var/www/public/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Parser.php(140): Symfony\Component\CssSelector\Parser\Parser->parseSimpleSelector(Object(Symfony\Component\CssSelector\Parser\TokenStream))
|  silverstripe#2 /var/www/public/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Parser.php(116): Symfony\Component\CssSelector\Parser\Parser->parserSelectorNode(Object(Symfony\Component\CssSelector\Parser\TokenStream))
|  silverstripe#3 /var/www/public/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Parser.php(51): Symfony\Component\CssSelector\Parser\Parser->parseSelectorList(Object(Symfony\Component\CssSelector\Parser\TokenStream))
|  silverstripe#4 /var/www/public/vendor/symfony/css-selector/Symfony/Component/CssSelector/XPath/Translator.php(299): Symfony\Component\CssSelector\Parser\Parser->parse('60 NZ Minutes')
|  silverstripe#5 /var/www/public/vendor/symfony/css-selector/Symfony/Component/CssSelector/XPath/Translator.php(123): Symfony\Component\CssSelector\XPath\Translator->parseSelectors('60 NZ Minutes')
|  silverstripe#6 /var/www/public/vendor/symfony/css-selector/Symfony/Component/CssSelector/CssSelector.php(65): Symfony\Component\CssSelector\XPath\Translator->cssToXPath('60 NZ Minutes', 'descendant-or-s...')
|  silverstripe#7 /var/www/public/vendor/behat/mink/src/Behat/Mink/Selector/CssSelector.php(35): Symfony\Component\CssSelector\CssSelector::toXPath('60 NZ Minutes')
|  silverstripe#8 /var/www/public/vendor/behat/mink/src/Behat/Mink/Selector/SelectorsHandler.php(111): Behat\Mink\Selector\CssSelector->translateToXPath('60 NZ Minutes')
|  silverstripe#9 /var/www/public/vendor/behat/mink/src/Behat/Mink/Element/Element.php(159): Behat\Mink\Selector\SelectorsHandler->selectorToXpath('css', '60 NZ Minutes')
|  silverstripe#10 /var/www/public/vendor/behat/mink/src/Behat/Mink/Element/Element.php(140): Behat\Mink\Element\Element->findAll('css', '60 NZ Minutes')
|  silverstripe#11 /var/www/public/vendor/silverstripe/behat-extension/src/SilverStripe/BehatExtension/Context/SilverStripeContext.php(148): Behat\Mink\Element\Element->find('css', '60 NZ Minutes')

Thanks,
Igor
jeffreyguo referenced this issue in jeffreyguo/silverstripe-behat-extension Jan 12, 2016
NEW: Add status code comment to testsession/start output.
@phptek
Copy link

phptek commented Jun 29, 2017

I think this can be closed can it not? (If for no other reason other than its being 5 years old, I just init'd my folder hierarchy ala (using 1.0.3)

./vendor/bin/behat --init @app

@robbieaverill
Copy link

I agree with @phptek, and that you don't need your own fixture/feature contexts any more so you can simply get started with feature definitions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants