@@ -67,5 +71,4 @@
Close
-
-{{/if}}
\ No newline at end of file
+
\ No newline at end of file
diff --git a/ui/packages/consul-ui/package.json b/ui/packages/consul-ui/package.json
index 3e6b38c20d..6f091f46b8 100644
--- a/ui/packages/consul-ui/package.json
+++ b/ui/packages/consul-ui/package.json
@@ -66,6 +66,7 @@
"@hashicorp/ember-cli-api-double": "^3.1.0",
"@mapbox/rehype-prism": "^0.5.0",
"@xstate/fsm": "^1.4.0",
+ "a11y-dialog": "^6.0.1",
"babel-eslint": "^10.0.3",
"babel-loader": "^8.1.0",
"babel-plugin-ember-modules-api-polyfill": "^3.2.0",
diff --git a/ui/packages/consul-ui/tests/acceptance/dc/intentions/create.feature b/ui/packages/consul-ui/tests/acceptance/dc/intentions/create.feature
index 273aecac88..ded06d0f52 100644
--- a/ui/packages/consul-ui/tests/acceptance/dc/intentions/create.feature
+++ b/ui/packages/consul-ui/tests/acceptance/dc/intentions/create.feature
@@ -32,7 +32,7 @@ Feature: dc / intentions / create: Intention Create
And I click ".ember-power-select-option:first-child"
Then I see the text "db" in "[data-test-destination-element] .ember-power-select-selected-item"
# Specifically set deny
- And I click "[value=deny]"
+ And I click ".value-deny"
And I submit
# TODO: When namespace is empty we expect *
# Then a PUT request was made to "/v1/connect/intentions/exact?source=@namespace%2Fweb&destination=@namespace%2Fdb&dc=datacenter" from yaml
@@ -75,7 +75,7 @@ Feature: dc / intentions / create: Intention Create
And I click ".ember-power-select-option:first-child"
Then I see the text "db" in "[data-test-destination-element] .ember-power-select-selected-item"
# Specifically set deny
- And I click "[value=deny]"
+ And I click ".value-deny"
And I submit
Then a PUT request was made to "/v1/connect/intentions/exact?source=default%2Fweb&destination=default%2Fdb&dc=datacenter" from yaml
---
diff --git a/ui/packages/consul-ui/tests/acceptance/dc/intentions/permissions/create.feature b/ui/packages/consul-ui/tests/acceptance/dc/intentions/permissions/create.feature
index ad42b85ec3..d2e4b28bb2 100644
--- a/ui/packages/consul-ui/tests/acceptance/dc/intentions/permissions/create.feature
+++ b/ui/packages/consul-ui/tests/acceptance/dc/intentions/permissions/create.feature
@@ -9,7 +9,7 @@ Feature: dc / intentions / permissions / create: Intention Permission Create
Then the url should be /datacenter/intentions/create
And the title should be "New Intention - Consul"
# Specifically set L7
- And I click "[value='']"
+ And I click ".value-"
And I click the permissions.create object
And I click the permissions.form.Action.option.Deny object
diff --git a/ui/packages/consul-ui/tests/acceptance/dc/intentions/permissions/warn.feature b/ui/packages/consul-ui/tests/acceptance/dc/intentions/permissions/warn.feature
index b5d7b34317..9cf390731e 100644
--- a/ui/packages/consul-ui/tests/acceptance/dc/intentions/permissions/warn.feature
+++ b/ui/packages/consul-ui/tests/acceptance/dc/intentions/permissions/warn.feature
@@ -20,12 +20,12 @@ Feature: dc / intentions / permissions / warn: Intention Permission Warn
intention: intention-id
---
Then the url should be /datacenter/intentions/intention-id
- And I click "[value='deny']"
+ And I click ".value-deny"
And I submit
- And the warning object is present
+ And I see the warning object
And I click the warning.cancel object
- And the warning object isn't present
+ And I don't see the warning object
And I submit
- And the warning object is present
+ And I see the warning object
And I click the warning.confirm object
Then a PUT request was made to "/v1/connect/intentions/exact?source=default%2Fweb&destination=default%2Fdb&dc=datacenter" from yaml
diff --git a/ui/packages/consul-ui/tests/pages.js b/ui/packages/consul-ui/tests/pages.js
index d6235204f8..b530cd1a5e 100644
--- a/ui/packages/consul-ui/tests/pages.js
+++ b/ui/packages/consul-ui/tests/pages.js
@@ -6,6 +6,7 @@ import {
collection,
text,
isPresent,
+ isVisible,
} from 'ember-cli-page-object';
import { alias } from 'ember-cli-page-object/macros';
@@ -204,7 +205,7 @@ export default {
intention(
visitable,
clickable,
- isPresent,
+ isVisible,
submitable,
deletable,
cancelable,
diff --git a/ui/packages/consul-ui/tests/pages/dc/intentions/edit.js b/ui/packages/consul-ui/tests/pages/dc/intentions/edit.js
index d79fb84fa2..53503232a4 100644
--- a/ui/packages/consul-ui/tests/pages/dc/intentions/edit.js
+++ b/ui/packages/consul-ui/tests/pages/dc/intentions/edit.js
@@ -1,7 +1,7 @@
export default function(
visitable,
clickable,
- isPresent,
+ isVisible,
submitable,
deletable,
cancelable,
@@ -22,7 +22,7 @@ export default function(
warning: {
scope: '[data-test-action-warning]',
resetScope: true,
- present: isPresent(),
+ see: isVisible(),
confirm: {
scope: '[data-test-action-warning-confirm]',
click: clickable(),
diff --git a/ui/packages/consul-ui/tests/steps/assertions/page.js b/ui/packages/consul-ui/tests/steps/assertions/page.js
index 939289bc23..1732a302a6 100644
--- a/ui/packages/consul-ui/tests/steps/assertions/page.js
+++ b/ui/packages/consul-ui/tests/steps/assertions/page.js
@@ -34,7 +34,11 @@ const dont = `( don't| shouldn't| can't)?`;
export default function(scenario, assert, find, currentPage, $) {
scenario
.then([`I${dont} $verb the $pageObject object`], function(negative, verb, element, next) {
- assert[negative ? 'notOk' : 'ok'](element[verb]());
+ let res = element[verb];
+ if (typeof res === 'function') {
+ res = res.call(element);
+ }
+ assert[negative ? 'notOk' : 'ok'](res, this.step);
setTimeout(() => next());
})
.then(
diff --git a/ui/yarn.lock b/ui/yarn.lock
index 50c8c43ec3..59fc376c40 100644
--- a/ui/yarn.lock
+++ b/ui/yarn.lock
@@ -2200,6 +2200,13 @@ JSV@^4.0.x:
resolved "https://registry.yarnpkg.com/JSV/-/JSV-4.0.2.tgz#d077f6825571f82132f9dffaed587b4029feff57"
integrity sha1-0Hf2glVx+CEy+d/67Vh7QCn+/1c=
+a11y-dialog@^6.0.1:
+ version "6.0.1"
+ resolved "https://registry.yarnpkg.com/a11y-dialog/-/a11y-dialog-6.0.1.tgz#0b6b4d4cbfeb0e3b5034e07b8484cffd17393c8d"
+ integrity sha512-d/I0nUjQFbJgBGU7olFwt9ZBvVHTNjpzJArr8oR+Vhobwcl153KFU/Pgppq7fIf9hSwJnLLTbK+2u7ald56uCA==
+ dependencies:
+ focusable-selectors "^0.2.0"
+
abab@^2.0.0, abab@^2.0.3:
version "2.0.5"
resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a"
@@ -7931,6 +7938,11 @@ flush-write-stream@^1.0.0:
inherits "^2.0.3"
readable-stream "^2.3.6"
+focusable-selectors@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/focusable-selectors/-/focusable-selectors-0.2.0.tgz#ae8aeb730e8e70bcd2572542fcdba3f89548922a"
+ integrity sha512-v6a8tiRtsiO0TvRDtrnpzhvUDb7L52MM8SrcO+pzC5azbekuvMLjijbyWeZ30efBGhVdgMv5zn0z7Y1bLkjc0w==
+
follow-redirects@^1.0.0:
version "1.13.0"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.0.tgz#b42e8d93a2a7eea5ed88633676d6597bc8e384db"