@@ -8,15 +8,16 @@ import * as components from "vuetify/components"
88import * as directives from "vuetify/directives"
99
1010import CrsSelector from "@/components/CrsSelector.vue"
11- import schema from "@/assets/schemas/CrsSelector.json"
11+ import schemas from "@geode/opengeodeweb-back/schemas.json"
12+
13+ const crs_selector_schema =
14+ schemas . opengeodeweb_back . geographic_coordinate_systems
1215
1316const vuetify = createVuetify ( {
1417 components,
1518 directives,
1619} )
1720
18- global . ResizeObserver = require ( "resize-observer-polyfill" )
19-
2021describe ( "CrsSelector.vue" , async ( ) => {
2122 test ( `BRep` , async ( ) => {
2223 const crs_list = [
@@ -26,8 +27,8 @@ describe("CrsSelector.vue", async () => {
2627 name : "Anguilla 1957 / British West Indies Grid" ,
2728 } ,
2829 ]
29- registerEndpoint ( schema . $id , {
30- method : schema . method ,
30+ registerEndpoint ( crs_selector_schema . $id , {
31+ method : crs_selector_schema . methods . filter ( ( m ) => m !== "OPTIONS" ) [ 0 ] ,
3132 handler : ( ) => ( {
3233 crs_list,
3334 } ) ,
@@ -40,8 +41,10 @@ describe("CrsSelector.vue", async () => {
4041 props : { input_geode_object : "BRep" , key_to_update } ,
4142 } )
4243 const td = await wrapper . find ( "td" )
43- const imput = await td . find ( "input" )
44- await imput . trigger ( "click" )
44+ await wrapper . vm . $nextTick ( )
45+ const input = await td . find ( "input" )
46+ console . log ( "toto" , input )
47+ await input . trigger ( "click" )
4548 expect ( wrapper . emitted ( ) ) . toHaveProperty ( "update_values" )
4649 expect ( wrapper . emitted ( ) . update_values ) . toHaveLength ( 1 )
4750 expect ( wrapper . emitted ( ) . update_values [ 0 ] [ 0 ] ) . toEqual ( {
0 commit comments