chore(sync) make the test pass

This commit is contained in:
Alexis Métaireau 2024-05-13 16:09:46 +02:00
parent 647f6c3dfe
commit 9e36476abe
3 changed files with 8 additions and 2 deletions

View file

@ -33,6 +33,7 @@ U.Map = L.Map.extend({
includes: [ControlsMixin],
initialize: function (el, geojson) {
this.sync = new U.SyncEngine(this)
// Locale name (pt_PT, en_US…)
// To be used for Django localization
if (geojson.properties.locale) L.setLocale(geojson.properties.locale)
@ -155,7 +156,6 @@ U.Map = L.Map.extend({
this.options.onLoadPanel = 'datafilters'
}
this.sync = new U.SyncEngine(this)
let isDirty = false // self status
try {
Object.defineProperty(this, 'isDirty', {

View file

@ -1375,6 +1375,12 @@ U.DataLayer = L.Evented.extend({
)
popupFieldset.appendChild(builder.build())
// XXX I'm not sure **why** this is needed (as it's set during `this.initialize`)
// but apparently it's needed.
if (!U.Utils.isObject(this.options.remoteData)) {
this.options.remoteData = {}
}
const remoteDataFields = [
[
'options.remoteData.url',

View file

@ -5,7 +5,7 @@ from time import sleep
from playwright.sync_api import expect
from umap.models import DataLayer, Map
from umap.models import DataLayer
from ..base import DataLayerFactory, MapFactory