Skip to content

Commit

Permalink
OP-273 - fix sylius 1.12 integration
Browse files Browse the repository at this point in the history
* OP-273 - fix not existing service on 1.12. Fix sylius version in gh actions.

* OP-273 - fix sylius version in gh actions.

* OP-273 - fix tests on 1.12
  • Loading branch information
BartoszWojdalowicz authored May 14, 2024
1 parent 3349335 commit 166dd8e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
matrix:
php: [ "8.1", "8.2", "8.3" ]
symfony: [ "^5.4", "^6.0" ]
sylius: [ "^1.12", "^1.13" ]
sylius: [ "~1.12.0", "~1.13.0" ]
node: [ "18.x", "20.x" ]
mysql: [ "5.7", "8.0" ]
env:
Expand Down Expand Up @@ -176,10 +176,12 @@ jobs:

-
name: Run Behat
if: ${{ matrix.sylius != '~1.13.0' }}
run: vendor/bin/behat --colors --strict -vvv --no-interaction --tags '~@sylius113' || vendor/bin/behat --colors --strict -vvv --no-interaction --rerun --tags '~@sylius113'

-
name: Run Behat
if: ${{ matrix.sylius == '~1.13.0' }}
run: vendor/bin/behat --colors --strict -vvv --no-interaction --tags '~@sylius112' || vendor/bin/behat --colors --strict -vvv --no-interaction --rerun --tags '~@sylius112'


Expand Down
18 changes: 9 additions & 9 deletions features/shop/site_wide_searching_products.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,34 @@ Feature: Site-wide products search
And the store has a select product attribute "Car Type" with values "Cabrio" and "SUV"
And the store has a select product attribute "Motorbike Type" with values "Enduro" and "Naked"
And there is a product named "BMW Z4" in the store
And this product's price is "$42,670.00"
And this product's price is "$42670"
And this product has select attribute "Car Type" with value "Cabrio"
And this product has a text attribute "Color" with value "Red"
And this product has option "Supply" with values "Gasoline" and "Diesel"
And this product is available in "Gasoline" supply priced at "$42,670.00"
And this product is available in "Diesel" supply priced at "$45,670.00"
And this product is available in "Gasoline" supply priced at "$42670"
And this product is available in "Diesel" supply priced at "$45670"
And this product belongs to "Cars"
And there is a product named "Volvo XC90" in the store
And this product's price is "$64,505.80"
And this product's price is "$64505.80"
And this product has select attribute "Car Type" with value "SUV"
And this product has a text attribute "Color" with value "Black"
And this product belongs to "Cars"
And there is a product named "BMW 5 Series" in the store
And this product's price is "$52,070.00"
And this product's price is "$52070"
And this product has select attribute "Car Type" with value "Cabrio"
And this product has a text attribute "Color" with value "Red"
And this product belongs to "Cars"
And there is a product named "Lamborghini Aventador" in the store
And this product's price is "$450,000.00"
And this product's price is "$450000"
And this product has a text attribute "Color" with value "Yellow"
And this product belongs to "Cars"
And there is a product named "BMW GS" in the store
And this product's price is "$18,070.00"
And this product's price is "$18070"
And this product has select attribute "Motorbike Type" with value "Enduro"
And this product has a text attribute "Color" with value "Grey"
And this product belongs to "Motorbikes"
And there is a product named "Ducati Monster" in the store
And this product's price is "$14,995.00"
And this product's price is "$14995"
And this product has select attribute "Motorbike Type" with value "Naked"
And this product has a text attribute "Color" with value "Black"
And this product's short description is:
Expand All @@ -49,7 +49,7 @@ Feature: Site-wide products search
And there is a product named "Honda Africa Twin" in the store
And this product has select attribute "Motorbike Type" with value "Enduro"
And this product has a text attribute "Color" with value "Green & White"
And this product's price is "$13,490.00"
And this product's price is "$13490"
And this product's description is:
"""
This is the Honda Africa Twin which is like the BMW GS but from Honda.
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/config/services/transformer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<service id="BitBag\SyliusElasticsearchPlugin\Transformer\Product\ChannelPricingTransformer">
<argument type="service" id="sylius.context.channel" />
<argument type="service" id="sylius.context.locale" />
<argument type="service" id="Sylius\Component\Product\Resolver\ProductVariantResolverInterface" />
<argument type="service" id="sylius.product_variant_resolver.default" />
<argument type="service" id="sylius.money_formatter" />
</service>

Expand Down
2 changes: 1 addition & 1 deletion tests/Behat/Resources/services/contexts/setup.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<argument type="service" id="sylius.factory.product_option" />
<argument type="service" id="sylius.factory.product_option_value" />
<argument type="service" id="doctrine.orm.entity_manager" />
<argument type="service" id="Sylius\Component\Product\Resolver\ProductVariantResolverInterface" />
<argument type="service" id="sylius.product_variant_resolver.default" />
<argument type="service" id="sylius.generator.slug" />
</service>

Expand Down

0 comments on commit 166dd8e

Please sign in to comment.