Skip to content

Commit

Permalink
EDSC-4343 Fixing broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dpesall committed Jan 8, 2025
1 parent 1c9e227 commit 3907211
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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')
}
})
}
Expand Down
26 changes: 13 additions & 13 deletions tests/e2e/map/map_spatial.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 3907211

Please sign in to comment.