From dc940cbf61b85f180bda67611f0a3bbacb60ae05 Mon Sep 17 00:00:00 2001 From: John Cowen Date: Mon, 4 Jan 2021 18:28:35 +0000 Subject: [PATCH] ui: [BUGFIX] Role/Policy selector default sort (#9434) * Sort the options when they aren't being searched --- .../consul-ui/app/components/child-selector/index.hbs | 2 +- .../acceptance/dc/acls/policies/as-many/add-existing.feature | 5 +++-- .../acceptance/dc/acls/roles/as-many/add-existing.feature | 5 +++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ui/packages/consul-ui/app/components/child-selector/index.hbs b/ui/packages/consul-ui/app/components/child-selector/index.hbs index 525bca8c69..280e17806a 100644 --- a/ui/packages/consul-ui/app/components/child-selector/index.hbs +++ b/ui/packages/consul-ui/app/components/child-selector/index.hbs @@ -23,7 +23,7 @@ #policies .ember-power-select-trigger" + And I see the text "Policy 1" in ".ember-power-select-option:first-child" And I type "Policy 1" into ".ember-power-select-search-input" And I click ".ember-power-select-option:first-child" And I see 1 policy model on the policies component diff --git a/ui/packages/consul-ui/tests/acceptance/dc/acls/roles/as-many/add-existing.feature b/ui/packages/consul-ui/tests/acceptance/dc/acls/roles/as-many/add-existing.feature index 30d02d48c8..256fd8f23a 100644 --- a/ui/packages/consul-ui/tests/acceptance/dc/acls/roles/as-many/add-existing.feature +++ b/ui/packages/consul-ui/tests/acceptance/dc/acls/roles/as-many/add-existing.feature @@ -10,10 +10,10 @@ Feature: dc / acls / roles / as many / add existing: Add existing --- And 2 role models from yaml --- - - ID: role-1 - Name: Role 1 - ID: role-2 Name: Role 2 + - ID: role-1 + Name: Role 1 --- When I visit the token page for yaml --- @@ -22,6 +22,7 @@ Feature: dc / acls / roles / as many / add existing: Add existing --- Then the url should be /datacenter/acls/tokens/key And I click "form > #roles .ember-power-select-trigger" + And I see the text "Role 1" in ".ember-power-select-option:first-child" And I type "Role 1" into ".ember-power-select-search-input" And I click ".ember-power-select-option:first-child" And I see 1 role model on the roles component