-
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.
* Add sorting to ACLs policies with comparator * Add acls/roles sorting test * Add navigation test for acls/policies * Update onchange value for sorting policies
- Loading branch information
Showing
13 changed files
with
107 additions
and
15 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
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default () => key => { | ||
return key; | ||
}; |
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
15 changes: 15 additions & 0 deletions
15
ui-v2/tests/acceptance/dc/acls/policies/navigation.feature
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
@setupApplicationTest | ||
Feature: dc / policies / navigation | ||
Scenario: Clicking a policy in the listing and back again | ||
Given 1 datacenter model with the value "dc-1" | ||
And 3 policy models | ||
When I visit the policies page for yaml | ||
--- | ||
dc: dc-1 | ||
--- | ||
Then the url should be /dc-1/acls/policies | ||
And the title should be "Policies - Consul" | ||
Then I see 3 policy models | ||
When I click policy on the policies | ||
And I click "[data-test-back]" | ||
Then the url should be /dc-1/acls/policies |
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
@setupApplicationTest | ||
Feature: dc / acls / policies / sorting | ||
Scenario: Sorting Policies | ||
Given 1 datacenter model with the value "dc-1" | ||
And 4 policy models from yaml | ||
--- | ||
- Name: "system-A" | ||
- Name: "system-D" | ||
- Name: "system-C" | ||
- Name: "system-B" | ||
--- | ||
When I visit the policies page for yaml | ||
--- | ||
dc: dc-1 | ||
--- | ||
Then the url should be /dc-1/acls/policies | ||
Then I see 4 policy models | ||
When I click selected on the sort | ||
When I click options.1.button on the sort | ||
Then I see name on the policies vertically like yaml | ||
--- | ||
- "system-D" | ||
- "system-C" | ||
- "system-B" | ||
- "system-A" | ||
--- | ||
When I click selected on the sort | ||
When I click options.0.button on the sort | ||
Then I see name on the policies vertically like yaml | ||
--- | ||
- "system-A" | ||
- "system-B" | ||
- "system-C" | ||
- "system-D" | ||
--- | ||
|
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
10 changes: 10 additions & 0 deletions
10
ui-v2/tests/acceptance/steps/dc/acls/policies/navigation-steps.js
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import steps from '../../../steps'; | ||
|
||
// step definitions that are shared between features should be moved to the | ||
// tests/acceptance/steps/steps.js file | ||
|
||
export default function(assert) { | ||
return steps(assert).then('I should find a file', function() { | ||
assert.ok(true, this.step); | ||
}); | ||
} |
10 changes: 10 additions & 0 deletions
10
ui-v2/tests/acceptance/steps/dc/acls/policies/sorting-steps.js
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import steps from '../../../steps'; | ||
|
||
// step definitions that are shared between features should be moved to the | ||
// tests/acceptance/steps/steps.js file | ||
|
||
export default function(assert) { | ||
return steps(assert).then('I should find a file', function() { | ||
assert.ok(true, this.step); | ||
}); | ||
} |
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,7 +1,7 @@ | ||
export default function(visitable, creatable, policies, filter) { | ||
export default function(visitable, creatable, policies, popoverSelect) { | ||
return creatable({ | ||
visit: visitable('/:dc/acls/policies'), | ||
policies: policies(), | ||
filter: filter(), | ||
sort: popoverSelect(), | ||
}); | ||
} |