Skip to content

Commit

Permalink
Fix behat (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
lruozzi9 committed Aug 29, 2022
1 parent 017c4d5 commit 40e257c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 19 deletions.
2 changes: 1 addition & 1 deletion features/enqueuing_products.feature
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Feature: Enqueuing products
And there is one item to import with identifier "BRAIDED_HAT_L" for the "Product" importer in the Akeneo queue
When I browse products
And I schedule an Akeneo PIM import for the "Braided hat l" product
Then I should be notified that it has been already enqueued
Then I should be notified that it has been successfully enqueued

@ui
Scenario: Enqueuing a configurable product
Expand Down
12 changes: 0 additions & 12 deletions tests/Behat/Context/Ui/Admin/ManagingProductsContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,4 @@ public function iShouldBeNotifiedThatItHasBeenSuccessfullyEnqueued(): void
'Akeneo PIM product import has been successfully scheduled',
);
}

/**
* @Given /^I should be notified that it has been already enqueued$/
*/
public function iShouldBeNotifiedThatItHasBeenAlreadyEnqueued(): void
{
$this->testHelper->waitUntilNotificationPopups(
$this->notificationChecker,
NotificationType::success(),
'Akeneo PIM import for this product has been already scheduled before',
);
}
}
2 changes: 1 addition & 1 deletion tests/Behat/Resources/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<argument type="service" id="sylius.repository.product_association_type" />
</service>

<service id="webgriffe_sylius_akeneo.behat.context.db.queue" class="Tests\Webgriffe\SyliusAkeneoPlugin\Behat\Context\Messenger\MessengerContext">
<service id="webgriffe_sylius_akeneo.behat.context.messenger" class="Tests\Webgriffe\SyliusAkeneoPlugin\Behat\Context\Messenger\MessengerContext">
<argument type="service" id="messenger.transport.main"/>
<argument type="service" id="webgriffe_sylius_akeneo.message_handler.item_import"/>
</service>
Expand Down
11 changes: 6 additions & 5 deletions tests/Behat/Resources/suites.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ default:
- webgriffe_sylius_akeneo.behat.context.setup.queue

- webgriffe_sylius_akeneo.behat.context.db.product
- webgriffe_sylius_akeneo.behat.context.db.queue
- webgriffe_sylius_akeneo.behat.context.messenger
- webgriffe_sylius_akeneo.behat.context.system.filesystem

filters:
Expand All @@ -26,7 +26,7 @@ default:
- webgriffe_sylius_akeneo.behat.context.setup.queue

- webgriffe_sylius_akeneo.behat.context.db.product
- webgriffe_sylius_akeneo.behat.context.db.queue
- webgriffe_sylius_akeneo.behat.context.messenger

filters:
tags: "@importing_product_associations && @cli"
Expand All @@ -42,7 +42,7 @@ default:

- webgriffe_sylius_akeneo.behat.context.cli.enqueue_command

- webgriffe_sylius_akeneo.behat.context.db.queue
- webgriffe_sylius_akeneo.behat.context.messenger

- webgriffe_sylius_akeneo.behat.context.system.filesystem
- webgriffe_sylius_akeneo.behat.context.system.datetime
Expand All @@ -61,7 +61,7 @@ default:

- webgriffe_sylius_akeneo.behat.context.cli.enqueue_command

- webgriffe_sylius_akeneo.behat.context.db.queue
- webgriffe_sylius_akeneo.behat.context.messenger

- webgriffe_sylius_akeneo.behat.context.system.filesystem
- webgriffe_sylius_akeneo.behat.context.system.datetime
Expand All @@ -82,6 +82,7 @@ default:
- webgriffe_sylius_akeneo.behat.context.setup.queue

- sylius.behat.context.ui.admin.managing_products
- webgriffe_sylius_akeneo.behat.context.messenger
- webgriffe_sylius_akeneo.behat.context.ui.admin.managing_products
filters:
tags: "@enqueuing_products && @ui"
Expand All @@ -97,7 +98,7 @@ default:

- webgriffe_sylius_akeneo.behat.context.cli.enqueue_command

- webgriffe_sylius_akeneo.behat.context.db.queue
- webgriffe_sylius_akeneo.behat.context.messenger

- webgriffe_sylius_akeneo.behat.context.system.filesystem
- webgriffe_sylius_akeneo.behat.context.system.datetime
Expand Down

0 comments on commit 40e257c

Please sign in to comment.