@discourse/types 0.0.2 → 2026.1.0-2709d36
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/declarations/admin/components/admin-config-areas/upcoming-change-item.d.ts +1 -1
- package/declarations/admin/components/admin-config-areas/upcoming-changes.d.ts +5 -0
- package/declarations/admin/components/admin-config-areas/upcoming-changes.d.ts.map +1 -1
- package/declarations/admin/components/admin-theme-editor.d.ts +1 -1
- package/declarations/admin/components/admin-welcome-banner-form.d.ts.map +1 -1
- package/declarations/admin/components/color-input.d.ts.map +1 -1
- package/declarations/admin/components/color-palette-editor.d.ts.map +1 -1
- package/declarations/admin/components/dashboard-new-features.d.ts.map +1 -1
- package/declarations/admin/components/edit-category-general.d.ts +3 -1
- package/declarations/admin/components/edit-category-general.d.ts.map +1 -1
- package/declarations/admin/components/edit-category-security.d.ts.map +1 -1
- package/declarations/admin/components/edit-category-settings.d.ts.map +1 -1
- package/declarations/admin/components/form-template/form.d.ts.map +1 -1
- package/declarations/admin/components/site-settings/upload.d.ts +45 -4
- package/declarations/admin/components/site-settings/upload.d.ts.map +1 -1
- package/declarations/admin/components/webhook-event.d.ts +2 -2
- package/declarations/admin/lib/hex-to-rgba.d.ts.map +1 -1
- package/declarations/admin/lib/template-form-fields.d.ts.map +1 -1
- package/declarations/admin/models/color-scheme-color.d.ts.map +1 -1
- package/declarations/admin/models/email-template.d.ts +1 -1
- package/declarations/admin/models/report.d.ts +12 -12
- package/declarations/admin/routes/admin-config/upcoming-changes.d.ts +1 -0
- package/declarations/admin/routes/admin-config/upcoming-changes.d.ts.map +1 -1
- package/declarations/app/components/bookmark-icon.d.ts +1 -1
- package/declarations/app/components/bookmark-menu.d.ts +1 -1
- package/declarations/app/components/category-permission-row.d.ts.map +1 -1
- package/declarations/app/components/composer-toggles.d.ts +1 -1
- package/declarations/app/components/d-button.d.ts +144 -4
- package/declarations/app/components/d-button.d.ts.map +1 -1
- package/declarations/app/components/d-editor.d.ts +0 -1
- package/declarations/app/components/d-editor.d.ts.map +1 -1
- package/declarations/app/components/d-navigation-item.d.ts +1 -1
- package/declarations/app/components/date-input.d.ts +1 -1
- package/declarations/app/components/date-picker.d.ts +1 -1
- package/declarations/app/components/form-template-field/composer.d.ts +7 -0
- package/declarations/app/components/form-template-field/composer.d.ts.map +1 -0
- package/declarations/app/components/form-template-field/wrapper.d.ts +1 -0
- package/declarations/app/components/form-template-field/wrapper.d.ts.map +1 -1
- package/declarations/app/components/group-manage-save-button.d.ts +2 -4
- package/declarations/app/components/group-manage-save-button.d.ts.map +1 -1
- package/declarations/app/components/group-smtp-email-settings.d.ts +1 -1
- package/declarations/app/components/header/contents.d.ts +1 -1
- package/declarations/app/components/header/logo.d.ts +1 -1
- package/declarations/app/components/header/search-menu-wrapper.d.ts +1 -1
- package/declarations/app/components/header/topic/info.d.ts +1 -1
- package/declarations/app/components/interface-color-selector.d.ts +1 -1
- package/declarations/app/components/light-dark-img.d.ts +1 -1
- package/declarations/app/components/modal/avatar-selector.d.ts +1 -1
- package/declarations/app/components/modal/create-invite.d.ts +2 -0
- package/declarations/app/components/modal/create-invite.d.ts.map +1 -1
- package/declarations/app/components/modal/group-default-notifications.d.ts.map +1 -1
- package/declarations/app/components/modal/move-to-topic.d.ts +1 -1
- package/declarations/app/components/modal/spreadsheet-editor.d.ts.map +1 -1
- package/declarations/app/components/post/menu/buttons/delete.d.ts +2 -2
- package/declarations/app/components/post/meta-data/reply-to-tab.d.ts.map +1 -1
- package/declarations/app/components/post/quoted-content.d.ts +1 -1
- package/declarations/app/components/post-language-selector.d.ts.map +1 -1
- package/declarations/app/components/post-list/item/index.d.ts +1 -1
- package/declarations/app/components/reviewable-bundled-action.d.ts +1 -1
- package/declarations/app/components/reviewable-refresh/item.d.ts.map +1 -1
- package/declarations/app/components/reviewable-refresh/timeline.d.ts.map +1 -1
- package/declarations/app/components/sidebar/common/custom-section.d.ts +3 -3
- package/declarations/app/components/sidebar/common/custom-section.d.ts.map +1 -1
- package/declarations/app/components/sidebar/edit-navigation-menu/categories-modal.d.ts.map +1 -1
- package/declarations/app/components/sidebar/user/tags-section.d.ts +2 -2
- package/declarations/app/components/sidebar/user/tags-section.d.ts.map +1 -1
- package/declarations/app/components/signup-progress-bar.d.ts +1 -1
- package/declarations/app/components/table-header-toggle.d.ts +1 -1
- package/declarations/app/components/topic-drafts-dropdown.d.ts +1 -1
- package/declarations/app/components/topic-list/bulk-select-checkbox.d.ts +3 -0
- package/declarations/app/components/topic-list/bulk-select-checkbox.d.ts.map +1 -0
- package/declarations/app/components/topic-list/item/bulk-select-cell.d.ts.map +1 -1
- package/declarations/app/components/topic-list/item/replies-cell.d.ts +1 -1
- package/declarations/app/components/topic-list/item/topic-cell.d.ts +0 -2
- package/declarations/app/components/topic-list/item/topic-cell.d.ts.map +1 -1
- package/declarations/app/components/topic-list/item.d.ts.map +1 -1
- package/declarations/app/components/topic-map/topic-map-summary.d.ts +1 -1
- package/declarations/app/components/uppy-image-uploader.d.ts +1 -1
- package/declarations/app/components/welcome-banner.d.ts.map +1 -1
- package/declarations/app/controllers/review/index.d.ts +1 -1
- package/declarations/app/controllers/user-activity/bookmarks.d.ts +2 -2
- package/declarations/app/controllers/user-invited/show.d.ts +3 -1
- package/declarations/app/controllers/user-invited/show.d.ts.map +1 -1
- package/declarations/app/controllers/user.d.ts +2 -2
- package/declarations/app/form-kit/components/fk/control/color.d.ts +13 -0
- package/declarations/app/form-kit/components/fk/control/color.d.ts.map +1 -0
- package/declarations/app/form-kit/components/fk/control/password.d.ts +1 -1
- package/declarations/app/form-kit/components/fk/control-wrapper.d.ts.map +1 -1
- package/declarations/app/form-kit/components/fk/field.d.ts.map +1 -1
- package/declarations/app/lib/color-transformations.d.ts +3 -0
- package/declarations/app/lib/color-transformations.d.ts.map +1 -1
- package/declarations/app/lib/deprecated.d.ts.map +1 -1
- package/declarations/app/lib/notification-types/upcoming-change-automatically-promoted.d.ts +7 -0
- package/declarations/app/lib/notification-types/upcoming-change-automatically-promoted.d.ts.map +1 -0
- package/declarations/app/lib/notification-types/upcoming-change-available.d.ts +7 -0
- package/declarations/app/lib/notification-types/upcoming-change-available.d.ts.map +1 -0
- package/declarations/app/lib/notification-types-manager.d.ts.map +1 -1
- package/declarations/app/lib/optional-service.d.ts +2 -2
- package/declarations/app/lib/optional-service.d.ts.map +1 -1
- package/declarations/app/lib/render-tags.d.ts.map +1 -1
- package/declarations/app/lib/sidebar/admin-sidebar.d.ts.map +1 -1
- package/declarations/app/lib/sidebar/common/community-section/faq-section-link.d.ts +2 -2
- package/declarations/app/lib/sidebar/user/community-section/my-posts-section-link.d.ts +1 -1
- package/declarations/app/lib/uppy/s3-multipart.d.ts.map +1 -1
- package/declarations/app/lib/weak-value-map.d.ts +110 -0
- package/declarations/app/lib/weak-value-map.d.ts.map +1 -0
- package/declarations/app/models/badge.d.ts +1 -1
- package/declarations/app/models/bookmark.d.ts +3 -3
- package/declarations/app/models/group.d.ts +1 -1
- package/declarations/app/models/post-stream.d.ts +1 -1
- package/declarations/app/models/post.d.ts +1 -1
- package/declarations/app/models/reviewable.d.ts +1 -1
- package/declarations/app/models/tag-group.d.ts +1 -1
- package/declarations/app/models/user.d.ts +2 -1
- package/declarations/app/models/user.d.ts.map +1 -1
- package/declarations/app/routes/badges/index.d.ts +1 -1
- package/declarations/app/routes/badges/show.d.ts +1 -1
- package/declarations/app/routes/invites/show.d.ts +1 -1
- package/declarations/app/routes/second-factor-auth.d.ts +1 -1
- package/declarations/app/services/composer.d.ts +1 -1
- package/declarations/app/services/composer.d.ts.map +1 -1
- package/declarations/app/services/pm-topic-tracking-state.d.ts +1 -1
- package/declarations/app/services/search.d.ts +1 -1
- package/declarations/app/services/store.d.ts.map +1 -1
- package/declarations/app/static/prosemirror/core/serializer.d.ts +1 -0
- package/declarations/app/static/prosemirror/core/serializer.d.ts.map +1 -1
- package/declarations/select-kit/components/composer-actions.d.ts +1 -1
- package/declarations/select-kit/components/email-group-user-chooser.d.ts +1 -1
- package/declarations/tests/helpers/create-pretender.d.ts.map +1 -1
- package/declarations/tests/helpers/form-kit-assertions.d.ts.map +1 -1
- package/declarations/tests/helpers/form-kit-helper.d.ts +9 -1
- package/declarations/tests/helpers/form-kit-helper.d.ts.map +1 -1
- package/declarations/tests/helpers/qunit-helpers.d.ts +2 -1
- package/declarations/tests/helpers/qunit-helpers.d.ts.map +1 -1
- package/declarations/tests/helpers/site-settings.d.ts.map +1 -1
- package/declarations/tests/integration/components/form-kit/controls/color-test.d.ts +2 -0
- package/declarations/tests/integration/components/form-kit/controls/color-test.d.ts.map +1 -0
- package/declarations/tests/integration/components/site-settings/upload-test.d.ts +2 -0
- package/declarations/tests/integration/components/site-settings/upload-test.d.ts.map +1 -0
- package/declarations/tests/unit/lib/weak-value-map-test.d.ts +2 -0
- package/declarations/tests/unit/lib/weak-value-map-test.d.ts.map +1 -0
- package/declarations/tsconfig.tsbuildinfo +1 -1
- package/external-types/discourse-i18n/index.d.ts +69 -0
- package/external-types/discourse-i18n/package.json +44 -0
- package/external-types/ember-compat__tracked-built-ins/index.d.ts +174 -0
- package/external-types/{@ember-compat__tracked-built-ins → ember-compat__tracked-built-ins}/package.json +13 -12
- package/external-types/ember-modifier/index.d.ts +327 -0
- package/external-types/ember-modifier/package.json +12 -11
- package/external-types/ember-qunit/index.d.ts +285 -0
- package/external-types/ember-qunit/package.json +9 -8
- package/external-types/ember-source/package.json +5 -4
- package/external-types/ember__render-modifiers/index.d.ts +52 -0
- package/external-types/{@ember__render-modifiers → ember__render-modifiers}/package.json +4 -3
- package/external-types/ember__string/index.d.ts +159 -0
- package/external-types/{@ember__string → ember__string}/package.json +9 -8
- package/external-types/ember__test-helpers/index.d.ts +1771 -0
- package/external-types/{@ember__test-helpers → ember__test-helpers}/package.json +9 -8
- package/external-types/floating-ui__dom/index.d.ts +353 -0
- package/external-types/{@floating-ui__dom → floating-ui__dom}/package.json +3 -2
- package/external-types/glimmer__component/index.d.ts +667 -0
- package/external-types/{@glimmer__component → glimmer__component}/package.json +8 -7
- package/external-types/glimmer__syntax/index.d.ts +5792 -0
- package/external-types/{@glimmer__syntax → glimmer__syntax}/package.json +2 -1
- package/external-types/glint__template/index.d.ts +5422 -0
- package/external-types/{@glint__template → glint__template}/package.json +3 -2
- package/external-types/jquery/index.d.ts +34986 -0
- package/external-types/jquery/package.json +134 -0
- package/external-types/{@glint__template → pretender}/LICENSE +5 -7
- package/external-types/pretender/index.d.ts +60 -0
- package/external-types/pretender/package.json +76 -0
- package/external-types/qunit/index.d.ts +935 -0
- package/external-types/qunit/package.json +52 -0
- package/external-types/rsvp/LICENSE +21 -0
- package/external-types/rsvp/index.d.ts +493 -0
- package/external-types/rsvp/package.json +36 -0
- package/external-types/sinon/LICENSE +21 -0
- package/external-types/sinon/index.d.ts +1464 -0
- package/external-types/sinon/package.json +64 -0
- package/package.json +17 -2
- package/tsconfig-plugin.json +1 -1
- package/declarations/admin/compat-modules.d.ts +0 -3
- package/declarations/admin/compat-modules.d.ts.map +0 -1
- package/declarations/admin/controllers/admin-web-hooks/edit.d.ts +0 -19
- package/declarations/admin/controllers/admin-web-hooks/edit.d.ts.map +0 -1
- package/declarations/admin/controllers/admin-web-hooks/index.d.ts +0 -13
- package/declarations/admin/controllers/admin-web-hooks/index.d.ts.map +0 -1
- package/declarations/admin/templates/admin-config/welcome-banner.d.ts +0 -3
- package/declarations/admin/templates/admin-config/welcome-banner.d.ts.map +0 -1
- package/declarations/app/components/about-page-user.d.ts +0 -3
- package/declarations/app/components/about-page-user.d.ts.map +0 -1
- package/declarations/app/components/bootstrap-mode-notice.d.ts +0 -7
- package/declarations/app/components/bootstrap-mode-notice.d.ts.map +0 -1
- package/declarations/app/components/d-combo-button.d.ts +0 -3
- package/declarations/app/components/d-combo-button.d.ts.map +0 -1
- package/declarations/app/components/footer-message.d.ts +0 -5
- package/declarations/app/components/footer-message.d.ts.map +0 -1
- package/declarations/app/components/group-imap-email-settings.d.ts +0 -13
- package/declarations/app/components/group-imap-email-settings.d.ts.map +0 -1
- package/declarations/app/components/scrolling-post-stream.d.ts +0 -23
- package/declarations/app/components/scrolling-post-stream.d.ts.map +0 -1
- package/declarations/app/components/top-period-buttons.d.ts +0 -7
- package/declarations/app/components/top-period-buttons.d.ts.map +0 -1
- package/declarations/app/config/environment.d.ts +0 -3
- package/declarations/app/config/environment.d.ts.map +0 -1
- package/declarations/app/lib/autocomplete/emoji.d.ts +0 -4
- package/declarations/app/lib/autocomplete/emoji.d.ts.map +0 -1
- package/declarations/app/loader.d.ts +0 -4
- package/declarations/app/loader.d.ts.map +0 -1
- package/declarations/app/services/dialog.d.ts +0 -2
- package/declarations/app/services/dialog.d.ts.map +0 -1
- package/declarations/app/services/internal-tooltip.d.ts +0 -2
- package/declarations/app/services/internal-tooltip.d.ts.map +0 -1
- package/declarations/app/services/menu.d.ts +0 -2
- package/declarations/app/services/menu.d.ts.map +0 -1
- package/declarations/app/services/toasts.d.ts +0 -2
- package/declarations/app/services/toasts.d.ts.map +0 -1
- package/declarations/app/services/tooltip.d.ts +0 -2
- package/declarations/app/services/tooltip.d.ts.map +0 -1
- package/declarations/app/static/wizard/components/fields/checkbox.d.ts +0 -5
- package/declarations/app/static/wizard/components/fields/checkbox.d.ts.map +0 -1
- package/declarations/app/static/wizard/components/fields/checkboxes.d.ts +0 -7
- package/declarations/app/static/wizard/components/fields/checkboxes.d.ts.map +0 -1
- package/declarations/app/static/wizard/components/fields/image-previews/generic.d.ts +0 -5
- package/declarations/app/static/wizard/components/fields/image-previews/generic.d.ts.map +0 -1
- package/declarations/app/static/wizard/components/fields/image-previews/index.d.ts +0 -9
- package/declarations/app/static/wizard/components/fields/image-previews/index.d.ts.map +0 -1
- package/declarations/app/static/wizard/components/fields/image-previews/logo-small.d.ts +0 -13
- package/declarations/app/static/wizard/components/fields/image-previews/logo-small.d.ts.map +0 -1
- package/declarations/app/static/wizard/components/fields/image-previews/logo.d.ts +0 -19
- package/declarations/app/static/wizard/components/fields/image-previews/logo.d.ts.map +0 -1
- package/declarations/app/static/wizard/components/fields/image.d.ts +0 -15
- package/declarations/app/static/wizard/components/fields/image.d.ts.map +0 -1
- package/declarations/app/static/wizard/components/fields/styling-preview/-homepage-preview.d.ts +0 -29
- package/declarations/app/static/wizard/components/fields/styling-preview/-homepage-preview.d.ts.map +0 -1
- package/declarations/app/static/wizard/components/fields/styling-preview/-preview-base.d.ts +0 -34
- package/declarations/app/static/wizard/components/fields/styling-preview/-preview-base.d.ts.map +0 -1
- package/declarations/app/static/wizard/components/fields/styling-preview/index.d.ts +0 -38
- package/declarations/app/static/wizard/components/fields/styling-preview/index.d.ts.map +0 -1
- package/declarations/app/static/wizard/components/wizard-canvas.d.ts +0 -14
- package/declarations/app/static/wizard/components/wizard-canvas.d.ts.map +0 -1
- package/declarations/app/widgets/actions-summary.d.ts +0 -2
- package/declarations/app/widgets/actions-summary.d.ts.map +0 -1
- package/declarations/app/widgets/bookmark-menu.d.ts +0 -2
- package/declarations/app/widgets/bookmark-menu.d.ts.map +0 -1
- package/declarations/app/widgets/post-user-tip-shim.d.ts +0 -2
- package/declarations/app/widgets/post-user-tip-shim.d.ts.map +0 -1
- package/declarations/app/widgets/topic-status.d.ts +0 -2
- package/declarations/app/widgets/topic-status.d.ts.map +0 -1
- package/declarations/select-kit/compat-modules.d.ts +0 -3
- package/declarations/select-kit/compat-modules.d.ts.map +0 -1
- package/declarations/tests/acceptance/bootstrap-mode-notice-test.d.ts +0 -2
- package/declarations/tests/acceptance/bootstrap-mode-notice-test.d.ts.map +0 -1
- package/declarations/tests/integration/components/widgets/actions-summary-test.d.ts +0 -2
- package/declarations/tests/integration/components/widgets/actions-summary-test.d.ts.map +0 -1
- package/declarations/tests/integration/components/widgets/avatar-flair-test.d.ts +0 -2
- package/declarations/tests/integration/components/widgets/avatar-flair-test.d.ts.map +0 -1
- package/declarations/tests/integration/components/widgets/button-test.d.ts +0 -2
- package/declarations/tests/integration/components/widgets/button-test.d.ts.map +0 -1
- package/declarations/tests/integration/components/widgets/post-cooked-test.d.ts +0 -2
- package/declarations/tests/integration/components/widgets/post-cooked-test.d.ts.map +0 -1
- package/declarations/tests/integration/components/widgets/post-links-test.d.ts +0 -2
- package/declarations/tests/integration/components/widgets/post-links-test.d.ts.map +0 -1
- package/declarations/tests/integration/components/widgets/post-small-action-test.d.ts +0 -2
- package/declarations/tests/integration/components/widgets/post-small-action-test.d.ts.map +0 -1
- package/declarations/tests/integration/components/widgets/post-stream-test.d.ts +0 -2
- package/declarations/tests/integration/components/widgets/post-stream-test.d.ts.map +0 -1
- package/declarations/tests/integration/components/widgets/post-test.d.ts +0 -2
- package/declarations/tests/integration/components/widgets/post-test.d.ts.map +0 -1
- package/declarations/tests/integration/components/widgets/poster-name-test.d.ts +0 -2
- package/declarations/tests/integration/components/widgets/poster-name-test.d.ts.map +0 -1
- package/declarations/tests/integration/components/widgets/render-glimmer-test.d.ts +0 -1
- package/declarations/tests/integration/components/widgets/render-glimmer-test.d.ts.map +0 -1
- package/declarations/tests/integration/components/widgets/small-user-list-test.d.ts +0 -2
- package/declarations/tests/integration/components/widgets/small-user-list-test.d.ts.map +0 -1
- package/declarations/tests/integration/components/widgets/topic-status-test.d.ts +0 -2
- package/declarations/tests/integration/components/widgets/topic-status-test.d.ts.map +0 -1
- package/declarations/tests/integration/components/widgets/widget-dropdown-test.d.ts +0 -2
- package/declarations/tests/integration/components/widgets/widget-dropdown-test.d.ts.map +0 -1
- package/declarations/tests/integration/components/widgets/widget-test.d.ts +0 -2
- package/declarations/tests/integration/components/widgets/widget-test.d.ts.map +0 -1
- package/declarations/tests/set-test-env.d.ts +0 -2
- package/declarations/tests/set-test-env.d.ts.map +0 -1
- package/declarations/tests/test-i18n.d.ts +0 -1
- package/declarations/tests/test-i18n.d.ts.map +0 -1
- package/external-types/@ember-compat__tracked-built-ins/dist/-private/array.d.ts +0 -33
- package/external-types/@ember-compat__tracked-built-ins/dist/-private/decorator.d.ts +0 -14
- package/external-types/@ember-compat__tracked-built-ins/dist/-private/map.d.ts +0 -44
- package/external-types/@ember-compat__tracked-built-ins/dist/-private/object.d.ts +0 -25
- package/external-types/@ember-compat__tracked-built-ins/dist/-private/property-storage-map.d.ts +0 -10
- package/external-types/@ember-compat__tracked-built-ins/dist/-private/set.d.ts +0 -40
- package/external-types/@ember-compat__tracked-built-ins/dist/-private/utils.d.ts +0 -6
- package/external-types/@ember-compat__tracked-built-ins/dist/-private/validator-versions.d.ts +0 -5
- package/external-types/@ember-compat__tracked-built-ins/dist/index.d.ts +0 -8
- package/external-types/@ember__render-modifiers/types/-private.d.ts +0 -13
- package/external-types/@ember__render-modifiers/types/modifiers/did-insert.d.ts +0 -11
- package/external-types/@ember__render-modifiers/types/modifiers/did-update.d.ts +0 -11
- package/external-types/@ember__render-modifiers/types/modifiers/will-destroy.d.ts +0 -11
- package/external-types/@ember__render-modifiers/types/template-registry.d.ts +0 -12
- package/external-types/@ember__string/declarations/index.d.ts +0 -159
- package/external-types/@ember__test-helpers/declarations/-internal/build-registry.d.ts +0 -36
- package/external-types/@ember__test-helpers/declarations/-internal/debug-info-helpers.d.ts +0 -28
- package/external-types/@ember__test-helpers/declarations/-internal/debug-info.d.ts +0 -71
- package/external-types/@ember__test-helpers/declarations/-internal/deprecations.d.ts +0 -37
- package/external-types/@ember__test-helpers/declarations/-internal/is-component.d.ts +0 -13
- package/external-types/@ember__test-helpers/declarations/-internal/is-promise.d.ts +0 -12
- package/external-types/@ember__test-helpers/declarations/-internal/render-settled.d.ts +0 -5
- package/external-types/@ember__test-helpers/declarations/-internal/warnings.d.ts +0 -32
- package/external-types/@ember__test-helpers/declarations/-tuple.d.ts +0 -5
- package/external-types/@ember__test-helpers/declarations/-utils.d.ts +0 -39
- package/external-types/@ember__test-helpers/declarations/application.d.ts +0 -21
- package/external-types/@ember__test-helpers/declarations/build-owner.d.ts +0 -35
- package/external-types/@ember__test-helpers/declarations/dom/-get-description.d.ts +0 -13
- package/external-types/@ember__test-helpers/declarations/dom/-get-element.d.ts +0 -16
- package/external-types/@ember__test-helpers/declarations/dom/-get-elements.d.ts +0 -8
- package/external-types/@ember__test-helpers/declarations/dom/-get-window-or-element.d.ts +0 -12
- package/external-types/@ember__test-helpers/declarations/dom/-guard-for-maxlength.d.ts +0 -12
- package/external-types/@ember__test-helpers/declarations/dom/-is-focusable.d.ts +0 -9
- package/external-types/@ember__test-helpers/declarations/dom/-is-form-control.d.ts +0 -10
- package/external-types/@ember__test-helpers/declarations/dom/-is-select-element.d.ts +0 -9
- package/external-types/@ember__test-helpers/declarations/dom/-logging.d.ts +0 -21
- package/external-types/@ember__test-helpers/declarations/dom/-target.d.ts +0 -12
- package/external-types/@ember__test-helpers/declarations/dom/-to-array.d.ts +0 -9
- package/external-types/@ember__test-helpers/declarations/dom/blur.d.ts +0 -37
- package/external-types/@ember__test-helpers/declarations/dom/click.d.ts +0 -65
- package/external-types/@ember__test-helpers/declarations/dom/double-click.d.ts +0 -65
- package/external-types/@ember__test-helpers/declarations/dom/fill-in.d.ts +0 -22
- package/external-types/@ember__test-helpers/declarations/dom/find-all.d.ts +0 -7
- package/external-types/@ember__test-helpers/declarations/dom/find.d.ts +0 -7
- package/external-types/@ember__test-helpers/declarations/dom/fire-event.d.ts +0 -18
- package/external-types/@ember__test-helpers/declarations/dom/focus.d.ts +0 -41
- package/external-types/@ember__test-helpers/declarations/dom/get-root-element.d.ts +0 -17
- package/external-types/@ember__test-helpers/declarations/dom/scroll-to.d.ts +0 -21
- package/external-types/@ember__test-helpers/declarations/dom/select.d.ts +0 -28
- package/external-types/@ember__test-helpers/declarations/dom/tab.d.ts +0 -31
- package/external-types/@ember__test-helpers/declarations/dom/tap.d.ts +0 -47
- package/external-types/@ember__test-helpers/declarations/dom/trigger-event.d.ts +0 -49
- package/external-types/@ember__test-helpers/declarations/dom/trigger-key-event.d.ts +0 -44
- package/external-types/@ember__test-helpers/declarations/dom/type-in.d.ts +0 -32
- package/external-types/@ember__test-helpers/declarations/dom/wait-for-focus.d.ts +0 -27
- package/external-types/@ember__test-helpers/declarations/dom/wait-for.d.ts +0 -27
- package/external-types/@ember__test-helpers/declarations/global.d.ts +0 -5
- package/external-types/@ember__test-helpers/declarations/has-ember-version.d.ts +0 -13
- package/external-types/@ember__test-helpers/declarations/helper-hooks.d.ts +0 -48
- package/external-types/@ember__test-helpers/declarations/index.d.ts +0 -49
- package/external-types/@ember__test-helpers/declarations/rerender.d.ts +0 -20
- package/external-types/@ember__test-helpers/declarations/resolver.d.ts +0 -21
- package/external-types/@ember__test-helpers/declarations/settled.d.ts +0 -72
- package/external-types/@ember__test-helpers/declarations/setup-application-context.d.ts +0 -69
- package/external-types/@ember__test-helpers/declarations/setup-context.d.ts +0 -209
- package/external-types/@ember__test-helpers/declarations/setup-onerror.d.ts +0 -53
- package/external-types/@ember__test-helpers/declarations/setup-rendering-context.d.ts +0 -75
- package/external-types/@ember__test-helpers/declarations/teardown-context.d.ts +0 -23
- package/external-types/@ember__test-helpers/declarations/test-metadata.d.ts +0 -28
- package/external-types/@ember__test-helpers/declarations/validate-error-handler.d.ts +0 -35
- package/external-types/@ember__test-helpers/declarations/wait-until.d.ts +0 -31
- package/external-types/@floating-ui__dom/dist/floating-ui.dom.d.mts +0 -356
- package/external-types/@floating-ui__dom/dist/floating-ui.dom.d.ts +0 -359
- package/external-types/@glimmer__component/dist/-private/base-component-manager.d.ts +0 -15
- package/external-types/@glimmer__component/dist/-private/component.d.ts +0 -247
- package/external-types/@glimmer__component/dist/-private/ember-component-manager.d.ts +0 -20
- package/external-types/@glimmer__component/dist/index.d.ts +0 -393
- package/external-types/@glimmer__syntax/dist/dev/index.d.cts +0 -5977
- package/external-types/@glimmer__syntax/dist/dev/index.d.ts +0 -5979
- package/external-types/@glimmer__syntax/dist/prod/index.d.ts +0 -5977
- package/external-types/@glint__ember-tsc/lib/cli/run-volar-tsc.d.ts +0 -4
- package/external-types/@glint__ember-tsc/lib/config/config.d.ts +0 -17
- package/external-types/@glint__ember-tsc/lib/config/environment.d.ts +0 -28
- package/external-types/@glint__ember-tsc/lib/config/index.d.ts +0 -19
- package/external-types/@glint__ember-tsc/lib/config/loader.d.ts +0 -27
- package/external-types/@glint__ember-tsc/lib/config/types.d.cts +0 -62
- package/external-types/@glint__ember-tsc/lib/environment-ember-template-imports/-private/environment/common.d.ts +0 -15
- package/external-types/@glint__ember-tsc/lib/environment-ember-template-imports/-private/environment/index.d.ts +0 -5
- package/external-types/@glint__ember-tsc/lib/environment-ember-template-imports/-private/environment/preprocess.d.ts +0 -6
- package/external-types/@glint__ember-tsc/lib/environment-ember-template-imports/-private/environment/transform.d.ts +0 -6
- package/external-types/@glint__ember-tsc/lib/index.d.ts +0 -9
- package/external-types/@glint__ember-tsc/lib/plugins/g-compiler-errors.d.ts +0 -14
- package/external-types/@glint__ember-tsc/lib/plugins/g-template-tag-symbols.d.ts +0 -13
- package/external-types/@glint__ember-tsc/lib/plugins/utils.d.ts +0 -27
- package/external-types/@glint__ember-tsc/lib/transform/diagnostics/augmentation.d.ts +0 -6
- package/external-types/@glint__ember-tsc/lib/transform/diagnostics/index.d.ts +0 -7
- package/external-types/@glint__ember-tsc/lib/transform/index.d.ts +0 -6
- package/external-types/@glint__ember-tsc/lib/transform/template/code-features.d.ts +0 -32
- package/external-types/@glint__ember-tsc/lib/transform/template/glimmer-ast-mapping-tree.d.ts +0 -82
- package/external-types/@glint__ember-tsc/lib/transform/template/inlining/index.d.ts +0 -18
- package/external-types/@glint__ember-tsc/lib/transform/template/inlining/tagged-strings.d.ts +0 -10
- package/external-types/@glint__ember-tsc/lib/transform/template/map-template-contents.d.ts +0 -123
- package/external-types/@glint__ember-tsc/lib/transform/template/rewrite-module.d.ts +0 -24
- package/external-types/@glint__ember-tsc/lib/transform/template/scope-stack.d.ts +0 -15
- package/external-types/@glint__ember-tsc/lib/transform/template/template-to-typescript.d.ts +0 -21
- package/external-types/@glint__ember-tsc/lib/transform/template/transformed-module.d.ts +0 -113
- package/external-types/@glint__ember-tsc/lib/transform/util.d.ts +0 -9
- package/external-types/@glint__ember-tsc/lib/volar/ember-language-plugin.d.ts +0 -16
- package/external-types/@glint__ember-tsc/lib/volar/gts-virtual-code.d.ts +0 -85
- package/external-types/@glint__ember-tsc/lib/volar/language-server.d.ts +0 -4
- package/external-types/@glint__ember-tsc/lib/volar/script-snapshot.d.ts +0 -19
- package/external-types/@glint__ember-tsc/package.json +0 -104
- package/external-types/@glint__ember-tsc/types/-private/dsl/globals.d.ts +0 -207
- package/external-types/@glint__ember-tsc/types/-private/dsl/index.d.ts +0 -50
- package/external-types/@glint__ember-tsc/types/-private/dsl/integration-declarations.d.ts +0 -138
- package/external-types/@glint__ember-tsc/types/-private/intrinsics/action.d.ts +0 -48
- package/external-types/@glint__ember-tsc/types/-private/intrinsics/concat.d.ts +0 -9
- package/external-types/@glint__ember-tsc/types/-private/intrinsics/each-in.d.ts +0 -27
- package/external-types/@glint__ember-tsc/types/-private/intrinsics/each.d.ts +0 -20
- package/external-types/@glint__ember-tsc/types/-private/intrinsics/fn.d.ts +0 -47
- package/external-types/@glint__ember-tsc/types/-private/intrinsics/get.d.ts +0 -34
- package/external-types/@glint__ember-tsc/types/-private/intrinsics/input.d.ts +0 -24
- package/external-types/@glint__ember-tsc/types/-private/intrinsics/link-to.d.ts +0 -31
- package/external-types/@glint__ember-tsc/types/-private/intrinsics/log.d.ts +0 -9
- package/external-types/@glint__ember-tsc/types/-private/intrinsics/mount.d.ts +0 -12
- package/external-types/@glint__ember-tsc/types/-private/intrinsics/mut.d.ts +0 -17
- package/external-types/@glint__ember-tsc/types/-private/intrinsics/on.d.ts +0 -24
- package/external-types/@glint__ember-tsc/types/-private/intrinsics/outlet.d.ts +0 -11
- package/external-types/@glint__ember-tsc/types/-private/intrinsics/textarea.d.ts +0 -16
- package/external-types/@glint__ember-tsc/types/-private/intrinsics/unbound.d.ts +0 -13
- package/external-types/@glint__ember-tsc/types/-private/intrinsics/unique-id.d.ts +0 -8
- package/external-types/@glint__ember-tsc/types/globals/index.d.ts +0 -6
- package/external-types/@glint__ember-tsc/types/silent-error.d.ts +0 -4
- package/external-types/@glint__template/-private/dsl/elements.d.ts +0 -4393
- package/external-types/@glint__template/-private/dsl/emit.d.ts +0 -178
- package/external-types/@glint__template/-private/dsl/lib.dom.augmentation.d.ts +0 -144
- package/external-types/@glint__template/-private/dsl/resolve.d.ts +0 -69
- package/external-types/@glint__template/-private/dsl/types.d.ts +0 -63
- package/external-types/@glint__template/-private/dsl.d.ts +0 -10
- package/external-types/@glint__template/-private/index.d.ts +0 -187
- package/external-types/@glint__template/-private/integration.d.ts +0 -82
- package/external-types/@glint__template/-private/keywords/-bind-invokable.d.ts +0 -98
- package/external-types/@glint__template/-private/keywords/component.d.ts +0 -7
- package/external-types/@glint__template/-private/keywords/debugger.d.ts +0 -6
- package/external-types/@glint__template/-private/keywords/each.d.ts +0 -19
- package/external-types/@glint__template/-private/keywords/has-block-params.d.ts +0 -9
- package/external-types/@glint__template/-private/keywords/has-block.d.ts +0 -9
- package/external-types/@glint__template/-private/keywords/helper.d.ts +0 -6
- package/external-types/@glint__template/-private/keywords/in-element.d.ts +0 -16
- package/external-types/@glint__template/-private/keywords/let.d.ts +0 -12
- package/external-types/@glint__template/-private/keywords/modifier.d.ts +0 -7
- package/external-types/@glint__template/-private/keywords/with.d.ts +0 -16
- package/external-types/@glint__template/-private/keywords.d.ts +0 -13
- package/external-types/@glint__template/-private/signature.d.ts +0 -86
- package/external-types/@types__qunit/index.d.ts +0 -935
- package/external-types/@types__qunit/package.json +0 -51
- package/external-types/@types__rsvp/index.d.ts +0 -497
- package/external-types/@types__rsvp/package.json +0 -35
- package/external-types/ember-modifier/declarations/-private/class-based/modifier-manager.d.ts +0 -43
- package/external-types/ember-modifier/declarations/-private/class-based/modifier.d.ts +0 -66
- package/external-types/ember-modifier/declarations/-private/function-based/modifier-manager.d.ts +0 -25
- package/external-types/ember-modifier/declarations/-private/function-based/modifier.d.ts +0 -71
- package/external-types/ember-modifier/declarations/-private/opaque.d.ts +0 -10
- package/external-types/ember-modifier/declarations/-private/signature.d.ts +0 -107
- package/external-types/ember-modifier/declarations/index.d.ts +0 -7
- package/external-types/ember-qunit/types/index.d.ts +0 -285
- package/external-types/ember-qunit/types/local-types.d.ts +0 -5
- package/external-types/ember-qunit/types/test-loader.d.ts +0 -4
- package/external-types.d.ts +0 -102
- /package/external-types/{@ember-compat__tracked-built-ins → ember-compat__tracked-built-ins}/LICENSE.md +0 -0
- /package/external-types/{@ember__render-modifiers → ember__render-modifiers}/LICENSE.md +0 -0
- /package/external-types/{@ember__string → ember__string}/LICENSE.md +0 -0
- /package/external-types/{@floating-ui__dom → floating-ui__dom}/LICENSE +0 -0
- /package/external-types/{@glimmer__syntax → glimmer__syntax}/LICENSE +0 -0
- /package/external-types/{@glint__ember-tsc → glint__template}/LICENSE +0 -0
- /package/external-types/{@types__qunit → jquery}/LICENSE +0 -0
- /package/external-types/{@types__rsvp → qunit}/LICENSE +0 -0
|
@@ -0,0 +1,1771 @@
|
|
|
1
|
+
declare module '@ember/test-helpers/-tuple' {
|
|
2
|
+
export type Lit = string | number | boolean | undefined | null | void | {};
|
|
3
|
+
export default function tuple<T extends Lit[]>(...args: T): T;
|
|
4
|
+
//# sourceMappingURL=-tuple.d.ts.map
|
|
5
|
+
}
|
|
6
|
+
declare module '@ember/test-helpers/-utils' {
|
|
7
|
+
export const nextTick: (cb: () => void) => Promise<void>;
|
|
8
|
+
export const futureTick: typeof setTimeout;
|
|
9
|
+
/**
|
|
10
|
+
Retrieves an array of destroyables from the specified property on the object
|
|
11
|
+
provided, iterates that array invoking each function, then deleting the
|
|
12
|
+
property (clearing the array).
|
|
13
|
+
|
|
14
|
+
@private
|
|
15
|
+
@param {Object} object an object to search for the destroyable array within
|
|
16
|
+
@param {string} property the property on the object that contains the destroyable array
|
|
17
|
+
*/
|
|
18
|
+
export function runDestroyablesFor(object: any, property: string): void;
|
|
19
|
+
/**
|
|
20
|
+
Returns whether the passed in string consists only of numeric characters.
|
|
21
|
+
|
|
22
|
+
@private
|
|
23
|
+
@param {string} n input string
|
|
24
|
+
@returns {boolean} whether the input string consists only of numeric characters
|
|
25
|
+
*/
|
|
26
|
+
export function isNumeric(n: string): boolean;
|
|
27
|
+
/**
|
|
28
|
+
Checks if an element is considered visible by the focus area spec.
|
|
29
|
+
|
|
30
|
+
@private
|
|
31
|
+
@param {Element} element the element to check
|
|
32
|
+
@returns {boolean} `true` when the element is visible, `false` otherwise
|
|
33
|
+
*/
|
|
34
|
+
export function isVisible(element: Element): boolean;
|
|
35
|
+
/**
|
|
36
|
+
Checks if an element is disabled.
|
|
37
|
+
|
|
38
|
+
@private
|
|
39
|
+
@param {Element} element the element to check
|
|
40
|
+
@returns {boolean} `true` when the element is disabled, `false` otherwise
|
|
41
|
+
*/
|
|
42
|
+
export function isDisabled(element: HTMLElement): boolean;
|
|
43
|
+
//# sourceMappingURL=-utils.d.ts.map
|
|
44
|
+
}
|
|
45
|
+
declare module '@ember/test-helpers/application' {
|
|
46
|
+
import Application from '@ember/application';
|
|
47
|
+
/**
|
|
48
|
+
Stores the provided application instance so that tests being ran will be aware of the application under test.
|
|
49
|
+
|
|
50
|
+
- Required by `setupApplicationContext` method.
|
|
51
|
+
- Used by `setupContext` and `setupRenderingContext` when present.
|
|
52
|
+
|
|
53
|
+
@public
|
|
54
|
+
@param {Ember.Application} application the application that will be tested
|
|
55
|
+
*/
|
|
56
|
+
export function setApplication(application: Application): void;
|
|
57
|
+
/**
|
|
58
|
+
Retrieve the application instance stored by `setApplication`.
|
|
59
|
+
|
|
60
|
+
@public
|
|
61
|
+
@returns {Ember.Application} the previously stored application instance under test
|
|
62
|
+
*/
|
|
63
|
+
export function getApplication(): Application | undefined;
|
|
64
|
+
//# sourceMappingURL=application.d.ts.map
|
|
65
|
+
}
|
|
66
|
+
declare module '@ember/test-helpers/build-owner' {
|
|
67
|
+
import Application from '@ember/application';
|
|
68
|
+
import type { Resolver } from '@ember/owner';
|
|
69
|
+
import type EmberOwner from '@ember/owner';
|
|
70
|
+
import type { SimpleElement } from '@simple-dom/interface';
|
|
71
|
+
export interface Owner extends EmberOwner {
|
|
72
|
+
_emberTestHelpersMockOwner?: boolean;
|
|
73
|
+
rootElement?: string | Element | SimpleElement | null;
|
|
74
|
+
_lookupFactory?(key: string): any;
|
|
75
|
+
visit(url: string, options?: {
|
|
76
|
+
[key: string]: any;
|
|
77
|
+
}): Promise<any>;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
Creates an "owner" (an object that either _is_ or duck-types like an
|
|
81
|
+
`Ember.ApplicationInstance`) from the provided options.
|
|
82
|
+
|
|
83
|
+
If `options.application` is present (e.g. setup by an earlier call to
|
|
84
|
+
`setApplication`) an `Ember.ApplicationInstance` is built via
|
|
85
|
+
`application.buildInstance()`.
|
|
86
|
+
|
|
87
|
+
If `options.application` is not present, we fall back to using
|
|
88
|
+
`options.resolver` instead (setup via `setResolver`). This creates a mock
|
|
89
|
+
"owner" by using a custom created combination of `Ember.Registry`,
|
|
90
|
+
`Ember.Container`, `Ember._ContainerProxyMixin`, and
|
|
91
|
+
`Ember._RegistryProxyMixin`.
|
|
92
|
+
|
|
93
|
+
@private
|
|
94
|
+
@param {Ember.Application} [application] the Ember.Application to build an instance from
|
|
95
|
+
@param {Ember.Resolver} [resolver] the resolver to use to back a "mock owner"
|
|
96
|
+
@returns {Promise<Ember.ApplicationInstance>} a promise resolving to the generated "owner"
|
|
97
|
+
*/
|
|
98
|
+
export default function buildOwner(application: Application | undefined | null, resolver: Resolver | undefined | null): Promise<Owner>;
|
|
99
|
+
//# sourceMappingURL=build-owner.d.ts.map
|
|
100
|
+
}
|
|
101
|
+
declare module '@ember/test-helpers/global' {
|
|
102
|
+
const _default: any;
|
|
103
|
+
export default _default;
|
|
104
|
+
//# sourceMappingURL=global.d.ts.map
|
|
105
|
+
}
|
|
106
|
+
declare module '@ember/test-helpers/has-ember-version' {
|
|
107
|
+
/**
|
|
108
|
+
Checks if the currently running Ember version is greater than or equal to the
|
|
109
|
+
specified major and minor version numbers.
|
|
110
|
+
|
|
111
|
+
@private
|
|
112
|
+
@param {number} major the major version number to compare
|
|
113
|
+
@param {number} minor the minor version number to compare
|
|
114
|
+
@returns {boolean} true if the Ember version is >= MAJOR.MINOR specified, false otherwise
|
|
115
|
+
*/
|
|
116
|
+
export default function hasEmberVersion(major: number, minor: number): boolean;
|
|
117
|
+
//# sourceMappingURL=has-ember-version.d.ts.map
|
|
118
|
+
}
|
|
119
|
+
declare module '@ember/test-helpers/helper-hooks' {
|
|
120
|
+
export type Hook = (...args: any[]) => void | Promise<void>;
|
|
121
|
+
export type HookLabel = 'start' | 'end' | 'targetFound';
|
|
122
|
+
export type HookUnregister = {
|
|
123
|
+
unregister: () => void;
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* Registers a function to be run during the invocation of a test helper.
|
|
127
|
+
*
|
|
128
|
+
* @param {string} helperName The name of the test helper in which to run the hook.
|
|
129
|
+
* Test helper names include `blur`, `click`, `doubleClick`, `fillIn`,
|
|
130
|
+
* `fireEvent`, `focus`, `render`, `scrollTo`, `select`, `tab`, `tap`, `triggerEvent`,
|
|
131
|
+
* `triggerKeyEvent`, `typeIn`, and `visit`.
|
|
132
|
+
* @param {string} label A label to help identify the hook. Built-in labels include `start`, `end`,
|
|
133
|
+
* and `targetFound`, the former designating either the start or end of
|
|
134
|
+
* the helper invocation.
|
|
135
|
+
* @param {Function} hook The hook function to run when the test helper is invoked.
|
|
136
|
+
* @returns {HookUnregister} An object containing an `unregister` function that unregisters
|
|
137
|
+
* the specific hook initially registered to the helper.
|
|
138
|
+
* @example
|
|
139
|
+
* <caption>
|
|
140
|
+
* Registering a hook for the `end` point of the `click` test helper invocation
|
|
141
|
+
* </caption>
|
|
142
|
+
*
|
|
143
|
+
* const hook = registerHook('click', 'end', () => {
|
|
144
|
+
* console.log('Running `click:end` test helper hook');
|
|
145
|
+
* });
|
|
146
|
+
*
|
|
147
|
+
* // Unregister the hook at some later point in time
|
|
148
|
+
* hook.unregister();
|
|
149
|
+
*/
|
|
150
|
+
export function registerHook(helperName: string, label: HookLabel, hook: Hook): HookUnregister;
|
|
151
|
+
/**
|
|
152
|
+
* Runs all hooks registered for a specific test helper.
|
|
153
|
+
*
|
|
154
|
+
* @param {string} helperName The name of the test helper in which to run the hook.
|
|
155
|
+
* Test helper names include `blur`, `click`, `doubleClick`, `fillIn`,
|
|
156
|
+
* `fireEvent`, `focus`, `render`, `scrollTo`, `select`, `tab`, `tap`, `triggerEvent`,
|
|
157
|
+
* `triggerKeyEvent`, `typeIn`, and `visit`.
|
|
158
|
+
* @param {string} label A label to help identify the hook. Built-in labels include `start`, `end`,
|
|
159
|
+
* and `targetFound`, the former designating either the start or end of
|
|
160
|
+
* the helper invocation.
|
|
161
|
+
* @param {unknown[]} args Any arguments originally passed to the test helper.
|
|
162
|
+
* @returns {Promise<void>} A promise representing the serial invocation of the hooks.
|
|
163
|
+
*/
|
|
164
|
+
export function runHooks(helperName: string, label: HookLabel, ...args: unknown[]): Promise<void>;
|
|
165
|
+
//# sourceMappingURL=helper-hooks.d.ts.map
|
|
166
|
+
}
|
|
167
|
+
declare module '@ember/test-helpers/resolver' {
|
|
168
|
+
import type { Resolver } from '@ember/owner';
|
|
169
|
+
/**
|
|
170
|
+
Stores the provided resolver instance so that tests being ran can resolve
|
|
171
|
+
objects in the same way as a normal application.
|
|
172
|
+
|
|
173
|
+
Used by `setupContext` and `setupRenderingContext` as a fallback when `setApplication` was _not_ used.
|
|
174
|
+
|
|
175
|
+
@public
|
|
176
|
+
@param {Ember.Resolver} resolver the resolver to be used for testing
|
|
177
|
+
*/
|
|
178
|
+
export function setResolver(resolver: Resolver): void;
|
|
179
|
+
/**
|
|
180
|
+
Retrieve the resolver instance stored by `setResolver`.
|
|
181
|
+
|
|
182
|
+
@public
|
|
183
|
+
@returns {Ember.Resolver} the previously stored resolver
|
|
184
|
+
*/
|
|
185
|
+
export function getResolver(): Resolver | undefined;
|
|
186
|
+
//# sourceMappingURL=resolver.d.ts.map
|
|
187
|
+
}
|
|
188
|
+
declare module '@ember/test-helpers/-internal/deprecations' {
|
|
189
|
+
import type { BaseContext } from '@ember/test-helpers/setup-context';
|
|
190
|
+
export interface DeprecationOptions {
|
|
191
|
+
id: string;
|
|
192
|
+
until: string;
|
|
193
|
+
for?: string;
|
|
194
|
+
since?: {
|
|
195
|
+
available: string;
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
export interface DeprecationFailure {
|
|
199
|
+
message: string;
|
|
200
|
+
options?: DeprecationOptions;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
*
|
|
204
|
+
* Provides the list of deprecation failures associated with a given base context;
|
|
205
|
+
*
|
|
206
|
+
* @private
|
|
207
|
+
* @param {BaseContext} [context] the test context
|
|
208
|
+
* @return {Array<DeprecationFailure>} the Deprecation Failures associated with the corresponding BaseContext;
|
|
209
|
+
*/
|
|
210
|
+
export function getDeprecationsForContext(context: BaseContext): Array<DeprecationFailure>;
|
|
211
|
+
/**
|
|
212
|
+
*
|
|
213
|
+
* Provides the list of deprecation failures associated with a given base
|
|
214
|
+
* context which occur while a callback is executed. This callback can be
|
|
215
|
+
* synchronous, or it can be an async function.
|
|
216
|
+
*
|
|
217
|
+
* @private
|
|
218
|
+
* @param {BaseContext} [context] the test context
|
|
219
|
+
* @param {Function} [callback] The callback that when executed will have its DeprecationFailure recorded
|
|
220
|
+
* @return {Array<DeprecationFailure>} The Deprecation Failures associated with the corresponding baseContext which occurred while the CallbackFunction was executed
|
|
221
|
+
*/
|
|
222
|
+
export function getDeprecationsDuringCallbackForContext(context: BaseContext, callback: () => void): Array<DeprecationFailure> | Promise<Array<DeprecationFailure>>;
|
|
223
|
+
//# sourceMappingURL=deprecations.d.ts.map
|
|
224
|
+
}
|
|
225
|
+
declare module '@ember/test-helpers/-internal/warnings' {
|
|
226
|
+
import type { BaseContext } from '@ember/test-helpers/setup-context';
|
|
227
|
+
export interface WarningOptions {
|
|
228
|
+
id?: string;
|
|
229
|
+
}
|
|
230
|
+
export interface Warning {
|
|
231
|
+
message: string;
|
|
232
|
+
options?: WarningOptions;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
*
|
|
236
|
+
* Provides the list of warnings associated with a given base context;
|
|
237
|
+
*
|
|
238
|
+
* @private
|
|
239
|
+
* @param {BaseContext} [context] the test context
|
|
240
|
+
* @return {Array<Warning>} the warnings associated with the corresponding BaseContext;
|
|
241
|
+
*/
|
|
242
|
+
export function getWarningsForContext(context: BaseContext): Array<Warning>;
|
|
243
|
+
/**
|
|
244
|
+
*
|
|
245
|
+
* Provides the list of warnings associated with a given test context which
|
|
246
|
+
* occurred only while a the provided callback is executed. This callback can be
|
|
247
|
+
* synchronous, or it can be an async function.
|
|
248
|
+
*
|
|
249
|
+
* @private
|
|
250
|
+
* @param {BaseContext} [context] the test context
|
|
251
|
+
* @param {Function} [callback] The callback that when executed will have its warnings recorded
|
|
252
|
+
* @return {Array<Warning>} The warnings associated with the corresponding baseContext which occurred while the CallbackFunction was executed
|
|
253
|
+
*/
|
|
254
|
+
export function getWarningsDuringCallbackForContext(context: BaseContext, callback: () => void): Array<Warning> | Promise<Array<Warning>>;
|
|
255
|
+
//# sourceMappingURL=warnings.d.ts.map
|
|
256
|
+
}
|
|
257
|
+
declare module '@ember/test-helpers/setup-context' {
|
|
258
|
+
import type { Resolver } from '@ember/owner';
|
|
259
|
+
import { type Owner } from 'declarations/build-owner.ts';
|
|
260
|
+
import { type DeprecationFailure } from 'declarations/-internal/deprecations.ts';
|
|
261
|
+
import { type Warning } from 'declarations/-internal/warnings.ts';
|
|
262
|
+
export interface SetupContextOptions {
|
|
263
|
+
resolver?: Resolver | undefined;
|
|
264
|
+
}
|
|
265
|
+
export type BaseContext = object;
|
|
266
|
+
/**
|
|
267
|
+
* The public API for the test context, which test authors can depend on being
|
|
268
|
+
* available.
|
|
269
|
+
*
|
|
270
|
+
* Note: this is *not* user-constructible; it becomes available by calling
|
|
271
|
+
* `setupContext()` with a base context object.
|
|
272
|
+
*/
|
|
273
|
+
export interface TestContext extends BaseContext {
|
|
274
|
+
owner: Owner;
|
|
275
|
+
set<T>(key: string, value: T): T;
|
|
276
|
+
setProperties<T extends Record<string, unknown>>(hash: T): T;
|
|
277
|
+
get(key: string): unknown;
|
|
278
|
+
getProperties(...args: string[]): Record<string, unknown>;
|
|
279
|
+
pauseTest(): Promise<void>;
|
|
280
|
+
resumeTest(): void;
|
|
281
|
+
}
|
|
282
|
+
export function isTestContext(context: BaseContext): context is TestContext;
|
|
283
|
+
/**
|
|
284
|
+
Stores the provided context as the "global testing context".
|
|
285
|
+
|
|
286
|
+
Generally setup automatically by `setupContext`.
|
|
287
|
+
|
|
288
|
+
@public
|
|
289
|
+
@param {Object} context the context to use
|
|
290
|
+
*/
|
|
291
|
+
export function setContext(context: BaseContext): void;
|
|
292
|
+
/**
|
|
293
|
+
Retrieve the "global testing context" as stored by `setContext`.
|
|
294
|
+
|
|
295
|
+
@public
|
|
296
|
+
@returns {Object} the previously stored testing context
|
|
297
|
+
*/
|
|
298
|
+
export function getContext(): BaseContext | undefined;
|
|
299
|
+
/**
|
|
300
|
+
Clear the "global testing context".
|
|
301
|
+
|
|
302
|
+
Generally invoked from `teardownContext`.
|
|
303
|
+
|
|
304
|
+
@public
|
|
305
|
+
*/
|
|
306
|
+
export function unsetContext(): void;
|
|
307
|
+
/**
|
|
308
|
+
* Returns a promise to be used to pauses the current test (due to being
|
|
309
|
+
* returned from the test itself). This is useful for debugging while testing
|
|
310
|
+
* or for test-driving. It allows you to inspect the state of your application
|
|
311
|
+
* at any point.
|
|
312
|
+
*
|
|
313
|
+
* The test framework wrapper (e.g. `ember-qunit` or `ember-mocha`) should
|
|
314
|
+
* ensure that when `pauseTest()` is used, any framework specific test timeouts
|
|
315
|
+
* are disabled.
|
|
316
|
+
*
|
|
317
|
+
* @public
|
|
318
|
+
* @returns {Promise<void>} resolves _only_ when `resumeTest()` is invoked
|
|
319
|
+
* @example <caption>Usage via ember-qunit</caption>
|
|
320
|
+
*
|
|
321
|
+
* import { setupRenderingTest } from 'ember-qunit';
|
|
322
|
+
* import { render, click, pauseTest } from '@ember/test-helpers';
|
|
323
|
+
*
|
|
324
|
+
*
|
|
325
|
+
* module('awesome-sauce', function(hooks) {
|
|
326
|
+
* setupRenderingTest(hooks);
|
|
327
|
+
*
|
|
328
|
+
* test('does something awesome', async function(assert) {
|
|
329
|
+
* await render(hbs`{{awesome-sauce}}`);
|
|
330
|
+
*
|
|
331
|
+
* // added here to visualize / interact with the DOM prior
|
|
332
|
+
* // to the interaction below
|
|
333
|
+
* await pauseTest();
|
|
334
|
+
*
|
|
335
|
+
* click('.some-selector');
|
|
336
|
+
*
|
|
337
|
+
* assert.equal(this.element.textContent, 'this sauce is awesome!');
|
|
338
|
+
* });
|
|
339
|
+
* });
|
|
340
|
+
*/
|
|
341
|
+
export function pauseTest(): Promise<void>;
|
|
342
|
+
/**
|
|
343
|
+
Resumes a test previously paused by `await pauseTest()`.
|
|
344
|
+
|
|
345
|
+
@public
|
|
346
|
+
*/
|
|
347
|
+
export function resumeTest(): void;
|
|
348
|
+
/**
|
|
349
|
+
* Returns deprecations which have occurred so far for a the current test context
|
|
350
|
+
*
|
|
351
|
+
* @public
|
|
352
|
+
* @returns {Array<DeprecationFailure>} An array of deprecation messages
|
|
353
|
+
* @example <caption>Usage via ember-qunit</caption>
|
|
354
|
+
*
|
|
355
|
+
* import { getDeprecations } from '@ember/test-helpers';
|
|
356
|
+
*
|
|
357
|
+
* module('awesome-sauce', function(hooks) {
|
|
358
|
+
* setupRenderingTest(hooks);
|
|
359
|
+
*
|
|
360
|
+
* test('does something awesome', function(assert) {
|
|
361
|
+
const deprecations = getDeprecations() // => returns deprecations which have occurred so far in this test
|
|
362
|
+
* });
|
|
363
|
+
* });
|
|
364
|
+
*/
|
|
365
|
+
export function getDeprecations(): Array<DeprecationFailure>;
|
|
366
|
+
export type { DeprecationFailure };
|
|
367
|
+
/**
|
|
368
|
+
* Returns deprecations which have occurred so far for a the current test context
|
|
369
|
+
*
|
|
370
|
+
* @public
|
|
371
|
+
* @param {Function} [callback] The callback that when executed will have its DeprecationFailure recorded
|
|
372
|
+
* @returns {Array<DeprecationFailure> | Promise<Array<DeprecationFailure>>} An array of deprecation messages
|
|
373
|
+
* @example <caption>Usage via ember-qunit</caption>
|
|
374
|
+
*
|
|
375
|
+
* import { getDeprecationsDuringCallback } from '@ember/test-helpers';
|
|
376
|
+
*
|
|
377
|
+
* module('awesome-sauce', function(hooks) {
|
|
378
|
+
* setupRenderingTest(hooks);
|
|
379
|
+
*
|
|
380
|
+
* test('does something awesome', function(assert) {
|
|
381
|
+
* const deprecations = getDeprecationsDuringCallback(() => {
|
|
382
|
+
* // code that might emit some deprecations
|
|
383
|
+
*
|
|
384
|
+
* }); // => returns deprecations which occurred while the callback was invoked
|
|
385
|
+
* });
|
|
386
|
+
*
|
|
387
|
+
*
|
|
388
|
+
* test('does something awesome', async function(assert) {
|
|
389
|
+
* const deprecations = await getDeprecationsDuringCallback(async () => {
|
|
390
|
+
* // awaited code that might emit some deprecations
|
|
391
|
+
* }); // => returns deprecations which occurred while the callback was invoked
|
|
392
|
+
* });
|
|
393
|
+
* });
|
|
394
|
+
*/
|
|
395
|
+
export function getDeprecationsDuringCallback(callback: () => void): Array<DeprecationFailure> | Promise<Array<DeprecationFailure>>;
|
|
396
|
+
/**
|
|
397
|
+
* Returns warnings which have occurred so far for a the current test context
|
|
398
|
+
*
|
|
399
|
+
* @public
|
|
400
|
+
* @returns {Array<Warning>} An array of warnings
|
|
401
|
+
* @example <caption>Usage via ember-qunit</caption>
|
|
402
|
+
*
|
|
403
|
+
* import { getWarnings } from '@ember/test-helpers';
|
|
404
|
+
*
|
|
405
|
+
* module('awesome-sauce', function(hooks) {
|
|
406
|
+
* setupRenderingTest(hooks);
|
|
407
|
+
*
|
|
408
|
+
* test('does something awesome', function(assert) {
|
|
409
|
+
const warnings = getWarnings() // => returns warnings which have occurred so far in this test
|
|
410
|
+
* });
|
|
411
|
+
* });
|
|
412
|
+
*/
|
|
413
|
+
export function getWarnings(): Array<Warning>;
|
|
414
|
+
export type { Warning };
|
|
415
|
+
/**
|
|
416
|
+
* Returns warnings which have occurred so far for a the current test context
|
|
417
|
+
*
|
|
418
|
+
* @public
|
|
419
|
+
* @param {Function} [callback] The callback that when executed will have its warnings recorded
|
|
420
|
+
* @returns {Array<Warning> | Promise<Array<Warning>>} An array of warnings information
|
|
421
|
+
* @example <caption>Usage via ember-qunit</caption>
|
|
422
|
+
*
|
|
423
|
+
* import { getWarningsDuringCallback } from '@ember/test-helpers';
|
|
424
|
+
* import { warn } from '@ember/debug';
|
|
425
|
+
*
|
|
426
|
+
* module('awesome-sauce', function(hooks) {
|
|
427
|
+
* setupRenderingTest(hooks);
|
|
428
|
+
*
|
|
429
|
+
* test('does something awesome', function(assert) {
|
|
430
|
+
* const warnings = getWarningsDuringCallback(() => {
|
|
431
|
+
* warn('some warning');
|
|
432
|
+
*
|
|
433
|
+
* }); // => returns warnings which occurred while the callback was invoked
|
|
434
|
+
* });
|
|
435
|
+
*
|
|
436
|
+
* test('does something awesome', async function(assert) {
|
|
437
|
+
* warn('some warning');
|
|
438
|
+
*
|
|
439
|
+
* const warnings = await getWarningsDuringCallback(async () => {
|
|
440
|
+
* warn('some other warning');
|
|
441
|
+
* }); // => returns warnings which occurred while the callback was invoked
|
|
442
|
+
* });
|
|
443
|
+
* });
|
|
444
|
+
*/
|
|
445
|
+
export function getWarningsDuringCallback(callback: () => void): Array<Warning> | Promise<Array<Warning>>;
|
|
446
|
+
/**
|
|
447
|
+
Used by test framework addons to setup the provided context for testing.
|
|
448
|
+
|
|
449
|
+
Responsible for:
|
|
450
|
+
|
|
451
|
+
- sets the "global testing context" to the provided context (`setContext`)
|
|
452
|
+
- create an owner object and set it on the provided context (e.g. `this.owner`)
|
|
453
|
+
- setup `this.set`, `this.setProperties`, `this.get`, and `this.getProperties` to the provided context
|
|
454
|
+
- setting up AJAX listeners
|
|
455
|
+
- setting up `pauseTest` (also available as `this.pauseTest()`) and `resumeTest` helpers
|
|
456
|
+
|
|
457
|
+
@public
|
|
458
|
+
@param {Object} base the context to setup
|
|
459
|
+
@param {Object} [options] options used to override defaults
|
|
460
|
+
@param {Resolver} [options.resolver] a resolver to use for customizing normal resolution
|
|
461
|
+
@returns {Promise<Object>} resolves with the context that was setup
|
|
462
|
+
*/
|
|
463
|
+
export default function setupContext<T extends object>(base: T, options?: SetupContextOptions): Promise<T & TestContext>;
|
|
464
|
+
//# sourceMappingURL=setup-context.d.ts.map
|
|
465
|
+
}
|
|
466
|
+
declare module '@ember/test-helpers/teardown-context' {
|
|
467
|
+
import type { TestContext } from '@ember/test-helpers/setup-context';
|
|
468
|
+
export interface TeardownContextOptions {
|
|
469
|
+
waitForSettled?: boolean | undefined;
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
472
|
+
Used by test framework addons to tear down the provided context after testing is completed.
|
|
473
|
+
|
|
474
|
+
Responsible for:
|
|
475
|
+
|
|
476
|
+
- un-setting the "global testing context" (`unsetContext`)
|
|
477
|
+
- destroy the contexts owner object
|
|
478
|
+
- remove AJAX listeners
|
|
479
|
+
|
|
480
|
+
@public
|
|
481
|
+
@param {Object} context the context to setup
|
|
482
|
+
@param {Object} [options] options used to override defaults
|
|
483
|
+
@param {boolean} [options.waitForSettled=true] should the teardown wait for `settled()`ness
|
|
484
|
+
@returns {Promise<void>} resolves when settled
|
|
485
|
+
*/
|
|
486
|
+
export default function teardownContext(context: TestContext, { waitForSettled }?: TeardownContextOptions): Promise<void>;
|
|
487
|
+
//# sourceMappingURL=teardown-context.d.ts.map
|
|
488
|
+
}
|
|
489
|
+
declare module '@ember/test-helpers/setup-rendering-context' {
|
|
490
|
+
import { type BaseContext, type TestContext } from 'declarations/setup-context.ts';
|
|
491
|
+
import type { Owner } from 'declarations/build-owner.ts'; const hasCalledSetupRenderingContext: unique symbol;
|
|
492
|
+
export interface RenderingTestContext extends TestContext {
|
|
493
|
+
element: Element | Document;
|
|
494
|
+
[hasCalledSetupRenderingContext]?: true;
|
|
495
|
+
}
|
|
496
|
+
export function isRenderingTestContext(context: BaseContext): context is RenderingTestContext;
|
|
497
|
+
export interface RenderOptions {
|
|
498
|
+
/**
|
|
499
|
+
The owner object to use as the basis for the template. In most cases you
|
|
500
|
+
will not need to specify this, however if you are using ember-engines
|
|
501
|
+
it is possible to specify the _engine's_ owner instead of the host
|
|
502
|
+
applications.
|
|
503
|
+
*/
|
|
504
|
+
owner?: Owner;
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
Renders the provided template and appends it to the DOM.
|
|
508
|
+
|
|
509
|
+
@public
|
|
510
|
+
@param {Template|Component} templateFactoryOrComponent the component (or template) to render
|
|
511
|
+
@param {RenderOptions} options options hash containing engine owner ({ owner: engineOwner })
|
|
512
|
+
@returns {Promise<void>} resolves when settled
|
|
513
|
+
|
|
514
|
+
@example
|
|
515
|
+
<caption>
|
|
516
|
+
Render a div element with the class 'container'.
|
|
517
|
+
</caption>
|
|
518
|
+
await render(hbs`<div class="container"></div>`);
|
|
519
|
+
*/
|
|
520
|
+
export function render(templateFactoryOrComponent: object, options?: RenderOptions): Promise<void>;
|
|
521
|
+
/**
|
|
522
|
+
Clears any templates previously rendered. This is commonly used for
|
|
523
|
+
confirming behavior that is triggered by teardown (e.g.
|
|
524
|
+
`willDestroyElement`).
|
|
525
|
+
|
|
526
|
+
@public
|
|
527
|
+
@returns {Promise<void>} resolves when settled
|
|
528
|
+
*/
|
|
529
|
+
export function clearRender(): Promise<void>;
|
|
530
|
+
/**
|
|
531
|
+
Used by test framework addons to setup the provided context for rendering.
|
|
532
|
+
|
|
533
|
+
`setupContext` must have been ran on the provided context
|
|
534
|
+
prior to calling `setupRenderingContext`.
|
|
535
|
+
|
|
536
|
+
Responsible for:
|
|
537
|
+
|
|
538
|
+
- Setup the basic framework used for rendering by the
|
|
539
|
+
`render` helper.
|
|
540
|
+
- Ensuring the event dispatcher is properly setup.
|
|
541
|
+
- Setting `this.element` to the root element of the testing
|
|
542
|
+
container (things rendered via `render` will go _into_ this
|
|
543
|
+
element).
|
|
544
|
+
|
|
545
|
+
@public
|
|
546
|
+
@param {TestContext} context the context to setup for rendering
|
|
547
|
+
@returns {Promise<RenderingTestContext>} resolves with the context that was setup
|
|
548
|
+
|
|
549
|
+
@example
|
|
550
|
+
<caption>
|
|
551
|
+
Rendering out a paragraph element containing the content 'hello', and then clearing that content via clearRender.
|
|
552
|
+
</caption>
|
|
553
|
+
|
|
554
|
+
await render(hbs`<p>Hello!</p>`);
|
|
555
|
+
assert.equal(this.element.textContent, 'Hello!', 'has rendered content');
|
|
556
|
+
await clearRender();
|
|
557
|
+
assert.equal(this.element.textContent, '', 'has rendered content');
|
|
558
|
+
*/
|
|
559
|
+
export default function setupRenderingContext(context: TestContext): Promise<RenderingTestContext>;
|
|
560
|
+
export {};
|
|
561
|
+
//# sourceMappingURL=setup-rendering-context.d.ts.map
|
|
562
|
+
}
|
|
563
|
+
declare module '@ember/test-helpers/rerender' {
|
|
564
|
+
/**
|
|
565
|
+
Returns a promise which will resolve when rendering has completed. In
|
|
566
|
+
this context, rendering is completed when all auto-tracked state that is
|
|
567
|
+
consumed in the template (including any tracked state in models, services,
|
|
568
|
+
etc. that are then used in a template) has been updated in the DOM.
|
|
569
|
+
|
|
570
|
+
For example, in a test you might want to update some tracked state and
|
|
571
|
+
then run some assertions after rendering has completed. You _could_ use
|
|
572
|
+
`await settled()` in that location, but in some contexts you don't want to
|
|
573
|
+
wait for full settledness (which includes test waiters, pending AJAX/fetch,
|
|
574
|
+
run loops, etc) but instead only want to know when that updated value has
|
|
575
|
+
been rendered in the DOM. **THAT** is what `await rerender()` is _perfect_
|
|
576
|
+
for.
|
|
577
|
+
@public
|
|
578
|
+
@returns {Promise<void>} a promise which fulfills when rendering has completed
|
|
579
|
+
*/
|
|
580
|
+
export default function rerender(): Promise<void>;
|
|
581
|
+
//# sourceMappingURL=rerender.d.ts.map
|
|
582
|
+
}
|
|
583
|
+
declare module '@ember/test-helpers/setup-application-context' {
|
|
584
|
+
import { type BaseContext, type TestContext } from 'declarations/setup-context.ts';
|
|
585
|
+
export interface ApplicationTestContext extends TestContext {
|
|
586
|
+
element?: Element | null;
|
|
587
|
+
}
|
|
588
|
+
export function isApplicationTestContext(context: BaseContext): context is ApplicationTestContext;
|
|
589
|
+
/**
|
|
590
|
+
Determines if we have any pending router transitions (used to determine `settled` state)
|
|
591
|
+
|
|
592
|
+
@public
|
|
593
|
+
@returns {(boolean|null)} if there are pending transitions
|
|
594
|
+
*/
|
|
595
|
+
export function hasPendingTransitions(): boolean | null;
|
|
596
|
+
/**
|
|
597
|
+
Setup the current router instance with settledness tracking. Generally speaking this
|
|
598
|
+
is done automatically (during a `visit('/some-url')` invocation), but under some
|
|
599
|
+
circumstances (e.g. a non-application test where you manually call `this.owner.setupRouter()`)
|
|
600
|
+
you may want to call it yourself.
|
|
601
|
+
|
|
602
|
+
@public
|
|
603
|
+
*/
|
|
604
|
+
export function setupRouterSettlednessTracking(): void;
|
|
605
|
+
/**
|
|
606
|
+
Navigate the application to the provided URL.
|
|
607
|
+
|
|
608
|
+
@public
|
|
609
|
+
@param {string} url The URL to visit (e.g. `/posts`)
|
|
610
|
+
@param {object} options app boot options
|
|
611
|
+
@returns {Promise<void>} resolves when settled
|
|
612
|
+
|
|
613
|
+
@example
|
|
614
|
+
<caption>
|
|
615
|
+
Visiting the route for post 1.
|
|
616
|
+
</caption>
|
|
617
|
+
await visit('/posts/1');
|
|
618
|
+
|
|
619
|
+
@example
|
|
620
|
+
<caption>
|
|
621
|
+
Visiting the route for post 1 while also providing the `rootElement` app boot option.
|
|
622
|
+
</caption>
|
|
623
|
+
await visit('/', { rootElement: '#container' });
|
|
624
|
+
*/
|
|
625
|
+
export function visit(url: string, options?: Record<string, unknown>): Promise<void>;
|
|
626
|
+
/**
|
|
627
|
+
@public
|
|
628
|
+
@returns {string} the currently active route name
|
|
629
|
+
*/
|
|
630
|
+
export function currentRouteName(): string;
|
|
631
|
+
/**
|
|
632
|
+
@public
|
|
633
|
+
@returns {string} the applications current url
|
|
634
|
+
*/
|
|
635
|
+
export function currentURL(): string;
|
|
636
|
+
/**
|
|
637
|
+
Used by test framework addons to setup the provided context for working with
|
|
638
|
+
an application (e.g. routing).
|
|
639
|
+
|
|
640
|
+
`setupContext` must have been run on the provided context prior to calling
|
|
641
|
+
`setupApplicationContext`.
|
|
642
|
+
|
|
643
|
+
Sets up the basic framework used by application tests.
|
|
644
|
+
|
|
645
|
+
@public
|
|
646
|
+
@param {Object} context the context to setup
|
|
647
|
+
@returns {Promise<void>} resolves when the context is set up
|
|
648
|
+
*/
|
|
649
|
+
export default function setupApplicationContext(context: TestContext): Promise<void>;
|
|
650
|
+
//# sourceMappingURL=setup-application-context.d.ts.map
|
|
651
|
+
}
|
|
652
|
+
declare module '@ember/test-helpers/-internal/debug-info' {
|
|
653
|
+
import type { DebugInfo as BackburnerDebugInfo } from '@ember/runloop/-private/backburner';
|
|
654
|
+
import { type PendingWaiterState } from '@ember/test-waiters';
|
|
655
|
+
type MaybeDebugInfo = BackburnerDebugInfo | null;
|
|
656
|
+
interface SettledState {
|
|
657
|
+
hasPendingTimers: boolean;
|
|
658
|
+
hasRunLoop: boolean;
|
|
659
|
+
hasPendingLegacyWaiters: boolean;
|
|
660
|
+
hasPendingTestWaiters: boolean;
|
|
661
|
+
hasPendingRequests: boolean;
|
|
662
|
+
isRenderPending: boolean;
|
|
663
|
+
}
|
|
664
|
+
interface SummaryInfo {
|
|
665
|
+
hasPendingRequests: boolean;
|
|
666
|
+
hasPendingLegacyWaiters: boolean;
|
|
667
|
+
hasPendingTestWaiters: boolean;
|
|
668
|
+
pendingTestWaiterInfo: PendingWaiterState;
|
|
669
|
+
autorunStackTrace: string | undefined | null;
|
|
670
|
+
pendingTimersCount: number;
|
|
671
|
+
hasPendingTimers: boolean;
|
|
672
|
+
pendingTimersStackTraces: (string | undefined)[];
|
|
673
|
+
pendingScheduledQueueItemCount: number;
|
|
674
|
+
pendingScheduledQueueItemStackTraces: (string | undefined)[];
|
|
675
|
+
hasRunLoop: boolean;
|
|
676
|
+
isRenderPending: boolean;
|
|
677
|
+
}
|
|
678
|
+
/**
|
|
679
|
+
* The base functionality which may be present on the `SettledState` interface
|
|
680
|
+
* in the `settled` module (**not** the one in this module).
|
|
681
|
+
*/
|
|
682
|
+
export default interface DebugInfo {
|
|
683
|
+
toConsole: () => void;
|
|
684
|
+
}
|
|
685
|
+
/**
|
|
686
|
+
* Determines if the `getDebugInfo` method is available in the
|
|
687
|
+
* running verison of backburner.
|
|
688
|
+
*
|
|
689
|
+
* @returns {boolean} True if `getDebugInfo` is present in backburner, otherwise false.
|
|
690
|
+
*/
|
|
691
|
+
export function backburnerDebugInfoAvailable(): boolean;
|
|
692
|
+
/**
|
|
693
|
+
* Retrieves debug information from backburner's current deferred actions queue (runloop instance).
|
|
694
|
+
* If the `getDebugInfo` method isn't available, it returns `null`.
|
|
695
|
+
*
|
|
696
|
+
* @public
|
|
697
|
+
* @returns {MaybeDebugInfo | null} Backburner debugInfo or, if the getDebugInfo method is not present, null
|
|
698
|
+
*/
|
|
699
|
+
export function getDebugInfo(): MaybeDebugInfo;
|
|
700
|
+
/**
|
|
701
|
+
* Encapsulates debug information for an individual test. Aggregates information
|
|
702
|
+
* from:
|
|
703
|
+
* - info provided by getSettledState
|
|
704
|
+
* - hasPendingTimers
|
|
705
|
+
* - hasRunLoop
|
|
706
|
+
* - hasPendingWaiters
|
|
707
|
+
* - hasPendingRequests
|
|
708
|
+
* - info provided by backburner's getDebugInfo method (timers, schedules, and stack trace info)
|
|
709
|
+
*
|
|
710
|
+
*/
|
|
711
|
+
export class TestDebugInfo implements DebugInfo {
|
|
712
|
+
private _settledState;
|
|
713
|
+
private _debugInfo;
|
|
714
|
+
private _summaryInfo;
|
|
715
|
+
constructor(settledState: SettledState, debugInfo?: MaybeDebugInfo);
|
|
716
|
+
get summary(): SummaryInfo;
|
|
717
|
+
toConsole(_console?: Console): void;
|
|
718
|
+
_formatCount(title: string, count: number): string;
|
|
719
|
+
}
|
|
720
|
+
export {};
|
|
721
|
+
//# sourceMappingURL=debug-info.d.ts.map
|
|
722
|
+
}
|
|
723
|
+
declare module '@ember/test-helpers/settled' {
|
|
724
|
+
import type DebugInfo from 'declarations/-internal/debug-info.ts';
|
|
725
|
+
/**
|
|
726
|
+
Clears listeners that were previously setup for `ajaxSend` and `ajaxComplete`.
|
|
727
|
+
|
|
728
|
+
@private
|
|
729
|
+
*/
|
|
730
|
+
export function _teardownAJAXHooks(): void;
|
|
731
|
+
/**
|
|
732
|
+
Sets up listeners for `ajaxSend` and `ajaxComplete`.
|
|
733
|
+
|
|
734
|
+
@private
|
|
735
|
+
*/
|
|
736
|
+
export function _setupAJAXHooks(): void;
|
|
737
|
+
export interface SettledState {
|
|
738
|
+
hasRunLoop: boolean;
|
|
739
|
+
hasPendingTimers: boolean;
|
|
740
|
+
hasPendingWaiters: boolean;
|
|
741
|
+
hasPendingRequests: boolean;
|
|
742
|
+
hasPendingTransitions: boolean | null;
|
|
743
|
+
isRenderPending: boolean;
|
|
744
|
+
pendingRequestCount: number;
|
|
745
|
+
debugInfo: DebugInfo;
|
|
746
|
+
}
|
|
747
|
+
/**
|
|
748
|
+
Check various settledness metrics, and return an object with the following properties:
|
|
749
|
+
|
|
750
|
+
- `hasRunLoop` - Checks if a run-loop has been started. If it has, this will
|
|
751
|
+
be `true` otherwise it will be `false`.
|
|
752
|
+
- `hasPendingTimers` - Checks if there are scheduled timers in the run-loop.
|
|
753
|
+
These pending timers are primarily registered by `Ember.run.schedule`. If
|
|
754
|
+
there are pending timers, this will be `true`, otherwise `false`.
|
|
755
|
+
- `hasPendingWaiters` - Checks if any registered test waiters are still
|
|
756
|
+
pending (e.g. the waiter returns `true`). If there are pending waiters,
|
|
757
|
+
this will be `true`, otherwise `false`.
|
|
758
|
+
- `hasPendingRequests` - Checks if there are pending AJAX requests (based on
|
|
759
|
+
`ajaxSend` / `ajaxComplete` events triggered by `jQuery.ajax`). If there
|
|
760
|
+
are pending requests, this will be `true`, otherwise `false`.
|
|
761
|
+
- `hasPendingTransitions` - Checks if there are pending route transitions. If the
|
|
762
|
+
router has not been instantiated / setup for the test yet this will return `null`,
|
|
763
|
+
if there are pending transitions, this will be `true`, otherwise `false`.
|
|
764
|
+
- `pendingRequestCount` - The count of pending AJAX requests.
|
|
765
|
+
- `debugInfo` - Debug information that's combined with info return from backburner's
|
|
766
|
+
getDebugInfo method.
|
|
767
|
+
- `isRenderPending` - Checks if there are any pending render operations. This will be true as long
|
|
768
|
+
as there are tracked values in the template that have not been rerendered yet.
|
|
769
|
+
|
|
770
|
+
@public
|
|
771
|
+
@returns {Object} object with properties for each of the metrics used to determine settledness
|
|
772
|
+
*/
|
|
773
|
+
export function getSettledState(): SettledState;
|
|
774
|
+
/**
|
|
775
|
+
Checks various settledness metrics (via `getSettledState()`) to determine if things are settled or not.
|
|
776
|
+
|
|
777
|
+
Settled generally means that there are no pending timers, no pending waiters,
|
|
778
|
+
no pending AJAX requests, and no current run loop. However, new settledness
|
|
779
|
+
metrics may be added and used as they become available.
|
|
780
|
+
|
|
781
|
+
@public
|
|
782
|
+
@returns {boolean} `true` if settled, `false` otherwise
|
|
783
|
+
*/
|
|
784
|
+
export function isSettled(): boolean;
|
|
785
|
+
/**
|
|
786
|
+
Returns a promise that resolves when in a settled state (see `isSettled` for
|
|
787
|
+
a definition of "settled state").
|
|
788
|
+
|
|
789
|
+
@public
|
|
790
|
+
@returns {Promise<void>} resolves when settled
|
|
791
|
+
*/
|
|
792
|
+
export default function settled(): Promise<void>;
|
|
793
|
+
//# sourceMappingURL=settled.d.ts.map
|
|
794
|
+
}
|
|
795
|
+
declare module '@ember/test-helpers/wait-until' {
|
|
796
|
+
type Falsy = false | 0 | '' | null | undefined;
|
|
797
|
+
export interface Options {
|
|
798
|
+
timeout?: number;
|
|
799
|
+
timeoutMessage?: string;
|
|
800
|
+
}
|
|
801
|
+
/**
|
|
802
|
+
Wait for the provided callback to return a truthy value.
|
|
803
|
+
|
|
804
|
+
This does not leverage `settled()`, and as such can be used to manage async
|
|
805
|
+
while _not_ settled (e.g. "loading" or "pending" states).
|
|
806
|
+
|
|
807
|
+
@public
|
|
808
|
+
@param {Function} callback the callback to use for testing when waiting should stop
|
|
809
|
+
@param {Object} [options] options used to override defaults
|
|
810
|
+
@param {number} [options.timeout=1000] the maximum amount of time to wait
|
|
811
|
+
@param {string} [options.timeoutMessage='waitUntil timed out'] the message to use in the reject on timeout
|
|
812
|
+
@returns {Promise} resolves with the callback value when it returns a truthy value
|
|
813
|
+
|
|
814
|
+
@example
|
|
815
|
+
<caption>
|
|
816
|
+
Waiting until a selected element displays text:
|
|
817
|
+
</caption>
|
|
818
|
+
await waitUntil(function() {
|
|
819
|
+
return find('.my-selector').textContent.includes('something')
|
|
820
|
+
}, { timeout: 2000 })
|
|
821
|
+
*/
|
|
822
|
+
export default function waitUntil<T>(callback: () => T | void | Falsy, options?: Options): Promise<T>;
|
|
823
|
+
export {};
|
|
824
|
+
//# sourceMappingURL=wait-until.d.ts.map
|
|
825
|
+
}
|
|
826
|
+
declare module '@ember/test-helpers/validate-error-handler' {
|
|
827
|
+
type ErrorHandlerValidation = Readonly<{
|
|
828
|
+
isValid: true;
|
|
829
|
+
message: null;
|
|
830
|
+
}> | Readonly<{
|
|
831
|
+
isValid: false;
|
|
832
|
+
message: string;
|
|
833
|
+
}>;
|
|
834
|
+
/**
|
|
835
|
+
* Validate the provided error handler to confirm that it properly re-throws
|
|
836
|
+
* errors when `Ember.testing` is true.
|
|
837
|
+
*
|
|
838
|
+
* This is intended to be used by test framework hosts (or other libraries) to
|
|
839
|
+
* ensure that `Ember.onerror` is properly configured. Without a check like
|
|
840
|
+
* this, `Ember.onerror` could _easily_ swallow all errors and make it _seem_
|
|
841
|
+
* like everything is just fine (and have green tests) when in reality
|
|
842
|
+
* everything is on fire...
|
|
843
|
+
*
|
|
844
|
+
* @public
|
|
845
|
+
* @param {Function} [callback=Ember.onerror] the callback to validate
|
|
846
|
+
* @returns {Object} object with `isValid` and `message`
|
|
847
|
+
*
|
|
848
|
+
* @example <caption>Example implementation for `ember-qunit`</caption>
|
|
849
|
+
*
|
|
850
|
+
* import { validateErrorHandler } from '@ember/test-helpers';
|
|
851
|
+
*
|
|
852
|
+
* test('Ember.onerror is functioning properly', function(assert) {
|
|
853
|
+
* let result = validateErrorHandler();
|
|
854
|
+
* assert.ok(result.isValid, result.message);
|
|
855
|
+
* });
|
|
856
|
+
*/
|
|
857
|
+
export default function validateErrorHandler(callback?: Function | undefined): ErrorHandlerValidation;
|
|
858
|
+
export {};
|
|
859
|
+
//# sourceMappingURL=validate-error-handler.d.ts.map
|
|
860
|
+
}
|
|
861
|
+
declare module '@ember/test-helpers/setup-onerror' {
|
|
862
|
+
import { type BaseContext } from 'declarations/setup-context.ts';
|
|
863
|
+
/**
|
|
864
|
+
* Sets the `Ember.onerror` function for tests. This value is intended to be reset after
|
|
865
|
+
* each test to ensure correct test isolation. To reset, you should simply call `setupOnerror`
|
|
866
|
+
* without an `onError` argument.
|
|
867
|
+
*
|
|
868
|
+
* @public
|
|
869
|
+
* @param {Function} onError the onError function to be set on Ember.onerror
|
|
870
|
+
*
|
|
871
|
+
* @example <caption>Example implementation for `ember-qunit` or `ember-mocha`</caption>
|
|
872
|
+
*
|
|
873
|
+
* import { setupOnerror } from '@ember/test-helpers';
|
|
874
|
+
*
|
|
875
|
+
* test('Ember.onerror is stubbed properly', function(assert) {
|
|
876
|
+
* setupOnerror(function(err) {
|
|
877
|
+
* assert.ok(err);
|
|
878
|
+
* });
|
|
879
|
+
* });
|
|
880
|
+
*/
|
|
881
|
+
export default function setupOnerror(onError?: (error: Error) => void): void;
|
|
882
|
+
/**
|
|
883
|
+
* Resets `Ember.onerror` to the value it originally was at the start of the test run.
|
|
884
|
+
* If there is no context or cached value this is a no-op.
|
|
885
|
+
*
|
|
886
|
+
* @public
|
|
887
|
+
*
|
|
888
|
+
* @example
|
|
889
|
+
*
|
|
890
|
+
* import { resetOnerror } from '@ember/test-helpers';
|
|
891
|
+
*
|
|
892
|
+
* QUnit.testDone(function() {
|
|
893
|
+
* resetOnerror();
|
|
894
|
+
* })
|
|
895
|
+
*/
|
|
896
|
+
export function resetOnerror(): void;
|
|
897
|
+
/**
|
|
898
|
+
* Caches the current value of Ember.onerror. When `setupOnerror` is called without a value
|
|
899
|
+
* or when `resetOnerror` is called the value will be set to what was cached here.
|
|
900
|
+
*
|
|
901
|
+
* @private
|
|
902
|
+
* @param {BaseContext} context the text context
|
|
903
|
+
*/
|
|
904
|
+
export function _prepareOnerror(context: BaseContext): void;
|
|
905
|
+
/**
|
|
906
|
+
* Removes the cached value of Ember.onerror.
|
|
907
|
+
*
|
|
908
|
+
* @private
|
|
909
|
+
* @param {BaseContext} context the text context
|
|
910
|
+
*/
|
|
911
|
+
export function _cleanupOnerror(context: BaseContext): void;
|
|
912
|
+
//# sourceMappingURL=setup-onerror.d.ts.map
|
|
913
|
+
}
|
|
914
|
+
declare module '@ember/test-helpers/-internal/debug-info-helpers' {
|
|
915
|
+
export interface DebugInfoHelper {
|
|
916
|
+
name: string;
|
|
917
|
+
log: () => void;
|
|
918
|
+
}
|
|
919
|
+
export const debugInfoHelpers: Set<DebugInfoHelper>;
|
|
920
|
+
/**
|
|
921
|
+
* Registers a custom debug info helper to augment the output for test isolation validation.
|
|
922
|
+
*
|
|
923
|
+
* @public
|
|
924
|
+
* @param {DebugInfoHelper} debugHelper a custom debug info helper
|
|
925
|
+
* @example
|
|
926
|
+
*
|
|
927
|
+
* import { registerDebugInfoHelper } from '@ember/test-helpers';
|
|
928
|
+
*
|
|
929
|
+
* registerDebugInfoHelper({
|
|
930
|
+
* name: 'Date override detection',
|
|
931
|
+
* log() {
|
|
932
|
+
* if (dateIsOverridden()) {
|
|
933
|
+
* console.log(this.name);
|
|
934
|
+
* console.log('The date object has been overridden');
|
|
935
|
+
* }
|
|
936
|
+
* }
|
|
937
|
+
* })
|
|
938
|
+
*/
|
|
939
|
+
export default function registerDebugInfoHelper(debugHelper: DebugInfoHelper): void;
|
|
940
|
+
//# sourceMappingURL=debug-info-helpers.d.ts.map
|
|
941
|
+
}
|
|
942
|
+
declare module '@ember/test-helpers/test-metadata' {
|
|
943
|
+
import type { BaseContext } from '@ember/test-helpers/setup-context'; class TestMetadata {
|
|
944
|
+
[key: string]: any;
|
|
945
|
+
testName?: string;
|
|
946
|
+
setupTypes: string[];
|
|
947
|
+
usedHelpers: string[];
|
|
948
|
+
constructor();
|
|
949
|
+
get isRendering(): boolean;
|
|
950
|
+
get isApplication(): boolean;
|
|
951
|
+
}
|
|
952
|
+
export { TestMetadata as __TestMetadata, };
|
|
953
|
+
export type {
|
|
954
|
+
/**
|
|
955
|
+
* A non-user-constructible interface representing the metadata associated
|
|
956
|
+
* with a test, designed for test frameworks to use e.g. with their reporters.
|
|
957
|
+
*/
|
|
958
|
+
TestMetadata, };
|
|
959
|
+
/**
|
|
960
|
+
* Gets the test metadata associated with the provided test context. Will create
|
|
961
|
+
* a new test metadata object if one does not exist.
|
|
962
|
+
*
|
|
963
|
+
* @param {BaseContext} context the context to use
|
|
964
|
+
* @returns {TestMetadata} the test metadata for the provided context
|
|
965
|
+
*/
|
|
966
|
+
export default function getTestMetadata(context: BaseContext): TestMetadata;
|
|
967
|
+
//# sourceMappingURL=test-metadata.d.ts.map
|
|
968
|
+
}
|
|
969
|
+
declare module '@ember/test-helpers/dom/-target' {
|
|
970
|
+
import type { IDOMElementDescriptor } from 'dom-element-descriptors';
|
|
971
|
+
export type Target = string | Element | IDOMElementDescriptor | Document | Window;
|
|
972
|
+
export interface HTMLElementContentEditable extends HTMLElement {
|
|
973
|
+
isContentEditable: true;
|
|
974
|
+
}
|
|
975
|
+
export function isElement(target: unknown): target is Element;
|
|
976
|
+
export function isWindow(target: Target): target is Window;
|
|
977
|
+
export function isDocument(target: unknown): target is Document;
|
|
978
|
+
export function isContentEditable(element: Element): element is HTMLElementContentEditable;
|
|
979
|
+
//# sourceMappingURL=-target.d.ts.map
|
|
980
|
+
}
|
|
981
|
+
declare module '@ember/test-helpers/dom/click' {
|
|
982
|
+
import { type Target } from 'declarations/dom/-target.ts';
|
|
983
|
+
/**
|
|
984
|
+
* Represent a particular mouse button being clicked.
|
|
985
|
+
* See https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons for available options.
|
|
986
|
+
*/
|
|
987
|
+
export const DEFAULT_CLICK_OPTIONS: {
|
|
988
|
+
buttons: number;
|
|
989
|
+
button: number;
|
|
990
|
+
};
|
|
991
|
+
/**
|
|
992
|
+
@private
|
|
993
|
+
@param {Element} element the element to click on
|
|
994
|
+
@param {MouseEventInit} options the options to be merged into the mouse events
|
|
995
|
+
@return {Promise<Event | void>} resolves when settled
|
|
996
|
+
*/
|
|
997
|
+
export function __click__(element: Element | Document | Window, options: MouseEventInit): Promise<Event | void>;
|
|
998
|
+
/**
|
|
999
|
+
Clicks on the specified target.
|
|
1000
|
+
|
|
1001
|
+
Sends a number of events intending to simulate a "real" user clicking on an
|
|
1002
|
+
element.
|
|
1003
|
+
|
|
1004
|
+
For non-focusable elements the following events are triggered (in order):
|
|
1005
|
+
|
|
1006
|
+
- `mousedown`
|
|
1007
|
+
- `mouseup`
|
|
1008
|
+
- `click`
|
|
1009
|
+
|
|
1010
|
+
For focusable (e.g. form control) elements the following events are triggered
|
|
1011
|
+
(in order):
|
|
1012
|
+
|
|
1013
|
+
- `mousedown`
|
|
1014
|
+
- `focus`
|
|
1015
|
+
- `focusin`
|
|
1016
|
+
- `mouseup`
|
|
1017
|
+
- `click`
|
|
1018
|
+
|
|
1019
|
+
The exact listing of events that are triggered may change over time as needed
|
|
1020
|
+
to continue to emulate how actual browsers handle clicking a given element.
|
|
1021
|
+
|
|
1022
|
+
Use the `options` hash to change the parameters of the [MouseEvents](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent).
|
|
1023
|
+
You can use this to specify modifier keys as well.
|
|
1024
|
+
|
|
1025
|
+
@public
|
|
1026
|
+
@param {string|Element|IDOMElementDescriptor} target the element, selector, or descriptor to click on
|
|
1027
|
+
@param {MouseEventInit} _options the options to be merged into the mouse events.
|
|
1028
|
+
@return {Promise<void>} resolves when settled
|
|
1029
|
+
|
|
1030
|
+
@example
|
|
1031
|
+
<caption>
|
|
1032
|
+
Emulating clicking a button using `click`
|
|
1033
|
+
</caption>
|
|
1034
|
+
click('button');
|
|
1035
|
+
|
|
1036
|
+
@example
|
|
1037
|
+
<caption>
|
|
1038
|
+
Emulating clicking a button and pressing the `shift` key simultaneously using `click` with `options`.
|
|
1039
|
+
</caption>
|
|
1040
|
+
|
|
1041
|
+
click('button', { shiftKey: true });
|
|
1042
|
+
*/
|
|
1043
|
+
export default function click(target: Target, _options?: MouseEventInit): Promise<void>;
|
|
1044
|
+
//# sourceMappingURL=click.d.ts.map
|
|
1045
|
+
}
|
|
1046
|
+
declare module '@ember/test-helpers/dom/double-click' {
|
|
1047
|
+
import { type Target } from 'declarations/dom/-target.ts';
|
|
1048
|
+
/**
|
|
1049
|
+
@private
|
|
1050
|
+
@param {Element} element the element to double-click on
|
|
1051
|
+
@param {MouseEventInit} options the options to be merged into the mouse events
|
|
1052
|
+
@returns {Promise<Event | void>} resolves when settled
|
|
1053
|
+
*/
|
|
1054
|
+
export function __doubleClick__(element: Element | Document | Window, options: MouseEventInit): Promise<Event | void>;
|
|
1055
|
+
/**
|
|
1056
|
+
Double-clicks on the specified target.
|
|
1057
|
+
|
|
1058
|
+
Sends a number of events intending to simulate a "real" user clicking on an
|
|
1059
|
+
element.
|
|
1060
|
+
|
|
1061
|
+
For non-focusable elements the following events are triggered (in order):
|
|
1062
|
+
|
|
1063
|
+
- `mousedown`
|
|
1064
|
+
- `mouseup`
|
|
1065
|
+
- `click`
|
|
1066
|
+
- `mousedown`
|
|
1067
|
+
- `mouseup`
|
|
1068
|
+
- `click`
|
|
1069
|
+
- `dblclick`
|
|
1070
|
+
|
|
1071
|
+
For focusable (e.g. form control) elements the following events are triggered
|
|
1072
|
+
(in order):
|
|
1073
|
+
|
|
1074
|
+
- `mousedown`
|
|
1075
|
+
- `focus`
|
|
1076
|
+
- `focusin`
|
|
1077
|
+
- `mouseup`
|
|
1078
|
+
- `click`
|
|
1079
|
+
- `mousedown`
|
|
1080
|
+
- `mouseup`
|
|
1081
|
+
- `click`
|
|
1082
|
+
- `dblclick`
|
|
1083
|
+
|
|
1084
|
+
The exact listing of events that are triggered may change over time as needed
|
|
1085
|
+
to continue to emulate how actual browsers handle clicking a given element.
|
|
1086
|
+
|
|
1087
|
+
Use the `options` hash to change the parameters of the [MouseEvents](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent).
|
|
1088
|
+
|
|
1089
|
+
@public
|
|
1090
|
+
@param {string|Element|IDOMElementDescriptor} target the element, selector, or descriptor to double-click on
|
|
1091
|
+
@param {MouseEventInit} _options the options to be merged into the mouse events
|
|
1092
|
+
@return {Promise<void>} resolves when settled
|
|
1093
|
+
|
|
1094
|
+
@example
|
|
1095
|
+
<caption>
|
|
1096
|
+
Emulating double clicking a button using `doubleClick`
|
|
1097
|
+
</caption>
|
|
1098
|
+
|
|
1099
|
+
doubleClick('button');
|
|
1100
|
+
|
|
1101
|
+
@example
|
|
1102
|
+
<caption>
|
|
1103
|
+
Emulating double clicking a button and pressing the `shift` key simultaneously using `click` with `options`.
|
|
1104
|
+
</caption>
|
|
1105
|
+
|
|
1106
|
+
doubleClick('button', { shiftKey: true });
|
|
1107
|
+
*/
|
|
1108
|
+
export default function doubleClick(target: Target, _options?: MouseEventInit): Promise<void>;
|
|
1109
|
+
//# sourceMappingURL=double-click.d.ts.map
|
|
1110
|
+
}
|
|
1111
|
+
declare module '@ember/test-helpers/dom/tab' {
|
|
1112
|
+
/**
|
|
1113
|
+
Emulates the user pressing the tab button.
|
|
1114
|
+
|
|
1115
|
+
Sends a number of events intending to simulate a "real" user pressing tab on their
|
|
1116
|
+
keyboard.
|
|
1117
|
+
|
|
1118
|
+
@public
|
|
1119
|
+
@param {Object} [options] optional tab behaviors
|
|
1120
|
+
@param {boolean} [options.backwards=false] indicates if the the user navigates backwards
|
|
1121
|
+
@param {boolean} [options.unRestrainTabIndex=false] indicates if tabbing should throw an error when tabindex is greater than 0
|
|
1122
|
+
@return {Promise<void>} resolves when settled
|
|
1123
|
+
|
|
1124
|
+
@example
|
|
1125
|
+
<caption>
|
|
1126
|
+
Emulating pressing the `TAB` key
|
|
1127
|
+
</caption>
|
|
1128
|
+
tab();
|
|
1129
|
+
|
|
1130
|
+
@example
|
|
1131
|
+
<caption>
|
|
1132
|
+
Emulating pressing the `SHIFT`+`TAB` key combination
|
|
1133
|
+
</caption>
|
|
1134
|
+
tab({ backwards: true });
|
|
1135
|
+
*/
|
|
1136
|
+
export default function triggerTab({ backwards, unRestrainTabIndex, }?: {
|
|
1137
|
+
backwards?: boolean | undefined;
|
|
1138
|
+
unRestrainTabIndex?: boolean | undefined;
|
|
1139
|
+
}): Promise<void>;
|
|
1140
|
+
//# sourceMappingURL=tab.d.ts.map
|
|
1141
|
+
}
|
|
1142
|
+
declare module '@ember/test-helpers/dom/tap' {
|
|
1143
|
+
import type { Target } from 'declarations/dom/-target.ts';
|
|
1144
|
+
/**
|
|
1145
|
+
Taps on the specified target.
|
|
1146
|
+
|
|
1147
|
+
Sends a number of events intending to simulate a "real" user tapping on an
|
|
1148
|
+
element.
|
|
1149
|
+
|
|
1150
|
+
For non-focusable elements the following events are triggered (in order):
|
|
1151
|
+
|
|
1152
|
+
- `touchstart`
|
|
1153
|
+
- `touchend`
|
|
1154
|
+
- `mousedown`
|
|
1155
|
+
- `mouseup`
|
|
1156
|
+
- `click`
|
|
1157
|
+
|
|
1158
|
+
For focusable (e.g. form control) elements the following events are triggered
|
|
1159
|
+
(in order):
|
|
1160
|
+
|
|
1161
|
+
- `touchstart`
|
|
1162
|
+
- `touchend`
|
|
1163
|
+
- `mousedown`
|
|
1164
|
+
- `focus`
|
|
1165
|
+
- `focusin`
|
|
1166
|
+
- `mouseup`
|
|
1167
|
+
- `click`
|
|
1168
|
+
|
|
1169
|
+
The exact listing of events that are triggered may change over time as needed
|
|
1170
|
+
to continue to emulate how actual browsers handle tapping on a given element.
|
|
1171
|
+
|
|
1172
|
+
Use the `options` hash to change the parameters of the tap events.
|
|
1173
|
+
|
|
1174
|
+
@public
|
|
1175
|
+
@param {string|Element|IDOMElementDescriptor} target the element, selector, or descriptor to tap on
|
|
1176
|
+
@param {Object} options the options to be merged into the touch events
|
|
1177
|
+
@return {Promise<void>} resolves when settled
|
|
1178
|
+
|
|
1179
|
+
@example
|
|
1180
|
+
<caption>
|
|
1181
|
+
Emulating tapping a button using `tap`
|
|
1182
|
+
</caption>
|
|
1183
|
+
|
|
1184
|
+
tap('button');
|
|
1185
|
+
*/
|
|
1186
|
+
export default function tap(target: Target, options?: TouchEventInit): Promise<void>;
|
|
1187
|
+
//# sourceMappingURL=tap.d.ts.map
|
|
1188
|
+
}
|
|
1189
|
+
declare module '@ember/test-helpers/dom/focus' {
|
|
1190
|
+
import { type Target } from 'declarations/dom/-target.ts';
|
|
1191
|
+
type FocusRecord = {
|
|
1192
|
+
focusTarget: HTMLElement | SVGElement;
|
|
1193
|
+
previousFocusedElement?: HTMLElement | SVGElement | null;
|
|
1194
|
+
};
|
|
1195
|
+
/**
|
|
1196
|
+
@private
|
|
1197
|
+
@param {Element} element the element to trigger events on
|
|
1198
|
+
@return {Promise<FocusRecord | Event | void>} resolves when settled
|
|
1199
|
+
*/
|
|
1200
|
+
export function __focus__(element: HTMLElement | Element | Document | SVGElement): Promise<FocusRecord | Event | void>;
|
|
1201
|
+
/**
|
|
1202
|
+
Focus the specified target.
|
|
1203
|
+
|
|
1204
|
+
Sends a number of events intending to simulate a "real" user focusing an
|
|
1205
|
+
element.
|
|
1206
|
+
|
|
1207
|
+
The following events are triggered (in order):
|
|
1208
|
+
|
|
1209
|
+
- `focus`
|
|
1210
|
+
- `focusin`
|
|
1211
|
+
|
|
1212
|
+
The exact listing of events that are triggered may change over time as needed
|
|
1213
|
+
to continue to emulate how actual browsers handle focusing a given element.
|
|
1214
|
+
|
|
1215
|
+
@public
|
|
1216
|
+
@param {string|Element|IDOMElementDescriptor} target the element, selector, or descriptor to focus
|
|
1217
|
+
@return {Promise<void>} resolves when the application is settled
|
|
1218
|
+
|
|
1219
|
+
@example
|
|
1220
|
+
<caption>
|
|
1221
|
+
Emulating focusing an input using `focus`
|
|
1222
|
+
</caption>
|
|
1223
|
+
|
|
1224
|
+
focus('input');
|
|
1225
|
+
*/
|
|
1226
|
+
export default function focus(target: Target): Promise<void>;
|
|
1227
|
+
export {};
|
|
1228
|
+
//# sourceMappingURL=focus.d.ts.map
|
|
1229
|
+
}
|
|
1230
|
+
declare module '@ember/test-helpers/dom/blur' {
|
|
1231
|
+
import type { Target } from 'declarations/dom/-target.ts';
|
|
1232
|
+
/**
|
|
1233
|
+
@private
|
|
1234
|
+
@param {Element} element the element to trigger events on
|
|
1235
|
+
@param {Element} relatedTarget the element that is focused after blur
|
|
1236
|
+
@return {Promise<Event | void>} resolves when settled
|
|
1237
|
+
*/
|
|
1238
|
+
export function __blur__(element: HTMLElement | Element | Document | SVGElement, relatedTarget?: HTMLElement | Element | Document | SVGElement | null): Promise<Event | void>;
|
|
1239
|
+
/**
|
|
1240
|
+
Unfocus the specified target.
|
|
1241
|
+
|
|
1242
|
+
Sends a number of events intending to simulate a "real" user unfocusing an
|
|
1243
|
+
element.
|
|
1244
|
+
|
|
1245
|
+
The following events are triggered (in order):
|
|
1246
|
+
|
|
1247
|
+
- `blur`
|
|
1248
|
+
- `focusout`
|
|
1249
|
+
|
|
1250
|
+
The exact listing of events that are triggered may change over time as needed
|
|
1251
|
+
to continue to emulate how actual browsers handle unfocusing a given element.
|
|
1252
|
+
|
|
1253
|
+
@public
|
|
1254
|
+
@param {string|Element|IDOMElementDescriptor} [target=document.activeElement] the element, selector, or descriptor to unfocus
|
|
1255
|
+
@return {Promise<void>} resolves when settled
|
|
1256
|
+
|
|
1257
|
+
@example
|
|
1258
|
+
<caption>
|
|
1259
|
+
Emulating blurring an input using `blur`
|
|
1260
|
+
</caption>
|
|
1261
|
+
|
|
1262
|
+
blur('input');
|
|
1263
|
+
*/
|
|
1264
|
+
export default function blur(target?: Target): Promise<void>;
|
|
1265
|
+
//# sourceMappingURL=blur.d.ts.map
|
|
1266
|
+
}
|
|
1267
|
+
declare module '@ember/test-helpers/dom/trigger-event' {
|
|
1268
|
+
import type { Target } from 'declarations/dom/-target.ts';
|
|
1269
|
+
/**
|
|
1270
|
+
* Triggers an event on the specified target.
|
|
1271
|
+
*
|
|
1272
|
+
* @public
|
|
1273
|
+
* @param {string|Element|IDOMElementDescriptor} target the element, selector, or descriptor to trigger the event on
|
|
1274
|
+
* @param {string} eventType the type of event to trigger
|
|
1275
|
+
* @param {Object} options additional properties to be set on the event
|
|
1276
|
+
* @param {boolean} force if true, will bypass availability checks (false by default)
|
|
1277
|
+
* @return {Promise<void>} resolves when the application is settled
|
|
1278
|
+
*
|
|
1279
|
+
* @example
|
|
1280
|
+
* <caption>
|
|
1281
|
+
* Using `triggerEvent` to upload a file
|
|
1282
|
+
*
|
|
1283
|
+
* When using `triggerEvent` to upload a file the `eventType` must be `change` and you must pass the
|
|
1284
|
+
* `options` param as an object with a key `files` containing an array of
|
|
1285
|
+
* [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob).
|
|
1286
|
+
* </caption>
|
|
1287
|
+
*
|
|
1288
|
+
* triggerEvent(
|
|
1289
|
+
* 'input.fileUpload',
|
|
1290
|
+
* 'change',
|
|
1291
|
+
* { files: [new Blob(['Ember Rules!'])] }
|
|
1292
|
+
* );
|
|
1293
|
+
*
|
|
1294
|
+
*
|
|
1295
|
+
* @example
|
|
1296
|
+
* <caption>
|
|
1297
|
+
* Using `triggerEvent` to upload a dropped file
|
|
1298
|
+
*
|
|
1299
|
+
* When using `triggerEvent` to handle a dropped (via drag-and-drop) file, the `eventType` must be `drop`. Assuming your `drop` event handler uses the [DataTransfer API](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer),
|
|
1300
|
+
* you must pass the `options` param as an object with a key of `dataTransfer`. The `options.dataTransfer` object should have a `files` key, containing an array of [File](https://developer.mozilla.org/en-US/docs/Web/API/File).
|
|
1301
|
+
* </caption>
|
|
1302
|
+
*
|
|
1303
|
+
* triggerEvent(
|
|
1304
|
+
* '[data-test-drop-zone]',
|
|
1305
|
+
* 'drop',
|
|
1306
|
+
* {
|
|
1307
|
+
* dataTransfer: {
|
|
1308
|
+
* files: [new File(['Ember Rules!'], 'ember-rules.txt')]
|
|
1309
|
+
* }
|
|
1310
|
+
* }
|
|
1311
|
+
* )
|
|
1312
|
+
*/
|
|
1313
|
+
export default function triggerEvent(target: Target, eventType: string, options?: Record<string, unknown>, force?: boolean): Promise<void>;
|
|
1314
|
+
//# sourceMappingURL=trigger-event.d.ts.map
|
|
1315
|
+
}
|
|
1316
|
+
declare module '@ember/test-helpers/dom/fire-event' {
|
|
1317
|
+
export const KEYBOARD_EVENT_TYPES: ["keydown", "keypress", "keyup"];
|
|
1318
|
+
export type KeyboardEventType = (typeof KEYBOARD_EVENT_TYPES)[number];
|
|
1319
|
+
export function isKeyboardEventType(eventType: any): eventType is KeyboardEventType; const MOUSE_EVENT_TYPES: ["click", "mousedown", "mouseup", "dblclick", "mouseenter", "mouseleave", "mousemove", "mouseout", "mouseover"];
|
|
1320
|
+
export type MouseEventType = (typeof MOUSE_EVENT_TYPES)[number];
|
|
1321
|
+
export function isMouseEventType(eventType: any): eventType is MouseEventType; const FILE_SELECTION_EVENT_TYPES: ["change"];
|
|
1322
|
+
export type FileSelectionEventType = (typeof FILE_SELECTION_EVENT_TYPES)[number];
|
|
1323
|
+
export function isFileSelectionEventType(eventType: any): eventType is FileSelectionEventType;
|
|
1324
|
+
export function isFileSelectionInput(element: any): element is HTMLInputElement; function fireEvent(element: Element | Document | Window, eventType: KeyboardEventType, options?: any): Promise<Event>; function fireEvent(element: Element | Document | Window, eventType: MouseEventType, options?: any): Promise<Event | void>; function fireEvent(element: Element | Document | Window, eventType: string, options?: any): Promise<Event>;
|
|
1325
|
+
export default fireEvent;
|
|
1326
|
+
export function _buildKeyboardEvent(type: KeyboardEventType, options?: any): Event;
|
|
1327
|
+
//# sourceMappingURL=fire-event.d.ts.map
|
|
1328
|
+
}
|
|
1329
|
+
declare module '@ember/test-helpers/dom/trigger-key-event' {
|
|
1330
|
+
import { type KeyboardEventType } from 'declarations/dom/fire-event.ts';
|
|
1331
|
+
import type { Target } from 'declarations/dom/-target.ts';
|
|
1332
|
+
export interface KeyModifiers {
|
|
1333
|
+
ctrlKey?: boolean;
|
|
1334
|
+
altKey?: boolean;
|
|
1335
|
+
shiftKey?: boolean;
|
|
1336
|
+
metaKey?: boolean;
|
|
1337
|
+
}
|
|
1338
|
+
/**
|
|
1339
|
+
@private
|
|
1340
|
+
@param {Element | Document} element the element to trigger the key event on
|
|
1341
|
+
@param {'keydown' | 'keyup' | 'keypress'} eventType the type of event to trigger
|
|
1342
|
+
@param {number|string} key the `keyCode`(number) or `key`(string) of the event being triggered
|
|
1343
|
+
@param {Object} [modifiers] the state of various modifier keys
|
|
1344
|
+
@return {Promise<Event>} resolves when settled
|
|
1345
|
+
*/
|
|
1346
|
+
export function __triggerKeyEvent__(element: Element | Document, eventType: KeyboardEventType, key: number | string, modifiers?: KeyModifiers): Promise<Event>;
|
|
1347
|
+
/**
|
|
1348
|
+
Triggers a keyboard event of given type in the target element.
|
|
1349
|
+
It also requires the developer to provide either a string with the [`key`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values)
|
|
1350
|
+
or the numeric [`keyCode`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode) of the pressed key.
|
|
1351
|
+
Optionally the user can also provide a POJO with extra modifiers for the event.
|
|
1352
|
+
|
|
1353
|
+
@public
|
|
1354
|
+
@param {string|Element|IDOMElementDescriptor} target the element, selector, or descriptor to trigger the event on
|
|
1355
|
+
@param {'keydown' | 'keyup' | 'keypress'} eventType the type of event to trigger
|
|
1356
|
+
@param {number|string} key the `keyCode`(number) or `key`(string) of the event being triggered
|
|
1357
|
+
@param {Object} [modifiers] the state of various modifier keys
|
|
1358
|
+
@param {boolean} [modifiers.ctrlKey=false] if true the generated event will indicate the control key was pressed during the key event
|
|
1359
|
+
@param {boolean} [modifiers.altKey=false] if true the generated event will indicate the alt key was pressed during the key event
|
|
1360
|
+
@param {boolean} [modifiers.shiftKey=false] if true the generated event will indicate the shift key was pressed during the key event
|
|
1361
|
+
@param {boolean} [modifiers.metaKey=false] if true the generated event will indicate the meta key was pressed during the key event
|
|
1362
|
+
@return {Promise<void>} resolves when the application is settled unless awaitSettled is false
|
|
1363
|
+
|
|
1364
|
+
@example
|
|
1365
|
+
<caption>
|
|
1366
|
+
Emulating pressing the `ENTER` key on a button using `triggerKeyEvent`
|
|
1367
|
+
</caption>
|
|
1368
|
+
triggerKeyEvent('button', 'keydown', 'Enter');
|
|
1369
|
+
*/
|
|
1370
|
+
export default function triggerKeyEvent(target: Target, eventType: KeyboardEventType, key: number | string, modifiers?: KeyModifiers): Promise<void>;
|
|
1371
|
+
//# sourceMappingURL=trigger-key-event.d.ts.map
|
|
1372
|
+
}
|
|
1373
|
+
declare module '@ember/test-helpers/dom/fill-in' {
|
|
1374
|
+
import { type Target } from 'declarations/dom/-target.ts';
|
|
1375
|
+
/**
|
|
1376
|
+
Fill the provided text into the `value` property (or set `.innerHTML` when
|
|
1377
|
+
the target is a content editable element) then trigger `change` and `input`
|
|
1378
|
+
events on the specified target.
|
|
1379
|
+
|
|
1380
|
+
@public
|
|
1381
|
+
@param {string|Element|IDOMElementDescriptor} target the element, selector, or descriptor to enter text into
|
|
1382
|
+
@param {string} text the text to fill into the target element
|
|
1383
|
+
@return {Promise<void>} resolves when the application is settled
|
|
1384
|
+
|
|
1385
|
+
@example
|
|
1386
|
+
<caption>
|
|
1387
|
+
Emulating filling an input with text using `fillIn`
|
|
1388
|
+
</caption>
|
|
1389
|
+
|
|
1390
|
+
fillIn('input', 'hello world');
|
|
1391
|
+
*/
|
|
1392
|
+
export default function fillIn(target: Target, text: string): Promise<void>;
|
|
1393
|
+
//# sourceMappingURL=fill-in.d.ts.map
|
|
1394
|
+
}
|
|
1395
|
+
declare module '@ember/test-helpers/dom/select' {
|
|
1396
|
+
import type { Target } from 'declarations/dom/-target.ts';
|
|
1397
|
+
/**
|
|
1398
|
+
Set the `selected` property true for the provided option the target is a
|
|
1399
|
+
select element (or set the select property true for multiple options if the
|
|
1400
|
+
multiple attribute is set true on the HTMLSelectElement) then trigger
|
|
1401
|
+
`change` and `input` events on the specified target.
|
|
1402
|
+
|
|
1403
|
+
@public
|
|
1404
|
+
@param {string|Element|IDOMElementDescriptor} target the element, selector, or descriptor for the select element
|
|
1405
|
+
@param {string|string[]} options the value/values of the items to select
|
|
1406
|
+
@param {boolean} keepPreviouslySelected a flag keep any existing selections
|
|
1407
|
+
@return {Promise<void>} resolves when the application is settled
|
|
1408
|
+
|
|
1409
|
+
@example
|
|
1410
|
+
<caption>
|
|
1411
|
+
Emulating selecting an option or multiple options using `select`
|
|
1412
|
+
</caption>
|
|
1413
|
+
|
|
1414
|
+
select('select', 'apple');
|
|
1415
|
+
|
|
1416
|
+
select('select', ['apple', 'orange']);
|
|
1417
|
+
|
|
1418
|
+
select('select', ['apple', 'orange'], true);
|
|
1419
|
+
*/
|
|
1420
|
+
export default function select(target: Target, options: string | string[], keepPreviouslySelected?: boolean): Promise<void>;
|
|
1421
|
+
//# sourceMappingURL=select.d.ts.map
|
|
1422
|
+
}
|
|
1423
|
+
declare module '@ember/test-helpers/dom/wait-for' {
|
|
1424
|
+
import { type IDOMElementDescriptor } from 'dom-element-descriptors';
|
|
1425
|
+
export interface Options {
|
|
1426
|
+
timeout?: number;
|
|
1427
|
+
count?: number | null;
|
|
1428
|
+
timeoutMessage?: string;
|
|
1429
|
+
}
|
|
1430
|
+
/**
|
|
1431
|
+
Used to wait for a particular selector to appear in the DOM. Due to the fact
|
|
1432
|
+
that it does not wait for general settledness, this is quite useful for testing
|
|
1433
|
+
interim DOM states (e.g. loading states, pending promises, etc).
|
|
1434
|
+
|
|
1435
|
+
@param {string|IDOMElementDescriptor} target the selector or DOM element descriptor to wait for
|
|
1436
|
+
@param {Object} [options] the options to be used
|
|
1437
|
+
@param {number} [options.timeout=1000] the time to wait (in ms) for a match
|
|
1438
|
+
@param {number} [options.count=null] the number of elements that should match the provided selector (null means one or more)
|
|
1439
|
+
@return {Promise<Element|Element[]>} resolves when the element(s) appear on the page
|
|
1440
|
+
|
|
1441
|
+
@example
|
|
1442
|
+
<caption>
|
|
1443
|
+
Waiting until a selector is rendered:
|
|
1444
|
+
</caption>
|
|
1445
|
+
await waitFor('.my-selector', { timeout: 2000 })
|
|
1446
|
+
*/
|
|
1447
|
+
export default function waitFor(target: string | IDOMElementDescriptor, options?: Options): Promise<Element | Element[]>;
|
|
1448
|
+
//# sourceMappingURL=wait-for.d.ts.map
|
|
1449
|
+
}
|
|
1450
|
+
declare module '@ember/test-helpers/dom/get-root-element' {
|
|
1451
|
+
/**
|
|
1452
|
+
Get the root element of the application under test (usually `#ember-testing`)
|
|
1453
|
+
|
|
1454
|
+
@public
|
|
1455
|
+
@returns {Element} the root element
|
|
1456
|
+
|
|
1457
|
+
@example
|
|
1458
|
+
<caption>
|
|
1459
|
+
Getting the root element of the application and checking that it is equal
|
|
1460
|
+
to the element with id 'ember-testing'.
|
|
1461
|
+
</caption>
|
|
1462
|
+
assert.equal(getRootElement(), document.querySelector('#ember-testing'));
|
|
1463
|
+
*/
|
|
1464
|
+
export default function getRootElement(): Element | Document;
|
|
1465
|
+
//# sourceMappingURL=get-root-element.d.ts.map
|
|
1466
|
+
}
|
|
1467
|
+
declare module '@ember/test-helpers/dom/find' {
|
|
1468
|
+
export default function find<K extends keyof (HTMLElementTagNameMap | SVGElementTagNameMap)>(selector: K): HTMLElementTagNameMap[K] | SVGElementTagNameMap[K] | null;
|
|
1469
|
+
export default function find<K extends keyof HTMLElementTagNameMap>(selector: K): HTMLElementTagNameMap[K] | null;
|
|
1470
|
+
export default function find<K extends keyof SVGElementTagNameMap>(selector: K): SVGElementTagNameMap[K] | null;
|
|
1471
|
+
export default function find(selector: string): Element | null;
|
|
1472
|
+
//# sourceMappingURL=find.d.ts.map
|
|
1473
|
+
}
|
|
1474
|
+
declare module '@ember/test-helpers/dom/find-all' {
|
|
1475
|
+
export default function findAll<K extends keyof (HTMLElementTagNameMap | SVGElementTagNameMap)>(selector: K): Array<HTMLElementTagNameMap[K] | SVGElementTagNameMap[K]>;
|
|
1476
|
+
export default function findAll<K extends keyof HTMLElementTagNameMap>(selector: K): Array<HTMLElementTagNameMap[K]>;
|
|
1477
|
+
export default function findAll<K extends keyof SVGElementTagNameMap>(selector: K): Array<SVGElementTagNameMap[K]>;
|
|
1478
|
+
export default function findAll(selector: string): Element[];
|
|
1479
|
+
//# sourceMappingURL=find-all.d.ts.map
|
|
1480
|
+
}
|
|
1481
|
+
declare module '@ember/test-helpers/dom/type-in' {
|
|
1482
|
+
import { type Target } from 'declarations/dom/-target.ts';
|
|
1483
|
+
export interface Options {
|
|
1484
|
+
delay?: number;
|
|
1485
|
+
}
|
|
1486
|
+
/**
|
|
1487
|
+
* Mimics character by character entry into the target `input` or `textarea` element.
|
|
1488
|
+
*
|
|
1489
|
+
* Allows for simulation of slow entry by passing an optional millisecond delay
|
|
1490
|
+
* between key events.
|
|
1491
|
+
|
|
1492
|
+
* The major difference between `typeIn` and `fillIn` is that `typeIn` triggers
|
|
1493
|
+
* keyboard events as well as `input` and `change`.
|
|
1494
|
+
* Typically this looks like `focus` -> `focusin` -> `keydown` -> `keypress` -> `keyup` -> `input` -> `change`
|
|
1495
|
+
* per character of the passed text (this may vary on some browsers).
|
|
1496
|
+
*
|
|
1497
|
+
* @public
|
|
1498
|
+
* @param {string|Element|IDOMElementDescriptor} target the element, selector, or descriptor to enter text into
|
|
1499
|
+
* @param {string} text the test to fill the element with
|
|
1500
|
+
* @param {Object} options {delay: x} (default 50) number of milliseconds to wait per keypress
|
|
1501
|
+
* @return {Promise<void>} resolves when the application is settled
|
|
1502
|
+
*
|
|
1503
|
+
* @example
|
|
1504
|
+
* <caption>
|
|
1505
|
+
* Emulating typing in an input using `typeIn`
|
|
1506
|
+
* </caption>
|
|
1507
|
+
*
|
|
1508
|
+
* typeIn('input', 'hello world');
|
|
1509
|
+
*/
|
|
1510
|
+
export default function typeIn(target: Target, text: string, options?: Options): Promise<void>;
|
|
1511
|
+
//# sourceMappingURL=type-in.d.ts.map
|
|
1512
|
+
}
|
|
1513
|
+
declare module '@ember/test-helpers/dom/scroll-to' {
|
|
1514
|
+
import type { IDOMElementDescriptor } from 'dom-element-descriptors';
|
|
1515
|
+
/**
|
|
1516
|
+
Scrolls DOM element, selector, or descriptor to the given coordinates.
|
|
1517
|
+
@public
|
|
1518
|
+
@param {string|HTMLElement|IDOMElementDescriptor} target the element, selector, or descriptor to trigger scroll on
|
|
1519
|
+
@param {Number} x x-coordinate
|
|
1520
|
+
@param {Number} y y-coordinate
|
|
1521
|
+
@return {Promise<void>} resolves when settled
|
|
1522
|
+
|
|
1523
|
+
@example
|
|
1524
|
+
<caption>
|
|
1525
|
+
Scroll DOM element to specific coordinates
|
|
1526
|
+
</caption>
|
|
1527
|
+
|
|
1528
|
+
scrollTo('#my-long-div', 0, 0); // scroll to top
|
|
1529
|
+
scrollTo('#my-long-div', 0, 100); // scroll down
|
|
1530
|
+
*/
|
|
1531
|
+
export default function scrollTo(target: string | HTMLElement | IDOMElementDescriptor, x: number, y: number): Promise<void>;
|
|
1532
|
+
//# sourceMappingURL=scroll-to.d.ts.map
|
|
1533
|
+
}
|
|
1534
|
+
declare module '@ember/test-helpers/dom/wait-for-focus' {
|
|
1535
|
+
import { type IDOMElementDescriptor } from 'dom-element-descriptors';
|
|
1536
|
+
export interface Options {
|
|
1537
|
+
timeout?: number;
|
|
1538
|
+
count?: number | null;
|
|
1539
|
+
timeoutMessage?: string;
|
|
1540
|
+
}
|
|
1541
|
+
/**
|
|
1542
|
+
Used to wait for a particular selector to receive focus. Useful for verifying
|
|
1543
|
+
keyboard navigation handling and default focus behaviour, without having to
|
|
1544
|
+
think about timing issues.
|
|
1545
|
+
|
|
1546
|
+
@param {string|IDOMElementDescriptor} target the selector or DOM element descriptor to wait receiving focus
|
|
1547
|
+
@param {Object} [options] the options to be used
|
|
1548
|
+
@param {number} [options.timeout=1000] the time to wait (in ms) for a match
|
|
1549
|
+
@param {string} [options.timeoutMessage='waitForFocus timed out waiting for selector'] the message to use in the reject on timeout
|
|
1550
|
+
@return {Promise<Element>} resolves when the element received focus
|
|
1551
|
+
|
|
1552
|
+
@example
|
|
1553
|
+
<caption>
|
|
1554
|
+
Waiting until a selector receive focus:
|
|
1555
|
+
</caption>
|
|
1556
|
+
await waitForFocus('.my-selector', { timeout: 2000 })
|
|
1557
|
+
*/
|
|
1558
|
+
export default function waitForFocus(target: string | IDOMElementDescriptor, options?: Options): Promise<Element>;
|
|
1559
|
+
//# sourceMappingURL=wait-for-focus.d.ts.map
|
|
1560
|
+
}
|
|
1561
|
+
declare module '@ember/test-helpers' {
|
|
1562
|
+
import type { Backburner, DeferredActionQueues } from '@ember/runloop/-private/backburner';
|
|
1563
|
+
export { setResolver, getResolver } from 'declarations/resolver.ts';
|
|
1564
|
+
export { getApplication, setApplication } from 'declarations/application.ts';
|
|
1565
|
+
export { default as hasEmberVersion } from 'declarations/has-ember-version.ts';
|
|
1566
|
+
export type { BaseContext, DeprecationFailure, TestContext, Warning, SetupContextOptions, } from 'declarations/setup-context.ts';
|
|
1567
|
+
export { default as setupContext, getContext, setContext, unsetContext, pauseTest, resumeTest, getDeprecations, getDeprecationsDuringCallback, getWarnings, getWarningsDuringCallback, } from 'declarations/setup-context.ts';
|
|
1568
|
+
export { default as teardownContext } from 'declarations/teardown-context.ts';
|
|
1569
|
+
export type { TeardownContextOptions } from 'declarations/teardown-context.ts';
|
|
1570
|
+
export { default as setupRenderingContext, render, clearRender, } from 'declarations/setup-rendering-context.ts';
|
|
1571
|
+
export type { RenderingTestContext } from 'declarations/setup-rendering-context.ts';
|
|
1572
|
+
export { default as rerender } from 'declarations/rerender.ts';
|
|
1573
|
+
export { default as setupApplicationContext, visit, currentRouteName, currentURL, } from 'declarations/setup-application-context.ts';
|
|
1574
|
+
export { default as settled, isSettled, getSettledState } from 'declarations/settled.ts';
|
|
1575
|
+
export { default as waitUntil } from 'declarations/wait-until.ts';
|
|
1576
|
+
export { default as validateErrorHandler } from 'declarations/validate-error-handler.ts';
|
|
1577
|
+
export { default as setupOnerror, resetOnerror } from 'declarations/setup-onerror.ts';
|
|
1578
|
+
export type { default as DebugInfo } from 'declarations/-internal/debug-info.ts';
|
|
1579
|
+
export { getDebugInfo } from 'declarations/-internal/debug-info.ts';
|
|
1580
|
+
export { default as registerDebugInfoHelper } from 'declarations/-internal/debug-info-helpers.ts';
|
|
1581
|
+
export type { TestMetadata } from 'declarations/test-metadata.ts';
|
|
1582
|
+
export { default as getTestMetadata } from 'declarations/test-metadata.ts';
|
|
1583
|
+
export { registerHook, runHooks, type Hook, type HookLabel, type HookUnregister, } from 'declarations/helper-hooks.ts';
|
|
1584
|
+
export { default as click } from 'declarations/dom/click.ts';
|
|
1585
|
+
export { default as doubleClick } from 'declarations/dom/double-click.ts';
|
|
1586
|
+
export { default as tab } from 'declarations/dom/tab.ts';
|
|
1587
|
+
export { default as tap } from 'declarations/dom/tap.ts';
|
|
1588
|
+
export { default as focus } from 'declarations/dom/focus.ts';
|
|
1589
|
+
export { default as blur } from 'declarations/dom/blur.ts';
|
|
1590
|
+
export { default as triggerEvent } from 'declarations/dom/trigger-event.ts';
|
|
1591
|
+
export { default as triggerKeyEvent } from 'declarations/dom/trigger-key-event.ts';
|
|
1592
|
+
export { default as fillIn } from 'declarations/dom/fill-in.ts';
|
|
1593
|
+
export { default as select } from 'declarations/dom/select.ts';
|
|
1594
|
+
export { default as waitFor } from 'declarations/dom/wait-for.ts';
|
|
1595
|
+
export { default as getRootElement } from 'declarations/dom/get-root-element.ts';
|
|
1596
|
+
export { default as find } from 'declarations/dom/find.ts';
|
|
1597
|
+
export { default as findAll } from 'declarations/dom/find-all.ts';
|
|
1598
|
+
export { default as typeIn } from 'declarations/dom/type-in.ts';
|
|
1599
|
+
export { default as scrollTo } from 'declarations/dom/scroll-to.ts';
|
|
1600
|
+
export { default as waitForFocus } from 'declarations/dom/wait-for-focus.ts';
|
|
1601
|
+
export type { Target } from 'declarations/dom/-target.ts'; module '@ember/runloop' {
|
|
1602
|
+
interface PrivateBackburner extends Backburner {
|
|
1603
|
+
hasTimers(): boolean;
|
|
1604
|
+
currentInstance: DeferredActionQueues | null;
|
|
1605
|
+
}
|
|
1606
|
+
}
|
|
1607
|
+
//# sourceMappingURL=index.d.ts.map
|
|
1608
|
+
}
|
|
1609
|
+
declare module '@ember/test-helpers/-internal/build-registry' {
|
|
1610
|
+
import type { Resolver } from '@ember/owner';
|
|
1611
|
+
import EmberObject from '@ember/object';
|
|
1612
|
+
import { Registry } from '@ember/-internals/container';
|
|
1613
|
+
import type { FullName } from '@ember/owner';
|
|
1614
|
+
import { ContainerProxyMixin, RegistryProxyMixin } from '@ember/-internals/runtime';
|
|
1615
|
+
interface Owner extends RegistryProxyMixin, ContainerProxyMixin {
|
|
1616
|
+
} const Owner: Readonly<typeof EmberObject> & (new (owner?: import("@ember/owner").default) => EmberObject) & import("@ember/object/mixin").default & {
|
|
1617
|
+
_emberTestHelpersMockOwner: boolean;
|
|
1618
|
+
/**
|
|
1619
|
+
* Unregister a factory and its instance.
|
|
1620
|
+
*
|
|
1621
|
+
* Overrides `RegistryProxy#unregister` in order to clear any cached instances
|
|
1622
|
+
* of the unregistered factory.
|
|
1623
|
+
*
|
|
1624
|
+
* @param {string} fullName Name of the factory to unregister.
|
|
1625
|
+
*
|
|
1626
|
+
* @see {@link https://github.com/emberjs/ember.js/pull/12680}
|
|
1627
|
+
* @see {@link https://github.com/emberjs/ember.js/blob/v4.5.0-alpha.5/packages/%40ember/engine/instance.ts#L152-L167}
|
|
1628
|
+
*/
|
|
1629
|
+
unregister(this: Owner, fullName: FullName): void;
|
|
1630
|
+
};
|
|
1631
|
+
/**
|
|
1632
|
+
* @private
|
|
1633
|
+
* @param {Object} resolver the resolver to use with the registry
|
|
1634
|
+
* @returns {Object} owner, container, registry
|
|
1635
|
+
*/
|
|
1636
|
+
export default function buildRegistry(resolver: Resolver): {
|
|
1637
|
+
registry: Registry;
|
|
1638
|
+
container: import("@ember/-internals/container").Container;
|
|
1639
|
+
owner: Owner;
|
|
1640
|
+
};
|
|
1641
|
+
export {};
|
|
1642
|
+
//# sourceMappingURL=build-registry.d.ts.map
|
|
1643
|
+
}
|
|
1644
|
+
declare module '@ember/test-helpers/-internal/is-component' {
|
|
1645
|
+
import type { ComponentLike } from '@glint/template'; function isComponent(maybeComponent: object): maybeComponent is ComponentLike;
|
|
1646
|
+
export default isComponent;
|
|
1647
|
+
//# sourceMappingURL=is-component.d.ts.map
|
|
1648
|
+
}
|
|
1649
|
+
declare module '@ember/test-helpers/-internal/is-promise' {
|
|
1650
|
+
/**
|
|
1651
|
+
*
|
|
1652
|
+
* detect if a value appears to be a promise
|
|
1653
|
+
*
|
|
1654
|
+
* @private
|
|
1655
|
+
* @param {any} [maybePromise] the value being considered to be a promise
|
|
1656
|
+
* @return {boolean} true if the value appears to be a promise, or false otherwise
|
|
1657
|
+
*/
|
|
1658
|
+
export default function (maybePromise: any): boolean;
|
|
1659
|
+
//# sourceMappingURL=is-promise.d.ts.map
|
|
1660
|
+
}
|
|
1661
|
+
declare module '@ember/test-helpers/-internal/render-settled' {
|
|
1662
|
+
let renderSettled: () => Promise<void>;
|
|
1663
|
+
export default renderSettled;
|
|
1664
|
+
//# sourceMappingURL=render-settled.d.ts.map
|
|
1665
|
+
}
|
|
1666
|
+
declare module '@ember/test-helpers/dom/-get-description' {
|
|
1667
|
+
import type { Target } from '@ember/test-helpers/dom/-target';
|
|
1668
|
+
/**
|
|
1669
|
+
Used internally by the DOM interaction helpers to get a description of a
|
|
1670
|
+
target for debug/error messaging.
|
|
1671
|
+
|
|
1672
|
+
@private
|
|
1673
|
+
@param {Target} target the target
|
|
1674
|
+
@returns {string} a description of the target
|
|
1675
|
+
*/
|
|
1676
|
+
export default function getDescription(target: Target): string;
|
|
1677
|
+
//# sourceMappingURL=-get-description.d.ts.map
|
|
1678
|
+
}
|
|
1679
|
+
declare module '@ember/test-helpers/dom/-get-element' {
|
|
1680
|
+
import { type Target } from 'declarations/dom/-target.ts';
|
|
1681
|
+
import { type IDOMElementDescriptor } from 'dom-element-descriptors'; function getElement<K extends keyof (HTMLElementTagNameMap | SVGElementTagNameMap)>(target: K): (HTMLElementTagNameMap[K] | SVGElementTagNameMap[K]) | null; function getElement<K extends keyof HTMLElementTagNameMap>(target: K): HTMLElementTagNameMap[K] | null; function getElement<K extends keyof SVGElementTagNameMap>(target: K): SVGElementTagNameMap[K] | null; function getElement(target: string): Element | null; function getElement(target: Element): Element; function getElement(target: IDOMElementDescriptor): Element | null; function getElement(target: Document): Document; function getElement(target: Window): Document; function getElement(target: string | IDOMElementDescriptor): Element | null; function getElement(target: Target): Element | Document | null;
|
|
1682
|
+
export default getElement;
|
|
1683
|
+
//# sourceMappingURL=-get-element.d.ts.map
|
|
1684
|
+
}
|
|
1685
|
+
declare module '@ember/test-helpers/dom/-get-elements' {
|
|
1686
|
+
import { type IDOMElementDescriptor } from 'dom-element-descriptors'; function getElements(target: string): NodeListOf<Element>; function getElements(target: IDOMElementDescriptor): Iterable<Element>; function getElements(target: string | IDOMElementDescriptor): Iterable<Element>;
|
|
1687
|
+
export default getElements;
|
|
1688
|
+
//# sourceMappingURL=-get-elements.d.ts.map
|
|
1689
|
+
}
|
|
1690
|
+
declare module '@ember/test-helpers/dom/-get-window-or-element' {
|
|
1691
|
+
import { type Target } from 'declarations/dom/-target.ts';
|
|
1692
|
+
/**
|
|
1693
|
+
Used internally by the DOM interaction helpers to find either window or an element.
|
|
1694
|
+
|
|
1695
|
+
@private
|
|
1696
|
+
@param {string|Element} target the window, an element or selector to retrieve
|
|
1697
|
+
@returns {Element|Window} the target or selector
|
|
1698
|
+
*/
|
|
1699
|
+
export function getWindowOrElement(target: Target): Element | Document | Window | null;
|
|
1700
|
+
//# sourceMappingURL=-get-window-or-element.d.ts.map
|
|
1701
|
+
}
|
|
1702
|
+
declare module '@ember/test-helpers/dom/-is-form-control' {
|
|
1703
|
+
export type FormControl = HTMLInputElement | HTMLButtonElement | HTMLSelectElement | HTMLTextAreaElement;
|
|
1704
|
+
/**
|
|
1705
|
+
@private
|
|
1706
|
+
@param {Element} element the element to check
|
|
1707
|
+
@returns {boolean} `true` when the element is a form control, `false` otherwise
|
|
1708
|
+
*/
|
|
1709
|
+
export default function isFormControl(element: Element | Document | Window): element is FormControl;
|
|
1710
|
+
//# sourceMappingURL=-is-form-control.d.ts.map
|
|
1711
|
+
}
|
|
1712
|
+
declare module '@ember/test-helpers/dom/-guard-for-maxlength' {
|
|
1713
|
+
import type { FormControl } from '@ember/test-helpers/dom/-is-form-control';
|
|
1714
|
+
/**
|
|
1715
|
+
* @private
|
|
1716
|
+
* @param {Element} element - the element to check
|
|
1717
|
+
* @param {string} text - the text being added to element
|
|
1718
|
+
* @param {string} testHelper - the test helper context the guard is called from (for Error message)
|
|
1719
|
+
* @throws if `element` has `maxlength` & `value` exceeds `maxlength`
|
|
1720
|
+
*/
|
|
1721
|
+
export default function guardForMaxlength(element: FormControl, text: string, testHelper: string): void;
|
|
1722
|
+
//# sourceMappingURL=-guard-for-maxlength.d.ts.map
|
|
1723
|
+
}
|
|
1724
|
+
declare module '@ember/test-helpers/dom/-is-focusable' {
|
|
1725
|
+
/**
|
|
1726
|
+
@private
|
|
1727
|
+
@param {Element} element the element to check
|
|
1728
|
+
@returns {boolean} `true` when the element is focusable, `false` otherwise
|
|
1729
|
+
*/
|
|
1730
|
+
export default function isFocusable(element: HTMLElement | SVGElement | Element | Document | Window): element is HTMLElement | SVGElement;
|
|
1731
|
+
//# sourceMappingURL=-is-focusable.d.ts.map
|
|
1732
|
+
}
|
|
1733
|
+
declare module '@ember/test-helpers/dom/-is-select-element' {
|
|
1734
|
+
/**
|
|
1735
|
+
@private
|
|
1736
|
+
@param {Element} element the element to check
|
|
1737
|
+
@returns {boolean} `true` when the element is a select element, `false` otherwise
|
|
1738
|
+
*/
|
|
1739
|
+
export default function isSelectElement(element: Element | Document): element is HTMLSelectElement;
|
|
1740
|
+
//# sourceMappingURL=-is-select-element.d.ts.map
|
|
1741
|
+
}
|
|
1742
|
+
declare module '@ember/test-helpers/dom/-logging' {
|
|
1743
|
+
import type { Target } from '@ember/test-helpers/dom/-target';
|
|
1744
|
+
/**
|
|
1745
|
+
* Logs a debug message to the console if the `testHelperLogging` query
|
|
1746
|
+
* parameter is set.
|
|
1747
|
+
*
|
|
1748
|
+
* @private
|
|
1749
|
+
* @param {string} helperName Name of the helper
|
|
1750
|
+
* @param {string|Element} target The target element or selector
|
|
1751
|
+
*/
|
|
1752
|
+
export function log(helperName: string, target: Target, ...args: any[]): void;
|
|
1753
|
+
/**
|
|
1754
|
+
* This generates a human-readable description to a DOM element.
|
|
1755
|
+
*
|
|
1756
|
+
* @private
|
|
1757
|
+
* @param {*} el The element that should be described
|
|
1758
|
+
* @returns {string} A human-readable description
|
|
1759
|
+
*/
|
|
1760
|
+
export function elementToString(el: unknown): string;
|
|
1761
|
+
//# sourceMappingURL=-logging.d.ts.map
|
|
1762
|
+
}
|
|
1763
|
+
declare module '@ember/test-helpers/dom/-to-array' {
|
|
1764
|
+
/**
|
|
1765
|
+
@private
|
|
1766
|
+
@param {NodeList} nodelist the nodelist to convert to an array
|
|
1767
|
+
@returns {Array} an array
|
|
1768
|
+
*/
|
|
1769
|
+
export default function toArray<T extends Node>(nodelist: NodeListOf<T>): T[];
|
|
1770
|
+
//# sourceMappingURL=-to-array.d.ts.map
|
|
1771
|
+
}
|