mirror of
https://github.com/umap-project/umap.git
synced 2025-04-29 03:42:37 +02:00
fix: listen to the correct event for conflicts
This commit is contained in:
parent
8400b55b9d
commit
b197e067e8
2 changed files with 3 additions and 3 deletions
|
@ -1713,7 +1713,7 @@ U.DataLayer = L.Evented.extend({
|
|||
'This situation is tricky, you have to choose carefully which version is pertinent.'
|
||||
)
|
||||
)
|
||||
document.addEventListener('alertConflictOverride', async (event) => {
|
||||
document.addEventListener('umap:alertConflictOverride', async (event) => {
|
||||
await this._trySave(url, {}, formData)
|
||||
})
|
||||
}
|
||||
|
|
|
@ -288,9 +288,9 @@ def test_should_display_alert_on_conflict(context, live_server, datalayer, openm
|
|||
saved = DataLayer.objects.last()
|
||||
data = json.loads(Path(saved.geojson.path).read_text())
|
||||
assert data["features"][0]["properties"]["name"] == "new name"
|
||||
expect(page_two.get_by_text("Woops! Someone else seems to")).to_be_visible()
|
||||
expect(page_two.get_by_text("Whoops! Other contributor(s) changed")).to_be_visible()
|
||||
with page_two.expect_response(re.compile(r".*/datalayer/update/.*")):
|
||||
page_two.get_by_role("button", name="Save anyway").click()
|
||||
page_two.get_by_text("Keep your changes and loose theirs").click()
|
||||
saved = DataLayer.objects.last()
|
||||
data = json.loads(Path(saved.geojson.path).read_text())
|
||||
assert data["features"][0]["properties"]["name"] == "custom name"
|
||||
|
|
Loading…
Reference in a new issue