diff --git a/frontend_tests/node_tests/settings_org.js b/frontend_tests/node_tests/settings_org.js index de0f3cc759..fde530ace2 100644 --- a/frontend_tests/node_tests/settings_org.js +++ b/frontend_tests/node_tests/settings_org.js @@ -58,7 +58,7 @@ function createSaveButtons(subsection) { const $stub_save_button_header = $(`#org-${CSS.escape(subsection)}`); const $save_button_controls = $(".save-button-controls"); const $stub_save_button = $(".save-discard-widget-button.save-button"); - const $stub_discard_button = $(`#org-discard-${CSS.escape(subsection)}`); + const $stub_discard_button = $(".save-discard-widget-button.discard-button"); const $stub_save_button_text = $(".save-discard-widget-button-text"); $stub_save_button_header.set_find_results( ".subsection-failed-status p", @@ -70,7 +70,7 @@ function createSaveButtons(subsection) { $stub_save_button_header.set_find_results(".save-button-controls", $save_button_controls); $stub_save_button_header.set_find_results( ".subsection-changes-discard button", - $(`#org-discard-${CSS.escape(subsection)}`), + $stub_discard_button, ); $save_button_controls.set_find_results(".discard-button", $stub_discard_button); const props = {}; @@ -439,7 +439,7 @@ function test_discard_changes_button(discard_changes) { const ev = { preventDefault: noop, stopPropagation: noop, - target: "#org-discard-msg-editing", + target: ".save-discard-widget-button.discard-button", }; page_params.realm_allow_edit_history = true; diff --git a/static/templates/settings/settings_save_discard_widget.hbs b/static/templates/settings/settings_save_discard_widget.hbs index 3b1243d551..81bb5a785e 100644 --- a/static/templates/settings/settings_save_discard_widget.hbs +++ b/static/templates/settings/settings_save_discard_widget.hbs @@ -10,7 +10,7 @@