ember-inspector 4.13.1-alpha.2024.8.8 → 4.13.1-alpha.2025.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -2
- package/app/components/app-picker.hbs +2 -2
- package/app/components/component-tree-item.hbs +13 -13
- package/app/components/component-tree-toolbar.hbs +3 -3
- package/app/components/{date-property-field.js → date-property-field.ts} +6 -5
- package/app/components/deprecation-item-source.hbs +1 -1
- package/app/components/deprecation-item.hbs +1 -1
- package/app/components/deprecations-toolbar.hbs +1 -1
- package/app/components/item-types.hbs +7 -7
- package/app/components/list-cell.hbs +3 -3
- package/app/components/list-content.hbs +4 -3
- package/app/components/list-content.ts +96 -0
- package/app/components/list.hbs +3 -3
- package/app/components/list.js +7 -7
- package/app/components/model-types-toolbar.hbs +3 -3
- package/app/components/object-inspector/dependent-keys.hbs +4 -4
- package/app/components/object-inspector/errors.hbs +4 -4
- package/app/components/object-inspector/properties-all.hbs +1 -1
- package/app/components/object-inspector/properties-grouped.hbs +5 -5
- package/app/components/object-inspector/property.hbs +16 -16
- package/app/components/object-inspector/property.ts +26 -17
- package/app/components/object-inspector/sort-properties.js +12 -4
- package/app/components/object-inspector.hbs +8 -8
- package/app/components/object-inspector.js +1 -1
- package/app/components/promise-item.hbs +11 -11
- package/app/components/promise-item.js +8 -6
- package/app/components/promise-tree-toolbar.hbs +5 -5
- package/app/components/records-toolbar.hbs +2 -2
- package/app/components/render-item.hbs +4 -4
- package/app/components/render-item.ts +12 -9
- package/app/components/render-tree-toolbar.hbs +1 -1
- package/app/components/route-cell-name.hbs +1 -1
- package/app/components/route-cell-name.js +3 -2
- package/app/components/route-tree-toolbar.hbs +2 -2
- package/app/components/scroll-container.js +2 -0
- package/app/components/side-nav.hbs +5 -5
- package/app/components/side-nav.js +1 -1
- package/app/computed/{debounce.js → debounce.ts} +7 -5
- package/app/config/environment.d.ts +5 -2
- package/app/controllers/app-config.js +1 -0
- package/app/controllers/application.js +33 -34
- package/app/controllers/component-tree.js +3 -2
- package/app/controllers/container-type.js +2 -1
- package/app/controllers/container-types/{index.js → index.ts} +5 -2
- package/app/controllers/container-types.js +3 -6
- package/app/controllers/deprecations.js +16 -11
- package/app/controllers/libraries.js +1 -0
- package/app/controllers/model-types.js +1 -0
- package/app/controllers/promise-tree.ts +149 -0
- package/app/controllers/records.js +18 -26
- package/app/controllers/{render-tree.js → render-tree.ts} +54 -45
- package/app/controllers/route-tree.js +7 -5
- package/app/helpers/build-style.js +1 -1
- package/app/initializers/setup.js +1 -1
- package/app/libs/promise-assembler.ts +249 -0
- package/app/libs/resizable-columns.js +10 -10
- package/app/models/{promise.js → promise.ts} +72 -69
- package/app/{router.js → router.ts} +1 -1
- package/app/routes/app-detected.js +3 -5
- package/app/routes/application.js +6 -12
- package/app/routes/deprecations.js +7 -16
- package/app/routes/launch.js +2 -1
- package/app/routes/libraries.js +2 -1
- package/app/routes/model-type.js +2 -3
- package/app/routes/model-types.ts +57 -0
- package/app/routes/promise-tree.ts +63 -0
- package/app/routes/records.ts +78 -0
- package/app/routes/render-tree.ts +93 -0
- package/app/routes/route-tree.js +0 -1
- package/app/routes/{tab.js → tab.ts} +9 -2
- package/app/routes/whats-new.js +1 -1
- package/app/services/adapters/{basic.js → basic.ts} +36 -30
- package/app/services/adapters/{bookmarklet.js → bookmarklet.ts} +17 -24
- package/app/services/adapters/{chrome.js → chrome.ts} +1 -2
- package/app/services/adapters/{web-extension.js → web-extension.ts} +43 -46
- package/app/services/adapters/websocket.ts +40 -0
- package/app/services/layout.ts +88 -0
- package/app/services/port.ts +195 -0
- package/app/services/storage/{local.js → local.ts} +7 -20
- package/app/services/storage/{memory.js → memory.ts} +6 -21
- package/app/services/{storage.js → storage.ts} +9 -20
- package/app/styles/base.scss +4 -2
- package/app/styles/colors.scss +33 -31
- package/app/styles/component_tree.scss +56 -51
- package/app/styles/dropdown.scss +2 -2
- package/app/styles/ember-table.scss +3 -3
- package/app/styles/mixin.scss +26 -26
- package/app/styles/object_inspector.scss +22 -21
- package/app/styles/utils.scss +408 -122
- package/app/templates/application.hbs +11 -11
- package/app/templates/component-tree.hbs +1 -1
- package/app/templates/deprecations.hbs +2 -3
- package/app/templates/info.hbs +10 -10
- package/app/templates/promise-tree.hbs +1 -1
- package/app/templates/render-tree.hbs +1 -1
- package/app/templates/route-tree.hbs +1 -1
- package/app/utils/escape-reg-exp.ts +3 -2
- package/app/utils/nullish.ts +7 -0
- package/app/utils/parse-text.ts +4 -5
- package/app/utils/truncate.js +0 -1
- package/config/ember-cli-update.json +5 -3
- package/config/ember-try.js +117 -72
- package/config/environment.js +1 -1
- package/config/optional-features.json +2 -1
- package/dist/bookmarklet/load_inspector.js +30 -11
- package/dist/bookmarklet/panes-3-16-0/assets/chunk.443.86a005e528b587663b78.js +1135 -0
- package/dist/bookmarklet/panes-3-16-0/assets/chunk.443.86a005e528b587663b78.js.LICENSE.txt +18 -0
- package/dist/bookmarklet/panes-3-16-0/assets/chunk.524.6a5edcbbcf29cbe1b167.js +40 -0
- package/dist/bookmarklet/panes-3-16-0/assets/chunk.582.b77d8494154b524e9f91.js +42 -0
- package/dist/bookmarklet/panes-3-16-0/assets/ember-inspector.css +150 -155
- package/dist/bookmarklet/panes-3-16-0/assets/ember-inspector.js +486 -590
- package/dist/bookmarklet/panes-3-16-0/assets/svg/ellipsis.svg +3 -3
- package/dist/bookmarklet/panes-3-16-0/assets/svg/nav-bug.svg +1 -1
- package/dist/bookmarklet/panes-3-16-0/assets/svg/nav-components.svg +2 -2
- package/dist/bookmarklet/panes-3-16-0/assets/svg/nav-container.svg +1 -1
- package/dist/bookmarklet/panes-3-16-0/assets/svg/nav-data.svg +1 -1
- package/dist/bookmarklet/panes-3-16-0/assets/svg/nav-deprecations.svg +3 -3
- package/dist/bookmarklet/panes-3-16-0/assets/svg/nav-info.svg +3 -3
- package/dist/bookmarklet/panes-3-16-0/assets/svg/nav-promises.svg +2 -2
- package/dist/bookmarklet/panes-3-16-0/assets/svg/nav-render-performance.svg +2 -2
- package/dist/bookmarklet/panes-3-16-0/assets/svg/nav-route-tree.svg +7 -7
- package/dist/bookmarklet/panes-3-16-0/assets/vendor.css +147 -148
- package/dist/bookmarklet/panes-3-16-0/assets/vendor.js +5153 -5980
- package/dist/bookmarklet/panes-3-16-0/ember_debug.js +250 -268
- package/dist/bookmarklet/panes-3-16-0/index.html +3 -4
- package/dist/chrome/background.js +26 -21
- package/dist/chrome/boot.js +1 -1
- package/dist/chrome/content-script.js +11 -11
- package/dist/chrome/devtools.js +12 -3
- package/dist/chrome/manifest.json +2 -2
- package/dist/chrome/options.js +17 -12
- package/dist/chrome/panes-3-16-0/assets/chunk.443.86a005e528b587663b78.js +1135 -0
- package/dist/chrome/panes-3-16-0/assets/chunk.443.86a005e528b587663b78.js.LICENSE.txt +18 -0
- package/dist/chrome/panes-3-16-0/assets/chunk.524.6a5edcbbcf29cbe1b167.js +40 -0
- package/dist/chrome/panes-3-16-0/assets/chunk.582.b77d8494154b524e9f91.js +42 -0
- package/dist/chrome/panes-3-16-0/assets/ember-inspector.css +150 -155
- package/dist/chrome/panes-3-16-0/assets/ember-inspector.js +486 -590
- package/dist/chrome/panes-3-16-0/assets/svg/ellipsis.svg +3 -3
- package/dist/chrome/panes-3-16-0/assets/svg/nav-bug.svg +1 -1
- package/dist/chrome/panes-3-16-0/assets/svg/nav-components.svg +2 -2
- package/dist/chrome/panes-3-16-0/assets/svg/nav-container.svg +1 -1
- package/dist/chrome/panes-3-16-0/assets/svg/nav-data.svg +1 -1
- package/dist/chrome/panes-3-16-0/assets/svg/nav-deprecations.svg +3 -3
- package/dist/chrome/panes-3-16-0/assets/svg/nav-info.svg +3 -3
- package/dist/chrome/panes-3-16-0/assets/svg/nav-promises.svg +2 -2
- package/dist/chrome/panes-3-16-0/assets/svg/nav-render-performance.svg +2 -2
- package/dist/chrome/panes-3-16-0/assets/svg/nav-route-tree.svg +7 -7
- package/dist/chrome/panes-3-16-0/assets/vendor.css +147 -148
- package/dist/chrome/panes-3-16-0/assets/vendor.js +5153 -5980
- package/dist/chrome/panes-3-16-0/ember_debug.js +250 -268
- package/dist/chrome/panes-3-16-0/index.html +3 -4
- package/dist/chrome/scripts/in-page-script.js +19 -13
- package/dist/firefox/background.js +26 -21
- package/dist/firefox/boot.js +1 -1
- package/dist/firefox/content-script.js +11 -11
- package/dist/firefox/devtools.js +12 -3
- package/dist/firefox/manifest.json +2 -2
- package/dist/firefox/options.js +17 -12
- package/dist/firefox/panes-3-16-0/assets/chunk.443.86a005e528b587663b78.js +1135 -0
- package/dist/firefox/panes-3-16-0/assets/chunk.443.86a005e528b587663b78.js.LICENSE.txt +18 -0
- package/dist/firefox/panes-3-16-0/assets/chunk.524.6a5edcbbcf29cbe1b167.js +40 -0
- package/dist/firefox/panes-3-16-0/assets/chunk.582.b77d8494154b524e9f91.js +42 -0
- package/dist/firefox/panes-3-16-0/assets/ember-inspector.css +150 -155
- package/dist/firefox/panes-3-16-0/assets/ember-inspector.js +486 -590
- package/dist/firefox/panes-3-16-0/assets/svg/ellipsis.svg +3 -3
- package/dist/firefox/panes-3-16-0/assets/svg/nav-bug.svg +1 -1
- package/dist/firefox/panes-3-16-0/assets/svg/nav-components.svg +2 -2
- package/dist/firefox/panes-3-16-0/assets/svg/nav-container.svg +1 -1
- package/dist/firefox/panes-3-16-0/assets/svg/nav-data.svg +1 -1
- package/dist/firefox/panes-3-16-0/assets/svg/nav-deprecations.svg +3 -3
- package/dist/firefox/panes-3-16-0/assets/svg/nav-info.svg +3 -3
- package/dist/firefox/panes-3-16-0/assets/svg/nav-promises.svg +2 -2
- package/dist/firefox/panes-3-16-0/assets/svg/nav-render-performance.svg +2 -2
- package/dist/firefox/panes-3-16-0/assets/svg/nav-route-tree.svg +7 -7
- package/dist/firefox/panes-3-16-0/assets/vendor.css +147 -148
- package/dist/firefox/panes-3-16-0/assets/vendor.js +5153 -5980
- package/dist/firefox/panes-3-16-0/ember_debug.js +250 -268
- package/dist/firefox/panes-3-16-0/index.html +3 -4
- package/dist/firefox/scripts/in-page-script.js +19 -13
- package/dist/websocket/assets/chunk.443.86a005e528b587663b78.js +1135 -0
- package/dist/websocket/assets/chunk.443.86a005e528b587663b78.js.LICENSE.txt +18 -0
- package/dist/websocket/assets/chunk.524.6a5edcbbcf29cbe1b167.js +40 -0
- package/dist/websocket/assets/chunk.582.b77d8494154b524e9f91.js +42 -0
- package/dist/websocket/assets/ember-inspector.css +150 -155
- package/dist/websocket/assets/ember-inspector.js +486 -590
- package/dist/websocket/assets/svg/ellipsis.svg +3 -3
- package/dist/websocket/assets/svg/nav-bug.svg +1 -1
- package/dist/websocket/assets/svg/nav-components.svg +2 -2
- package/dist/websocket/assets/svg/nav-container.svg +1 -1
- package/dist/websocket/assets/svg/nav-data.svg +1 -1
- package/dist/websocket/assets/svg/nav-deprecations.svg +3 -3
- package/dist/websocket/assets/svg/nav-info.svg +3 -3
- package/dist/websocket/assets/svg/nav-promises.svg +2 -2
- package/dist/websocket/assets/svg/nav-render-performance.svg +2 -2
- package/dist/websocket/assets/svg/nav-route-tree.svg +7 -7
- package/dist/websocket/assets/vendor.css +147 -148
- package/dist/websocket/assets/vendor.js +5153 -5980
- package/dist/websocket/ember_debug.js +250 -268
- package/dist/websocket/index.html +3 -4
- package/ember-cli-build.js +11 -11
- package/ember_debug/adapters/basic.js +2 -1
- package/ember_debug/adapters/bookmarklet.js +1 -0
- package/ember_debug/adapters/firefox.js +3 -3
- package/ember_debug/adapters/web-extension.js +2 -1
- package/ember_debug/data-debug.js +5 -6
- package/ember_debug/deprecation-debug.js +8 -8
- package/ember_debug/general-debug.js +1 -1
- package/ember_debug/libs/capture-render-tree.js +0 -1
- package/ember_debug/libs/promise-assembler.js +1 -0
- package/ember_debug/libs/render-tree.js +13 -12
- package/ember_debug/libs/source-map.js +5 -4
- package/ember_debug/libs/view-inspection.js +12 -12
- package/ember_debug/main.js +1 -1
- package/ember_debug/models/profile-manager.js +2 -1
- package/ember_debug/object-inspector.js +19 -18
- package/ember_debug/port.js +1 -0
- package/ember_debug/promise-debug.js +1 -1
- package/ember_debug/route-debug.js +3 -2
- package/ember_debug/services/session.js +1 -1
- package/ember_debug/utils/classify.js +1 -1
- package/ember_debug/utils/ember/debug.js +2 -0
- package/ember_debug/utils/ember/loader.js +2 -2
- package/ember_debug/utils/ember/runloop.js +2 -0
- package/ember_debug/utils/ember-object-names.js +2 -2
- package/ember_debug/utils/ember.js +9 -3
- package/ember_debug/utils/evented.js +1 -1
- package/ember_debug/utils/get-object-name.js +2 -2
- package/ember_debug/utils/rsvp.js +1 -0
- package/ember_debug/utils/type-check.js +5 -1
- package/ember_debug/vendor/startup-wrapper.js +4 -1
- package/ember_debug/view-debug.js +3 -2
- package/eslint.config.mjs +172 -0
- package/gulpfile.js +1 -1
- package/lib/ui/addon/components/drag-handle.hbs +4 -4
- package/lib/ui/addon/components/drag-handle.js +3 -1
- package/lib/ui/addon/components/empty-message.hbs +1 -1
- package/lib/ui/addon/components/error-page.hbs +3 -3
- package/lib/ui/addon/components/resizable-column.js +1 -1
- package/lib/ui/addon/components/toolbar-clear-button.hbs +1 -1
- package/lib/ui/addon/components/toolbar-reload-button.hbs +1 -1
- package/lib/ui/addon/components/toolbar-search-field.hbs +2 -2
- package/lib/ui/addon/styles/_disclosure-triangle.scss +3 -1
- package/lib/ui/addon/styles/_drag-handle.scss +7 -7
- package/lib/ui/addon/styles/_empty-message.scss +1 -1
- package/lib/ui/addon/styles/_error-page.scss +8 -7
- package/lib/ui/addon/styles/_list.scss +46 -45
- package/lib/ui/addon/styles/_nav.scss +29 -27
- package/lib/ui/addon/styles/_object-inspector-toggle.scss +5 -5
- package/lib/ui/addon/styles/_pill.scss +4 -4
- package/lib/ui/addon/styles/_send-to-console.scss +1 -1
- package/lib/ui/addon/styles/_split.scss +17 -20
- package/lib/ui/addon/styles/addon.scss +13 -13
- package/lib/ui/addon/styles/toolbar/_checkbox.scss +5 -5
- package/lib/ui/addon/styles/toolbar/_icon-button.scss +44 -25
- package/lib/ui/addon/styles/toolbar/_index.scss +6 -5
- package/lib/ui/addon/styles/toolbar/_radio.scss +10 -10
- package/lib/ui/addon/styles/toolbar/_search.scss +5 -3
- package/package.json +85 -86
- package/public/assets/svg/ellipsis.svg +3 -3
- package/public/assets/svg/nav-bug.svg +1 -1
- package/public/assets/svg/nav-components.svg +2 -2
- package/public/assets/svg/nav-container.svg +1 -1
- package/public/assets/svg/nav-data.svg +1 -1
- package/public/assets/svg/nav-deprecations.svg +3 -3
- package/public/assets/svg/nav-info.svg +3 -3
- package/public/assets/svg/nav-promises.svg +2 -2
- package/public/assets/svg/nav-render-performance.svg +2 -2
- package/public/assets/svg/nav-route-tree.svg +7 -7
- package/scripts/download-panes.js +1 -1
- package/skeletons/bookmarklet/load_inspector.js +30 -11
- package/skeletons/web-extension/background.js +26 -21
- package/skeletons/web-extension/boot.js +1 -1
- package/skeletons/web-extension/content-script.js +11 -11
- package/skeletons/web-extension/devtools.js +12 -3
- package/skeletons/web-extension/manifest.json +2 -2
- package/skeletons/web-extension/options.js +17 -12
- package/skeletons/web-extension/scripts/in-page-script.js +19 -13
- package/testem.js +0 -1
- package/tests/acceptance/app-picker-test.js +4 -4
- package/tests/acceptance/component-tree-test.js +43 -57
- package/tests/acceptance/container-test.js +0 -2
- package/tests/acceptance/data-test.js +8 -10
- package/tests/acceptance/deprecation-test.js +8 -12
- package/tests/acceptance/info-test.js +2 -2
- package/tests/acceptance/object-inspector-test.js +62 -110
- package/tests/acceptance/promise-test.js +1 -11
- package/tests/acceptance/render-tree-test.js +2 -2
- package/tests/acceptance/route-tree-test.js +12 -14
- package/tests/acceptance/whats-new-test.js +3 -3
- package/tests/ember_debug/container-debug-test.js +4 -4
- package/tests/ember_debug/deprecation-debug-test.js +8 -5
- package/tests/ember_debug/ember-debug-test.js +1 -4
- package/tests/ember_debug/object-inspector-test.js +44 -44
- package/tests/ember_debug/profile-manager-test.js +140 -165
- package/tests/ember_debug/profile-node-test.js +3 -3
- package/tests/ember_debug/promise-assembler-test.js +12 -9
- package/tests/ember_debug/promise-debug-test.js +5 -6
- package/tests/ember_debug/route-debug-test.js +8 -7
- package/tests/ember_debug/view-debug-test.js +179 -181
- package/tests/helpers/{index.js → index.ts} +6 -5
- package/tests/helpers/setup-ember-debug-test.js +14 -0
- package/tests/integration/injection-test.js +12 -13
- package/tests/test-adapter.js +15 -15
- package/tests/test-helper.js +6 -1
- package/tests/unit/check-current-route-test.js +0 -4
- package/tests/unit/resizable-columns-test.js +53 -51
- package/tests/unit/utils/parse-text-test.js +3 -3
- package/tests/unit/utils/search-match-test.js +5 -5
- package/tests/unit/utils/type-check-test.js +22 -0
- package/tsconfig.json +3 -1
- package/types/ember-inspector/index.d.ts +2 -1
- package/types/global.d.ts +1 -7
- package/.editorconfig +0 -19
- package/.ember-cli +0 -15
- package/.eslintignore +0 -33
- package/.eslintrc.js +0 -86
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -30
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- package/.github/dependabot.yml +0 -14
- package/.github/pull_request_template.md +0 -4
- package/.github/workflows/build.yml +0 -339
- package/.github/workflows/plan-release.yml +0 -83
- package/.github/workflows/publish.yml +0 -60
- package/.prettierignore +0 -25
- package/.prettierrc.js +0 -14
- package/.release-plan.json +0 -17
- package/.stylelintrc.js +0 -3
- package/.template-lintrc.js +0 -12
- package/.tool-versions +0 -2
- package/.watchmanconfig +0 -3
- package/app/components/.gitkeep +0 -0
- package/app/components/list-content.js +0 -130
- package/app/controllers/.gitkeep +0 -0
- package/app/controllers/promise-tree.js +0 -130
- package/app/helpers/.gitkeep +0 -0
- package/app/libs/promise-assembler.js +0 -169
- package/app/models/.gitkeep +0 -0
- package/app/routes/.gitkeep +0 -0
- package/app/routes/model-types.js +0 -47
- package/app/routes/promise-tree.js +0 -48
- package/app/routes/records.js +0 -55
- package/app/routes/render-tree.js +0 -66
- package/app/services/adapters/websocket.js +0 -31
- package/app/services/layout.js +0 -39
- package/app/services/port.js +0 -90
- package/dist/bookmarklet/panes-3-16-0/assets/chunk.143.152107b52f1d9b56abd2.js +0 -28
- package/dist/bookmarklet/panes-3-16-0/assets/chunk.178.fd17fd3a54b4e3a24554.js +0 -9
- package/dist/bookmarklet/panes-3-16-0/assets/chunk.359.0be5d21f60d2b5d6d423.js +0 -2620
- package/dist/bookmarklet/panes-3-16-0/assets/chunk.359.0be5d21f60d2b5d6d423.js.LICENSE.txt +0 -67
- package/dist/chrome/panes-3-16-0/assets/chunk.143.152107b52f1d9b56abd2.js +0 -28
- package/dist/chrome/panes-3-16-0/assets/chunk.178.fd17fd3a54b4e3a24554.js +0 -9
- package/dist/chrome/panes-3-16-0/assets/chunk.359.0be5d21f60d2b5d6d423.js +0 -2620
- package/dist/chrome/panes-3-16-0/assets/chunk.359.0be5d21f60d2b5d6d423.js.LICENSE.txt +0 -67
- package/dist/firefox/panes-3-16-0/assets/chunk.143.152107b52f1d9b56abd2.js +0 -28
- package/dist/firefox/panes-3-16-0/assets/chunk.178.fd17fd3a54b4e3a24554.js +0 -9
- package/dist/firefox/panes-3-16-0/assets/chunk.359.0be5d21f60d2b5d6d423.js +0 -2620
- package/dist/firefox/panes-3-16-0/assets/chunk.359.0be5d21f60d2b5d6d423.js.LICENSE.txt +0 -67
- package/dist/websocket/assets/chunk.143.152107b52f1d9b56abd2.js +0 -28
- package/dist/websocket/assets/chunk.178.fd17fd3a54b4e3a24554.js +0 -9
- package/dist/websocket/assets/chunk.359.0be5d21f60d2b5d6d423.js +0 -2620
- package/dist/websocket/assets/chunk.359.0be5d21f60d2b5d6d423.js.LICENSE.txt +0 -67
- package/ember_debug/.eslintrc.js +0 -13
- package/tests/helpers/trigger-port.js +0 -6
- package/tests/unit/.gitkeep +0 -0
- /package/app/{app.js → app.ts} +0 -0
- /package/app/controllers/{info.js → info.ts} +0 -0
- /package/app/services/adapters/{firefox.js → firefox.ts} +0 -0
@@ -1,3 +1,4 @@
|
|
1
|
+
/* eslint-disable ember/no-classic-classes */
|
1
2
|
import {
|
2
3
|
click,
|
3
4
|
find,
|
@@ -8,10 +9,12 @@ import {
|
|
8
9
|
import hasEmberVersion from '@ember/test-helpers/has-ember-version';
|
9
10
|
import { A } from '@ember/array';
|
10
11
|
import { run } from '@ember/runloop';
|
11
|
-
|
12
|
+
// eslint-disable-next-line ember/no-classic-components
|
13
|
+
import EmberComponent, { setComponentTemplate } from '@ember/component';
|
12
14
|
import EmberRoute from '@ember/routing/route';
|
13
15
|
import EmberObject from '@ember/object';
|
14
16
|
import Controller from '@ember/controller';
|
17
|
+
// eslint-disable-next-line ember/no-at-ember-render-modifiers
|
15
18
|
import didInsert from '@ember/render-modifiers/modifiers/did-insert';
|
16
19
|
import QUnit, { module, test } from 'qunit';
|
17
20
|
import { hbs } from 'ember-cli-htmlbars';
|
@@ -25,11 +28,12 @@ try {
|
|
25
28
|
// eslint-disable-next-line no-undef,ember/new-module-imports
|
26
29
|
templateOnlyComponent = Ember._templateOnlyComponent;
|
27
30
|
// eslint-disable-next-line no-empty
|
28
|
-
} catch
|
31
|
+
} catch {}
|
29
32
|
try {
|
33
|
+
// eslint-disable-next-line no-undef
|
30
34
|
templateOnlyComponent = require('ember').default._templateOnlyComponent;
|
31
35
|
// eslint-disable-next-line no-empty
|
32
|
-
} catch
|
36
|
+
} catch {}
|
33
37
|
|
34
38
|
// TODO switch to an adapter architecture, similar to the acceptance tests
|
35
39
|
async function captureMessage(type, callback) {
|
@@ -103,7 +107,7 @@ function matchTree(tree, matchers, name) {
|
|
103
107
|
QUnit.assert.strictEqual(
|
104
108
|
tree.length,
|
105
109
|
matchers.length,
|
106
|
-
`${name} tree and matcher should have the same length
|
110
|
+
`${name} tree and matcher should have the same length`,
|
107
111
|
);
|
108
112
|
|
109
113
|
for (let i = 0; i < matchers.length; i++) {
|
@@ -117,7 +121,7 @@ function match(actual, matcher, message) {
|
|
117
121
|
} else if (Array.isArray(matcher)) {
|
118
122
|
QUnit.assert.ok(
|
119
123
|
matcher.indexOf(actual) > -1,
|
120
|
-
`${actual} should be one of ${matcher.join('/')}
|
124
|
+
`${actual} should be one of ${matcher.join('/')}`,
|
121
125
|
);
|
122
126
|
} else if (matcher instanceof RegExp && actual !== null) {
|
123
127
|
QUnit.assert.ok(actual.match(matcher), `${actual} should match ${matcher}`);
|
@@ -146,23 +150,23 @@ function Serialized(id) {
|
|
146
150
|
return (actual) => {
|
147
151
|
QUnit.assert.ok(
|
148
152
|
typeof actual === 'object' && actual !== null,
|
149
|
-
'serialized object should be an object'
|
153
|
+
'serialized object should be an object',
|
150
154
|
);
|
151
155
|
QUnit.assert.ok(
|
152
156
|
typeof actual.id === 'string',
|
153
|
-
'serialized object should have a string id'
|
157
|
+
'serialized object should have a string id',
|
154
158
|
);
|
155
159
|
|
156
160
|
if (id === undefined) {
|
157
161
|
QUnit.assert.ok(
|
158
162
|
actual.id.match(/^ember[0-9]+$/),
|
159
|
-
'serialized object should have an ember guid'
|
163
|
+
'serialized object should have an ember guid',
|
160
164
|
);
|
161
165
|
} else {
|
162
166
|
QUnit.assert.strictEqual(
|
163
167
|
actual.id,
|
164
168
|
id,
|
165
|
-
'serialized object should have an ember guid'
|
169
|
+
'serialized object should have an ember guid',
|
166
170
|
);
|
167
171
|
}
|
168
172
|
};
|
@@ -172,13 +176,13 @@ function RenderNodeID(id) {
|
|
172
176
|
return (actual) => {
|
173
177
|
QUnit.assert.ok(
|
174
178
|
typeof actual === 'string',
|
175
|
-
'render node id should be a string'
|
179
|
+
'render node id should be a string',
|
176
180
|
);
|
177
181
|
|
178
182
|
if (id === undefined) {
|
179
183
|
QUnit.assert.ok(
|
180
184
|
actual.match(/^.+render-node:.+$/),
|
181
|
-
`render node id should have the right format, actual: ${actual}
|
185
|
+
`render node id should have the right format, actual: ${actual}`,
|
182
186
|
);
|
183
187
|
} else {
|
184
188
|
QUnit.assert.strictEqual(actual, id, 'render node id should match');
|
@@ -190,32 +194,32 @@ function Args({ names = [], positionals = 0 } = {}) {
|
|
190
194
|
return (actual) => {
|
191
195
|
QUnit.assert.ok(
|
192
196
|
typeof actual === 'object' && actual !== null,
|
193
|
-
'serialized args should be an object'
|
197
|
+
'serialized args should be an object',
|
194
198
|
);
|
195
199
|
|
196
200
|
QUnit.assert.ok(
|
197
201
|
actual !== null && !actual.named.__ARGS__,
|
198
|
-
'serialized named args should not have __ARGS__'
|
202
|
+
'serialized named args should not have __ARGS__',
|
199
203
|
);
|
200
204
|
|
201
205
|
QUnit.assert.ok(
|
202
206
|
typeof actual.named === 'object' && actual !== null,
|
203
|
-
'serialized named args should be an object'
|
207
|
+
'serialized named args should be an object',
|
204
208
|
);
|
205
209
|
QUnit.assert.deepEqual(
|
206
210
|
Object.keys(actual.named),
|
207
211
|
names,
|
208
|
-
'serialized named args should have the right keys'
|
212
|
+
'serialized named args should have the right keys',
|
209
213
|
);
|
210
214
|
|
211
215
|
QUnit.assert.ok(
|
212
216
|
Array.isArray(actual.positional),
|
213
|
-
'serialized positional args should be an array'
|
217
|
+
'serialized positional args should be an array',
|
214
218
|
);
|
215
219
|
QUnit.assert.strictEqual(
|
216
220
|
actual.positional.length,
|
217
221
|
positionals,
|
218
|
-
'serialized positional args should have the right number of items'
|
222
|
+
'serialized positional args should have the right number of items',
|
219
223
|
);
|
220
224
|
};
|
221
225
|
}
|
@@ -240,12 +244,12 @@ function RenderNode(
|
|
240
244
|
match(
|
241
245
|
actual.instance,
|
242
246
|
instance,
|
243
|
-
`${name} ${type} should have correct instance
|
247
|
+
`${name} ${type} should have correct instance`,
|
244
248
|
);
|
245
249
|
match(
|
246
250
|
actual.template,
|
247
251
|
template,
|
248
|
-
`${name} ${type} should have correct template
|
252
|
+
`${name} ${type} should have correct template`,
|
249
253
|
);
|
250
254
|
match(actual.bounds, bounds, `${name} ${type} should have correct bounds`);
|
251
255
|
matchTree(actual.children, children, `${name} ${type}`);
|
@@ -256,7 +260,7 @@ function Component(
|
|
256
260
|
{
|
257
261
|
name,
|
258
262
|
instance = Serialized(),
|
259
|
-
template = `my-app/
|
263
|
+
template = `my-app/components/${name}.hbs`,
|
260
264
|
bounds = 'single',
|
261
265
|
...options
|
262
266
|
},
|
@@ -264,7 +268,7 @@ function Component(
|
|
264
268
|
) {
|
265
269
|
return RenderNode(
|
266
270
|
{ name, instance, template, bounds, ...options, type: 'component' },
|
267
|
-
...children
|
271
|
+
...children,
|
268
272
|
);
|
269
273
|
}
|
270
274
|
|
@@ -280,7 +284,7 @@ function Modifier(
|
|
280
284
|
) {
|
281
285
|
return RenderNode(
|
282
286
|
{ name, instance, template, bounds, ...options, type: 'modifier' },
|
283
|
-
...children
|
287
|
+
...children,
|
284
288
|
);
|
285
289
|
}
|
286
290
|
|
@@ -305,14 +309,25 @@ function HtmlElement(
|
|
305
309
|
...options,
|
306
310
|
type: 'html-element',
|
307
311
|
},
|
308
|
-
...children
|
312
|
+
...children,
|
309
313
|
);
|
310
314
|
}
|
311
315
|
|
316
|
+
function RouteArgs() {
|
317
|
+
if (hasEmberVersion(6, 4)) {
|
318
|
+
// Related to routable components
|
319
|
+
return Args({ names: ['controller', 'model'] });
|
320
|
+
}
|
321
|
+
if (hasEmberVersion(3, 14)) {
|
322
|
+
return Args({ names: ['model'] });
|
323
|
+
}
|
324
|
+
return Args();
|
325
|
+
}
|
326
|
+
|
312
327
|
function Route(
|
313
328
|
{
|
314
329
|
name,
|
315
|
-
args =
|
330
|
+
args = RouteArgs(),
|
316
331
|
instance = Serialized(),
|
317
332
|
template = `my-app/templates/${name}.hbs`,
|
318
333
|
...options
|
@@ -323,8 +338,8 @@ function Route(
|
|
323
338
|
{ type: 'outlet', name: 'main', instance: undefined, template: null },
|
324
339
|
RenderNode(
|
325
340
|
{ name, args, instance, template, ...options, type: 'route-template' },
|
326
|
-
...children
|
327
|
-
)
|
341
|
+
...children,
|
342
|
+
),
|
328
343
|
);
|
329
344
|
}
|
330
345
|
|
@@ -336,7 +351,7 @@ function TopLevel(...children) {
|
|
336
351
|
instance: Undefined(),
|
337
352
|
template: /^packages\/.+\/templates\/outlet\.hbs$/,
|
338
353
|
},
|
339
|
-
...children
|
354
|
+
...children,
|
340
355
|
);
|
341
356
|
}
|
342
357
|
|
@@ -376,7 +391,7 @@ module('Ember Debug - View', function (hooks) {
|
|
376
391
|
},
|
377
392
|
});
|
378
393
|
},
|
379
|
-
})
|
394
|
+
}),
|
380
395
|
);
|
381
396
|
|
382
397
|
this.owner.register(
|
@@ -389,7 +404,7 @@ module('Ember Debug - View', function (hooks) {
|
|
389
404
|
},
|
390
405
|
});
|
391
406
|
},
|
392
|
-
})
|
407
|
+
}),
|
393
408
|
);
|
394
409
|
|
395
410
|
this.owner.register(
|
@@ -402,7 +417,7 @@ module('Ember Debug - View', function (hooks) {
|
|
402
417
|
},
|
403
418
|
});
|
404
419
|
},
|
405
|
-
})
|
420
|
+
}),
|
406
421
|
);
|
407
422
|
|
408
423
|
this.owner.register(
|
@@ -415,7 +430,7 @@ module('Ember Debug - View', function (hooks) {
|
|
415
430
|
},
|
416
431
|
});
|
417
432
|
},
|
418
|
-
})
|
433
|
+
}),
|
419
434
|
);
|
420
435
|
|
421
436
|
this.owner.register(
|
@@ -428,7 +443,7 @@ module('Ember Debug - View', function (hooks) {
|
|
428
443
|
},
|
429
444
|
});
|
430
445
|
},
|
431
|
-
})
|
446
|
+
}),
|
432
447
|
);
|
433
448
|
|
434
449
|
this.owner.register(
|
@@ -441,7 +456,7 @@ module('Ember Debug - View', function (hooks) {
|
|
441
456
|
},
|
442
457
|
});
|
443
458
|
},
|
444
|
-
})
|
459
|
+
}),
|
445
460
|
);
|
446
461
|
|
447
462
|
this.owner.register(
|
@@ -450,7 +465,7 @@ module('Ember Debug - View', function (hooks) {
|
|
450
465
|
model() {
|
451
466
|
return A(['first comment', 'second comment', 'third comment']);
|
452
467
|
},
|
453
|
-
})
|
468
|
+
}),
|
454
469
|
);
|
455
470
|
|
456
471
|
this.owner.register(
|
@@ -459,7 +474,7 @@ module('Ember Debug - View', function (hooks) {
|
|
459
474
|
model() {
|
460
475
|
return 'String as model';
|
461
476
|
},
|
462
|
-
})
|
477
|
+
}),
|
463
478
|
);
|
464
479
|
|
465
480
|
this.owner.register(
|
@@ -468,7 +483,7 @@ module('Ember Debug - View', function (hooks) {
|
|
468
483
|
toString() {
|
469
484
|
return 'App.ApplicationController';
|
470
485
|
},
|
471
|
-
})
|
486
|
+
}),
|
472
487
|
);
|
473
488
|
|
474
489
|
this.owner.register(
|
@@ -481,50 +496,83 @@ module('Ember Debug - View', function (hooks) {
|
|
481
496
|
toString() {
|
482
497
|
return 'App.SimpleController';
|
483
498
|
},
|
484
|
-
})
|
499
|
+
}),
|
485
500
|
);
|
486
501
|
|
487
502
|
this.owner.register(
|
488
503
|
'component:test-foo',
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
504
|
+
setComponentTemplate(
|
505
|
+
hbs('test-foo', {
|
506
|
+
moduleName: 'my-app/components/test-foo.hbs',
|
507
|
+
}),
|
508
|
+
EmberComponent.extend({
|
509
|
+
classNames: ['simple-component'],
|
510
|
+
toString() {
|
511
|
+
return 'App.TestFooComponent';
|
512
|
+
},
|
513
|
+
}),
|
514
|
+
),
|
495
515
|
);
|
496
516
|
|
497
517
|
this.owner.register(
|
498
518
|
'component:test-bar',
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
519
|
+
setComponentTemplate(
|
520
|
+
hbs(
|
521
|
+
`<!-- before -->
|
522
|
+
<div class="another-component">
|
523
|
+
{{@value}}
|
524
|
+
<span>test</span>
|
525
|
+
<span class="bar-inner">bar</span>
|
526
|
+
</div>
|
527
|
+
<!-- after -->`,
|
528
|
+
{ moduleName: 'my-app/components/test-bar.hbs' },
|
529
|
+
),
|
530
|
+
templateOnlyComponent?.() ||
|
531
|
+
EmberComponent.extend({
|
532
|
+
tagName: '',
|
533
|
+
toString() {
|
534
|
+
return 'App.TestBarComponent';
|
535
|
+
},
|
536
|
+
}),
|
537
|
+
),
|
506
538
|
);
|
507
539
|
|
508
540
|
this.owner.register(
|
509
541
|
'component:test-in-element-in-component',
|
510
|
-
|
511
|
-
|
512
|
-
this.
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
542
|
+
setComponentTemplate(
|
543
|
+
hbs(`
|
544
|
+
{{#in-element this.elementTarget}}
|
545
|
+
<p class='test-in-element-in-component'>
|
546
|
+
App.TestInElementInComponent
|
547
|
+
</p>
|
548
|
+
{{/in-element}}
|
549
|
+
`),
|
550
|
+
EmberComponent.extend({
|
551
|
+
init(...args) {
|
552
|
+
this._super(...args);
|
553
|
+
this.elementTarget = document.querySelector('#target');
|
554
|
+
},
|
555
|
+
toString() {
|
556
|
+
return 'App.TestInElementInComponent';
|
557
|
+
},
|
558
|
+
}),
|
559
|
+
),
|
519
560
|
);
|
520
561
|
|
521
562
|
this.owner.register(
|
522
563
|
'component:test-component-in-in-element',
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
564
|
+
setComponentTemplate(
|
565
|
+
hbs(`
|
566
|
+
<p class='test-component-in-in-element'>
|
567
|
+
App.TestComponentInElement
|
568
|
+
</p>
|
569
|
+
`),
|
570
|
+
EmberComponent.extend({
|
571
|
+
toString() {
|
572
|
+
return 'App.TestComponentInElement';
|
573
|
+
},
|
574
|
+
}),
|
575
|
+
),
|
528
576
|
);
|
529
577
|
|
530
578
|
/*
|
@@ -539,8 +587,8 @@ module('Ember Debug - View', function (hooks) {
|
|
539
587
|
<div id="target"></div>
|
540
588
|
{{outlet}}
|
541
589
|
</div>`,
|
542
|
-
{ moduleName: 'my-app/templates/application.hbs' }
|
543
|
-
)
|
590
|
+
{ moduleName: 'my-app/templates/application.hbs' },
|
591
|
+
),
|
544
592
|
);
|
545
593
|
|
546
594
|
this.owner.register(
|
@@ -553,22 +601,22 @@ module('Ember Debug - View', function (hooks) {
|
|
553
601
|
`,
|
554
602
|
{
|
555
603
|
moduleName: 'my-app/templates/simple.hbs',
|
556
|
-
}
|
557
|
-
)
|
604
|
+
},
|
605
|
+
),
|
558
606
|
);
|
559
607
|
|
560
608
|
this.owner.register(
|
561
609
|
'template:test-in-element-in-component',
|
562
610
|
hbs('<TestInElementInComponent />', {
|
563
611
|
moduleName: 'my-app/templates/test-in-element-in-component.hbs',
|
564
|
-
})
|
612
|
+
}),
|
565
613
|
);
|
566
614
|
|
567
615
|
this.owner.register(
|
568
616
|
'template:test-component-in-in-element',
|
569
617
|
hbs('<TestComponentInInElement />', {
|
570
618
|
moduleName: 'my-app/templates/test-component-in-in-element.hbs',
|
571
|
-
})
|
619
|
+
}),
|
572
620
|
);
|
573
621
|
|
574
622
|
this.owner.register(
|
@@ -577,64 +625,25 @@ module('Ember Debug - View', function (hooks) {
|
|
577
625
|
'<EmberWormhole @to="target"><div class="in-wormhole">Wormhole</div></EmberWormhole>',
|
578
626
|
{
|
579
627
|
moduleName: 'my-app/templates/wormhole.hbs',
|
580
|
-
}
|
581
|
-
)
|
628
|
+
},
|
629
|
+
),
|
582
630
|
);
|
583
631
|
this.owner.register(
|
584
632
|
'template:inputs',
|
585
633
|
hbs('Simple <Input @value="987" />', {
|
586
634
|
moduleName: 'my-app/templates/inputs.hbs',
|
587
|
-
})
|
635
|
+
}),
|
588
636
|
);
|
589
637
|
|
590
638
|
this.owner.register(
|
591
639
|
'template:comments/index',
|
592
640
|
hbs('{{#each this.comments as |comment|}}{{comment}}{{/each}}', {
|
593
641
|
moduleName: 'my-app/templates/comments/index.hbs',
|
594
|
-
})
|
642
|
+
}),
|
595
643
|
);
|
596
644
|
this.owner.register(
|
597
645
|
'template:posts',
|
598
|
-
hbs('Posts', { moduleName: 'my-app/templates/posts.hbs' })
|
599
|
-
);
|
600
|
-
this.owner.register(
|
601
|
-
'template:components/test-foo',
|
602
|
-
hbs('test-foo', {
|
603
|
-
moduleName: 'my-app/templates/components/test-foo.hbs',
|
604
|
-
})
|
605
|
-
);
|
606
|
-
this.owner.register(
|
607
|
-
'template:components/test-bar',
|
608
|
-
hbs(
|
609
|
-
`<!-- before -->
|
610
|
-
<div class="another-component">
|
611
|
-
{{@value}}
|
612
|
-
<span>test</span>
|
613
|
-
<span class="bar-inner">bar</span>
|
614
|
-
</div>
|
615
|
-
<!-- after -->`,
|
616
|
-
{ moduleName: 'my-app/templates/components/test-bar.hbs' }
|
617
|
-
)
|
618
|
-
);
|
619
|
-
|
620
|
-
this.owner.register(
|
621
|
-
'template:components/test-component-in-in-element',
|
622
|
-
hbs(`
|
623
|
-
<p class='test-component-in-in-element'>
|
624
|
-
App.TestComponentInElement
|
625
|
-
</p>
|
626
|
-
`)
|
627
|
-
);
|
628
|
-
|
629
|
-
this.owner.register(
|
630
|
-
'template:components/test-in-element-in-component',
|
631
|
-
hbs(`
|
632
|
-
{{#in-element this.elementTarget}}
|
633
|
-
<p class='test-in-element-in-component'>
|
634
|
-
App.TestInElementInComponent
|
635
|
-
</p>
|
636
|
-
{{/in-element}}
|
637
|
-
`)
|
646
|
+
hbs('Posts', { moduleName: 'my-app/templates/posts.hbs' }),
|
638
647
|
);
|
639
648
|
|
640
649
|
this.owner.register('modifier:did-insert', didInsert);
|
@@ -674,7 +683,7 @@ module('Ember Debug - View', function (hooks) {
|
|
674
683
|
Modifier({
|
675
684
|
name: 'deprecated-event-handlers',
|
676
685
|
args: Args({ positionals: 1 }),
|
677
|
-
})
|
686
|
+
}),
|
678
687
|
);
|
679
688
|
}
|
680
689
|
const enableModifierSupport = isInVersionSpecifier('>3.28.0', VERSION);
|
@@ -688,7 +697,7 @@ module('Ember Debug - View', function (hooks) {
|
|
688
697
|
name: '-text-field',
|
689
698
|
template: /.*/,
|
690
699
|
args: Args({ names: ['target', 'value'], positionals: 0 }),
|
691
|
-
})
|
700
|
+
}),
|
692
701
|
);
|
693
702
|
}
|
694
703
|
|
@@ -698,7 +707,7 @@ module('Ember Debug - View', function (hooks) {
|
|
698
707
|
name: 'input',
|
699
708
|
args: Args({ names: ['id', 'class', 'type'] }),
|
700
709
|
},
|
701
|
-
...modifiers
|
710
|
+
...modifiers,
|
702
711
|
);
|
703
712
|
if (hasEmberVersion(3, 26)) {
|
704
713
|
inputChildren.push(htmlElement);
|
@@ -718,10 +727,10 @@ module('Ember Debug - View', function (hooks) {
|
|
718
727
|
args: Args({ names: ['value'], positionals: 0 }),
|
719
728
|
template: /.*/,
|
720
729
|
},
|
721
|
-
...inputChildren
|
722
|
-
)
|
723
|
-
)
|
724
|
-
)
|
730
|
+
...inputChildren,
|
731
|
+
),
|
732
|
+
),
|
733
|
+
),
|
725
734
|
),
|
726
735
|
]);
|
727
736
|
});
|
@@ -747,7 +756,7 @@ module('Ember Debug - View', function (hooks) {
|
|
747
756
|
QUnit.assert.equal(
|
748
757
|
value.details[0].properties[0].value.inspect,
|
749
758
|
'{ x: 123, x.y: 456 }',
|
750
|
-
'test-bar args value inspect should be correct'
|
759
|
+
'test-bar args value inspect should be correct',
|
751
760
|
);
|
752
761
|
}
|
753
762
|
argsTestPromise = testArgsValue();
|
@@ -763,7 +772,7 @@ module('Ember Debug - View', function (hooks) {
|
|
763
772
|
QUnit.assert.equal(
|
764
773
|
value.details[1].name,
|
765
774
|
'HTMLDivElement',
|
766
|
-
'in-element args value inspect should be correct'
|
775
|
+
'in-element args value inspect should be correct',
|
767
776
|
);
|
768
777
|
}
|
769
778
|
argsTestPromise = testArgsValue();
|
@@ -773,7 +782,7 @@ module('Ember Debug - View', function (hooks) {
|
|
773
782
|
Component({
|
774
783
|
name: 'test-component-in-in-element',
|
775
784
|
template: () => null,
|
776
|
-
})
|
785
|
+
}),
|
777
786
|
),
|
778
787
|
];
|
779
788
|
|
@@ -790,9 +799,9 @@ module('Ember Debug - View', function (hooks) {
|
|
790
799
|
name: 'did-insert',
|
791
800
|
args: Args({ positionals: 1 }),
|
792
801
|
}),
|
793
|
-
...children
|
802
|
+
...children,
|
794
803
|
),
|
795
|
-
]
|
804
|
+
],
|
796
805
|
);
|
797
806
|
} else {
|
798
807
|
root.push(...children);
|
@@ -800,13 +809,13 @@ module('Ember Debug - View', function (hooks) {
|
|
800
809
|
|
801
810
|
matchTree(tree, [
|
802
811
|
TopLevel(
|
803
|
-
Route({ name: 'application' }, Route({ name: 'simple' }, ...root))
|
812
|
+
Route({ name: 'application' }, Route({ name: 'simple' }, ...root)),
|
804
813
|
),
|
805
814
|
]);
|
806
815
|
|
807
816
|
QUnit.assert.ok(
|
808
817
|
argsTestPromise instanceof Promise,
|
809
|
-
'args should be tested'
|
818
|
+
'args should be tested',
|
810
819
|
);
|
811
820
|
await argsTestPromise;
|
812
821
|
});
|
@@ -818,7 +827,7 @@ module('Ember Debug - View', function (hooks) {
|
|
818
827
|
.dom(this.element)
|
819
828
|
.hasClass(
|
820
829
|
'ember-application',
|
821
|
-
'The rootElement has the .ember-application CSS class'
|
830
|
+
'The rootElement has the .ember-application CSS class',
|
822
831
|
);
|
823
832
|
|
824
833
|
this.element.classList.remove('ember-application');
|
@@ -832,7 +841,7 @@ module('Ember Debug - View', function (hooks) {
|
|
832
841
|
.dom(this.element)
|
833
842
|
.doesNotHaveClass(
|
834
843
|
'ember-application',
|
835
|
-
'The rootElement no longer has the .ember-application CSS class'
|
844
|
+
'The rootElement no longer has the .ember-application CSS class',
|
836
845
|
);
|
837
846
|
|
838
847
|
let tree = await getRenderTree();
|
@@ -855,7 +864,7 @@ module('Ember Debug - View', function (hooks) {
|
|
855
864
|
Component({
|
856
865
|
name: 'test-component-in-in-element',
|
857
866
|
template: () => null,
|
858
|
-
})
|
867
|
+
}),
|
859
868
|
),
|
860
869
|
];
|
861
870
|
|
@@ -872,9 +881,9 @@ module('Ember Debug - View', function (hooks) {
|
|
872
881
|
name: 'did-insert',
|
873
882
|
args: Args({ positionals: 1 }),
|
874
883
|
}),
|
875
|
-
...children
|
884
|
+
...children,
|
876
885
|
),
|
877
|
-
]
|
886
|
+
],
|
878
887
|
);
|
879
888
|
} else {
|
880
889
|
root.push(...children);
|
@@ -882,32 +891,35 @@ module('Ember Debug - View', function (hooks) {
|
|
882
891
|
|
883
892
|
matchTree(tree, [
|
884
893
|
TopLevel(
|
885
|
-
Route({ name: 'application' }, Route({ name: 'simple' }, ...root))
|
894
|
+
Route({ name: 'application' }, Route({ name: 'simple' }, ...root)),
|
886
895
|
),
|
887
896
|
]);
|
888
897
|
});
|
889
898
|
|
890
899
|
test('Does not list nested {{yield}} views', async function () {
|
891
|
-
this.owner.register('component:x-first', EmberComponent.extend());
|
892
|
-
this.owner.register('component:x-second', EmberComponent.extend());
|
893
|
-
|
894
900
|
this.owner.register(
|
895
|
-
'
|
896
|
-
|
897
|
-
|
898
|
-
|
901
|
+
'component:x-first',
|
902
|
+
setComponentTemplate(
|
903
|
+
hbs('{{#x-second}}{{yield}}{{/x-second}}', {
|
904
|
+
moduleName: 'my-app/components/x-first.hbs',
|
905
|
+
}),
|
906
|
+
EmberComponent.extend(),
|
907
|
+
),
|
899
908
|
);
|
900
909
|
this.owner.register(
|
901
|
-
'
|
902
|
-
|
903
|
-
|
904
|
-
|
910
|
+
'component:x-second',
|
911
|
+
setComponentTemplate(
|
912
|
+
hbs('{{yield}}', {
|
913
|
+
moduleName: 'my-app/components/x-second.hbs',
|
914
|
+
}),
|
915
|
+
EmberComponent.extend(),
|
916
|
+
),
|
905
917
|
);
|
906
918
|
this.owner.register(
|
907
|
-
'template:
|
908
|
-
hbs('{{
|
909
|
-
moduleName: 'my-app/templates/
|
910
|
-
})
|
919
|
+
'template:posts',
|
920
|
+
hbs('{{#x-first}}Foo{{/x-first}}', {
|
921
|
+
moduleName: 'my-app/templates/posts.hbs',
|
922
|
+
}),
|
911
923
|
);
|
912
924
|
|
913
925
|
await visit('/posts');
|
@@ -920,9 +932,9 @@ module('Ember Debug - View', function (hooks) {
|
|
920
932
|
{ name: 'application' },
|
921
933
|
Route(
|
922
934
|
{ name: 'posts' },
|
923
|
-
Component({ name: 'x-first' }, Component({ name: 'x-second' }))
|
924
|
-
)
|
925
|
-
)
|
935
|
+
Component({ name: 'x-first' }, Component({ name: 'x-second' })),
|
936
|
+
),
|
937
|
+
),
|
926
938
|
),
|
927
939
|
]);
|
928
940
|
});
|
@@ -946,8 +958,9 @@ module('Ember Debug - View', function (hooks) {
|
|
946
958
|
assert.ok(!isVisible(tooltip), 'tooltip is not visible');
|
947
959
|
assert.ok(!isVisible(highlight), 'highlight is not visible');
|
948
960
|
|
961
|
+
// eslint-disable-next-line ember/no-runloop
|
949
962
|
run(() =>
|
950
|
-
EmberDebug.port.trigger('view:inspectViews', { inspect: true })
|
963
|
+
EmberDebug.port.trigger('view:inspectViews', { inspect: true }),
|
951
964
|
);
|
952
965
|
});
|
953
966
|
|
@@ -965,10 +978,7 @@ module('Ember Debug - View', function (hooks) {
|
|
965
978
|
assert
|
966
979
|
.dom('.ember-inspector-tooltip-detail-template', tooltip)
|
967
980
|
.hasText(
|
968
|
-
'my-app/
|
969
|
-
/\//g,
|
970
|
-
'\u200B/\u200B'
|
971
|
-
)
|
981
|
+
'my-app/components/test-foo.hbs'.replace(/\//g, '\u200B/\u200B'),
|
972
982
|
);
|
973
983
|
assert
|
974
984
|
.dom('.ember-inspector-tooltip-detail-instance', tooltip)
|
@@ -983,12 +993,12 @@ module('Ember Debug - View', function (hooks) {
|
|
983
993
|
assert.strictEqual(
|
984
994
|
actual.width,
|
985
995
|
expected.width,
|
986
|
-
'same width as component'
|
996
|
+
'same width as component',
|
987
997
|
);
|
988
998
|
assert.strictEqual(
|
989
999
|
actual.height,
|
990
1000
|
expected.height,
|
991
|
-
'same height as component'
|
1001
|
+
'same height as component',
|
992
1002
|
);
|
993
1003
|
|
994
1004
|
await triggerEvent('.bar-inner', 'mousemove');
|
@@ -1000,17 +1010,14 @@ module('Ember Debug - View', function (hooks) {
|
|
1000
1010
|
assert
|
1001
1011
|
.dom('.ember-inspector-tooltip-detail-template', tooltip)
|
1002
1012
|
.hasText(
|
1003
|
-
'my-app/
|
1004
|
-
/\//g,
|
1005
|
-
'\u200B/\u200B'
|
1006
|
-
)
|
1013
|
+
'my-app/components/test-bar.hbs'.replace(/\//g, '\u200B/\u200B'),
|
1007
1014
|
);
|
1008
1015
|
assert
|
1009
1016
|
.dom('.ember-inspector-tooltip-detail-instance', tooltip)
|
1010
1017
|
.hasText(
|
1011
1018
|
templateOnlyComponent
|
1012
1019
|
? 'TemplateOnlyComponent'
|
1013
|
-
: 'App.TestBarComponent'
|
1020
|
+
: 'App.TestBarComponent',
|
1014
1021
|
);
|
1015
1022
|
|
1016
1023
|
actual = highlight.getBoundingClientRect();
|
@@ -1022,12 +1029,12 @@ module('Ember Debug - View', function (hooks) {
|
|
1022
1029
|
assert.strictEqual(
|
1023
1030
|
actual.width,
|
1024
1031
|
expected.width,
|
1025
|
-
'same width as component'
|
1032
|
+
'same width as component',
|
1026
1033
|
);
|
1027
1034
|
assert.strictEqual(
|
1028
1035
|
actual.height,
|
1029
1036
|
expected.height,
|
1030
|
-
'same height as component'
|
1037
|
+
'same height as component',
|
1031
1038
|
);
|
1032
1039
|
|
1033
1040
|
await triggerEvent(document.body, 'mousemove');
|
@@ -1046,10 +1053,7 @@ module('Ember Debug - View', function (hooks) {
|
|
1046
1053
|
assert
|
1047
1054
|
.dom('.ember-inspector-tooltip-detail-template', tooltip)
|
1048
1055
|
.hasText(
|
1049
|
-
'my-app/
|
1050
|
-
/\//g,
|
1051
|
-
'\u200B/\u200B'
|
1052
|
-
)
|
1056
|
+
'my-app/components/test-foo.hbs'.replace(/\//g, '\u200B/\u200B'),
|
1053
1057
|
);
|
1054
1058
|
assert
|
1055
1059
|
.dom('.ember-inspector-tooltip-detail-instance', tooltip)
|
@@ -1065,7 +1069,7 @@ module('Ember Debug - View', function (hooks) {
|
|
1065
1069
|
assert.deepEqual(
|
1066
1070
|
actual.height,
|
1067
1071
|
expected.height,
|
1068
|
-
'same height as component'
|
1072
|
+
'same height as component',
|
1069
1073
|
);
|
1070
1074
|
|
1071
1075
|
assert.ok(isVisible(tooltip), 'tooltip is visible');
|
@@ -1075,10 +1079,7 @@ module('Ember Debug - View', function (hooks) {
|
|
1075
1079
|
assert
|
1076
1080
|
.dom('.ember-inspector-tooltip-detail-template', tooltip)
|
1077
1081
|
.hasText(
|
1078
|
-
'my-app/
|
1079
|
-
/\//g,
|
1080
|
-
'\u200B/\u200B'
|
1081
|
-
)
|
1082
|
+
'my-app/components/test-foo.hbs'.replace(/\//g, '\u200B/\u200B'),
|
1082
1083
|
);
|
1083
1084
|
assert
|
1084
1085
|
.dom('.ember-inspector-tooltip-detail-instance', tooltip)
|
@@ -1117,7 +1118,6 @@ module('Ember Debug - View', function (hooks) {
|
|
1117
1118
|
let actual = highlight.getBoundingClientRect();
|
1118
1119
|
let expected = inElement.getBoundingClientRect();
|
1119
1120
|
|
1120
|
-
// await this.pauseTest();
|
1121
1121
|
assert.ok(isVisible(tooltip), 'tooltip is visible');
|
1122
1122
|
assert.ok(isVisible(highlight), 'highlight is visible');
|
1123
1123
|
|
@@ -1127,7 +1127,7 @@ module('Ember Debug - View', function (hooks) {
|
|
1127
1127
|
assert.deepEqual(
|
1128
1128
|
actual.height,
|
1129
1129
|
expected.height,
|
1130
|
-
'same height as component'
|
1130
|
+
'same height as component',
|
1131
1131
|
);
|
1132
1132
|
|
1133
1133
|
assert
|
@@ -1151,7 +1151,6 @@ module('Ember Debug - View', function (hooks) {
|
|
1151
1151
|
let actual = highlight.getBoundingClientRect();
|
1152
1152
|
let expected = inElement.getBoundingClientRect();
|
1153
1153
|
|
1154
|
-
// await this.pauseTest();
|
1155
1154
|
assert.ok(isVisible(tooltip), 'tooltip is visible');
|
1156
1155
|
assert.ok(isVisible(highlight), 'highlight is visible');
|
1157
1156
|
|
@@ -1161,7 +1160,7 @@ module('Ember Debug - View', function (hooks) {
|
|
1161
1160
|
assert.deepEqual(
|
1162
1161
|
actual.height,
|
1163
1162
|
expected.height,
|
1164
|
-
'same height as component'
|
1163
|
+
'same height as component',
|
1165
1164
|
);
|
1166
1165
|
|
1167
1166
|
assert
|
@@ -1185,7 +1184,6 @@ module('Ember Debug - View', function (hooks) {
|
|
1185
1184
|
let actual = highlight.getBoundingClientRect();
|
1186
1185
|
let expected = inElement.getBoundingClientRect();
|
1187
1186
|
|
1188
|
-
// await this.pauseTest();
|
1189
1187
|
assert.ok(isVisible(tooltip), 'tooltip is visible');
|
1190
1188
|
assert.ok(isVisible(highlight), 'highlight is visible');
|
1191
1189
|
|
@@ -1195,7 +1193,7 @@ module('Ember Debug - View', function (hooks) {
|
|
1195
1193
|
assert.deepEqual(
|
1196
1194
|
actual.height,
|
1197
1195
|
expected.height,
|
1198
|
-
'same height as component'
|
1196
|
+
'same height as component',
|
1199
1197
|
);
|
1200
1198
|
|
1201
1199
|
assert
|