Esri / arcgis-experience-builder-sdk-resources

ArcGIS Experience Builder samples
https://developers.arcgis.com/experience-builder/
Apache License 2.0
125 stars 115 forks source link

'test theme variable' fails #181

Open esride-nik opened 5 months ago

esride-nik commented 5 months ago

The referenced test is trying to overwrite a color value in the theme from '#000' to '#FFF' to render it to the widget UI. It fails because the method of overwriting a theme variable doesn't seem to work anymore.

The content of renderResult.baseElement.innerHTML is: <div><div class="widget-show-unit-tests jimu-widget"><p>This widget shows how to unit test a widget.</p><div>Widget label:</div><div>Theme variable:#000</div><button>Click me</button><div>Count:0</div><button>Query features</button><div><div>Query Result count:</div></div></div></div>

As you can see, '#000' is still contained in the widget UI.

The test ouput is: ` test show-unit-tests widget › test theme variable

expect(received).toBeInTheDocument()

received value must be an HTMLElement or an SVGElement.
Received has value: null`

https://github.com/Esri/arcgis-experience-builder-sdk-resources/blame/d455a007e64fb99175ac7f959fe546f69c788465/widgets/show-unit-tests/tests/widget.test.tsx#L51