Interactive interface for browsing global, full-resolution satellite imagery
add/fix e2e tests #2931
Ben King64f551d6f1d9
diff --git a/e2e/features/palettes/disable-test.js b/e2e/features/palettes/disable-test.jsindex 6a55bca3d..81126b799 100644--- a/e2e/features/palettes/disable-test.js+++ b/e2e/features/palettes/disable-test.js@@ -9,12 +9,12 @@ module.exports = {normalizeViewport(client, 1000, 850);client.url(client.globals.url + enabledPermalink);},- 'Verify that toggling class updates permalink and layer-legend': function(client) {+ 'Verify that toggling class updates permalink and layer-legend': (client) => {client.waitForElementVisible('#active-Last_of_the_Wild_1995-2004', TIME_LIMIT, () => {client.expect.element('#active-Last_of_the_Wild_1995-2004 .disabled-classification').to.not.be.present;client.click('#active-Last_of_the_Wild_1995-2004 .wv-layers-options');client.waitForElementVisible('.layer-classification-toggle', 2000, () => {- client.click('.react-switch-case .react-switch-button');+ client.click('.classification-list .react-switch-case .react-switch-button');client.waitForElementVisible(`${classColorBoxId}0.disabled-classification`, TIME_LIMIT, () => {client.expect.element(`${classColorBoxId}1.disabled-classification`).to.not.be.present;client.assert.urlContains('(disabled=0)');@@ -22,7 +22,21 @@ module.exports = {});});},- 'Verify that loaded permalink disables classes': function(client) {+ 'Verify that toggling class-all off updates permalink and layer-legend': (client) => {+ client.click('.classification-switch-header .react-switch-case .react-switch-button');+ client.waitForElementVisible(`${classColorBoxId}15.disabled-classification`, TIME_LIMIT, () => {+ client.expect.element(`${classColorBoxId}0.disabled-classification`).to.be.present;+ client.expect.element(`${classColorBoxId}1.disabled-classification`).to.be.present;+ client.assert.urlContains('(disabled=0-1-2-3-4-5-6-7-8-9-10-11-12-13-14-15)');+ });+ },+ 'Verify that toggling class-all on updates permalink and layer-legend': (client) => {+ client.click('.classification-switch-header .react-switch-case .react-switch-button');+ client.pause(1000);+ client.expect.element(`${classColorBoxId}0.disabled-classification`).to.not.be.present;+ client.expect.element(`${classColorBoxId}15.disabled-classification`).to.not.be.present;+ },+ 'Verify that loaded permalink disables classes': (client) => {client.url(client.globals.url + disabledPermalink);client.waitForElementVisible(`${classColorBoxId}0`, TIME_LIMIT, () => {client.expect.element(`${classColorBoxId}0.disabled-classification`).to.be.present;diff --git a/web/js/components/layer/settings/classification-toggle.js b/web/js/components/layer/settings/classification-toggle.jsindex 1f4a7f689..aae447629 100644--- a/web/js/components/layer/settings/classification-toggle.js+++ b/web/js/components/layer/settings/classification-toggle.js@@ -34,7 +34,7 @@ export default function ClassificationToggle(props) {/></div>- <Scrollbar style={{ maxHeight: `${height}px` }}>+ <Scrollbar className="classification-list" style={{ maxHeight: `${height}px` }}>{legend.colors.map((color, index) => {const id = legend.id + index;const tooltip = tooltips[index];