mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 17:10:53 +00:00
Add tests
This commit is contained in:
parent
74be2d9351
commit
b847995f96
3 changed files with 19 additions and 1 deletions
|
|
@ -17,7 +17,16 @@ Feature: Adding images to an existing product
|
||||||
Then I should be notified that it has been successfully uploaded
|
Then I should be notified that it has been successfully uploaded
|
||||||
And the product "Lamborghini Gallardo Model" should have an image with "banner" type
|
And the product "Lamborghini Gallardo Model" should have an image with "banner" type
|
||||||
|
|
||||||
@ui @mink:chromedriver @api
|
@api @ui @mink:chromedriver
|
||||||
|
Scenario: Trying to add svg image to an existing product
|
||||||
|
Given the store has a product "Lamborghini Gallardo Model"
|
||||||
|
When I want to modify this product
|
||||||
|
And I attach the "sylius.svg" image
|
||||||
|
And I save my changes to the images
|
||||||
|
Then I should be notified that svg file is not allowed
|
||||||
|
And this product should not have any images
|
||||||
|
|
||||||
|
@api @ui @mink:chromedriver
|
||||||
Scenario: Adding multiple images to an existing product
|
Scenario: Adding multiple images to an existing product
|
||||||
Given the store has a product "Lamborghini Gallardo Model"
|
Given the store has a product "Lamborghini Gallardo Model"
|
||||||
When I want to modify this product
|
When I want to modify this product
|
||||||
|
|
|
||||||
|
|
@ -1081,6 +1081,14 @@ final class ManagingProductsContext implements Context
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Then I should be notified that svg file is not allowed
|
||||||
|
*/
|
||||||
|
public function iShouldBeNotifiedThatSvgTypeIsNotAllowed(): void
|
||||||
|
{
|
||||||
|
$this->assertValidationMessage('image', 'This file type is not allowed.');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Then I should be notified that simple product code has to be unique
|
* @Then I should be notified that simple product code has to be unique
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
1
src/Sylius/Behat/Resources/fixtures/sylius.svg
Executable file
1
src/Sylius/Behat/Resources/fixtures/sylius.svg
Executable file
|
|
@ -0,0 +1 @@
|
||||||
|
<svg id="Warstwa_1" data-name="Warstwa 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1012.77 417.76"><defs><style>.cls-1{fill:#fff;}.cls-2{fill:#30ba9d;}.cls-3{fill:#1a9f83;}</style></defs><title>sylius-logo</title><path class="cls-1" d="M393.56,255.07s14.68,17.33,36.09,17.33c13.46,0,24.67-8.15,24.67-21.41,0-30.17-69.53-25.48-69.53-70.34,0-21.62,19-38.54,46.08-38.54,15.3,0,41,6.94,41,26.51v11.82H453.1v-6.72c0-7.55-10.81-13.05-22.23-13.05-15.49,0-25.28,8.56-25.28,19.36,0,29.16,69.33,22.64,69.33,69.94,0,22-17.13,41-45.67,41a64.37,64.37,0,0,1-47.72-21.4Z"/><path class="cls-1" d="M507.53,314.2c8,0,14.27-5.71,18.15-14.88l4.69-11.22-35.28-81.76c-1.42-3.27-3.26-4.08-6.52-4.08h-2.45V185.34h11.62c8.36,0,11.42,2.24,14.68,10.4l23.45,58.1a110.31,110.31,0,0,1,3.67,12.44h.4a93.93,93.93,0,0,1,3.47-12.44l21.41-58.1c3.06-8.16,6.73-10.4,15.09-10.4h11.83v16.92h-2.66c-3.25,0-5.09.81-6.52,4.08L541.78,307.06c-6.32,15.9-18.76,24.27-33.23,24.27a34.19,34.19,0,0,1-24.26-10.2l8.15-14.27C492.44,307.06,498.76,314.2,507.53,314.2Z"/><path class="cls-1" d="M611.5,166c0-3.06-1.63-4.49-4.48-4.49h-8.36V144.56h19.57c9.17,0,13,3.87,13,13.05V267.1c0,3.06,1.63,4.49,4.49,4.49h8.35v16.92H624.55c-9.17,0-13-3.88-13-13.05Z"/><path class="cls-1" d="M673.23,206.75c0-3.06-1.63-4.49-4.49-4.49h-8.36V185.34h19.38c9.17,0,13,3.87,13,13V267.1c0,3.06,1.63,4.49,4.49,4.49h8.36v16.92H686.28c-9.18,0-13-3.88-13-13.05Zm.41-62.19h17.73v20.59H673.64Z"/><path class="cls-1" d="M730.7,206.75c0-3.06-1.63-4.49-4.49-4.49h-8.36V185.34h19.37c9.38,0,13.25,3.87,13.25,12.64v48.93c0,14.28,2.86,25.69,19.17,25.69,21.21,0,33.64-18.55,33.64-38.94V185.34h19.78V267.1c0,3.06,1.63,4.49,4.49,4.49h8.35v16.92h-19c-8.76,0-13.05-4.08-13.05-11.42v-3.87c0-3.27.21-5.91.21-5.91h-.41C799.41,277.5,786.16,291,765.77,291c-23.25,0-35.07-12.23-35.07-39.55Z"/><path class="cls-1" d="M858.91,259.56s12.23,15.29,31.2,15.29c9.58,0,17.94-4.29,17.94-13.26,0-18.55-56.27-16.51-56.27-49.74,0-19.78,17.32-29,38.33-29,12.44,0,33.84,4.28,33.84,20v9.78H906.21v-5.1c0-6.12-9.17-8.77-15.49-8.77-11.62,0-19.17,4.09-19.17,12.24,0,19.57,56.28,15.29,56.28,49.75,0,18.35-16.31,30.17-37.93,30.17-27.52,0-41.18-18.14-41.18-18.14Z"/><polygon class="cls-2" points="119.37 230.23 168.96 329.41 260.49 329.56 282.64 298.38 119.37 230.23"/><polygon class="cls-3" points="84.95 241.12 151.62 332.64 260.49 332.82 282.64 298.58 84.95 241.12"/><polygon class="cls-3" points="164.89 129.63 197.34 154.8 226.68 98.5 216.71 92.12 164.89 129.63"/><polygon class="cls-2" points="260.49 332.82 164.89 129.63 185.34 114.83 296.58 277.01 260.49 332.82"/><polygon class="cls-2" points="207.51 98.78 269.78 149.08 226.08 84.95 207.51 98.78"/></svg>
|
||||||
|
After Width: | Height: | Size: 2.6 KiB |
Loading…
Add table
Reference in a new issue