1@setupApplicationTest 2Feature: dc / intentions / deleting: Deleting items with confirmations, success and error notifications 3 Background: 4 Given 1 datacenter model with the value "datacenter" 5 And 1 intention model from yaml 6 --- 7 SourceNS: default 8 SourceName: name 9 DestinationNS: default 10 DestinationName: destination 11 ID: ee52203d-989f-4f7a-ab5a-2bef004164ca 12 Meta: ~ 13 --- 14 Scenario: Deleting a intention model from the intention listing page 15 When I visit the intentions page for yaml 16 --- 17 dc: datacenter 18 --- 19 And I click actions on the intentionList.intentions 20 And I click delete on the intentionList.intentions 21 And I click confirmDelete on the intentionList.intentions 22 Then a DELETE request was made to "/v1/connect/intentions/exact?source=default%2Fname&destination=default%2Fdestination&dc=datacenter" 23 And "[data-notification]" has the "notification-delete" class 24 And "[data-notification]" has the "success" class 25 Scenario: Deleting an intention from the intention detail page 26 When I visit the intention page for yaml 27 --- 28 dc: datacenter 29 intention: ee52203d-989f-4f7a-ab5a-2bef004164ca 30 --- 31 And I click delete 32 And I click confirmDelete 33 Then a DELETE request was made to "/v1/connect/intentions/exact?source=default%2Fname&destination=default%2Fdestination&dc=datacenter" 34 And "[data-notification]" has the "notification-delete" class 35 And "[data-notification]" has the "success" class 36 Scenario: Deleting an intention from the intention detail page and getting an error 37 When I visit the intention page for yaml 38 --- 39 dc: datacenter 40 intention: ee52203d-989f-4f7a-ab5a-2bef004164ca 41 --- 42 Given the url "/v1/connect/intentions/exact?source=default%2Fname&destination=default%2Fdestination&dc=datacenter" responds with a 500 status 43 And I click delete 44 And I click confirmDelete 45 And "[data-notification]" has the "notification-update" class 46 And "[data-notification]" has the "error" class 47 Scenario: Deleting an intention from the intention detail page and getting an error due to a duplicate intention 48 When I visit the intention page for yaml 49 --- 50 dc: datacenter 51 intention: ee52203d-989f-4f7a-ab5a-2bef004164ca 52 --- 53 Given the url "/v1/connect/intentions/exact?source=default%2Fname&destination=default%2Fdestination&dc=datacenter" responds with from yaml 54 --- 55 status: 500 56 body: "duplicate intention found:" 57 --- 58 And I click delete 59 And I click confirmDelete 60 And "[data-notification]" has the "notification-update" class 61 And "[data-notification]" has the "error" class 62 And I see the text "Intention exists" in "[data-notification] strong" 63