-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ui: [Bugfix] KV creation from within a 'folder' (#8613)
* ui: Prefill an newly created KV for the when we are on a create route * ui: Add some KV creation tests
- Loading branch information
Showing
3 changed files
with
62 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,50 @@ | ||
@setupApplicationTest | ||
Feature: dc / kvs / create | ||
Scenario: | ||
Given 1 datacenter model with the value "datacenter" | ||
When I visit the kv page for yaml | ||
--- | ||
dc: datacenter | ||
--- | ||
Then the url should be /datacenter/kv/create | ||
And the title should be "New Key/Value - Consul" | ||
|
||
@ignore | ||
Scenario: Test we can create a KV | ||
Then ok | ||
@setupApplicationTest | ||
Feature: dc / kvs / create | ||
Scenario: Creating a root KV | ||
Given 1 datacenter model with the value "datacenter" | ||
When I visit the kv page for yaml | ||
--- | ||
dc: datacenter | ||
--- | ||
Then the url should be /datacenter/kv/create | ||
And the title should be "New Key/Value - Consul" | ||
Then I fill in with yaml | ||
--- | ||
additional: key-value | ||
value: value | ||
--- | ||
And I submit | ||
Then the url should be /datacenter/kv | ||
Then a PUT request was made to "/v1/kv/key-value?dc=datacenter&ns=@namespace" | ||
And "[data-notification]" has the "notification-update" class | ||
And "[data-notification]" has the "success" class | ||
Scenario: Creating a folder | ||
Given 1 datacenter model with the value "datacenter" | ||
When I visit the kv page for yaml | ||
--- | ||
dc: datacenter | ||
--- | ||
Then the url should be /datacenter/kv/create | ||
And the title should be "New Key/Value - Consul" | ||
Then I fill in with yaml | ||
--- | ||
additional: key-value/ | ||
--- | ||
And I submit | ||
Then the url should be /datacenter/kv | ||
Then a PUT request was made to "/v1/kv/key-value/?dc=datacenter&ns=@namespace" | ||
And "[data-notification]" has the "notification-update" class | ||
And "[data-notification]" has the "success" class | ||
Scenario: Clicking create from within a folder | ||
Given 1 datacenter model with the value "datacenter" | ||
And 1 kv model from yaml | ||
--- | ||
- key-value/ | ||
--- | ||
When I visit the kvs page for yaml | ||
--- | ||
dc: datacenter | ||
--- | ||
And I click kv on the kvs | ||
And I click create | ||
And I see the text "New Key / Value" in "h1" |