forked from alphagov/whitehall
/
editing-attachments.feature
26 lines (21 loc) · 1.08 KB
/
editing-attachments.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Feature: Editing attachments
In order to send the best version of a policy to the departmental editor
A writer
Should be able to manipulate the attachments on a document
Background:
Given I am a writer
Scenario: Removing an attachment
Given a draft publication "Legalise beards" with a PDF attachment
When I remove the attachment from the publication "Legalise beards"
And I visit the list of draft documents
And I view the publication "Legalise beards"
Then I should not see a link to the PDF attachment
Scenario: Preserving attachments on published documents
Given a published publication "Standard Beard Lengths" with a PDF attachment
When I remove the attachment from a new draft of the publication "Standard Beard Lengths"
And I visit the publication "Standard Beard Lengths"
Then I should see a link to the PDF attachment
Scenario: Remember uploaded file after validation failure
Given I attempt to create an invalid publication with an attachment
When I set the publication title to "Validation Error Fixed" and save
Then I should see a link to the PDF attachment