From 5aefc40330facc8979d74b8418353abb695bd01c Mon Sep 17 00:00:00 2001 From: decaffeinate Date: Mon, 6 Dec 2021 16:12:46 +0000 Subject: [PATCH 01/12] decaffeinate: Rename accessibility_test.coffee and 20 other files from .coffee to .js --- .../system/{accessibility_test.coffee => accessibility_test.js} | 0 ...{attachment_caption_test.coffee => attachment_caption_test.js} | 0 ...{attachment_gallery_test.coffee => attachment_gallery_test.js} | 0 src/test/system/{attachment_test.coffee => attachment_test.js} | 0 src/test/system/{basic_input_test.coffee => basic_input_test.js} | 0 .../{block_formatting_test.coffee => block_formatting_test.js} | 0 src/test/system/{caching_test.coffee => caching_test.js} | 0 .../system/{canceled_input_test.coffee => canceled_input_test.js} | 0 .../{composition_input_test.coffee => composition_input_test.js} | 0 .../{cursor_movement_test.coffee => cursor_movement_test.js} | 0 .../system/{custom_element_test.coffee => custom_element_test.js} | 0 .../system/{html_loading_test.coffee => html_loading_test.js} | 0 .../system/{html_reparsing_test.coffee => html_reparsing_test.js} | 0 .../{html_replacement_test.coffee => html_replacement_test.js} | 0 ...tallation_process_test.coffee => installation_process_test.js} | 0 .../system/{level_2_input_test.coffee => level_2_input_test.js} | 0 .../{list_formatting_test.coffee => list_formatting_test.js} | 0 .../system/{mutation_input_test.coffee => mutation_input_test.js} | 0 src/test/system/{pasting_test.coffee => pasting_test.js} | 0 .../{text_formatting_test.coffee => text_formatting_test.js} | 0 src/test/system/{undo_test.coffee => undo_test.js} | 0 21 files changed, 0 insertions(+), 0 deletions(-) rename src/test/system/{accessibility_test.coffee => accessibility_test.js} (100%) rename src/test/system/{attachment_caption_test.coffee => attachment_caption_test.js} (100%) rename src/test/system/{attachment_gallery_test.coffee => attachment_gallery_test.js} (100%) rename src/test/system/{attachment_test.coffee => attachment_test.js} (100%) rename src/test/system/{basic_input_test.coffee => basic_input_test.js} (100%) rename src/test/system/{block_formatting_test.coffee => block_formatting_test.js} (100%) rename src/test/system/{caching_test.coffee => caching_test.js} (100%) rename src/test/system/{canceled_input_test.coffee => canceled_input_test.js} (100%) rename src/test/system/{composition_input_test.coffee => composition_input_test.js} (100%) rename src/test/system/{cursor_movement_test.coffee => cursor_movement_test.js} (100%) rename src/test/system/{custom_element_test.coffee => custom_element_test.js} (100%) rename src/test/system/{html_loading_test.coffee => html_loading_test.js} (100%) rename src/test/system/{html_reparsing_test.coffee => html_reparsing_test.js} (100%) rename src/test/system/{html_replacement_test.coffee => html_replacement_test.js} (100%) rename src/test/system/{installation_process_test.coffee => installation_process_test.js} (100%) rename src/test/system/{level_2_input_test.coffee => level_2_input_test.js} (100%) rename src/test/system/{list_formatting_test.coffee => list_formatting_test.js} (100%) rename src/test/system/{mutation_input_test.coffee => mutation_input_test.js} (100%) rename src/test/system/{pasting_test.coffee => pasting_test.js} (100%) rename src/test/system/{text_formatting_test.coffee => text_formatting_test.js} (100%) rename src/test/system/{undo_test.coffee => undo_test.js} (100%) diff --git a/src/test/system/accessibility_test.coffee b/src/test/system/accessibility_test.js similarity index 100% rename from src/test/system/accessibility_test.coffee rename to src/test/system/accessibility_test.js diff --git a/src/test/system/attachment_caption_test.coffee b/src/test/system/attachment_caption_test.js similarity index 100% rename from src/test/system/attachment_caption_test.coffee rename to src/test/system/attachment_caption_test.js diff --git a/src/test/system/attachment_gallery_test.coffee b/src/test/system/attachment_gallery_test.js similarity index 100% rename from src/test/system/attachment_gallery_test.coffee rename to src/test/system/attachment_gallery_test.js diff --git a/src/test/system/attachment_test.coffee b/src/test/system/attachment_test.js similarity index 100% rename from src/test/system/attachment_test.coffee rename to src/test/system/attachment_test.js diff --git a/src/test/system/basic_input_test.coffee b/src/test/system/basic_input_test.js similarity index 100% rename from src/test/system/basic_input_test.coffee rename to src/test/system/basic_input_test.js diff --git a/src/test/system/block_formatting_test.coffee b/src/test/system/block_formatting_test.js similarity index 100% rename from src/test/system/block_formatting_test.coffee rename to src/test/system/block_formatting_test.js diff --git a/src/test/system/caching_test.coffee b/src/test/system/caching_test.js similarity index 100% rename from src/test/system/caching_test.coffee rename to src/test/system/caching_test.js diff --git a/src/test/system/canceled_input_test.coffee b/src/test/system/canceled_input_test.js similarity index 100% rename from src/test/system/canceled_input_test.coffee rename to src/test/system/canceled_input_test.js diff --git a/src/test/system/composition_input_test.coffee b/src/test/system/composition_input_test.js similarity index 100% rename from src/test/system/composition_input_test.coffee rename to src/test/system/composition_input_test.js diff --git a/src/test/system/cursor_movement_test.coffee b/src/test/system/cursor_movement_test.js similarity index 100% rename from src/test/system/cursor_movement_test.coffee rename to src/test/system/cursor_movement_test.js diff --git a/src/test/system/custom_element_test.coffee b/src/test/system/custom_element_test.js similarity index 100% rename from src/test/system/custom_element_test.coffee rename to src/test/system/custom_element_test.js diff --git a/src/test/system/html_loading_test.coffee b/src/test/system/html_loading_test.js similarity index 100% rename from src/test/system/html_loading_test.coffee rename to src/test/system/html_loading_test.js diff --git a/src/test/system/html_reparsing_test.coffee b/src/test/system/html_reparsing_test.js similarity index 100% rename from src/test/system/html_reparsing_test.coffee rename to src/test/system/html_reparsing_test.js diff --git a/src/test/system/html_replacement_test.coffee b/src/test/system/html_replacement_test.js similarity index 100% rename from src/test/system/html_replacement_test.coffee rename to src/test/system/html_replacement_test.js diff --git a/src/test/system/installation_process_test.coffee b/src/test/system/installation_process_test.js similarity index 100% rename from src/test/system/installation_process_test.coffee rename to src/test/system/installation_process_test.js diff --git a/src/test/system/level_2_input_test.coffee b/src/test/system/level_2_input_test.js similarity index 100% rename from src/test/system/level_2_input_test.coffee rename to src/test/system/level_2_input_test.js diff --git a/src/test/system/list_formatting_test.coffee b/src/test/system/list_formatting_test.js similarity index 100% rename from src/test/system/list_formatting_test.coffee rename to src/test/system/list_formatting_test.js diff --git a/src/test/system/mutation_input_test.coffee b/src/test/system/mutation_input_test.js similarity index 100% rename from src/test/system/mutation_input_test.coffee rename to src/test/system/mutation_input_test.js diff --git a/src/test/system/pasting_test.coffee b/src/test/system/pasting_test.js similarity index 100% rename from src/test/system/pasting_test.coffee rename to src/test/system/pasting_test.js diff --git a/src/test/system/text_formatting_test.coffee b/src/test/system/text_formatting_test.js similarity index 100% rename from src/test/system/text_formatting_test.coffee rename to src/test/system/text_formatting_test.js diff --git a/src/test/system/undo_test.coffee b/src/test/system/undo_test.js similarity index 100% rename from src/test/system/undo_test.coffee rename to src/test/system/undo_test.js From 9fa192be8a6cfa5af8a4dcba96481e38e2da4220 Mon Sep 17 00:00:00 2001 From: decaffeinate Date: Mon, 6 Dec 2021 16:12:49 +0000 Subject: [PATCH 02/12] decaffeinate: Convert accessibility_test.coffee and 20 other files to JS --- src/test/system/accessibility_test.js | 60 +- src/test/system/attachment_caption_test.js | 82 +- src/test/system/attachment_gallery_test.js | 89 +- src/test/system/attachment_test.js | 178 +-- src/test/system/basic_input_test.js | 128 +- src/test/system/block_formatting_test.js | 1159 +++++++++--------- src/test/system/caching_test.js | 41 +- src/test/system/canceled_input_test.js | 84 +- src/test/system/composition_input_test.js | 341 +++--- src/test/system/cursor_movement_test.js | 124 +- src/test/system/custom_element_test.js | 940 +++++++------- src/test/system/html_loading_test.js | 190 +-- src/test/system/html_reparsing_test.js | 56 +- src/test/system/html_replacement_test.js | 243 ++-- src/test/system/installation_process_test.js | 127 +- src/test/system/level_2_input_test.js | 512 ++++---- src/test/system/list_formatting_test.js | 139 +-- src/test/system/mutation_input_test.js | 246 ++-- src/test/system/pasting_test.js | 496 ++++---- src/test/system/text_formatting_test.js | 383 +++--- src/test/system/undo_test.js | 130 +- 21 files changed, 3017 insertions(+), 2731 deletions(-) diff --git a/src/test/system/accessibility_test.js b/src/test/system/accessibility_test.js index 285634b41..16c539d35 100644 --- a/src/test/system/accessibility_test.js +++ b/src/test/system/accessibility_test.js @@ -1,31 +1,43 @@ -import { assert, test, testGroup, triggerEvent } from "test/test_helper" +/* + * decaffeinate suggestions: + * DS102: Remove unnecessary code created because of implicit returns + * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md + */ +import { assert, test, testGroup, triggerEvent } from "test/test_helper"; -testGroup "Accessibility attributes", template: "editor_default_aria_label", -> - test "sets the role to textbox", -> - editor = document.getElementById("editor-without-labels") - assert.equal editor.getAttribute("role"), "textbox" +testGroup("Accessibility attributes", {template: "editor_default_aria_label"}, function() { + test("sets the role to textbox", function() { + const editor = document.getElementById("editor-without-labels"); + return assert.equal(editor.getAttribute("role"), "textbox"); + }); - test "does not set aria-label when the element has no