From d81e6927cb3cb257e519a9fb853c1c989574f948 Mon Sep 17 00:00:00 2001 From: Jose Buitron Date: Thu, 11 Apr 2024 15:42:35 -0500 Subject: [PATCH] test: Fixed test --- src/storyMap/components/StoryMapForm.test.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/storyMap/components/StoryMapForm.test.js b/src/storyMap/components/StoryMapForm.test.js index f4df6673ff..6b4336dabf 100644 --- a/src/storyMap/components/StoryMapForm.test.js +++ b/src/storyMap/components/StoryMapForm.test.js @@ -91,6 +91,7 @@ beforeEach(() => { off: jest.fn(), getCanvas: jest.fn(), addControl: jest.fn(), + removeControl: jest.fn(), getCenter: jest.fn(), getZoom: jest.fn(), addSource: jest.fn(), @@ -380,6 +381,7 @@ test('StoryMapForm: Sidebar navigation', async () => { off: jest.fn(), getCanvas: jest.fn(), addControl: jest.fn(), + removeControl: jest.fn(), getCenter: () => ({ lng: -99.91122777353772, lat: 21.64458705609789 }), getZoom: jest.fn(), flyTo: jest.fn(), @@ -634,6 +636,7 @@ test('StoryMapForm: Change chapter location', async () => { off: jest.fn(), getCanvas: jest.fn(), addControl: jest.fn(), + removeControl: jest.fn(), addSource: jest.fn(), getSource: jest.fn(), addLayer: jest.fn(), @@ -706,6 +709,12 @@ test('StoryMapForm: Move chapter down with menu', async () => { name: 'Chapters sidebar', }); + await waitFor(() => + expect(within(chaptersSection).getByRole('button', { + name: 'Chapter 1', + })).toBeInTheDocument() + ) + const chapter1 = within(chaptersSection).getByRole('button', { name: 'Chapter 1', });