File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -31,9 +31,10 @@ import { required } from '../../validators'
3131 */
3232const ChartComponent = Component ( {
3333 'validators' : [ required ( 'type' ) ] ,
34- 'render' : ( args , selection , data ) => {
34+ 'init' : ( args , selection ) => selection . append ( 'div' ) ,
35+ 'render' : ( args , selection , data , element ) => {
36+ console . log ( 'render called' ) // eslint-disable-line
3537 const { bb} = require ( 'billboard.js' )
36- const element = selection . append ( 'div' )
3738 bb . generate ( {
3839 'bindto' : element . node ( ) ,
3940 'data' : Object . assign ( data , { 'type' : args . type } )
Original file line number Diff line number Diff line change @@ -37,6 +37,15 @@ describe('Integration test', function() {
3737 title_text . should . equal ( 'Cereals' )
3838 const h1_text = await driver . findElement ( By . css ( 'h1' ) ) . getText ( )
3939 h1_text . should . equal ( 'Cereals' )
40+ const original_elements = await driver . findElements (
41+ By . css ( 'svg' ) )
42+ const original_element_count = original_elements . length
43+ const dropdown = await driver . findElement ( By . css ( 'select' ) )
44+ await driver . findElement ( By . css ( 'select option:nth-child(2)' ) ) . click ( )
45+ const new_elements = await driver . findElements (
46+ By . css ( 'svg' ) )
47+ const new_element_count = new_elements . length
48+ original_element_count . should . equal ( new_element_count )
4049 } finally {
4150 await driver . quit ( )
4251 }
You can’t perform that action at this time.
0 commit comments