-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ui: Fixup KV folder creation then further creation within that folder #12081
Changes from 4 commits
a79801d
9328df3
6edf202
13bfac5
38de6de
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ as |parentKey|}} | |
partition=route.params.partition | ||
nspace=route.params.nspace | ||
dc=route.params.dc | ||
key=(if (string-ends-with routeName 'create') parentKey route.params.key) | ||
key=(if (string-ends-with routeName 'create') '' route.params.key) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was the actual bug |
||
) | ||
}} | ||
as |loader|> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,3 +49,27 @@ Feature: dc / kvs / create | |
And I click create | ||
And I see the text "New Key / Value" in "h1" | ||
And I see the text "key-value" in "[data-test-breadcrumbs] li:nth-child(2) a" | ||
And I see the "[data-test-kv-key]" element | ||
Scenario: Clicking create from within a just created 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/ | ||
--- | ||
Given 1 kv model from yaml | ||
--- | ||
- key-value/ | ||
--- | ||
And I submit | ||
Then the url should be /datacenter/kv | ||
And I click "[data-test-kv]" | ||
And I click "[data-test-create]" | ||
And I see the text "New Key / Value" in "h1" | ||
And I see the text "key-value" in "[data-test-breadcrumbs] li:nth-child(2) a" | ||
And I see the "[data-test-kv-key]" element | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Test was mainly copy/pasted from the above (not visible unless you view the entire file). We were already testing: "creating a folder" and "clicking create from within a folder" but not "creating a folder and then immediately clicking create form within that folder". I also noticed that we weren't asserting for existence of the input field in the "clicking create from within a folder" test that already existed. Whilst this test wasn't failing even with the extra assertion, I thought it would be a good idea to add here to helper prevent any possible regression in the future (line 52) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This bit makes the "pass an empty id to get a new ember-data object" work