Skip to content
Permalink
Browse files

date :test

  • Loading branch information...
sagarjadhav968 committed Jul 27, 2018
1 parent fc72580 commit 9e4832307fa9a5a93db0f0ef7e74138de5791642
@@ -0,0 +1 @@
var google;
@@ -29,7 +29,10 @@ module.exports = function(config) {
}
},
files: [
{ pattern: './config/karma-test-shim.js', watched: false }
{ pattern: './config/karma-test-shim.js', watched: false }, {
pattern: './config/app.init.js',
watched: false
}
],

preprocessors: {
@@ -73,12 +76,12 @@ module.exports = function(config) {
autoWatch: false,
browsers: ['ChromeNoSandbox'],


singleRun: true
};

if (process.env.TRAVIS) {
_config.browsers = ['Chrome_travis_ci'];
_config.browsers = ['Chrome_travis_ci'];
}
config.set(_config);
};
};
@@ -218,16 +218,21 @@ description : inner-grid-dark-track-color set inner grid dark color

drawChart() {
if (this.data && this.showChart) {
this.hasLoaded = true;
this.options = {gantt: {criticalPathEnabled: this.criticalPathEnabled,
criticalPathStyle: {stroke: '#e64a19',
strokeWidth: 5}},
innerGridTrack: {fill: this.innerGridTrackColor ? this.innerGridTrackColor : ''},
innerGridDarkTrack: {fill: this.innerGridDarkTrack ? this.innerGridDarkTrack : ''},
};
this.chart = new google.visualization.Gantt(this.ganttchart.nativeElement);
this.hasLoaded = true;
this.chart.draw(this.createTable(this._data), this.options);
google.visualization.events.addListener(this.chart, 'click', this.onClick);
if ( google && google.visualization) {
this.chart = new google.visualization.Gantt(this.ganttchart.nativeElement);
this.chart.draw(this.createTable(this._data), this.options);
google.visualization.events.addListener(this.chart, 'click', this.onClick);

} else {
this.hasLoaded = false;
}
}
}

@@ -25,6 +25,9 @@ describe('amexio-text-field' , () => {
it('show chart', () => {
let newdata = [{'name':'chart'}];
comp.data = newdata ;
comp.criticalPathEnabled=true;
comp.innerGridTrackColor='#e64a19';
comp.innerGridDarkTrack='#e64a19';
expect(newdata).toEqual(comp.data);
expect(true).toBe(comp.showChart);
});
@@ -35,14 +38,13 @@ describe('amexio-text-field' , () => {
expect(false).toBe(comp.showChart);
});

// it('Draw chart', () => {

// comp.data = [
// [{ datatype: 'string', label: 'Task ID' }],
// ['toTrain', 'Walk to train stop', 'walk'] ];
// comp.showChart = true;
// comp.drawChart();
// });
it('Draw Chart Test', () => {
comp.showChart = true;
let newdata = [{ name : 'chart'}];
comp.data = newdata;
comp.drawChart();
expect(false).toBe(comp.hasLoaded);
});

// it('Check Undefined', () => {
// let newdata = [{ name : 'chart'}];

0 comments on commit 9e48323

Please sign in to comment.
You can’t perform that action at this time.