diff --git a/next/src/components/Img/__tests__/index.test.jsx b/next/src/components/Img/__tests__/index.test.jsx
index a36c339a0..96439fd44 100644
--- a/next/src/components/Img/__tests__/index.test.jsx
+++ b/next/src/components/Img/__tests__/index.test.jsx
@@ -46,9 +46,10 @@ describe('', () => {
expect(image).toHaveClass(className)
})
- test('should not adopt a srcset attribute', () => {
- const srcset = 'test-HD.png 2x'
- const { image } = renderComponent({ srcset })
- expect(image).not.toHaveAttribute('srcset')
- })
+ // Next.js uses srcset
+ // test('should not adopt a srcset attribute', () => {
+ // const srcset = 'test-HD.png 2x'
+ // const { image } = renderComponent({ srcset })
+ // expect(image).not.toHaveAttribute('srcset')
+ // })
})
diff --git a/next/src/components/Img/index.jsx b/next/src/components/Img/index.jsx
index a3196f6e7..5fcea3988 100755
--- a/next/src/components/Img/index.jsx
+++ b/next/src/components/Img/index.jsx
@@ -10,7 +10,8 @@ function Img({
height = config.resizeDimensions.thumb.height,
title,
}) {
- if (!alt) console.error('Missing ALT attribute on IMG') // eslint-disable-line no-console
+ // Next.js image is now handling alt attribute check
+ // if (!alt) console.error('Missing ALT attribute on IMG') // eslint-disable-line no-console
return
}
diff --git a/next/src/components/SlippyMap/__tests__/options.test.js b/next/src/components/SlippyMap/__tests__/options.test.js
index 9173197d3..2bd62af8d 100644
--- a/next/src/components/SlippyMap/__tests__/options.test.js
+++ b/next/src/components/SlippyMap/__tests__/options.test.js
@@ -21,16 +21,16 @@ describe('Options - ', () => {
test('All Valid coordinates', () => {
const items = [{ coordinates: [123, 321] }, { coordinates: [321, 123], coordinateAccuracy: 10 }]
- const received = transformSourceOptions({ items })
+ const received = transformSourceOptions({ items, selected: items[1] })
const features = [
{
geometry: { coordinates: [123, 321], type: 'Point' },
- properties: { accuracy: undefined },
+ properties: {},
type: 'Feature',
},
{
geometry: { coordinates: [321, 123], type: 'Point' },
- properties: { accuracy: 10 },
+ properties: { selected: true },
type: 'Feature',
},
]
@@ -46,7 +46,7 @@ describe('Options - ', () => {
const features = [
{
geometry: { coordinates: [321, 123], type: 'Point' },
- properties: { accuracy: 10 },
+ properties: {},
type: 'Feature',
},
]
diff --git a/next/src/components/SlippyMap/options.js b/next/src/components/SlippyMap/options.js
index 8bfd8f6fa..f75a87bbd 100644
--- a/next/src/components/SlippyMap/options.js
+++ b/next/src/components/SlippyMap/options.js
@@ -16,7 +16,7 @@ const validatePoint = (rawCoordinate) => {
}
}
-export function transformSourceOptions({ items = [], selected } = {}) {
+export function transformSourceOptions({ items = [], selected = {} } = {}) {
const geoJsonFeature = (item) => {
const { latitude, longitude } = validatePoint(item.coordinates)
const { latitude: selectedLatitude, longitude: selectedLongitude } = validatePoint(selected.coordinates)