From 9c9bade2b2398136ba8c72f8fdde1ea3b0a39afe Mon Sep 17 00:00:00 2001 From: Juhuan Ye Date: Fri, 6 May 2016 15:21:07 -0400 Subject: [PATCH 1/3] Enhence the detail pods in dummy app --- .../components/dummy-detail-pods/template.hbs | 108 +++++------------- .../components/dummy-node-pods/template.hbs | 6 +- .../dummy/app/styles/_dummy-detail-pods.scss | 12 +- 3 files changed, 42 insertions(+), 84 deletions(-) diff --git a/tests/dummy/app/pods/components/dummy-detail-pods/template.hbs b/tests/dummy/app/pods/components/dummy-detail-pods/template.hbs index c03c707..9ffa2f3 100644 --- a/tests/dummy/app/pods/components/dummy-detail-pods/template.hbs +++ b/tests/dummy/app/pods/components/dummy-detail-pods/template.hbs @@ -1,8 +1,8 @@ -{{#liquid-unless isPodVisible}} {{else}} {{#liquid-if podLayer.root class='liquid-pods'}} +{{#liquid-if podLayer.root class='liquid-pods'}}
-
+
6500
@@ -27,7 +27,7 @@
-
+
IP address
@@ -44,6 +44,11 @@
Undefined
+
+
+ +
+
@@ -52,95 +57,42 @@
{{#frost-button class='small secondary text' }}Actions{{/frost-button}}
-{{else liquid-if podLayer.alarms}} +{{else liquid-if podLayer.subPod}}
-
- -
- {{#frost-button class='close tertiary icon' onClick=(action 'closePod')}} {{frost-icon icon='frost/chevron'}} {{/frost-button}} -
- -
Child title
-
Subtext
-
-
- Child context -
-
- - -{{/liquid-if}} {{#liquid-if podLayer.alarmsT1 class='liquid-pods'}} -
-
-
{{podLayerAlias}}
+
Additional attributes
-
-
-
- {{#frost-button class='close tertiary icon' onClick=(action 'closePod')}} {{frost-icon icon='frost/chevron'}} {{/frost-button}} -
-
Child title
-
Subtext
-
-
-
- Child context -
-
-
-
-
-
Description
-
Oh furniture acuteness suspected continual +
+
+
+
IP address
+
192.0.1.2
-
-
-
-{{/liquid-if}} {{#liquid-if podLayer.alarmsT2 class='liquid-pods'}} -
-
-
- -
-
-
-
- {{#frost-button class='close tertiary icon' onClick=(action 'closePod')}} {{frost-icon icon='frost/chevron'}} {{/frost-button}} -
-
Child title
-
Subtext
-
-
-
- Child context -
-
-
-
-
-
Description
-
Oh furniture acuteness suspected continual +
+
+
Address
+
Undefined
+
+
{{#frost-button class='small secondary text' }}Details{{/frost-button}}
+
{{#frost-button class='small secondary text' }}Related{{/frost-button}}
+
{{#frost-button class='small secondary text' }}Actions{{/frost-button}}
+
-{{/liquid-if}} {{/liquid-unless}} +{{/liquid-if}}{{/liquid-unless}} diff --git a/tests/dummy/app/pods/components/dummy-node-pods/template.hbs b/tests/dummy/app/pods/components/dummy-node-pods/template.hbs index 02be3a0..8d2d0c7 100644 --- a/tests/dummy/app/pods/components/dummy-node-pods/template.hbs +++ b/tests/dummy/app/pods/components/dummy-node-pods/template.hbs @@ -1,6 +1,6 @@ -{{#liquid-unless isPodVisible}} +{{#liquid-if isPodVisible}} + -{{else}} {{#liquid-if podLayer.root class='liquid-pods'}}
@@ -191,4 +191,4 @@ - {{/liquid-unless}} + {{/liquid-if}} diff --git a/tests/dummy/app/styles/_dummy-detail-pods.scss b/tests/dummy/app/styles/_dummy-detail-pods.scss index ad672a2..080a604 100644 --- a/tests/dummy/app/styles/_dummy-detail-pods.scss +++ b/tests/dummy/app/styles/_dummy-detail-pods.scss @@ -13,7 +13,7 @@ $frost-color-warn-1: #7D85B2; } .dummy-detail-pods .pod.context .header .close { border: none; - .frost-svg { + .frost-test { margin: 10px 10px 10px 10px; padding: 5px 5px 5px 5px; border: 5px groove $frost-color-lgrey-1; @@ -23,7 +23,10 @@ $frost-color-warn-1: #7D85B2; padding: 10px 15px 10px 20px; display: flex; flex-direction: column; - border-bottom: 1px solid $frost-color-lgrey-1; + + &.with-bottom { + border-bottom: 1px solid $frost-color-lgrey-1; + } } .dummy-detail-pods .pod.context .session .critical, .dummy-detail-pods .pod.context .session .major, @@ -67,11 +70,14 @@ $frost-color-warn-1: #7D85B2; font-size: $frost-font-s; color: $frost-color-grey-1; } -.dummy-detail-pods .pod.context.session.row.property .link { +.dummy-detail-pods .pod.context .session .row .property .link { padding-top: 5px; flex-direction: row-reverse; font-size: $frost-font-s; color: $frost-color-grey-1; + margin-left: auto; + display: block; + width: 65px; } .dummy-detail-pods .pod.context .bottom { padding: 1px 15px 10px 15px; From 74589c656beb71d0e11819efa3767a46b0b172ba Mon Sep 17 00:00:00 2001 From: Juhuan Ye Date: Mon, 9 May 2016 14:29:35 -0400 Subject: [PATCH 2/3] add acceptance test cases --- tests/acceptance/pods-test.js | 45 +++++++++++++++++++ .../components/dummy-detail-pods/template.hbs | 9 ++-- tests/dummy/app/pods/demo/template.hbs | 2 +- 3 files changed, 51 insertions(+), 5 deletions(-) create mode 100644 tests/acceptance/pods-test.js diff --git a/tests/acceptance/pods-test.js b/tests/acceptance/pods-test.js new file mode 100644 index 0000000..2a239a1 --- /dev/null +++ b/tests/acceptance/pods-test.js @@ -0,0 +1,45 @@ +/* jshint expr:true */ +import { + describe, + it, + beforeEach, + afterEach +} +from 'mocha' +import { + expect +} +from 'chai' +import startApp from '../helpers/start-app' +import destroyApp from '../helpers/destroy-app' + +/* eslint-disable */ +describe('Acceptance: PodsTest', function () { + let application + beforeEach(function () { + application = startApp() + }) + + afterEach(function () { + destroyApp(application) + }) + + it('can visit /', function () { + visit('/') + click('#detailPodsId') + andThen(function () { + click('#openNewPod'); + andThen(function () { + click('#testButtonId'); + andThen(function () { + click('#closePodId'); + }) + }) + }) + + andThen(function () { + expect(currentPath()).to.equal('demo') + }) + }) +}) +/* eslint-enable */ diff --git a/tests/dummy/app/pods/components/dummy-detail-pods/template.hbs b/tests/dummy/app/pods/components/dummy-detail-pods/template.hbs index 9ffa2f3..2addd4e 100644 --- a/tests/dummy/app/pods/components/dummy-detail-pods/template.hbs +++ b/tests/dummy/app/pods/components/dummy-detail-pods/template.hbs @@ -1,3 +1,4 @@ +{{#liquid-unless isPodVisible}} {{else}} {{#liquid-if podLayer.root class='liquid-pods'}}
@@ -46,7 +47,7 @@
- +
@@ -54,7 +55,7 @@
{{#frost-button class='small secondary text' }}Details{{/frost-button}}
{{#frost-button class='small secondary text' }}Related{{/frost-button}}
-
{{#frost-button class='small secondary text' }}Actions{{/frost-button}}
+
{{#frost-button class='small secondary text' id='closePodId' onClick=(action 'closePod')}}Actions{{/frost-button}}
{{else liquid-if podLayer.subPod}} @@ -63,7 +64,7 @@
{{#each podNames as |stack|}} - {{stack}}/ {{/each}} + {{stack}}/ {{/each}}
@@ -90,7 +91,7 @@
-
{{#frost-button class='small secondary text' }}Details{{/frost-button}}
+
{{#frost-button class='small secondary text' onClick=(action 'changePod' stack)}}Details{{/frost-button}}
{{#frost-button class='small secondary text' }}Related{{/frost-button}}
{{#frost-button class='small secondary text' }}Actions{{/frost-button}}
diff --git a/tests/dummy/app/pods/demo/template.hbs b/tests/dummy/app/pods/demo/template.hbs index c290df1..bdab75a 100644 --- a/tests/dummy/app/pods/demo/template.hbs +++ b/tests/dummy/app/pods/demo/template.hbs @@ -5,7 +5,7 @@ {{#frost-button class='medium secondary text' onClick=(action 'togglePods' 'map')}}Map pods{{/frost-button}} {{#frost-button class='medium secondary text' onClick=(action 'togglePods' 'node')}}Node pods{{/frost-button}} {{#frost-button class='medium secondary text' onClick=(action 'togglePods' 'search')}}Search pods{{/frost-button}} - {{#frost-button class='medium secondary text' onClick=(action 'togglePods' 'detail')}}Detail pods{{/frost-button}} + {{#frost-button class='medium secondary text' id='detailPodsId' onClick=(action 'togglePods' 'detail')}}Detail pods{{/frost-button}}
{{dummy-map-pods isPodVisible=isMapPodVisible}} {{dummy-node-pods isPodVisible=isNodePodVisible}} From 71b71a2bc962d4efe5f41518026c0a6b560a981c Mon Sep 17 00:00:00 2001 From: Juhuan Ye Date: Mon, 9 May 2016 15:25:08 -0400 Subject: [PATCH 3/3] Fix issue --- tests/acceptance/pods-test.js | 40 +++++++++++++++++------------------ 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/tests/acceptance/pods-test.js b/tests/acceptance/pods-test.js index 2a239a1..334c169 100644 --- a/tests/acceptance/pods-test.js +++ b/tests/acceptance/pods-test.js @@ -15,31 +15,31 @@ import destroyApp from '../helpers/destroy-app' /* eslint-disable */ describe('Acceptance: PodsTest', function () { - let application - beforeEach(function () { - application = startApp() - }) + let application + beforeEach(function () { + application = startApp() + }) - afterEach(function () { - destroyApp(application) - }) + afterEach(function () { + destroyApp(application) + }) - it('can visit /', function () { - visit('/') - click('#detailPodsId') - andThen(function () { - click('#openNewPod'); + it('can visit /', function (done) { + visit('/') + click('#detailPodsId') andThen(function () { - click('#testButtonId'); + click('#openNewPod'); andThen(function () { - click('#closePodId'); + click('#testButtonId'); + andThen(function () { + click('#closePodId'); + andThen(function () { + expect(currentPath()).to.equal('demo') + done(); + }) + }) }) }) }) - - andThen(function () { - expect(currentPath()).to.equal('demo') - }) }) -}) -/* eslint-enable */ + /* eslint-enable */