Skip to content

Commit

Permalink
[Admin][Product] Enable and fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mpysiak committed May 17, 2024
1 parent 27a9529 commit d8e1758
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ Feature: Checking products in the shop while editing them
And the store has a product "Bugatti" available in "United States" channel
And I am logged in as an administrator

@todo @ui @no-api
@ui @no-api
Scenario: Accessing product show page in shop from the product edit page where product is available in more than one channel
Given this product is available in the "Europe" channel
And I am browsing products
When I want to modify this product
And I choose to show this product in the "Europe" channel
Then I should see this product in the "Europe" channel in the shop

@todo @ui @no-api
@ui @no-api
Scenario: Accessing product show page in shop from the product edit page where product is available in one channel
Given I am browsing products
When I want to modify this product
And I choose to show this product in this channel
Then I should see this product in the "United States" channel in the shop

@todo @ui @no-api
@ui @no-api
Scenario: Being unable to access product show page in shop when the product is disabled
Given this product has been disabled
When I want to modify this product
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ Feature: Checking products in the shop while viewing them
And I am logged in as an administrator
And I am browsing products

@todo @ui @no-api
@ui @no-api
Scenario: Accessing product show page in shop from the product show page where product is available in more than one channel
Given this product is available in the "Europe" channel
When I access the "Bugatti" product
And I show this product in the "Europe" channel
Then I should see this product in the "Europe" channel in the shop

@todo @ui @no-api
@ui @no-api
Scenario: Accessing product show page in shop from the product show page where product is available in one channel
When I access the "Bugatti" product
And I show this product in this channel
Then I should see this product in the "Europe" channel in the shop

@todo @ui @no-api
@ui @no-api
Scenario: Being unable to access product show page in shop when the product is disabled
Given this product has been disabled
When I access the "Bugatti" product
Expand Down
6 changes: 3 additions & 3 deletions src/Sylius/Behat/Page/Admin/Product/ShowPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ public function showVariantEditPage(ProductVariantInterface $variant): void
protected function getDefinedElements(): array
{
return array_merge(parent::getDefinedElements(), [
'breadcrumb' => '.breadcrumb > div',
'edit_product_button' => '#edit-product',
'edit_variant_button' => '#variants .variants-accordion__title:contains("%variantCode%") .edit-variant',
'product_name' => '#header h1 .content > span',
'show_product_dropdown' => '.scrolling.menu',
'show_product_single_button' => '.ui.labeled.icon.button',
'show_product_dropdown' => '[data-test-view-in-store]',
'show_product_single_button' => '[data-test-view-in-store]',
'variants' => '#variants',
'breadcrumb' => '.breadcrumb > div',
]);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,8 @@ protected function getDefinedElements(): array
'product_taxon' => '#sylius-product-taxonomy-tree .item .header:contains("%taxonName%") input',
'product_taxons' => '#sylius_product_productTaxons',
'shipping_required' => '#sylius_product_variant_shippingRequired',
'show_product_dropdown' => '.scrolling.menu',
'show_product_single_button' => '[data-test-show-product-in-shop-page]',
'show_product_dropdown' => '[data-test-view-in-store]',
'show_product_single_button' => '[data-test-view-in-store]',
'slug' => '#sylius_product_translations_%locale%_slug',
'tab' => '.menu [data-tab="%name%"]',
'taxonomy' => 'a[data-tab="taxonomy"]',
Expand Down

0 comments on commit d8e1758

Please sign in to comment.