/* Ċ Ġ* ĠCopyright Ġ( c ) Ġ 2 0 1 7 - present ĠRobert ĠJar os Ċ Ġ* Ċ Ġ* ĠPermission Ġis Ġhereby Ġgranted , Ġfree Ġof Ġcharge , Ġto Ġany Ġperson Ġobtaining Ġa Ġcopy Ċ Ġ* Ġof Ġthis Ġsoftware Ġand Ġassociated Ġdocumentation Ġfiles Ġ( the Ġ" Software "), Ġto Ġdeal Ċ Ġ* Ġin Ġthe ĠSoftware Ġwithout Ġrestriction , Ġincluding Ġwithout Ġlimitation Ġthe Ġrights Ċ Ġ* Ġto Ġuse , Ġcopy , Ġmodify , Ġmerge , Ġpublish , Ġdistribute , Ġsublicense , Ġand / or Ġsell Ċ Ġ* Ġcopies Ġof Ġthe ĠSoftware , Ġand Ġto Ġpermit Ġpersons Ġto Ġwhom Ġthe ĠSoftware Ġis Ċ Ġ* Ġfurnished Ġto Ġdo Ġso , Ġsubject Ġto Ġthe Ġfollowing Ġconditions : Ċ Ġ* Ċ Ġ* ĠThe Ġabove Ġcopyright Ġnotice Ġand Ġthis Ġpermission Ġnotice Ġshall Ġbe Ġincluded Ġin Ġall Ċ Ġ* Ġcopies Ġor Ġsubstantial Ġportions Ġof Ġthe ĠSoftware . Ċ Ġ* Ċ Ġ* ĠTHE ĠSOFTWARE ĠIS ĠPROVIDED Ġ" AS ĠIS ", ĠWITHOUT ĠWARRANTY ĠOF ĠANY ĠKIND , ĠEXPRESS ĠOR Ċ Ġ* ĠIMPLIED , ĠINCLUDING ĠBUT ĠNOT ĠLIMITED ĠTO ĠTHE ĠWARRANTIES ĠOF ĠMERCHANTABILITY , Ċ Ġ* ĠFITNESS ĠFOR ĠA ĠPARTICULAR ĠPURPOSE ĠAND ĠNONINFRINGEMENT . ĠIN ĠNO ĠEVENT ĠSHALL ĠTHE Ċ Ġ* ĠAUTHORS ĠOR ĠCOPYRIGHT ĠHOLDERS ĠBE ĠLIABLE ĠFOR ĠANY ĠCLAIM , ĠDAMAGES ĠOR ĠOTHER Ċ Ġ* ĠLIABILITY , ĠWHETHER ĠIN ĠAN ĠACTION ĠOF ĠCONTRACT , ĠTORT ĠOR ĠOTHERWISE , ĠARISING ĠFROM , Ċ Ġ* ĠOUT ĠOF ĠOR ĠIN ĠCONNECTION ĠWITH ĠTHE ĠSOFTWARE ĠOR ĠTHE ĠUSE ĠOR ĠOTHER ĠDEALINGS ĠIN ĠTHE Ċ Ġ* ĠSOFTWARE . Ċ Ġ*/ Ċ package Ġtest . pl . tre k soft . k vision . tab ulator Ċ Ċ import Ġpl . tre k soft . k vision . panel . Root Ċ import Ġpl . tre k soft . k vision . tab ulator . Tab ulator Options Ċ import Ġpl . tre k soft . k vision . tab ulator . Tab ulator Ċ import Ġpl . tre k soft . k vision . utils . obj Ċ import Ġtest . pl . tre k soft . k vision . Dom Spec Ċ import Ġkotlin . browser . document Ċ import Ġkotlin . test . Test Ċ Ċ class ĠTab ulator Spec Ġ: ĠDom Spec Ġ{ ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġrender () Ġ{ ĊĠĠĠĠĠĠĠ Ġrun Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġroot Ġ= ĠRoot (" test ", Ġfixed Ġ= Ġtrue ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġtab ulator Ġ= ĠTab ulator < Any >( options Ġ= ĠTab ulator Options ( data Ġ= ĠarrayOf ( obj Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġid Ġ= Ġ 1 ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġname Ġ= Ġ" Name " ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġage Ġ= Ġ 4 0 ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ}, Ġobj Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġid Ġ= Ġ 2 ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġname Ġ= Ġ" Name 2 " ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġage Ġ= Ġ 5 0 ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ}), Ġvirtual Dom Ġ= Ġfalse )) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġroot . add ( tab ulator ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtab ulator . redraw ( true ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġelement Ġ= Ġdocument . getElementById (" test ") ĊĠĠĠĠĠĠĠĠĠĠĠ ĠassertEquals Html ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ"< div Ġclass =\" tab ulator \" Ġrole =\" grid \" Ġtab ulator - layout =\" fit Data \">< div Ġclass =\" tab ulator - header \" Ġstyle =\" padding - right : Ġ 0 px ;\ ">< div Ġclass =\" tab ulator - headers \" Ġstyle =\" margin - left : Ġ 0 px ;\ ">< div Ġclass =\" tab ulator - col Ġtab ulator - sortable \" Ġrole =\" column header \" Ġaria - sort =\" none \" Ġtab ulator - field =\" id \" Ġtitle =\" \" Ġstyle =\" min - width : Ġ 4 0 px ;\ ">< div Ġclass =\" tab ulator - col - content \">< div Ġclass =\" tab ulator - col - title \"> id </ div >< div Ġclass =\" tab ulator - arrow \"></ div ></ div >< div Ġclass =\" tab ulator - col - resize - handle \"></ div >< div Ġclass =\" tab ulator - col - resize - handle Ġprev \"></ div ></ div >< div Ġclass =\" tab ulator - col Ġtab ulator - sortable \" Ġrole =\" column header \" Ġaria - sort =\" none \" Ġtab ulator - field =\" name \" Ġtitle =\" \" Ġstyle =\" min - width : Ġ 4 0 px ;\ ">< div Ġclass =\" tab ulator - col - content \">< div Ġclass =\" tab ulator - col - title \"> name </ div >< div Ġclass =\" tab ulator - arrow \"></ div ></ div >< div Ġclass =\" tab ulator - col - resize - handle \"></ div >< div Ġclass =\" tab ulator - col - resize - handle Ġprev \"></ div ></ div >< div Ġclass =\" tab ulator - col Ġtab ulator - sortable \" Ġrole =\" column header \" Ġaria - sort =\" none \" Ġtab ulator - field =\" age \" Ġtitle =\" \" Ġstyle =\" min - width : Ġ 4 0 px ;\ ">< div Ġclass =\" tab ulator - col - content \">< div Ġclass =\" tab ulator - col - title \"> age </ div >< div Ġclass =\" tab ulator - arrow \"></ div ></ div >< div Ġclass =\" tab ulator - col - resize - handle \"></ div >< div Ġclass =\" tab ulator - col - resize - handle Ġprev \"></ div ></ div ></ div >< div Ġclass =\" tab ulator - frozen - rows - holder \"></ div ></ div >< div Ġclass =\" tab ulator - table Holder \" Ġtabindex =\" 0 \">< div Ġclass =\" tab ulator - table \">< div Ġclass =\" tab ulator - row Ġtab ulator - selectable Ġtab ulator - row - odd \" Ġrole =\" row \" Ġstyle =\" padding - left : Ġ 0 px ;\ ">< div Ġclass =\" tab ulator - cell \" Ġrole =\" grid cell \" Ġtab ulator - field =\" id \" Ġtitle =\" \"> 1 < div Ġclass =\" tab ulator - col - resize - handle \"></ div >< div Ġclass =\" tab ulator - col - resize - handle Ġprev \"></ div ></ div >< div Ġclass =\" tab ulator - cell \" Ġrole =\" grid cell \" Ġtab ulator - field =\" name \" Ġtitle =\" \"> Name < div Ġclass =\" tab ulator - col - resize - handle \"></ div >< div Ġclass =\" tab ulator - col - resize - handle Ġprev \"></ div ></ div >< div Ġclass =\" tab ulator - cell \" Ġrole =\" grid cell \" Ġtab ulator - field =\" age \" Ġtitle =\" \"> 4 0 < div Ġclass =\" tab ulator - col - resize - handle \"></ div >< div Ġclass =\" tab ulator - col - resize - handle Ġprev \"></ div ></ div ></ div >< div Ġclass =\" tab ulator - row Ġtab ulator - selectable Ġtab ulator - row - even \" Ġrole =\" row \" Ġstyle =\" padding - left : Ġ 0 px ;\ ">< div Ġclass =\" tab ulator - cell \" Ġrole =\" grid cell \" Ġtab ulator - field =\" id \" Ġtitle =\" \"> 2 < div Ġclass =\" tab ulator - col - resize - handle \"></ div >< div Ġclass =\" tab ulator - col - resize - handle Ġprev \"></ div ></ div >< div Ġclass =\" tab ulator - cell \" Ġrole =\" grid cell \" Ġtab ulator - field =\" name \" Ġtitle =\" \"> Name 2 < div Ġclass =\" tab ulator - col - resize - handle \"></ div >< div Ġclass =\" tab ulator - col - resize - handle Ġprev \"></ div ></ div >< div Ġclass =\" tab ulator - cell \" Ġrole =\" grid cell \" Ġtab ulator - field =\" age \" Ġtitle =\" \"> 5 0 < div Ġclass =\" tab ulator - col - resize - handle \"></ div >< div Ġclass =\" tab ulator - col - resize - handle Ġprev \"></ div ></ div ></ div ></ div ></ div ></ div >", ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġelement ?. innerHTML , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ" Should Ġrender Ġcorrect Ġtab ulator Ġtable " ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ } Ċ