44 lines
1.1 KiB
Gherkin
44 lines
1.1 KiB
Gherkin
Feature: Extra image generation
|
|
As a Jekyll user
|
|
I want to resize images that aren't used in posts or pages
|
|
In order to use them in my stylesheets
|
|
|
|
Scenario: Resizing a single image
|
|
Given I have a responsive_image configuration with:
|
|
"""
|
|
sizes:
|
|
- width: 100
|
|
|
|
extra_images:
|
|
- assets/test.png
|
|
"""
|
|
|
|
And I have a file "index.html" with "Hello, world!"
|
|
When I run Jekyll
|
|
Then the image "assets/resized/test-100x50.png" should have the dimensions "100x50"
|
|
|
|
Scenario: Using glob patterns
|
|
Given I have a responsive_image configuration with:
|
|
"""
|
|
sizes:
|
|
- width: 100
|
|
|
|
extra_images:
|
|
- assets/*.png
|
|
"""
|
|
|
|
And I have a file "index.html" with "Hello, world!"
|
|
When I run Jekyll
|
|
Then the image "assets/resized/test-100x50.png" should have the dimensions "100x50"
|
|
|
|
Scenario: No extra images
|
|
Given I have a responsive_image configuration with:
|
|
"""
|
|
sizes:
|
|
- width: 100
|
|
"""
|
|
|
|
And I have a file "index.html" with "Hello, world!"
|
|
When I run Jekyll
|
|
Then the file "assets/resized/test-100x50.png" should not exist
|