From 00ded027ad110d51bc3a3d7ee90924a459a0c35e Mon Sep 17 00:00:00 2001 From: Joseph Wynn Date: Thu, 29 Dec 2016 22:19:48 +1300 Subject: [PATCH] Tidy up tests --- features/extra-image-generation.feature | 3 --- features/image-generation.feature | 8 ++------ features/image-hashes.feature | 2 +- features/responsive-image-block.feature | 5 +---- features/responsive-image-tag.feature | 1 - 5 files changed, 4 insertions(+), 15 deletions(-) diff --git a/features/extra-image-generation.feature b/features/extra-image-generation.feature index b9fb0c8..1c076ff 100644 --- a/features/extra-image-generation.feature +++ b/features/extra-image-generation.feature @@ -12,7 +12,6 @@ Feature: Extra image generation - assets/everybody-loves-jalapeño-pineapple-cornbread.png - assets/*.jpeg """ - And I have a file "index.html" with "Hello, world!" When I run Jekyll 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: - assets/*.png """ - And I have a file "index.html" with "Hello, world!" 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" @@ -43,7 +41,6 @@ Feature: Extra image generation sizes: - width: 100 """ - And I have a file "index.html" with "Hello, world!" When I run Jekyll Then the file "assets/resized/everybody-loves-jalapeño-pineapple-cornbread-100x50.png" should not exist diff --git a/features/image-generation.feature b/features/image-generation.feature index 5e05c45..1b1eb23 100644 --- a/features/image-generation.feature +++ b/features/image-generation.feature @@ -1,7 +1,7 @@ Feature: Responsive image generation As a Jekyll user - I want to generate responsive images - In order to use them on my pages + I want to resize my images + In order to render them on my pages Scenario: Resizing images Given I have a responsive_image configuration with: @@ -10,7 +10,6 @@ Feature: Responsive image generation sizes: - width: 100 """ - 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 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: - width: 100 """ - And I have a file "index.html" with: """ {% responsive_image path: assets/everybody-loves-jalapeño-pineapple-cornbread.png %} {% responsive_image path: assets/subdir/test.png %} {% responsive_image path: assets/everybody-loves-jalapeño-pineapple-cornbread.png cache: true %} """ - When I run Jekyll 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 @@ -45,7 +42,6 @@ Feature: Responsive image generation sizes: - width: 100 """ - And I have a file "index.html" with "{% responsive_image path: assets/progressive.jpeg %}" When I run Jekyll Then the image "assets/resized/progressive-100x50.jpeg" should be interlaced diff --git a/features/image-hashes.feature b/features/image-hashes.feature index b88fa31..a81fc6e 100644 --- a/features/image-hashes.feature +++ b/features/image-hashes.feature @@ -1,5 +1,5 @@ Feature: Image hashes inside responsive image templates - As a Jekyll user + As a Jekyll template developer I want to have access to image hashes In order to create custom responsive image templates diff --git a/features/responsive-image-block.feature b/features/responsive-image-block.feature index dfea6cb..0a6c6ae 100644 --- a/features/responsive-image-block.feature +++ b/features/responsive-image-block.feature @@ -8,12 +8,10 @@ Feature: Jekyll responsive_image_block tag And I have a file "index.html" with: """ {% assign path = 'assets/everybody-loves-jalapeño-pineapple-cornbread.png' %} - {% assign alt = 'Lorem ipsum' %} - {% responsive_image_block %} path: {{ path }} title: Magic rainbow adventure! - alt: {{ alt }} + alt: Lorem ipsum {% endresponsive_image_block %} """ 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 alt = 'Lorem ipsum' %} - {% responsive_image_block %} path: {{ path }} diff --git a/features/responsive-image-tag.feature b/features/responsive-image-tag.feature index f74187a..bf5fc4a 100644 --- a/features/responsive-image-tag.feature +++ b/features/responsive-image-tag.feature @@ -1,7 +1,6 @@ Feature: Jekyll responsive_image tag As a Jekyll template developer I want to include responsive images in my page - In order to best cater for devices of all sizes Scenario: Simple image tag Given I have a responsive_image configuration with "template" set to "_includes/responsive-image.html"