|
| 1 | +Feature: Images tab on edit standard edition |
| 2 | + |
| 3 | + Background: |
| 4 | + Given I am a writer |
| 5 | + |
| 6 | + Scenario: Images are listed on the images tab |
| 7 | + And a draft standard edition with images exists |
| 8 | + When I visit the images tab of the document with images |
| 9 | + Then I should see a list with 2 images |
| 10 | + |
| 11 | + Scenario: Images can be deleted from the images tab |
| 12 | + And a draft standard edition with images exists |
| 13 | + When I visit the images tab of the document with images |
| 14 | + Then I should see a list with 2 images |
| 15 | + When I click to delete an image |
| 16 | + And I confirm the deletion |
| 17 | + Then I should see a successfully deleted banner |
| 18 | + And I should see a list with 1 image |
| 19 | + |
| 20 | + Scenario: Images details can be updated from the images tab |
| 21 | + And a draft standard edition with images exists |
| 22 | + When I visit the images tab of the document with images |
| 23 | + And I click to edit the details of an image |
| 24 | + And I update the image details and save |
| 25 | + Then I should see a updated banner |
| 26 | + Then I should see the updated image details |
| 27 | + |
| 28 | + Scenario: Lead image setting can be updated from the images tab |
| 29 | + And an organisation with a default news image exists |
| 30 | + And the organisation has a draft case study with images |
| 31 | + When I visit the images tab of the standard edition with images |
| 32 | + Then I should see the organisations default news image |
| 33 | + When I click to hide the lead image |
| 34 | + Then I should see a button to select a custom lead image |
| 35 | + And I should see a button to choose to use the default image |
| 36 | + |
| 37 | + Scenario: User selects a new lead image |
| 38 | + And a draft standard edition with images with the captions "First image uploaded" and "Second image uploaded" exists |
| 39 | + When I visit the images tab of the document with images |
| 40 | + And I make the image with caption "First image uploaded" the lead image |
| 41 | + Then I can see that the image with caption "First image uploaded" is the lead image |
| 42 | + And I make the image with caption "Second image uploaded" the lead image |
| 43 | + Then I can see that the image with caption "Second image uploaded" is the lead image |
| 44 | + |
| 45 | + Scenario: Image uploaded with no cropping required |
| 46 | + And I start drafting a new standard edition "Standard Beard Lengths" |
| 47 | + When I visit the images tab of the document "Standard Beard Lengths" |
| 48 | + And I upload a 960x640 image |
| 49 | + Then I should see a list with 1 image |
| 50 | + |
| 51 | + Scenario: No file uploaded |
| 52 | + And I start drafting a new standard edition "Standard Beard Lengths" |
| 53 | + When I visit the images tab of the document "Standard Beard Lengths" |
| 54 | + And I click upload without attaching a file |
| 55 | + Then I should get the error message "No images selected. Choose a valid JPEG, PNG, SVG or GIF." |
0 commit comments