This repository has been archived by the owner on Oct 12, 2018. It is now read-only.
/
editing.feature
81 lines (70 loc) · 3.14 KB
/
editing.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
Feature: Editing artefacts
In order to maintain GovUK metadata
I want to edit artefacts
Background:
Given I am an admin
Scenario: Editing an artefact and changing the slug
Given two artefacts exist
When I change the slug of the first artefact to "a new slug"
And I save
Then I should see the edit form again
And I should see an indication that the save worked
Scenario: Editing an artefact and returning to edit some more
Given two artefacts exist
When I change the title of the first artefact
And I mark relatedness as done
And I save, indicating that I want to continue editing afterwards
Then I should be redirected back to the edit page
And I should see an indication that the save worked
Scenario: Trying to create an artefact for a need that is already met
Given an artefact exists
When I try to create a new artefact with the same need
Then I should be redirected to Publisher
Scenario: Assign a related item
Given two artefacts exist
When I create a relationship between them
Then I should be redirected to Publisher
And the API should say that the artefacts are related
And the rest of the system should be notified that the artefact has been updated
Scenario: Unassign a related item
Given two artefacts exist
And the artefacts are related
When I destroy their relationship
Then I should be redirected to Publisher
And the API should say that the artefacts are not related
And the rest of the system should be notified that the artefact has been updated
Scenario: Assign additional related items
Given several artefacts exist
And some of the artefacts are related
When I create more relationships between them
Then I should be redirected to Publisher
And the API should say that more of the artefacts are related
And the rest of the system should be notified that the artefact has been updated
# Scenario: Assign a contact
# Given an artefact exists
# And a contact exists
# When I add the contact to the artefact
# Then I should be redirected to Publisher
# And the API should say that the artefact has the contact
# And the rest of the system should be notified that the artefact has been updated
# Scenario: Unassign a contact
# Given an artefact exists
# And a contact exists
# And the artefact has the contact
# When I remove the contact from the artefact
# Then I should be redirected to Publisher
# And the API should say that the artefact does not have the contact
# And the rest of the system should be notified that the artefact has been updated
Scenario: Add a section
Given an artefact exists
And a section exists
When I add the section to the artefact
Then I should be redirected to Publisher
And the API should say that the artefact has the section
Scenario: Remove a section
Given an artefact exists
And a section exists
And the artefact has the section
When I remove the section from the artefact
Then I should be redirected to Publisher
And the API should say that the artefact does not have the section