open-consul/ui-v2/tests/acceptance/dc/nspaces/delete.feature
John Cowen 4be0f6c061
ui: Run 2 separate test runs oss and ent (#7214)
* ui: Make API integration tests aware of CONSUL_NSPACES_ENABLED

* ui: Allow passing CONSUL_NSPACES_ENABLED in via the cli in ember

* ui: Add more makefile targets/package scripts to switch NSPACEs on/off

* ui: Ensure all acceptance tests continue to pass with NSPACEs on/off

This required a little tweaking of the dictionary, at some point
page-navigation and some of these little tweaks will no longer be
required

* ui: Try running CI frontend tests in two parellel runs oss/ent

* ui: Use correct make target, use different names for the reports
2020-02-07 11:02:53 +00:00

55 lines
2.9 KiB
Gherkin

@setupApplicationTest
@onlyNamespaceable
Feature: dc / nspaces / delete: Deleting items with confirmations, success and error notifications
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
Background:
Given 1 datacenter model with the value "datacenter"
Scenario: Deleting a [Edit] model from the [Listing] listing page
Given 1 [Edit] model from json
---
[Data]
---
When I visit the [Listing] page for yaml
---
dc: datacenter
---
And I click actions on the [Listing]
And I click delete on the [Listing]
And I click confirmDelete on the [Listing]
Then a [Method] request was made to "[URL]"
And "[data-notification]" has the "notification-delete" class
And "[data-notification]" has the "success" class
Where:
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| Edit | Listing | Method | URL | Data |
| nspace | nspaces | DELETE | /v1/namespace/a-namespace | {"Name": "a-namespace"} |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Scenario: Deleting a [Model] from the [Model] detail page
When I visit the [Model] page for yaml
---
dc: datacenter
[Slug]
---
And I click delete
And I click confirmDelete
Then a [Method] request was made to "[URL]"
And "[data-notification]" has the "notification-delete" class
And "[data-notification]" has the "success" class
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
Where:
-----------------------------------------------------------------------------------------------------------------------------------------------------------
| Model | Method | URL | Slug |
| nspace | DELETE | /v1/namespace/a-namespace | namespace: a-namespace |
-----------------------------------------------------------------------------------------------------------------------------------------------------------