@@ -106,7 +106,7 @@ |
||
106 | 106 | |
107 | 107 | try { |
108 | 108 | return Languages::getName($language, $region); |
109 | - } catch(MissingResourceException $exception) { |
|
109 | + } catch (MissingResourceException $exception) { |
|
110 | 110 | return null; |
111 | 111 | } |
112 | 112 | } |
@@ -93,7 +93,7 @@ |
||
93 | 93 | { |
94 | 94 | try { |
95 | 95 | return Currencies::getName($code); |
96 | - } catch(MissingResourceException $exception) { |
|
96 | + } catch (MissingResourceException $exception) { |
|
97 | 97 | return null; |
98 | 98 | } |
99 | 99 | } |
@@ -21,7 +21,6 @@ |
||
21 | 21 | use Sylius\Component\Addressing\Model\CountryInterface; |
22 | 22 | use Sylius\Component\Addressing\Model\ProvinceInterface; |
23 | 23 | use Sylius\Component\Addressing\Model\ZoneInterface; |
24 | -use Sylius\Component\Addressing\Model\ZoneMember; |
|
25 | 24 | use Sylius\Component\Addressing\Model\ZoneMemberInterface; |
26 | 25 | use Webmozart\Assert\Assert; |
27 | 26 |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | $this->assertInstanceOf(SalesSummary::class, $salesSummary); |
97 | 97 | $this->assertSame($expectedPeriods, $salesSummary->getIntervals()); |
98 | 98 | $this->assertSame( |
99 | - ['70.00', '40.00' ,'0.00' ,'0.00' ,'0.00' ,'0.00' ,'0.00' ,'0.00' ,'0.00' ,'0.00' ,'0.00' ,'0.00'], |
|
99 | + ['70.00', '40.00', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00'], |
|
100 | 100 | $salesSummary->getSales() |
101 | 101 | ); |
102 | 102 | } |
@@ -114,8 +114,8 @@ discard block |
||
114 | 114 | $this->assertSame($expectedPeriods, $salesSummary->getIntervals()); |
115 | 115 | $this->assertSame( |
116 | 116 | [ |
117 | - '0.00', '0.00' ,'0.00' ,'0.00' ,'0.00' ,'0.00' ,'0.00' ,'0.00' ,'0.00' ,'0.00' ,'0.00' ,'20.00', |
|
118 | - '70.00', '40.00' ,'0.00' ,'0.00' ,'0.00' ,'0.00' ,'0.00' ,'0.00' ,'0.00' ,'0.00' ,'0.00' ,'0.00' |
|
117 | + '0.00', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00', '20.00', |
|
118 | + '70.00', '40.00', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00' |
|
119 | 119 | ], |
120 | 120 | $salesSummary->getSales() |
121 | 121 | ); |
@@ -28,7 +28,7 @@ |
||
28 | 28 | function it_has_intervals_list(): void |
29 | 29 | { |
30 | 30 | $this->getIntervals()->shouldReturn( |
31 | - [9, 10 ,11] |
|
31 | + [9, 10, 11] |
|
32 | 32 | ); |
33 | 33 | } |
34 | 34 |
@@ -18,16 +18,16 @@ |
||
18 | 18 | use Sylius\Behat\NotificationType; |
19 | 19 | use Sylius\Behat\Page\Admin\Crud\CreatePageInterface; |
20 | 20 | use Sylius\Behat\Page\Admin\Crud\UpdatePageInterface; |
21 | +use Sylius\Behat\Page\Admin\ProductReview\IndexPageInterface as ProductReviewIndexPageInterface; |
|
22 | +use Sylius\Behat\Page\Admin\ProductVariant\CreatePageInterface as VariantCreatePageInterface; |
|
23 | +use Sylius\Behat\Page\Admin\ProductVariant\GeneratePageInterface; |
|
24 | +use Sylius\Behat\Page\Admin\ProductVariant\UpdatePageInterface as VariantUpdatePageInterface; |
|
21 | 25 | use Sylius\Behat\Page\Admin\Product\CreateConfigurableProductPageInterface; |
22 | 26 | use Sylius\Behat\Page\Admin\Product\CreateSimpleProductPageInterface; |
23 | 27 | use Sylius\Behat\Page\Admin\Product\IndexPageInterface; |
24 | 28 | use Sylius\Behat\Page\Admin\Product\IndexPerTaxonPageInterface; |
25 | 29 | use Sylius\Behat\Page\Admin\Product\UpdateConfigurableProductPageInterface; |
26 | 30 | use Sylius\Behat\Page\Admin\Product\UpdateSimpleProductPageInterface; |
27 | -use Sylius\Behat\Page\Admin\ProductReview\IndexPageInterface as ProductReviewIndexPageInterface; |
|
28 | -use Sylius\Behat\Page\Admin\ProductVariant\CreatePageInterface as VariantCreatePageInterface; |
|
29 | -use Sylius\Behat\Page\Admin\ProductVariant\GeneratePageInterface; |
|
30 | -use Sylius\Behat\Page\Admin\ProductVariant\UpdatePageInterface as VariantUpdatePageInterface; |
|
31 | 31 | use Sylius\Behat\Service\NotificationCheckerInterface; |
32 | 32 | use Sylius\Behat\Service\Resolver\CurrentPageResolverInterface; |
33 | 33 | use Sylius\Behat\Service\SharedStorageInterface; |
@@ -25,14 +25,29 @@ discard block |
||
25 | 25 | |
26 | 26 | public function isSlugReadonlyIn(string $locale): bool; |
27 | 27 | |
28 | + /** |
|
29 | + * @return void |
|
30 | + */ |
|
28 | 31 | public function specifyPrice(string $channelName, string $price): void; |
29 | 32 | |
33 | + /** |
|
34 | + * @return void |
|
35 | + */ |
|
30 | 36 | public function specifyOriginalPrice(string $channelName, string $originalPrice): void; |
31 | 37 | |
38 | + /** |
|
39 | + * @return void |
|
40 | + */ |
|
32 | 41 | public function nameItIn(string $name, string $localeCode): void; |
33 | 42 | |
43 | + /** |
|
44 | + * @return void |
|
45 | + */ |
|
34 | 46 | public function addSelectedAttributes(): void; |
35 | 47 | |
48 | + /** |
|
49 | + * @return void |
|
50 | + */ |
|
36 | 51 | public function removeAttribute(string $attributeName, string $localeCode): void; |
37 | 52 | |
38 | 53 | public function getAttributeValue(string $attributeName, string $localeCode): string; |
@@ -45,48 +60,83 @@ discard block |
||
45 | 60 | |
46 | 61 | public function isMainTaxonChosen(string $taxonName): bool; |
47 | 62 | |
63 | + /** |
|
64 | + * @return void |
|
65 | + */ |
|
48 | 66 | public function selectMainTaxon(TaxonInterface $taxon): void; |
49 | 67 | |
68 | + /** |
|
69 | + * @return void |
|
70 | + */ |
|
50 | 71 | public function disableTracking(): void; |
51 | 72 | |
73 | + /** |
|
74 | + * @return void |
|
75 | + */ |
|
52 | 76 | public function enableTracking(): void; |
53 | 77 | |
54 | 78 | public function isTracked(): bool; |
55 | 79 | |
80 | + /** |
|
81 | + * @return void |
|
82 | + */ |
|
56 | 83 | public function enableSlugModification(string $locale): void; |
57 | 84 | |
58 | 85 | public function isImageWithTypeDisplayed(string $type): bool; |
59 | 86 | |
60 | 87 | /** |
61 | 88 | * @param string $type |
89 | + * @return void |
|
62 | 90 | */ |
63 | 91 | public function attachImage(string $path, string $type = null): void; |
64 | 92 | |
93 | + /** |
|
94 | + * @return void |
|
95 | + */ |
|
65 | 96 | public function changeImageWithType(string $type, string $path): void; |
66 | 97 | |
98 | + /** |
|
99 | + * @return void |
|
100 | + */ |
|
67 | 101 | public function removeImageWithType(string $type): void; |
68 | 102 | |
103 | + /** |
|
104 | + * @return void |
|
105 | + */ |
|
69 | 106 | public function removeFirstImage(): void; |
70 | 107 | |
108 | + /** |
|
109 | + * @return void |
|
110 | + */ |
|
71 | 111 | public function modifyFirstImageType(string $type): void; |
72 | 112 | |
73 | 113 | public function countImages(): int; |
74 | 114 | |
75 | 115 | /** |
76 | 116 | * @param string[] $productsNames |
117 | + * @return void |
|
77 | 118 | */ |
78 | 119 | public function associateProducts(ProductAssociationTypeInterface $productAssociationType, array $productsNames): void; |
79 | 120 | |
80 | 121 | public function hasAssociatedProduct(string $productName, ProductAssociationTypeInterface $productAssociationType): bool; |
81 | 122 | |
123 | + /** |
|
124 | + * @return void |
|
125 | + */ |
|
82 | 126 | public function removeAssociatedProduct(string $productName, ProductAssociationTypeInterface $productAssociationType): void; |
83 | 127 | |
84 | 128 | public function getPricingConfigurationForChannelAndCurrencyCalculator(ChannelInterface $channel, CurrencyInterface $currency): string; |
85 | 129 | |
130 | + /** |
|
131 | + * @return void |
|
132 | + */ |
|
86 | 133 | public function activateLanguageTab(string $locale): void; |
87 | 134 | |
88 | 135 | public function getSlug(string $locale): string; |
89 | 136 | |
137 | + /** |
|
138 | + * @return void |
|
139 | + */ |
|
90 | 140 | public function specifySlugIn(string $slug, string $locale): void; |
91 | 141 | |
92 | 142 | public function getPriceForChannel(string $channelName): string; |
@@ -95,23 +145,44 @@ discard block |
||
95 | 145 | |
96 | 146 | public function isShippingRequired(): bool; |
97 | 147 | |
148 | + /** |
|
149 | + * @return void |
|
150 | + */ |
|
98 | 151 | public function goToVariantsList(): void; |
99 | 152 | |
153 | + /** |
|
154 | + * @return void |
|
155 | + */ |
|
100 | 156 | public function goToVariantCreation(): void; |
101 | 157 | |
158 | + /** |
|
159 | + * @return void |
|
160 | + */ |
|
102 | 161 | public function goToVariantGeneration(): void; |
103 | 162 | |
104 | 163 | public function hasInventoryTab(): bool; |
105 | 164 | |
106 | 165 | public function isShowInShopButtonDisabled(): bool; |
107 | 166 | |
167 | + /** |
|
168 | + * @return void |
|
169 | + */ |
|
108 | 170 | public function showProductInChannel(string $channel): void; |
109 | 171 | |
172 | + /** |
|
173 | + * @return void |
|
174 | + */ |
|
110 | 175 | public function showProductInSingleChannel(): void; |
111 | 176 | |
177 | + /** |
|
178 | + * @return void |
|
179 | + */ |
|
112 | 180 | public function disable(): void; |
113 | 181 | |
114 | 182 | public function isEnabled(): bool; |
115 | 183 | |
184 | + /** |
|
185 | + * @return void |
|
186 | + */ |
|
116 | 187 | public function enable(): void; |
117 | 188 | } |
@@ -19,8 +19,14 @@ discard block |
||
19 | 19 | |
20 | 20 | interface UpdatePageInterface extends BaseUpdatePageInterface |
21 | 21 | { |
22 | + /** |
|
23 | + * @return void |
|
24 | + */ |
|
22 | 25 | public function disableTracking(): void; |
23 | 26 | |
27 | + /** |
|
28 | + * @return void |
|
29 | + */ |
|
24 | 30 | public function enableTracking(): void; |
25 | 31 | |
26 | 32 | public function isCodeDisabled(): bool; |
@@ -39,21 +45,42 @@ discard block |
||
39 | 45 | |
40 | 46 | public function getNameInLanguage(string $language): string; |
41 | 47 | |
48 | + /** |
|
49 | + * @return void |
|
50 | + */ |
|
42 | 51 | public function selectOption(string $optionName, string $optionValue): void; |
43 | 52 | |
44 | 53 | public function isShowInShopButtonDisabled(): bool; |
45 | 54 | |
55 | + /** |
|
56 | + * @return void |
|
57 | + */ |
|
46 | 58 | public function showProductInChannel(string $channel): void; |
47 | 59 | |
60 | + /** |
|
61 | + * @return void |
|
62 | + */ |
|
48 | 63 | public function showProductInSingleChannel(): void; |
49 | 64 | |
65 | + /** |
|
66 | + * @return void |
|
67 | + */ |
|
50 | 68 | public function specifyCurrentStock(int $amount): void; |
51 | 69 | |
70 | + /** |
|
71 | + * @return void |
|
72 | + */ |
|
52 | 73 | public function specifyPrice(int $price): void; |
53 | 74 | |
75 | + /** |
|
76 | + * @return void |
|
77 | + */ |
|
54 | 78 | public function disable(): void; |
55 | 79 | |
56 | 80 | public function isEnabled(): bool; |
57 | 81 | |
82 | + /** |
|
83 | + * @return void |
|
84 | + */ |
|
58 | 85 | public function enable(): void; |
59 | 86 | } |
@@ -22,24 +22,31 @@ discard block |
||
22 | 22 | { |
23 | 23 | /** |
24 | 24 | * @throws ElementNotFoundException |
25 | + * @return void |
|
25 | 26 | */ |
26 | 27 | public function addToCart(): void; |
27 | 28 | |
28 | 29 | /** |
29 | 30 | * @throws ElementNotFoundException |
31 | + * @return void |
|
30 | 32 | */ |
31 | 33 | public function addToCartWithQuantity(string $quantity): void; |
32 | 34 | |
33 | 35 | /** |
34 | 36 | * @throws ElementNotFoundException |
37 | + * @return void |
|
35 | 38 | */ |
36 | 39 | public function addToCartWithVariant(string $variant): void; |
37 | 40 | |
38 | 41 | /** |
39 | 42 | * @throws ElementNotFoundException |
43 | + * @return void |
|
40 | 44 | */ |
41 | 45 | public function addToCartWithOption(ProductOptionInterface $option, string $optionValue): void; |
42 | 46 | |
47 | + /** |
|
48 | + * @return null|string |
|
49 | + */ |
|
43 | 50 | public function getAttributeByName(string $name): ?string; |
44 | 51 | |
45 | 52 | public function getAttributes(): array; |
@@ -72,10 +79,19 @@ discard block |
||
72 | 79 | |
73 | 80 | public function countReviews(): int; |
74 | 81 | |
82 | + /** |
|
83 | + * @return void |
|
84 | + */ |
|
75 | 85 | public function selectOption(string $optionCode, string $optionValue): void; |
76 | 86 | |
87 | + /** |
|
88 | + * @return void |
|
89 | + */ |
|
77 | 90 | public function selectVariant(string $variantName): void; |
78 | 91 | |
92 | + /** |
|
93 | + * @return void |
|
94 | + */ |
|
79 | 95 | public function visit(string $url): void; |
80 | 96 | |
81 | 97 | public function getVariantsNames(): array; |