From 0598b66a805e4b3233ec464d96cdc38a362d5a5d Mon Sep 17 00:00:00 2001 From: Joel Kuzmarski Date: Thu, 27 Jun 2019 04:01:30 -0500 Subject: [PATCH] Fix text and add feature test for copy button (#5958) `Copied IP Address!` > `Copied output!` Adds feature test for copy button --- .../app/templates/components/healthcheck-output.hbs | 2 +- .../tests/acceptance/components/copy-button.feature | 13 +++++++++++++ .../steps/components/copy-button-steps.js | 10 ++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 ui-v2/tests/acceptance/components/copy-button.feature create mode 100644 ui-v2/tests/acceptance/steps/components/copy-button-steps.js diff --git a/ui-v2/app/templates/components/healthcheck-output.hbs b/ui-v2/app/templates/components/healthcheck-output.hbs index 05a75e40a2..fc7e560a4e 100644 --- a/ui-v2/app/templates/components/healthcheck-output.hbs +++ b/ui-v2/app/templates/components/healthcheck-output.hbs @@ -6,7 +6,7 @@ {{/block-slot}} {{#block-slot 'success' as |transition|}}

- Copied IP Address! + Copied output!

{{/block-slot}} {{#block-slot 'error' as |transition|}} diff --git a/ui-v2/tests/acceptance/components/copy-button.feature b/ui-v2/tests/acceptance/components/copy-button.feature new file mode 100644 index 0000000000..5bf266f9ce --- /dev/null +++ b/ui-v2/tests/acceptance/components/copy-button.feature @@ -0,0 +1,13 @@ +@setupApplicationTest +Feature: components / copy-button + Background: + Given 1 datacenter model with the value "dc-1" + Scenario: Clicking the copy button + When I visit the node page for yaml + --- + dc: dc-1 + node: node-0 + --- + Then the url should be /dc-1/nodes/node-0 + When I click ".healthcheck-output:nth-child(1) button.copy-btn" + Then I see the text "Copied output!" in ".healthcheck-output:nth-child(1) p.feedback-dialog-out" diff --git a/ui-v2/tests/acceptance/steps/components/copy-button-steps.js b/ui-v2/tests/acceptance/steps/components/copy-button-steps.js new file mode 100644 index 0000000000..960cdf533d --- /dev/null +++ b/ui-v2/tests/acceptance/steps/components/copy-button-steps.js @@ -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); + }); +}