Skip to content

Commit

Permalink
Merge pull request #12 from JasonYe007/master
Browse files Browse the repository at this point in the history
Enhence the detail pods in dummy app
  • Loading branch information
JasonYe007 committed May 9, 2016
2 parents 6da7d14 + 71b71a2 commit 6300a58
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 87 deletions.
45 changes: 45 additions & 0 deletions tests/acceptance/pods-test.js
Original file line number Diff line number Diff line change
@@ -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 (done) {
visit('/')
click('#detailPodsId')
andThen(function () {
click('#openNewPod');
andThen(function () {
click('#testButtonId');
andThen(function () {
click('#closePodId');
andThen(function () {
expect(currentPath()).to.equal('demo')
done();
})
})
})
})
})
})
/* eslint-enable */
113 changes: 33 additions & 80 deletions tests/dummy/app/pods/components/dummy-detail-pods/template.hbs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{{#liquid-unless isPodVisible}} {{else}} {{#liquid-if podLayer.root class='liquid-pods'}}
{{#liquid-unless isPodVisible}} {{else}}
{{#liquid-if podLayer.root class='liquid-pods'}}
<div class="pod context">
<div class="header">
<div class="close">
<div class="frost-svg">
<div class="frost-test">
6500
</div>
</div>
Expand All @@ -27,7 +28,7 @@
</div>
</div>
</div>
<div class="session">
<div class="session with-bottom">
<div class="row">
<div class="property">
<div class="title">IP address</div>
Expand All @@ -44,103 +45,55 @@
<div class="value">Undefined</div>
</div>
</div>
<div class="row">
<div class="property">
<div class="link" id='openNewPod' {{action (action 'openPod' 'subPod' 'Primary identifier')}}>Attributes</div>
</div>
</div>

</div>
<div class="bottom">
<div class="row">{{#frost-button class='small secondary text' }}Details{{/frost-button}} </div>
<div class="row">{{#frost-button class='small secondary text' }}Related{{/frost-button}} </div>
<div class="row">{{#frost-button class='small secondary text' }}Actions{{/frost-button}} </div>
<div class="row">{{#frost-button class='small secondary text' id='closePodId' onClick=(action 'closePod')}}Actions{{/frost-button}} </div>
</div>
</div>
{{else liquid-if podLayer.alarms}}
{{else liquid-if podLayer.subPod}}
<div class="pod context">
<div class="header">
<div class="title">
<div class="breadcrumb action">
<div class="close">
<div class="frost-test">
{{#each podNames as |stack|}}
<span {{action (action 'changePod' stack)}}>{{stack}}/</span> {{/each}}
<span id= "testButtonId" {{action (action 'changePod' stack)}}>{{stack}}/</span> {{/each}}
</div>
<div class="primary">{{podLayerAlias}}</div>
</div>
</div>
<div class="header">
{{#frost-button class='close tertiary icon' onClick=(action 'closePod')}} {{frost-icon icon='frost/chevron'}} {{/frost-button}}
<div class="title">

<div class="primary">Child title</div>
<div class="secondary">Subtext</div>
</div>
</div>
<div class="body">
Child context
</div>
</div>


{{/liquid-if}} {{#liquid-if podLayer.alarmsT1 class='liquid-pods'}}
<div class="pod context">
<div class="header">
<div class="title">
<div class="breadcrumb action">
{{#each podNames as |stack|}}
<span {{action (action 'changePod' stack)}}>{{stack}}/</span> {{/each}}
</div>
<div class="primary">{{podLayerAlias}}</div>
<div class="secondary">Additional attributes</div>
</div>
</div>
</div>
<div class="pod context">
<div class="header">
{{#frost-button class='close tertiary icon' onClick=(action 'closePod')}} {{frost-icon icon='frost/chevron'}} {{/frost-button}}
<div class="title">
<div class="primary">Child title</div>
<div class="secondary">Subtext</div>
</div>
</div>
<div class="body">
Child context
</div>
</div>
<div class="pod context">
<div class="header">
<div class="title">
<div class="primary">Description</div>
<div class="secondary">Oh furniture acuteness suspected continual
<div class="session with-bottom">
<div class="row">
<div class="property">
<div class="title">IP address</div>
<div class="value">192.0.1.2</div>
</div>
</div>
</div>
</div>
{{/liquid-if}} {{#liquid-if podLayer.alarmsT2 class='liquid-pods'}}
<div class="pod context">
<div class="header">
<div class="title">
<div class="breadcrumb action">
{{#each podNames as |stack|}}
<span {{action (action 'changePod' stack)}}>{{stack}}/</span> {{/each}}
<div class="property" >
<div class="title">Lat, Long</div>
<div class="value">42.66, -73.76</div>
</div>
<div class="primary">{{podLayerAlias}}</div>
</div>
</div>
</div>
<div class="pod context">
<div class="header">
{{#frost-button class='close tertiary icon' onClick=(action 'closePod')}} {{frost-icon icon='frost/chevron'}} {{/frost-button}}
<div class="title">
<div class="primary">Child title</div>
<div class="secondary">Subtext</div>
</div>
</div>
<div class="body">
Child context
</div>
</div>
<div class="pod context">
<div class="header">
<div class="title">
<div class="primary">Description</div>
<div class="secondary">Oh furniture acuteness suspected continual
<div class="row">
<div class="property">
<div class="title">Address</div>
<div class="value">Undefined</div>
</div>
</div>
</div>
<div class="bottom">
<div class="row">{{#frost-button class='small secondary text' onClick=(action 'changePod' stack)}}Details{{/frost-button}} </div>
<div class="row">{{#frost-button class='small secondary text' }}Related{{/frost-button}} </div>
<div class="row">{{#frost-button class='small secondary text' }}Actions{{/frost-button}} </div>
</div>
</div>
{{/liquid-if}} {{/liquid-unless}}
{{/liquid-if}}{{/liquid-unless}}
6 changes: 3 additions & 3 deletions tests/dummy/app/pods/components/dummy-node-pods/template.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{#liquid-unless isPodVisible}}
{{#liquid-if isPodVisible}}


{{else}}
{{#liquid-if podLayer.root class='liquid-pods'}}
<div class="pod context">
<div class="header">
Expand Down Expand Up @@ -191,4 +191,4 @@



{{/liquid-unless}}
{{/liquid-if}}
2 changes: 1 addition & 1 deletion tests/dummy/app/pods/demo/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
</div>
{{dummy-map-pods isPodVisible=isMapPodVisible}}
{{dummy-node-pods isPodVisible=isNodePodVisible}}
Expand Down
12 changes: 9 additions & 3 deletions tests/dummy/app/styles/_dummy-detail-pods.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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,
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 6300a58

Please sign in to comment.