Sylius / PluginSkeleton

Skeleton for starting Sylius plugins.
https://sylius.com/plugins/
73 stars 63 forks source link

Missing mink parameters #50

Closed marek-pietrzak-tg closed 6 years ago

marek-pietrzak-tg commented 6 years ago

Hi, I tried a Plugin Skeleton, but behat tests failed for default features:

@managing_products
Feature: Adding a new product with text attribute
    In order to extend my merchandise with more complex products
    As an Administrator
    I want to add a new product with text attribute to the shop

  Background:
    Given the store operates on a single channel in "United States"
    And the store has a text product attribute "Gun caliber"
    And the store has a text product attribute "Overall length"
    And I am logged in as an administrator
      Type error: strpos() expects parameter 1 to be string, null given (Behat\Testwork\Call\Exception\FatalThrowableError)
      #1 vendor/sylius/sylius/src/Sylius/Behat/Service/Setter/CookieSetter.php(50): Sylius\Behat\Service\Setter\CookieSetter->prepareMinkSessionIfNeeded()
      #2 vendor/sylius/sylius/src/Sylius/Behat/Service/SecurityService.php(103): Sylius\Behat\Service\Setter\CookieSetter->setCookie('MOCKSESSID', 'bf43018f907a5ca...')
      #3 vendor/sylius/sylius/src/Sylius/Behat/Service/SecurityService.php(62): Sylius\Behat\Service\SecurityService->setToken(Object(Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken))
      #4 vendor/sylius/sylius/src/Sylius/Behat/Context/Setup/AdminSecurityContext.php(74): Sylius\Behat\Service\SecurityService->logIn(Object(Sylius\Component\Core\Model\AdminUser))
      #5 [internal function]: Sylius\Behat\Context\Setup\AdminSecurityContext->iAmLoggedInAsAnAdministrator()

Can you advice what is the configuration which will make this work, please? Would be great if the documentation mentioned that.

pamil commented 6 years ago

Have you followed the installation phase from the readme?

marek-pietrzak-tg commented 6 years ago

Hi @pamil , yes I have.

pamil commented 6 years ago

Ah, these added scenarios are JS based, so:

marek-pietrzak-tg commented 6 years ago

thanks, will check if it works in the evening.

marek-pietrzak-tg commented 6 years ago

Yes, that was it and I can see you have already improved readme. thanks @pamil 👍