2020-07-09 09:08:47 +00:00
|
|
|
@setupApplicationTest
|
|
|
|
Feature: dc / intentions / deleting: Deleting items with confirmations, success and error notifications
|
|
|
|
Background:
|
|
|
|
Given 1 datacenter model with the value "datacenter"
|
2020-09-30 11:33:01 +00:00
|
|
|
And 1 intention model from yaml
|
2020-07-09 09:08:47 +00:00
|
|
|
---
|
2020-09-30 11:33:01 +00:00
|
|
|
SourceNS: default
|
2020-07-09 09:08:47 +00:00
|
|
|
SourceName: name
|
2020-09-30 11:33:01 +00:00
|
|
|
DestinationNS: default
|
|
|
|
DestinationName: destination
|
2020-07-09 09:08:47 +00:00
|
|
|
ID: ee52203d-989f-4f7a-ab5a-2bef004164ca
|
2020-09-18 10:14:06 +00:00
|
|
|
Meta: ~
|
2020-07-09 09:08:47 +00:00
|
|
|
---
|
2020-09-30 11:33:01 +00:00
|
|
|
Scenario: Deleting a intention model from the intention listing page
|
2020-07-09 09:08:47 +00:00
|
|
|
When I visit the intentions page for yaml
|
|
|
|
---
|
|
|
|
dc: datacenter
|
|
|
|
---
|
2020-10-26 09:30:07 +00:00
|
|
|
And I click actions on the intentionList.intentions
|
|
|
|
And I click delete on the intentionList.intentions
|
|
|
|
And I click confirmDelete on the intentionList.intentions
|
2020-09-30 11:33:01 +00:00
|
|
|
Then a DELETE request was made to "/v1/connect/intentions/exact?source=default%2Fname&destination=default%2Fdestination&dc=datacenter"
|
2020-07-09 09:08:47 +00:00
|
|
|
And "[data-notification]" has the "notification-delete" class
|
|
|
|
And "[data-notification]" has the "success" class
|
|
|
|
Scenario: Deleting an intention from the intention detail page
|
|
|
|
When I visit the intention page for yaml
|
|
|
|
---
|
|
|
|
dc: datacenter
|
|
|
|
intention: ee52203d-989f-4f7a-ab5a-2bef004164ca
|
|
|
|
---
|
|
|
|
And I click delete
|
|
|
|
And I click confirmDelete
|
2020-09-30 11:33:01 +00:00
|
|
|
Then a DELETE request was made to "/v1/connect/intentions/exact?source=default%2Fname&destination=default%2Fdestination&dc=datacenter"
|
2020-07-09 09:08:47 +00:00
|
|
|
And "[data-notification]" has the "notification-delete" class
|
|
|
|
And "[data-notification]" has the "success" class
|
|
|
|
Scenario: Deleting an intention from the intention detail page and getting an error
|
|
|
|
When I visit the intention page for yaml
|
|
|
|
---
|
|
|
|
dc: datacenter
|
|
|
|
intention: ee52203d-989f-4f7a-ab5a-2bef004164ca
|
|
|
|
---
|
2020-09-30 11:33:01 +00:00
|
|
|
Given the url "/v1/connect/intentions/exact?source=default%2Fname&destination=default%2Fdestination&dc=datacenter" responds with a 500 status
|
2020-07-09 09:08:47 +00:00
|
|
|
And I click delete
|
|
|
|
And I click confirmDelete
|
|
|
|
And "[data-notification]" has the "notification-update" class
|
|
|
|
And "[data-notification]" has the "error" class
|
|
|
|
Scenario: Deleting an intention from the intention detail page and getting an error due to a duplicate intention
|
|
|
|
When I visit the intention page for yaml
|
|
|
|
---
|
|
|
|
dc: datacenter
|
|
|
|
intention: ee52203d-989f-4f7a-ab5a-2bef004164ca
|
|
|
|
---
|
2020-09-30 11:33:01 +00:00
|
|
|
Given the url "/v1/connect/intentions/exact?source=default%2Fname&destination=default%2Fdestination&dc=datacenter" responds with from yaml
|
2020-07-09 09:08:47 +00:00
|
|
|
---
|
|
|
|
status: 500
|
|
|
|
body: "duplicate intention found:"
|
|
|
|
---
|
|
|
|
And I click delete
|
|
|
|
And I click confirmDelete
|
|
|
|
And "[data-notification]" has the "notification-update" class
|
|
|
|
And "[data-notification]" has the "error" class
|
|
|
|
And I see the text "Intention exists" in "[data-notification] strong"
|