Tidy up tests
This commit is contained in:
parent
85b56541fb
commit
00ded027ad
|
@ -12,7 +12,6 @@ Feature: Extra image generation
|
||||||
- assets/everybody-loves-jalapeño-pineapple-cornbread.png
|
- assets/everybody-loves-jalapeño-pineapple-cornbread.png
|
||||||
- assets/*.jpeg
|
- assets/*.jpeg
|
||||||
"""
|
"""
|
||||||
|
|
||||||
And I have a file "index.html" with "Hello, world!"
|
And I have a file "index.html" with "Hello, world!"
|
||||||
When I run Jekyll
|
When I run Jekyll
|
||||||
Then the image "assets/resized/everybody-loves-jalapeño-pineapple-cornbread-100x50.png" should have the dimensions "100x50"
|
Then the image "assets/resized/everybody-loves-jalapeño-pineapple-cornbread-100x50.png" should have the dimensions "100x50"
|
||||||
|
@ -31,7 +30,6 @@ Feature: Extra image generation
|
||||||
extra_images:
|
extra_images:
|
||||||
- assets/*.png
|
- assets/*.png
|
||||||
"""
|
"""
|
||||||
|
|
||||||
And I have a file "index.html" with "Hello, world!"
|
And I have a file "index.html" with "Hello, world!"
|
||||||
When I run Jekyll
|
When I run Jekyll
|
||||||
Then the image "sub-dir/my-site-copy/assets/resized/everybody-loves-jalapeño-pineapple-cornbread-100x50.png" should have the dimensions "100x50"
|
Then the image "sub-dir/my-site-copy/assets/resized/everybody-loves-jalapeño-pineapple-cornbread-100x50.png" should have the dimensions "100x50"
|
||||||
|
@ -43,7 +41,6 @@ Feature: Extra image generation
|
||||||
sizes:
|
sizes:
|
||||||
- width: 100
|
- width: 100
|
||||||
"""
|
"""
|
||||||
|
|
||||||
And I have a file "index.html" with "Hello, world!"
|
And I have a file "index.html" with "Hello, world!"
|
||||||
When I run Jekyll
|
When I run Jekyll
|
||||||
Then the file "assets/resized/everybody-loves-jalapeño-pineapple-cornbread-100x50.png" should not exist
|
Then the file "assets/resized/everybody-loves-jalapeño-pineapple-cornbread-100x50.png" should not exist
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
Feature: Responsive image generation
|
Feature: Responsive image generation
|
||||||
As a Jekyll user
|
As a Jekyll user
|
||||||
I want to generate responsive images
|
I want to resize my images
|
||||||
In order to use them on my pages
|
In order to render them on my pages
|
||||||
|
|
||||||
Scenario: Resizing images
|
Scenario: Resizing images
|
||||||
Given I have a responsive_image configuration with:
|
Given I have a responsive_image configuration with:
|
||||||
|
@ -10,7 +10,6 @@ Feature: Responsive image generation
|
||||||
sizes:
|
sizes:
|
||||||
- width: 100
|
- width: 100
|
||||||
"""
|
"""
|
||||||
|
|
||||||
And I have a file "index.html" with "{% responsive_image path: assets/everybody-loves-jalapeño-pineapple-cornbread.png alt: Foobar %}"
|
And I have a file "index.html" with "{% responsive_image path: assets/everybody-loves-jalapeño-pineapple-cornbread.png alt: Foobar %}"
|
||||||
When I run Jekyll
|
When I run Jekyll
|
||||||
Then the image "assets/resized/everybody-loves-jalapeño-pineapple-cornbread-100x50.png" should have the dimensions "100x50"
|
Then the image "assets/resized/everybody-loves-jalapeño-pineapple-cornbread-100x50.png" should have the dimensions "100x50"
|
||||||
|
@ -24,14 +23,12 @@ Feature: Responsive image generation
|
||||||
sizes:
|
sizes:
|
||||||
- width: 100
|
- width: 100
|
||||||
"""
|
"""
|
||||||
|
|
||||||
And I have a file "index.html" with:
|
And I have a file "index.html" with:
|
||||||
"""
|
"""
|
||||||
{% responsive_image path: assets/everybody-loves-jalapeño-pineapple-cornbread.png %}
|
{% responsive_image path: assets/everybody-loves-jalapeño-pineapple-cornbread.png %}
|
||||||
{% responsive_image path: assets/subdir/test.png %}
|
{% responsive_image path: assets/subdir/test.png %}
|
||||||
{% responsive_image path: assets/everybody-loves-jalapeño-pineapple-cornbread.png cache: true %}
|
{% responsive_image path: assets/everybody-loves-jalapeño-pineapple-cornbread.png cache: true %}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
When I run Jekyll
|
When I run Jekyll
|
||||||
Then the file "assets/resized/everybody-loves-jalapeño-pineapple-cornbread-100.png" should exist
|
Then the file "assets/resized/everybody-loves-jalapeño-pineapple-cornbread-100.png" should exist
|
||||||
And the file "_site/assets/resized/everybody-loves-jalapeño-pineapple-cornbread-100.png" should exist
|
And the file "_site/assets/resized/everybody-loves-jalapeño-pineapple-cornbread-100.png" should exist
|
||||||
|
@ -45,7 +42,6 @@ Feature: Responsive image generation
|
||||||
sizes:
|
sizes:
|
||||||
- width: 100
|
- width: 100
|
||||||
"""
|
"""
|
||||||
|
|
||||||
And I have a file "index.html" with "{% responsive_image path: assets/progressive.jpeg %}"
|
And I have a file "index.html" with "{% responsive_image path: assets/progressive.jpeg %}"
|
||||||
When I run Jekyll
|
When I run Jekyll
|
||||||
Then the image "assets/resized/progressive-100x50.jpeg" should be interlaced
|
Then the image "assets/resized/progressive-100x50.jpeg" should be interlaced
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Feature: Image hashes inside responsive image templates
|
Feature: Image hashes inside responsive image templates
|
||||||
As a Jekyll user
|
As a Jekyll template developer
|
||||||
I want to have access to image hashes
|
I want to have access to image hashes
|
||||||
In order to create custom responsive image templates
|
In order to create custom responsive image templates
|
||||||
|
|
||||||
|
|
|
@ -8,12 +8,10 @@ Feature: Jekyll responsive_image_block tag
|
||||||
And I have a file "index.html" with:
|
And I have a file "index.html" with:
|
||||||
"""
|
"""
|
||||||
{% assign path = 'assets/everybody-loves-jalapeño-pineapple-cornbread.png' %}
|
{% assign path = 'assets/everybody-loves-jalapeño-pineapple-cornbread.png' %}
|
||||||
{% assign alt = 'Lorem ipsum' %}
|
|
||||||
|
|
||||||
{% responsive_image_block %}
|
{% responsive_image_block %}
|
||||||
path: {{ path }}
|
path: {{ path }}
|
||||||
title: Magic rainbow adventure!
|
title: Magic rainbow adventure!
|
||||||
alt: {{ alt }}
|
alt: Lorem ipsum
|
||||||
{% endresponsive_image_block %}
|
{% endresponsive_image_block %}
|
||||||
"""
|
"""
|
||||||
When I run Jekyll
|
When I run Jekyll
|
||||||
|
@ -41,7 +39,6 @@ Feature: Jekyll responsive_image_block tag
|
||||||
"""
|
"""
|
||||||
{% assign path = 'assets/everybody-loves-jalapeño-pineapple-cornbread.png' %}
|
{% assign path = 'assets/everybody-loves-jalapeño-pineapple-cornbread.png' %}
|
||||||
{% assign alt = 'Lorem ipsum' %}
|
{% assign alt = 'Lorem ipsum' %}
|
||||||
|
|
||||||
{% responsive_image_block %}
|
{% responsive_image_block %}
|
||||||
path: {{ path }}
|
path: {{ path }}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
Feature: Jekyll responsive_image tag
|
Feature: Jekyll responsive_image tag
|
||||||
As a Jekyll template developer
|
As a Jekyll template developer
|
||||||
I want to include responsive images in my page
|
I want to include responsive images in my page
|
||||||
In order to best cater for devices of all sizes
|
|
||||||
|
|
||||||
Scenario: Simple image tag
|
Scenario: Simple image tag
|
||||||
Given I have a responsive_image configuration with "template" set to "_includes/responsive-image.html"
|
Given I have a responsive_image configuration with "template" set to "_includes/responsive-image.html"
|
||||||
|
|
Loading…
Reference in New Issue