Skip to content

Commit 60580e0

Browse files
committed
Fix behat
1 parent 0db1f16 commit 60580e0

File tree

6 files changed

+12
-13
lines changed

6 files changed

+12
-13
lines changed

features/shop/filtering_products.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Feature: Filtering products
1919
And 3 of these products have text attribute "color" with "Red" value
2020
And 5 of these products have text attribute "color" with "Green" value
2121
And 7 of these products have text attribute "color" with "Blue" value
22+
And populate elasticsearch
2223

2324
@ui
2425
Scenario: Filtering products by name

tests/Behat/Context/Hook/ElasticsearchContext.php renamed to tests/Behat/Context/Setup/ElasticsearchContext.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
declare(strict_types=1);
1212

13-
namespace Tests\BitBag\SyliusElasticsearchPlugin\Behat\Context\Hook;
13+
namespace Tests\BitBag\SyliusElasticsearchPlugin\Behat\Context\Setup;
1414

1515
use Behat\Behat\Context\Context;
1616
use Tests\BitBag\SyliusElasticsearchPlugin\Behat\Service\Populate;
@@ -31,9 +31,9 @@ public function __construct(Populate $populate)
3131
}
3232

3333
/**
34-
* @AfterScenario
34+
* @Given populate elasticsearch
3535
*/
36-
public function populateIndex(): void
36+
public function populateElasticsearch()
3737
{
3838
$this->populate->populateIndex();
3939
}
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
imports:
22
- { resource: "contexts/setup.yml" }
33
- { resource: "contexts/ui.yml" }
4-
- { resource: "contexts/hook.yml" }

tests/Behat/Resources/services/contexts/hook.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

tests/Behat/Resources/services/contexts/setup.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,10 @@ services:
3333
- "@__symfony__.doctrine.orm.entity_manager"
3434
tags:
3535
- { name: fob.context_service }
36+
37+
bitbag.sylius_elasticsearch_plugin.behat.context.setup.elasticsearch:
38+
class: Tests\BitBag\SyliusElasticsearchPlugin\Behat\Context\Setup\ElasticsearchContext
39+
arguments:
40+
- "@bitbag.sylius_elasticsearch_plugin.behat.populate"
41+
tags:
42+
- { name: fob.context_service }

tests/Behat/Resources/suites/ui/managing_inventory.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ default:
44
contexts_services:
55
- sylius.behat.context.hook.doctrine_orm
66

7-
- bitbag.sylius_elasticsearch_plugin.behat.context.hook.elasticsearch
8-
97
- sylius.behat.context.transform.channel
108
- sylius.behat.context.transform.lexical
119
- sylius.behat.context.transform.locale
@@ -21,6 +19,7 @@ default:
2119
- bitbag.sylius_elasticsearch_plugin.behat.context.setup.product
2220
- bitbag.sylius_elasticsearch_plugin.behat.context.setup.product_attribute
2321
- bitbag.sylius_elasticsearch_plugin.behat.context.setup.product_taxon
22+
- bitbag.sylius_elasticsearch_plugin.behat.context.setup.elasticsearch
2423

2524
- bitbag.sylius_elasticsearch_plugin.behat.context.ui.shop.product
2625
filters:

0 commit comments

Comments
 (0)