2018-08-29 18:14:31 +00:00
|
|
|
@setupApplicationTest
|
|
|
|
Feature: dc / intentions / update: Intention Update
|
|
|
|
Background:
|
|
|
|
Given 1 datacenter model with the value "datacenter"
|
|
|
|
And 1 intention model from yaml
|
|
|
|
---
|
2020-09-30 11:33:01 +00:00
|
|
|
SourceName: web
|
|
|
|
DestinationName: db
|
2021-09-24 16:31:58 +00:00
|
|
|
SourceNS: default
|
|
|
|
DestinationNS: default
|
|
|
|
SourcePartition: default
|
|
|
|
DestinationPartition: default
|
2018-08-29 18:14:31 +00:00
|
|
|
ID: intention-id
|
|
|
|
---
|
|
|
|
When I visit the intention page for yaml
|
|
|
|
---
|
|
|
|
dc: datacenter
|
|
|
|
intention: intention-id
|
|
|
|
---
|
|
|
|
Then the url should be /datacenter/intentions/intention-id
|
2020-01-28 14:25:52 +00:00
|
|
|
And the title should be "Edit Intention - Consul"
|
2018-10-19 15:17:02 +00:00
|
|
|
Scenario: Update to [Description], [Action]
|
2018-08-29 18:14:31 +00:00
|
|
|
Then I fill in with yaml
|
|
|
|
---
|
2018-10-19 15:17:02 +00:00
|
|
|
Description: [Description]
|
2018-08-29 18:14:31 +00:00
|
|
|
---
|
|
|
|
And I click "[value=[Action]]"
|
|
|
|
And I submit
|
2021-09-24 16:31:58 +00:00
|
|
|
Then a PUT request was made to "/v1/connect/intentions/exact?source=default%2Fdefault%2Fweb&destination=default%2Fdefault%2Fdb&dc=datacenter" from yaml
|
2018-08-29 18:14:31 +00:00
|
|
|
---
|
2018-10-19 15:17:02 +00:00
|
|
|
Description: [Description]
|
2018-08-29 18:14:31 +00:00
|
|
|
Action: [Action]
|
|
|
|
---
|
|
|
|
Then the url should be /datacenter/intentions
|
2020-01-28 14:25:52 +00:00
|
|
|
And the title should be "Intentions - Consul"
|
2023-03-06 22:10:09 +00:00
|
|
|
And "[data-notification]" has the "hds-toast" class
|
|
|
|
And "[data-notification]" has the "hds-alert--color-success" class
|
2018-08-29 18:14:31 +00:00
|
|
|
Where:
|
|
|
|
------------------------------
|
|
|
|
| Description | Action |
|
|
|
|
| Desc | allow |
|
|
|
|
------------------------------
|
|
|
|
Scenario: There was an error saving the intention
|
2021-09-24 16:31:58 +00:00
|
|
|
Given the url "/v1/connect/intentions/exact?source=default%2Fdefault%2Fweb&destination=default%2Fdefault%2Fdb&dc=datacenter" responds with a 500 status
|
2018-08-29 18:14:31 +00:00
|
|
|
And I submit
|
|
|
|
Then the url should be /datacenter/intentions/intention-id
|
2023-03-06 22:10:09 +00:00
|
|
|
And "[data-notification]" has the "hds-toast" class
|
|
|
|
And "[data-notification]" has the "hds-alert--color-critical" class
|
2018-08-29 18:14:31 +00:00
|
|
|
|