Interactive interface for browsing global, full-resolution satellite imagery
encode layer id
Jason Kent43365734e7dd
diff --git a/e2e/features/smart-handoff/smart-handoff-test.js b/e2e/features/smart-handoff/smart-handoff-test.jsindex 5c7116fa7..84c98ab0a 100644--- a/e2e/features/smart-handoff/smart-handoff-test.js+++ b/e2e/features/smart-handoff/smart-handoff-test.js@@ -10,6 +10,7 @@ const TIME_LIMIT = 10000;const layersTab = '#layers-sidebar-tab';const dataTabButton = '#download-sidebar-tab';+const cloudRadiusRadioButton = '#MODIS_Aqua_Cloud_Effective_Radius-smart-handoff-choice';module.exports = {@@ -46,11 +47,9 @@ module.exports = {c.click(dataTabButton);// Ensure layer is now showing as an option for download- c.expect- .element('.smart-handoff-layer-list > .layer-item > #MODIS_Aqua_Cloud_Effective_Radius')- .to.be.present;+ c.expect.element(cloudRadiusRadioButton).to.be.present;- c.click('#MODIS_Aqua_Cloud_Effective_Radius');+ c.click(cloudRadiusRadioButton);// Verify granules and date are correctc.expectdiff --git a/web/js/containers/sidebar/smart-handoff.js b/web/js/containers/sidebar/smart-handoff.jsindex 50fe9513c..03edac36e 100644--- a/web/js/containers/sidebar/smart-handoff.js+++ b/web/js/containers/sidebar/smart-handoff.js@@ -280,6 +280,7 @@ class SmartHandoff extends Component {const dateSelection = moment.utc(selectedDate).format('YYYY MMM DD');+if (areThereLayersToDownload) {return (<div className="smart-handoff-side-panel">@@ -299,17 +300,18 @@ class SmartHandoff extends Component {<div className="smart-handoff-layer-list">{activeLayers.map((layer) => {if (layer.conceptId) {+ const inputId = `${util.encodeId(layer.id)}-smart-handoff-choice`;return (- <div className="layer-item" key={layer.id}>+ <div className="layer-item" key={inputId}><input- id={layer.id}+ id={inputId}type="radio"value={layer.conceptId}name="smart-handoff-layer-radio"checked={selectedLayer && selectedLayer.id === layer.id}onChange={() => this.onLayerChange(layer, currentExtent)}/>- <label htmlFor={layer.id}>{layer.title}</label>+ <label htmlFor={inputId}>{layer.title}</label><span>{layer.subtitle}</span></div>);