From eedee07e7c6699ce2a3b156737f8cf9873e55d41 Mon Sep 17 00:00:00 2001 From: John Cowen Date: Fri, 23 Oct 2020 17:26:06 +0100 Subject: [PATCH] ui: Initial Intention Permission Integration and acceptance testing (#9003) --- .../consul/intention/form/fieldsets/index.hbs | 9 ++- .../intention/permission/form/index.hbs | 35 ++++++----- .../intention/permission/form/pageobject.js | 46 +++++++++++++++ .../permission/header/form/pageobject.js | 20 +++++++ .../permission/header/list/pageobject.js | 8 +++ .../intention/permission/list/pageobject.js | 8 +++ .../app/components/power-select/pageobject.js | 17 ++++++ .../dc/intentions/permissions/create.feature | 24 ++++++++ .../dc/intentions/permissions/create-steps.js | 10 ++++ .../consul-ui/tests/acceptance/steps/steps.js | 12 ++-- ui/packages/consul-ui/tests/dictionary.js | 8 ++- ui/packages/consul-ui/tests/helpers/page.js | 39 +++++++++++++ .../tests/helpers/yadda-annotations.js | 27 +++++---- .../consul/intention/permission/form-test.js | 32 ++++++++++ .../intention/permission/header/form-test.js | 42 ++++++++++++++ .../consul-ui/tests/lib/page-object/index.js | 32 ++++++++++ ui/packages/consul-ui/tests/pages.js | 14 ++++- .../tests/pages/dc/intentions/edit.js | 33 ++++++++--- ui/packages/consul-ui/tests/steps.js | 58 ++++--------------- .../consul-ui/tests/steps/assertions/page.js | 26 +++++++++ .../tests/steps/interactions/visit.js | 5 +- 21 files changed, 412 insertions(+), 93 deletions(-) create mode 100644 ui/packages/consul-ui/app/components/consul/intention/permission/form/pageobject.js create mode 100644 ui/packages/consul-ui/app/components/consul/intention/permission/header/form/pageobject.js create mode 100644 ui/packages/consul-ui/app/components/consul/intention/permission/header/list/pageobject.js create mode 100644 ui/packages/consul-ui/app/components/consul/intention/permission/list/pageobject.js create mode 100644 ui/packages/consul-ui/app/components/power-select/pageobject.js create mode 100644 ui/packages/consul-ui/tests/acceptance/dc/intentions/permissions/create.feature create mode 100644 ui/packages/consul-ui/tests/acceptance/steps/dc/intentions/permissions/create-steps.js create mode 100644 ui/packages/consul-ui/tests/helpers/page.js create mode 100644 ui/packages/consul-ui/tests/integration/components/consul/intention/permission/form-test.js create mode 100644 ui/packages/consul-ui/tests/integration/components/consul/intention/permission/header/form-test.js create mode 100644 ui/packages/consul-ui/tests/lib/page-object/index.js diff --git a/ui/packages/consul-ui/app/components/consul/intention/form/fieldsets/index.hbs b/ui/packages/consul-ui/app/components/consul/intention/form/fieldsets/index.hbs index 02dcd0853e..1adf4ba9c8 100644 --- a/ui/packages/consul-ui/app/components/consul/intention/form/fieldsets/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/intention/form/fieldsets/index.hbs @@ -144,7 +144,13 @@ {{#if (eq (or item.Action '') '')}}
- +

Permissions

{{#if (gt item.Permissions.length 0) }}
@@ -210,6 +216,7 @@