-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test is hung in the middle #96
Comments
Another hanging case is missing // component
import Component from 'can/component/';
import Map from 'can/map/';
import './breadcrumb.less!';
import template from './breadcrumb.stache!';
export const ViewModel = Map.extend({
isVisible: false,
paths: []
});
export default Component.extend({
tag: 'sc-breadcrumb',
viewModel: ViewModel,
template
}); // stache
<div {{^isVisible}} class="sc-hidden"{{/isVisible}}>
{{#if isVisible}}
{{#each paths}}
{{#if @index}}
<span class="sc-icon-caret-right"></span>
{{/if}}
{{#if isLink}}
<a href="{{link}}">{{name}}</a>
{{else}}
<p>{{name}}</p>
{{/if}}
{{/each}}
{{/if}}
</div> // test
import QUnit from 'steal-qunit';
import can from 'can';
import $ from 'jquery';
import F from 'funcunit';
import './breadcrumb';
// ViewModel unit tests
QUnit.module('apoc/components/breadcrumb');
QUnit.test('Breadcrumb', function() {
// given
const mock = {
isVisible: true,
paths: [
{
isLink: true,
link: '#depth-1',
name: 'Depth 1'
},
{
isLink: true,
link: '#depth-1/depth-2',
name: 'Depth 2'
},
{
isLink: false,
link: '#depth-1/depth-2/depth-3',
name: 'Depth 3'
}
]
};
// when
const template = can.stache('<sc-breadcrumb {is-visible}="isVisible" {paths}="paths" />');
$('#qunit-fixture').html(template(mock));
this.$component = F('#qunit-fixture').find('sc-breadcrumb');
this.vm = can.viewModel(this.$component);
// then
F('sc-breadcrumb').find('.sc-icon-caret-right')
.css('color', 'rgb(153, 153, 153)', 'show have gray colored arrow')
.size(this.vm.paths.length - 1, 'should have 1 less number of depth arrow');
F('sc-breadcrumb').find('a')
.size(this.vm.paths.length - 1, 'should have 1 less number of depth link');
}); log from
|
Update chrometestee:html-injector injecting scripts into file /test/test.html?__token=d5r1bn +475ms
testee:reporter startRun ---------------------------------------------------- +1s
testee:reporter { status: 'running', file: 'http://localhost:3996/test/test.html?__token=d5r1bn', id: '6a473ffcf2036a579b013a9746505665', environment: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36', runner: 'QUnit', time: 1479942101214 } +1ms phantomtestee:html-injector injecting scripts into file /test/test.html?__token=lr1i20 +472ms
testee:reporter starting test { file: 'http://localhost:3996/test/test.html?__token=lr1i20',
id: 'eba2407b07bf1a93b29a31630d919ea5',
title: 'show have gray colored arrow' } +1s Even it doesn't trigger |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
node: v4.5.0
npm: 2.15.9
testee: 0.2.5
phantomjs: 2.1.1
log from
DEBUG:testee
command withphantom
browserlog from
DEBUG:testee
command withfirefox
browserThe text was updated successfully, but these errors were encountered: