diff --git a/static/src/js/components/SpatialSelection/SpatialSelection.jsx b/static/src/js/components/SpatialSelection/SpatialSelection.jsx index ca98df44d8..e7b6d31e5b 100644 --- a/static/src/js/components/SpatialSelection/SpatialSelection.jsx +++ b/static/src/js/components/SpatialSelection/SpatialSelection.jsx @@ -536,13 +536,13 @@ const SpatialSelection = (props) => { const buttons = drawToolbar.querySelectorAll('.leaflet-draw-draw-circle, .leaflet-draw-draw-polygon, .leaflet-draw-draw-rectangle, .leaflet-draw-draw-marker') buttons.forEach((button) => { if (button.classList.contains('leaflet-draw-draw-circle')) { - button.setAttribute('aria-label', 'Draw by a spatial circle') + button.setAttribute('aria-label', 'Draw a spatial circle') } else if (button.classList.contains('leaflet-draw-draw-polygon')) { - button.setAttribute('aria-label', 'Draw by a spatial polygon') + button.setAttribute('aria-label', 'Draw a spatial polygon') } else if (button.classList.contains('leaflet-draw-draw-rectangle')) { - button.setAttribute('aria-label', 'Draw by a spatial rectangle') + button.setAttribute('aria-label', 'Draw a spatial rectangle') } else if (button.classList.contains('leaflet-draw-draw-marker')) { - button.setAttribute('aria-label', 'Draw by a spatial coordinate') + button.setAttribute('aria-label', 'Draw a spatial coordinate') } }) } diff --git a/tests/e2e/map/map_spatial.spec.js b/tests/e2e/map/map_spatial.spec.js index 2cee8a8ed6..a691dd8008 100644 --- a/tests/e2e/map/map_spatial.spec.js +++ b/tests/e2e/map/map_spatial.spec.js @@ -54,7 +54,7 @@ test.describe('Map: Spatial interactions', () => { // Select the point spatial type await page.getByRole('button', { name: 'spatial-selection-dropdown' }).click() - await page.getByRole('button', { name: 'Select Point' }).click() + await page.getByRole('button', { name: 'Point' }).click() // Add the point to the map await page.mouse.click(1000, 500) @@ -90,7 +90,7 @@ test.describe('Map: Spatial interactions', () => { await page.goto('/') // Select the point spatial type - await page.getByRole('link', { name: 'Search by spatial coordinate' }).click() + await page.getByRole('link', { name: 'Draw a spatial coordinate' }).click() // Add the point to the map await page.mouse.click(1000, 500) @@ -127,7 +127,7 @@ test.describe('Map: Spatial interactions', () => { // Select the point spatial type await page.getByRole('button', { name: 'spatial-selection-dropdown' }).click() - await page.getByRole('button', { name: 'Select Point' }).click() + await page.getByRole('button', { name: 'Point' }).click() // Enter the spatial point await page.getByTestId('spatial-display_point').focus() @@ -173,7 +173,7 @@ test.describe('Map: Spatial interactions', () => { await page.goto('/') // Select the point spatial type - await page.getByRole('link', { name: 'Search by spatial coordinate' }).click() + await page.getByRole('link', { name: 'Draw a spatial coordinate' }).click() // Add the point to the map await page.mouse.click(1000, 500) @@ -234,7 +234,7 @@ test.describe('Map: Spatial interactions', () => { // Select the circle spatial type await page.getByRole('button', { name: 'spatial-selection-dropdown' }).click() - await page.getByRole('button', { name: 'Select Circle' }).click() + await page.getByRole('button', { name: 'Circle' }).click() // Add the circle to the map await page.mouse.move(1000, 500) @@ -274,7 +274,7 @@ test.describe('Map: Spatial interactions', () => { await page.goto('/') // Select the circle spatial type - await page.getByRole('link', { name: 'Search by spatial circle' }).click() + await page.getByRole('link', { name: 'Draw a spatial circle' }).click() // Add the point to the map await page.mouse.move(1000, 500) @@ -315,7 +315,7 @@ test.describe('Map: Spatial interactions', () => { // Select the circle spatial type await page.getByRole('button', { name: 'spatial-selection-dropdown' }).click() - await page.getByRole('button', { name: 'Select Circle' }).click() + await page.getByRole('button', { name: 'Circle' }).click() // Enter the circle values await page.getByTestId('spatial-display_circle-center').focus() @@ -364,7 +364,7 @@ test.describe('Map: Spatial interactions', () => { await page.goto('/') // Select the circle spatial type - await page.getByRole('link', { name: 'Search by spatial circle' }).click() + await page.getByRole('link', { name: 'Draw a spatial circle' }).click() // Add the point to the map await page.mouse.move(1000, 500) @@ -431,7 +431,7 @@ test.describe('Map: Spatial interactions', () => { // Select the bounding box spatial type await page.getByRole('button', { name: 'spatial-selection-dropdown' }).click() - await page.getByRole('button', { name: 'Select Rectangle' }).click() + await page.getByRole('button', { name: 'Rectangle' }).click() // Add the bounding box to the map await page.mouse.click(1000, 500) @@ -510,7 +510,7 @@ test.describe('Map: Spatial interactions', () => { // Select the bounding box spatial type await page.getByRole('button', { name: 'spatial-selection-dropdown' }).click() - await page.getByRole('button', { name: 'Select Rectangle' }).click() + await page.getByRole('button', { name: 'Rectangle' }).click() // Enter the bounding box values await page.getByTestId('spatial-display_southwest-point').focus() @@ -562,7 +562,7 @@ test.describe('Map: Spatial interactions', () => { // Select the bounding box spatial type await page.getByRole('button', { name: 'spatial-selection-dropdown' }).click() - await page.getByRole('button', { name: 'Select Rectangle' }).click() + await page.getByRole('button', { name: 'Rectangle' }).click() // Add the bounding box to the map await page.mouse.click(1000, 500) @@ -627,7 +627,7 @@ test.describe('Map: Spatial interactions', () => { // Select the polygon spatial type await page.getByRole('button', { name: 'spatial-selection-dropdown' }).click() - await page.getByRole('button', { name: 'Select Polygon' }).click() + await page.getByRole('button', { name: 'Polygon' }).click() // Add the polygon to the map await page.mouse.click(1000, 500) @@ -741,7 +741,7 @@ test.describe('Map: Spatial interactions', () => { // Select the polygon spatial type await page.getByRole('button', { name: 'spatial-selection-dropdown' }).click() - await page.getByRole('button', { name: 'Select Polygon' }).click() + await page.getByRole('button', { name: 'Polygon' }).click() // Add the polygon to the map await page.mouse.click(1000, 500)