2018-07-04 14:58:09 +00:00
|
|
|
@setupApplicationTest
|
2018-08-29 18:14:31 +00:00
|
|
|
Feature: deleting: Deleting items with confirmations, success and error notifications
|
2018-10-19 15:17:02 +00:00
|
|
|
In order to delete items in consul
|
|
|
|
As a user
|
|
|
|
I should be able to delete items, get confirmation or a error notification that it has or has not been deleted
|
2018-08-29 18:14:31 +00:00
|
|
|
Background:
|
2018-07-04 14:58:09 +00:00
|
|
|
Given 1 datacenter model with the value "datacenter"
|
2018-10-19 15:17:02 +00:00
|
|
|
Scenario: Deleting a [Edit] model from the [Listing] listing page
|
|
|
|
Given 1 [Edit] model from json
|
2018-07-04 14:58:09 +00:00
|
|
|
---
|
|
|
|
[Data]
|
|
|
|
---
|
2018-10-19 15:17:02 +00:00
|
|
|
When I visit the [Listing] page for yaml
|
2018-07-04 14:58:09 +00:00
|
|
|
---
|
|
|
|
dc: datacenter
|
|
|
|
---
|
2018-10-19 15:17:02 +00:00
|
|
|
And I click actions on the [Listing]
|
|
|
|
And I click delete on the [Listing]
|
|
|
|
And I click confirmDelete on the [Listing]
|
2020-01-24 12:26:28 +00:00
|
|
|
Then a [Method] request was made to "[URL]"
|
2018-08-29 18:14:31 +00:00
|
|
|
And "[data-notification]" has the "notification-delete" class
|
|
|
|
And "[data-notification]" has the "success" class
|
|
|
|
Where:
|
2020-01-24 12:26:28 +00:00
|
|
|
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
| Edit | Listing | Method | URL | Data |
|
|
|
|
| token | tokens | DELETE | /v1/acl/token/001fda31-194e-4ff1-a5ec-589abf2cafd0?dc=datacenter&ns=@!namespace | {"AccessorID": "001fda31-194e-4ff1-a5ec-589abf2cafd0"} |
|
|
|
|
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
2018-08-29 18:14:31 +00:00
|
|
|
Scenario: Deleting a [Model] from the [Model] detail page
|
2018-07-04 14:58:09 +00:00
|
|
|
When I visit the [Model] page for yaml
|
|
|
|
---
|
|
|
|
dc: datacenter
|
|
|
|
[Slug]
|
|
|
|
---
|
|
|
|
And I click delete
|
|
|
|
And I click confirmDelete
|
2020-01-24 12:26:28 +00:00
|
|
|
Then a [Method] request was made to "[URL]"
|
2018-08-29 18:14:31 +00:00
|
|
|
And "[data-notification]" has the "notification-delete" class
|
|
|
|
And "[data-notification]" has the "success" class
|
2021-09-15 18:50:11 +00:00
|
|
|
Where:
|
|
|
|
-----------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
| Model | Method | URL | Slug |
|
|
|
|
| token | DELETE | /v1/acl/token/001fda31-194e-4ff1-a5ec-589abf2cafd0?dc=datacenter&ns=@!namespace | token: 001fda31-194e-4ff1-a5ec-589abf2cafd0 |
|
|
|
|
-----------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
Scenario: Deleting a [Model] from the [Model] detail page error
|
2018-08-29 18:14:31 +00:00
|
|
|
When I visit the [Model] page for yaml
|
|
|
|
---
|
|
|
|
dc: datacenter
|
|
|
|
[Slug]
|
|
|
|
---
|
|
|
|
Given the url "[URL]" responds with a 500 status
|
|
|
|
And I click delete
|
|
|
|
And I click confirmDelete
|
|
|
|
And "[data-notification]" has the "notification-delete" class
|
|
|
|
And "[data-notification]" has the "error" class
|
2018-07-04 14:58:09 +00:00
|
|
|
Where:
|
2020-01-24 12:26:28 +00:00
|
|
|
-----------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
| Model | Method | URL | Slug |
|
|
|
|
| token | DELETE | /v1/acl/token/001fda31-194e-4ff1-a5ec-589abf2cafd0?dc=datacenter&ns=@!namespace | token: 001fda31-194e-4ff1-a5ec-589abf2cafd0 |
|
|
|
|
-----------------------------------------------------------------------------------------------------------------------------------------------------------
|