{"version":3,"sources":["license.js","loader.js","@ember/-internals/container/tests/container_test.js","@ember/-internals/container/tests/owner_test.js","@ember/-internals/container/tests/registry_test.js","@ember/-internals/extension-support/tests/container_debug_adapter_test.js","@ember/-internals/extension-support/tests/data_adapter_test.js","@ember/-internals/glimmer/tests/integration/application/actions-test.js","@ember/-internals/glimmer/tests/integration/application/engine-test.js","@ember/-internals/glimmer/tests/integration/application/helper-registration-test.js","@ember/-internals/glimmer/tests/integration/application/hot-reload-test.js","@ember/-internals/glimmer/tests/integration/application/rendering-test.js","@ember/-internals/glimmer/tests/integration/components/angle-bracket-invocation-test.js","@ember/-internals/glimmer/tests/integration/components/append-test.js","@ember/-internals/glimmer/tests/integration/components/attribute-bindings-test.js","@ember/-internals/glimmer/tests/integration/components/attrs-lookup-test.js","@ember/-internals/glimmer/tests/integration/components/class-bindings-test.js","@ember/-internals/glimmer/tests/integration/components/contextual-components-test.js","@ember/-internals/glimmer/tests/integration/components/curly-components-test.js","@ember/-internals/glimmer/tests/integration/components/destroy-test.js","@ember/-internals/glimmer/tests/integration/components/dynamic-components-test.js","@ember/-internals/glimmer/tests/integration/components/error-handling-test.js","@ember/-internals/glimmer/tests/integration/components/fragment-components-test.js","@ember/-internals/glimmer/tests/integration/components/input-angle-test.js","@ember/-internals/glimmer/tests/integration/components/input-curly-test.js","@ember/-internals/glimmer/tests/integration/components/instrumentation-compile-test.js","@ember/-internals/glimmer/tests/integration/components/instrumentation-test.js","@ember/-internals/glimmer/tests/integration/components/life-cycle-test.js","@ember/-internals/glimmer/tests/integration/components/link-to/query-params-angle-test.js","@ember/-internals/glimmer/tests/integration/components/link-to/query-params-curly-test.js","@ember/-internals/glimmer/tests/integration/components/link-to/rendering-angle-test.js","@ember/-internals/glimmer/tests/integration/components/link-to/rendering-curly-test.js","@ember/-internals/glimmer/tests/integration/components/link-to/routing-angle-test.js","@ember/-internals/glimmer/tests/integration/components/link-to/routing-curly-test.js","@ember/-internals/glimmer/tests/integration/components/link-to/transitioning-classes-angle-test.js","@ember/-internals/glimmer/tests/integration/components/link-to/transitioning-classes-curly-test.js","@ember/-internals/glimmer/tests/integration/components/local-lookup-test.js","@ember/-internals/glimmer/tests/integration/components/namespaced-lookup-test.js","@ember/-internals/glimmer/tests/integration/components/render-to-element-test.js","@ember/-internals/glimmer/tests/integration/components/target-action-test.js","@ember/-internals/glimmer/tests/integration/components/template-only-components-test.js","@ember/-internals/glimmer/tests/integration/components/textarea-angle-test.js","@ember/-internals/glimmer/tests/integration/components/textarea-curly-test.js","@ember/-internals/glimmer/tests/integration/components/to-string-test.js","@ember/-internals/glimmer/tests/integration/components/tracked-test.js","@ember/-internals/glimmer/tests/integration/components/utils-test.js","@ember/-internals/glimmer/tests/integration/components/web-component-fallback-test.js","@ember/-internals/glimmer/tests/integration/components/will-destroy-element-hook-test.js","@ember/-internals/glimmer/tests/integration/content-test.js","@ember/-internals/glimmer/tests/integration/custom-component-manager-test.js","@ember/-internals/glimmer/tests/integration/custom-modifier-manager-test.js","@ember/-internals/glimmer/tests/integration/event-dispatcher-test.js","@ember/-internals/glimmer/tests/integration/helpers/-class-test.js","@ember/-internals/glimmer/tests/integration/helpers/array-test.js","@ember/-internals/glimmer/tests/integration/helpers/closure-action-test.js","@ember/-internals/glimmer/tests/integration/helpers/concat-test.js","@ember/-internals/glimmer/tests/integration/helpers/custom-helper-test.js","@ember/-internals/glimmer/tests/integration/helpers/element-action-test.js","@ember/-internals/glimmer/tests/integration/helpers/get-test.js","@ember/-internals/glimmer/tests/integration/helpers/hash-test.js","@ember/-internals/glimmer/tests/integration/helpers/if-unless-test.js","@ember/-internals/glimmer/tests/integration/helpers/loc-test.js","@ember/-internals/glimmer/tests/integration/helpers/log-test.js","@ember/-internals/glimmer/tests/integration/helpers/mut-test.js","@ember/-internals/glimmer/tests/integration/helpers/partial-test.js","@ember/-internals/glimmer/tests/integration/helpers/readonly-test.js","@ember/-internals/glimmer/tests/integration/helpers/tracked-test.js","@ember/-internals/glimmer/tests/integration/helpers/unbound-test.js","@ember/-internals/glimmer/tests/integration/helpers/yield-test.js","@ember/-internals/glimmer/tests/integration/input-test.js","@ember/-internals/glimmer/tests/integration/mount-test.js","@ember/-internals/glimmer/tests/integration/outlet-test.js","@ember/-internals/glimmer/tests/integration/refinements-test.js","@ember/-internals/glimmer/tests/integration/render-settled-test.js","@ember/-internals/glimmer/tests/integration/svg-test.js","@ember/-internals/glimmer/tests/integration/syntax/each-in-test.js","@ember/-internals/glimmer/tests/integration/syntax/each-test.js","@ember/-internals/glimmer/tests/integration/syntax/experimental-syntax-test.js","@ember/-internals/glimmer/tests/integration/syntax/if-unless-test.js","@ember/-internals/glimmer/tests/integration/syntax/in-element-test.js","@ember/-internals/glimmer/tests/integration/syntax/let-test.js","@ember/-internals/glimmer/tests/integration/syntax/with-dynamic-var-test.js","@ember/-internals/glimmer/tests/integration/syntax/with-test.js","@ember/-internals/glimmer/tests/unit/outlet-test.js","@ember/-internals/glimmer/tests/unit/runtime-resolver-cache-test.js","@ember/-internals/glimmer/tests/unit/template-factory-test.js","@ember/-internals/glimmer/tests/unit/utils/debug-stack-test.js","@ember/-internals/glimmer/tests/utils/glimmerish-component.js","@ember/-internals/glimmer/tests/utils/helpers.js","@ember/-internals/glimmer/tests/utils/shared-conditional-tests.js","@ember/-internals/glimmer/tests/utils/string-test.js","@ember/-internals/meta/tests/listeners_test.js","@ember/-internals/meta/tests/meta_test.js","@ember/-internals/metal/tests/accessors/get_path_test.js","@ember/-internals/metal/tests/accessors/get_properties_test.js","@ember/-internals/metal/tests/accessors/get_test.js","@ember/-internals/metal/tests/accessors/mandatory_setters_test.js","@ember/-internals/metal/tests/accessors/set_path_test.js","@ember/-internals/metal/tests/accessors/set_test.js","@ember/-internals/metal/tests/alias_test.js","@ember/-internals/metal/tests/chains_test.js","@ember/-internals/metal/tests/computed_decorator_test.js","@ember/-internals/metal/tests/computed_test.js","@ember/-internals/metal/tests/events_test.js","@ember/-internals/metal/tests/expand_properties_test.js","@ember/-internals/metal/tests/injected_property_test.js","@ember/-internals/metal/tests/is_blank_test.js","@ember/-internals/metal/tests/is_empty_test.js","@ember/-internals/metal/tests/is_none_test.js","@ember/-internals/metal/tests/is_present_test.js","@ember/-internals/metal/tests/libraries_test.js","@ember/-internals/metal/tests/main_test.js","@ember/-internals/metal/tests/mixin/accessor_test.js","@ember/-internals/metal/tests/mixin/alias_method_test.js","@ember/-internals/metal/tests/mixin/apply_test.js","@ember/-internals/metal/tests/mixin/computed_test.js","@ember/-internals/metal/tests/mixin/concatenated_properties_test.js","@ember/-internals/metal/tests/mixin/detect_test.js","@ember/-internals/metal/tests/mixin/introspection_test.js","@ember/-internals/metal/tests/mixin/merged_properties_test.js","@ember/-internals/metal/tests/mixin/method_test.js","@ember/-internals/metal/tests/mixin/observer_test.js","@ember/-internals/metal/tests/mixin/reopen_test.js","@ember/-internals/metal/tests/mixin/without_test.js","@ember/-internals/metal/tests/namespace_search_test.js","@ember/-internals/metal/tests/native_desc_decorator_test.js","@ember/-internals/metal/tests/observer_test.js","@ember/-internals/metal/tests/performance_test.js","@ember/-internals/metal/tests/properties_test.js","@ember/-internals/metal/tests/property_did_change_hook.js","@ember/-internals/metal/tests/property_events_test.js","@ember/-internals/metal/tests/set_properties_test.js","@ember/-internals/metal/tests/tracked/classic_classes_test.js","@ember/-internals/metal/tests/tracked/get_test.js","@ember/-internals/metal/tests/tracked/set_test.js","@ember/-internals/metal/tests/tracked/support.js","@ember/-internals/metal/tests/tracked/validation_test.js","@ember/-internals/metal/tests/watching/is_watching_test.js","@ember/-internals/metal/tests/watching/unwatch_test.js","@ember/-internals/metal/tests/watching/watch_test.js","@ember/-internals/routing/tests/ext/controller_test.js","@ember/-internals/routing/tests/location/auto_location_test.js","@ember/-internals/routing/tests/location/hash_location_test.js","@ember/-internals/routing/tests/location/history_location_test.js","@ember/-internals/routing/tests/location/none_location_test.js","@ember/-internals/routing/tests/location/util_test.js","@ember/-internals/routing/tests/system/cache_test.js","@ember/-internals/routing/tests/system/controller_for_test.js","@ember/-internals/routing/tests/system/dsl_test.js","@ember/-internals/routing/tests/system/route_test.js","@ember/-internals/routing/tests/system/router_test.js","@ember/-internals/routing/tests/utils_test.js","@ember/-internals/runtime/tests/array/any-test.js","@ember/-internals/runtime/tests/array/apply-test.js","@ember/-internals/runtime/tests/array/compact-test.js","@ember/-internals/runtime/tests/array/every-test.js","@ember/-internals/runtime/tests/array/filter-test.js","@ember/-internals/runtime/tests/array/find-test.js","@ember/-internals/runtime/tests/array/firstObject-test.js","@ember/-internals/runtime/tests/array/forEach-test.js","@ember/-internals/runtime/tests/array/includes-test.js","@ember/-internals/runtime/tests/array/indexOf-test.js","@ember/-internals/runtime/tests/array/invoke-test.js","@ember/-internals/runtime/tests/array/isAny-test.js","@ember/-internals/runtime/tests/array/lastIndexOf-test.js","@ember/-internals/runtime/tests/array/lastObject-test.js","@ember/-internals/runtime/tests/array/map-test.js","@ember/-internals/runtime/tests/array/mapBy-test.js","@ember/-internals/runtime/tests/array/objectAt-test.js","@ember/-internals/runtime/tests/array/reduce-test.js","@ember/-internals/runtime/tests/array/reject-test.js","@ember/-internals/runtime/tests/array/sortBy-test.js","@ember/-internals/runtime/tests/array/toArray-test.js","@ember/-internals/runtime/tests/array/uniq-test.js","@ember/-internals/runtime/tests/array/uniqBy-test.js","@ember/-internals/runtime/tests/array/without-test.js","@ember/-internals/runtime/tests/copyable-array/copy-test.js","@ember/-internals/runtime/tests/core/compare_test.js","@ember/-internals/runtime/tests/core/copy_test.js","@ember/-internals/runtime/tests/core/isEqual_test.js","@ember/-internals/runtime/tests/core/is_array_test.js","@ember/-internals/runtime/tests/core/is_empty_test.js","@ember/-internals/runtime/tests/core/type_of_test.js","@ember/-internals/runtime/tests/ext/function_test.js","@ember/-internals/runtime/tests/ext/rsvp_test.js","@ember/-internals/runtime/tests/helpers/array.js","@ember/-internals/runtime/tests/inject_test.js","@ember/-internals/runtime/tests/legacy_1x/mixins/observable/chained_test.js","@ember/-internals/runtime/tests/legacy_1x/mixins/observable/observable_test.js","@ember/-internals/runtime/tests/legacy_1x/mixins/observable/propertyChanges_test.js","@ember/-internals/runtime/tests/legacy_1x/system/object/base_test.js","@ember/-internals/runtime/tests/legacy_1x/system/object/concatenated_test.js","@ember/-internals/runtime/tests/mixins/array_test.js","@ember/-internals/runtime/tests/mixins/comparable_test.js","@ember/-internals/runtime/tests/mixins/container_proxy_test.js","@ember/-internals/runtime/tests/mixins/enumerable_test.js","@ember/-internals/runtime/tests/mixins/evented_test.js","@ember/-internals/runtime/tests/mixins/mutable_enumerable_test.js","@ember/-internals/runtime/tests/mixins/observable_test.js","@ember/-internals/runtime/tests/mixins/promise_proxy_test.js","@ember/-internals/runtime/tests/mixins/target_action_support_test.js","@ember/-internals/runtime/tests/mutable-array/addObject-test.js","@ember/-internals/runtime/tests/mutable-array/clear-test.js","@ember/-internals/runtime/tests/mutable-array/insertAt-test.js","@ember/-internals/runtime/tests/mutable-array/popObject-test.js","@ember/-internals/runtime/tests/mutable-array/pushObject-test.js","@ember/-internals/runtime/tests/mutable-array/pushObjects-test.js","@ember/-internals/runtime/tests/mutable-array/removeAt-test.js","@ember/-internals/runtime/tests/mutable-array/removeObject-test.js","@ember/-internals/runtime/tests/mutable-array/removeObjects-test.js","@ember/-internals/runtime/tests/mutable-array/replace-test.js","@ember/-internals/runtime/tests/mutable-array/reverseObjects-test.js","@ember/-internals/runtime/tests/mutable-array/setObjects-test.js","@ember/-internals/runtime/tests/mutable-array/shiftObject-test.js","@ember/-internals/runtime/tests/mutable-array/unshiftObject-test.js","@ember/-internals/runtime/tests/mutable-array/unshiftObjects-test.js","@ember/-internals/runtime/tests/system/array_proxy/arranged_content_test.js","@ember/-internals/runtime/tests/system/array_proxy/array_observer_test.js","@ember/-internals/runtime/tests/system/array_proxy/content_change_test.js","@ember/-internals/runtime/tests/system/array_proxy/length_test.js","@ember/-internals/runtime/tests/system/array_proxy/watching_and_listening_test.js","@ember/-internals/runtime/tests/system/core_object_test.js","@ember/-internals/runtime/tests/system/namespace/base_test.js","@ember/-internals/runtime/tests/system/native_array/a_test.js","@ember/-internals/runtime/tests/system/native_array/replace_test.js","@ember/-internals/runtime/tests/system/object/computed_test.js","@ember/-internals/runtime/tests/system/object/create_test.js","@ember/-internals/runtime/tests/system/object/destroy_test.js","@ember/-internals/runtime/tests/system/object/detectInstance_test.js","@ember/-internals/runtime/tests/system/object/detect_test.js","@ember/-internals/runtime/tests/system/object/es-compatibility-test.js","@ember/-internals/runtime/tests/system/object/events_test.js","@ember/-internals/runtime/tests/system/object/extend_test.js","@ember/-internals/runtime/tests/system/object/observer_test.js","@ember/-internals/runtime/tests/system/object/reopenClass_test.js","@ember/-internals/runtime/tests/system/object/reopen_test.js","@ember/-internals/runtime/tests/system/object/strict-mode-test.js","@ember/-internals/runtime/tests/system/object/toString_test.js","@ember/-internals/runtime/tests/system/object_proxy_test.js","@ember/-internals/utils/tests/cache_test.js","@ember/-internals/utils/tests/can_invoke_test.js","@ember/-internals/utils/tests/checkHasSuper_test.js","@ember/-internals/utils/tests/generate_guid_test.js","@ember/-internals/utils/tests/guid_for_test.js","@ember/-internals/utils/tests/inspect_test.js","@ember/-internals/utils/tests/is_proxy_test.js","@ember/-internals/utils/tests/make_array_test.js","@ember/-internals/utils/tests/to-string-test.js","@ember/-internals/utils/tests/try_invoke_test.js","@ember/application/tests/application_instance_test.js","@ember/application/tests/application_test.js","@ember/application/tests/bootstrap-test.js","@ember/application/tests/dependency_injection/custom_resolver_test.js","@ember/application/tests/dependency_injection/default_resolver_test.js","@ember/application/tests/dependency_injection/normalization_test.js","@ember/application/tests/dependency_injection/to_string_test.js","@ember/application/tests/dependency_injection_test.js","@ember/application/tests/initializers_test.js","@ember/application/tests/instance_initializers_test.js","@ember/application/tests/lazy_load_test.js","@ember/application/tests/logging_test.js","@ember/application/tests/readiness_test.js","@ember/application/tests/reset_test.js","@ember/application/tests/visit_test.js","@ember/controller/tests/controller_test.js","@ember/engine/tests/engine_initializers_test.js","@ember/engine/tests/engine_instance_initializers_test.js","@ember/engine/tests/engine_instance_test.js","@ember/engine/tests/engine_parent_test.js","@ember/engine/tests/engine_test.js","@ember/error/tests/index_test.js","@ember/instrumentation/tests/index-test.js","@ember/object/tests/action_test.js","@ember/object/tests/computed/computed_macros_test.js","@ember/object/tests/computed/macro_decorators_test.js","@ember/object/tests/computed/reduce_computed_macros_test.js","@ember/polyfills/tests/assign_test.js","@ember/polyfills/tests/merge_test.js","@ember/runloop/tests/debounce_test.js","@ember/runloop/tests/later_test.js","@ember/runloop/tests/next_test.js","@ember/runloop/tests/once_test.js","@ember/runloop/tests/onerror_test.js","@ember/runloop/tests/run_bind_test.js","@ember/runloop/tests/run_test.js","@ember/runloop/tests/schedule_test.js","@ember/runloop/tests/sync_test.js","@ember/runloop/tests/unwind_test.js","@ember/service/tests/service_test.js","@ember/string/tests/camelize_test.js","@ember/string/tests/capitalize_test.js","@ember/string/tests/classify_test.js","@ember/string/tests/dasherize_test.js","@ember/string/tests/decamelize_test.js","@ember/string/tests/loc_test.js","@ember/string/tests/underscore_test.js","@ember/string/tests/w_test.js","ember-template-compiler/tests/plugins/assert-if-helper-without-arguments-test.js","ember-template-compiler/tests/plugins/assert-input-helper-without-block-test.js","ember-template-compiler/tests/plugins/assert-local-variable-shadowing-helper-invocation-test.js","ember-template-compiler/tests/plugins/assert-reserved-named-arguments-test.js","ember-template-compiler/tests/plugins/assert-splattribute-expression-test.js","ember-template-compiler/tests/plugins/deprecate-send-action-test.js","ember-template-compiler/tests/plugins/transform-component-invocation-test.js","ember-template-compiler/tests/plugins/transform-input-type-syntax-test.js","ember-template-compiler/tests/plugins/transform-link-to-test.js","ember-template-compiler/tests/system/bootstrap-test.js","ember-template-compiler/tests/system/compile_options_test.js","ember-template-compiler/tests/system/dasherize-component-name-test.js","ember-template-compiler/tests/utils/transform-test-case.js","ember/tests/application_lifecycle_test.js","ember/tests/component_context_test.js","ember/tests/component_registration_test.js","ember/tests/controller_test.js","ember/tests/error_handler_test.js","ember/tests/homepage_example_test.js","ember/tests/integration/multiple-app-test.js","ember/tests/production_build_test.js","ember/tests/reexports_test.js","ember/tests/routing/decoupled_basic_test.js","ember/tests/routing/query_params_test.js","ember/tests/routing/query_params_test/model_dependent_state_with_query_params_test.js","ember/tests/routing/query_params_test/overlapping_query_params_test.js","ember/tests/routing/query_params_test/query_param_async_get_handler_test.js","ember/tests/routing/query_params_test/query_params_paramless_link_to_test.js","ember/tests/routing/query_params_test/shared_state_test.js","ember/tests/routing/router_map_test.js","ember/tests/routing/router_service_test/basic_test.js","ember/tests/routing/router_service_test/build_routeinfo_metadata_test.js","ember/tests/routing/router_service_test/currenturl_lifecycle_test.js","ember/tests/routing/router_service_test/events_test.js","ember/tests/routing/router_service_test/isActive_test.js","ember/tests/routing/router_service_test/recognize_test.js","ember/tests/routing/router_service_test/replaceWith_test.js","ember/tests/routing/router_service_test/transitionTo_test.js","ember/tests/routing/router_service_test/urlFor_test.js","ember/tests/routing/substates_test.js","ember/tests/routing/toplevel_dom_test.js","ember/tests/service_injection_test.js","ember/tests/view_instrumentation_test.js","internal-test-helpers/index.js","internal-test-helpers/lib/apply-mixins.js","internal-test-helpers/lib/browser-detect.js","internal-test-helpers/lib/build-owner.js","internal-test-helpers/lib/confirm-export.js","internal-test-helpers/lib/element-helpers.js","internal-test-helpers/lib/ember-dev/assertion.js","internal-test-helpers/lib/ember-dev/containers.js","internal-test-helpers/lib/ember-dev/debug.js","internal-test-helpers/lib/ember-dev/deprecation.js","internal-test-helpers/lib/ember-dev/method-call-tracker.js","internal-test-helpers/lib/ember-dev/namespaces.js","internal-test-helpers/lib/ember-dev/run-loop.js","internal-test-helpers/lib/ember-dev/setup-qunit.js","internal-test-helpers/lib/ember-dev/utils.js","internal-test-helpers/lib/ember-dev/warning.js","internal-test-helpers/lib/equal-inner-html.js","internal-test-helpers/lib/equal-tokens.js","internal-test-helpers/lib/factory.js","internal-test-helpers/lib/get-all-property-names.js","internal-test-helpers/lib/get-text-of.js","internal-test-helpers/lib/matchers.js","internal-test-helpers/lib/module-for.js","internal-test-helpers/lib/node-query.js","internal-test-helpers/lib/registry-check.js","internal-test-helpers/lib/run.js","internal-test-helpers/lib/strip.js","internal-test-helpers/lib/system/synthetic-events.js","internal-test-helpers/lib/test-cases/abstract-application.js","internal-test-helpers/lib/test-cases/abstract-rendering.js","internal-test-helpers/lib/test-cases/abstract.js","internal-test-helpers/lib/test-cases/application.js","internal-test-helpers/lib/test-cases/autoboot-application.js","internal-test-helpers/lib/test-cases/default-resolver-application.js","internal-test-helpers/lib/test-cases/query-param.js","internal-test-helpers/lib/test-cases/rendering.js","internal-test-helpers/lib/test-cases/router.js","internal-test-helpers/lib/test-cases/test-resolver-application.js","internal-test-helpers/lib/test-context.js","internal-test-helpers/lib/test-resolver.js","internal-test-helpers/tests/index-test.js","node-module.js"],"sourcesContent":["/*!\n * @overview Ember - JavaScript Application Framework\n * @copyright Copyright 2011-2018 Tilde Inc. and contributors\n * Portions Copyright 2006-2011 Strobe Inc.\n * Portions Copyright 2008-2011 Apple Inc. All rights reserved.\n * @license Licensed under MIT license\n * See https://raw.github.com/emberjs/ember.js/master/LICENSE\n * @version 3.10.2\n */\n","/*globals process */\nvar enifed, requireModule, Ember;\n\n// Used in @ember/-internals/environment/lib/global.js\nmainContext = this; // eslint-disable-line no-undef\n\n(function() {\n function missingModule(name, referrerName) {\n if (referrerName) {\n throw new Error('Could not find module ' + name + ' required by: ' + referrerName);\n } else {\n throw new Error('Could not find module ' + name);\n }\n }\n\n function internalRequire(_name, referrerName) {\n var name = _name;\n var mod = registry[name];\n\n if (!mod) {\n name = name + '/index';\n mod = registry[name];\n }\n\n var exports = seen[name];\n\n if (exports !== undefined) {\n return exports;\n }\n\n exports = seen[name] = {};\n\n if (!mod) {\n missingModule(_name, referrerName);\n }\n\n var deps = mod.deps;\n var callback = mod.callback;\n var reified = new Array(deps.length);\n\n for (var i = 0; i < deps.length; i++) {\n if (deps[i] === 'exports') {\n reified[i] = exports;\n } else if (deps[i] === 'require') {\n reified[i] = requireModule;\n } else {\n reified[i] = internalRequire(deps[i], name);\n }\n }\n\n callback.apply(this, reified);\n\n return exports;\n }\n\n var isNode =\n typeof window === 'undefined' &&\n typeof process !== 'undefined' &&\n {}.toString.call(process) === '[object process]';\n\n if (!isNode) {\n Ember = this.Ember = this.Ember || {};\n }\n\n if (typeof Ember === 'undefined') {\n Ember = {};\n }\n\n if (typeof Ember.__loader === 'undefined') {\n var registry = Object.create(null);\n var seen = Object.create(null);\n\n enifed = function(name, deps, callback) {\n var value = {};\n\n if (!callback) {\n value.deps = [];\n value.callback = deps;\n } else {\n value.deps = deps;\n value.callback = callback;\n }\n\n registry[name] = value;\n };\n\n requireModule = function(name) {\n return internalRequire(name, null);\n };\n\n // setup `require` module\n requireModule['default'] = requireModule;\n\n requireModule.has = function registryHas(moduleName) {\n return Boolean(registry[moduleName]) || Boolean(registry[moduleName + '/index']);\n };\n\n requireModule._eak_seen = registry;\n\n Ember.__loader = {\n define: enifed,\n require: requireModule,\n registry: registry,\n };\n } else {\n enifed = Ember.__loader.define;\n requireModule = Ember.__loader.require;\n }\n})();\n","enifed(\"@ember/-internals/container/tests/container_test\", [\"ember-babel\", \"@ember/-internals/owner\", \"@ember/polyfills\", \"@ember/-internals/container\", \"internal-test-helpers\"], function (_emberBabel, _owner, _polyfills, _container, _internalTestHelpers) {\n \"use strict\";\n\n (0, _internalTestHelpers.moduleFor)('Container',\n /*#__PURE__*/\n function (_AbstractTestCase) {\n (0, _emberBabel.inheritsLoose)(_class, _AbstractTestCase);\n\n function _class() {\n return _AbstractTestCase.apply(this, arguments) || this;\n }\n\n var _proto = _class.prototype;\n\n _proto['@test A registered factory returns the same instance each time'] = function testARegisteredFactoryReturnsTheSameInstanceEachTime(assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n var PostController = (0, _internalTestHelpers.factory)();\n registry.register('controller:post', PostController);\n var postController = container.lookup('controller:post');\n assert.ok(postController instanceof PostController, 'The lookup is an instance of the factory');\n assert.equal(postController, container.lookup('controller:post'));\n };\n\n _proto['@test uses create time injections if factory has no extend'] = function testUsesCreateTimeInjectionsIfFactoryHasNoExtend(assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n var AppleController = (0, _internalTestHelpers.factory)();\n var PostController = (0, _internalTestHelpers.factory)();\n PostController.extend = undefined; // remove extend\n\n registry.register('controller:apple', AppleController);\n registry.register('controller:post', PostController);\n registry.injection('controller:post', 'apple', 'controller:apple');\n var postController = container.lookup('controller:post');\n assert.ok(postController.apple instanceof AppleController, 'instance receives an apple of instance AppleController');\n };\n\n _proto['@test A registered factory returns a fresh instance if singleton: false is passed as an option'] = function testARegisteredFactoryReturnsAFreshInstanceIfSingletonFalseIsPassedAsAnOption(assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n var PostController = (0, _internalTestHelpers.factory)();\n registry.register('controller:post', PostController);\n var postController1 = container.lookup('controller:post');\n var postController2 = container.lookup('controller:post', {\n singleton: false\n });\n var postController3 = container.lookup('controller:post', {\n singleton: false\n });\n var postController4 = container.lookup('controller:post');\n assert.equal(postController1.toString(), postController4.toString(), 'Singleton factories looked up normally return the same value');\n assert.notEqual(postController1.toString(), postController2.toString(), 'Singleton factories are not equal to factories looked up with singleton: false');\n assert.notEqual(postController2.toString(), postController3.toString(), 'Two factories looked up with singleton: false are not equal');\n assert.notEqual(postController3.toString(), postController4.toString(), 'A singleton factory looked up after a factory called with singleton: false is not equal');\n assert.ok(postController1 instanceof PostController, 'All instances are instances of the registered factory');\n assert.ok(postController2 instanceof PostController, 'All instances are instances of the registered factory');\n assert.ok(postController3 instanceof PostController, 'All instances are instances of the registered factory');\n assert.ok(postController4 instanceof PostController, 'All instances are instances of the registered factory');\n };\n\n _proto[\"@test A factory type with a registered injection's instances receive that injection\"] = function testAFactoryTypeWithARegisteredInjectionSInstancesReceiveThatInjection(assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n var PostController = (0, _internalTestHelpers.factory)();\n var Store = (0, _internalTestHelpers.factory)();\n registry.register('controller:post', PostController);\n registry.register('store:main', Store);\n registry.typeInjection('controller', 'store', 'store:main');\n var postController = container.lookup('controller:post');\n var store = container.lookup('store:main');\n assert.equal(postController.store, store);\n };\n\n _proto['@test An individual factory with a registered injection receives the injection'] = function testAnIndividualFactoryWithARegisteredInjectionReceivesTheInjection(assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n var PostController = (0, _internalTestHelpers.factory)();\n var Store = (0, _internalTestHelpers.factory)();\n registry.register('controller:post', PostController);\n registry.register('store:main', Store);\n registry.injection('controller:post', 'store', 'store:main');\n var postController = container.lookup('controller:post');\n var store = container.lookup('store:main');\n assert.equal(postController.store, store, 'has the correct store injected');\n };\n\n _proto['@test A factory with both type and individual injections'] = function testAFactoryWithBothTypeAndIndividualInjections(assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n var PostController = (0, _internalTestHelpers.factory)();\n var Store = (0, _internalTestHelpers.factory)();\n var Router = (0, _internalTestHelpers.factory)();\n registry.register('controller:post', PostController);\n registry.register('store:main', Store);\n registry.register('router:main', Router);\n registry.injection('controller:post', 'store', 'store:main');\n registry.typeInjection('controller', 'router', 'router:main');\n var postController = container.lookup('controller:post');\n var store = container.lookup('store:main');\n var router = container.lookup('router:main');\n assert.equal(postController.store, store);\n assert.equal(postController.router, router);\n };\n\n _proto['@test A non-singleton instance is never cached'] = function testANonSingletonInstanceIsNeverCached(assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n var PostView = (0, _internalTestHelpers.factory)();\n registry.register('view:post', PostView, {\n singleton: false\n });\n var postView1 = container.lookup('view:post');\n var postView2 = container.lookup('view:post');\n assert.ok(postView1 !== postView2, 'Non-singletons are not cached');\n };\n\n _proto['@test A non-instantiated property is not instantiated'] = function testANonInstantiatedPropertyIsNotInstantiated(assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n\n var template = function () {};\n\n registry.register('template:foo', template, {\n instantiate: false\n });\n assert.equal(container.lookup('template:foo'), template);\n };\n\n _proto['@test A failed lookup returns undefined'] = function testAFailedLookupReturnsUndefined(assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n assert.equal(container.lookup('doesnot:exist'), undefined);\n };\n\n _proto['@test An invalid factory throws an error'] = function testAnInvalidFactoryThrowsAnError(assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n registry.register('controller:foo', {});\n assert.throws(function () {\n container.lookup('controller:foo');\n }, /Failed to create an instance of \\'controller:foo\\'/);\n };\n\n _proto['@test Injecting a failed lookup raises an error'] = function testInjectingAFailedLookupRaisesAnError() {\n var registry = new _container.Registry();\n var container = registry.container();\n var fooInstance = {};\n var fooFactory = {};\n var Foo = {\n create: function () {\n return fooInstance;\n },\n extend: function () {\n return fooFactory;\n }\n };\n registry.register('model:foo', Foo);\n registry.injection('model:foo', 'store', 'store:main');\n expectAssertion(function () {\n container.lookup('model:foo');\n });\n };\n\n _proto['@test Injecting a falsy value does not raise an error'] = function testInjectingAFalsyValueDoesNotRaiseAnError(assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n var ApplicationController = (0, _internalTestHelpers.factory)();\n registry.register('controller:application', ApplicationController);\n registry.register('user:current', null, {\n instantiate: false\n });\n registry.injection('controller:application', 'currentUser', 'user:current');\n assert.strictEqual(container.lookup('controller:application').currentUser, null);\n };\n\n _proto['@test The container returns same value each time even if the value is falsy'] = function testTheContainerReturnsSameValueEachTimeEvenIfTheValueIsFalsy(assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n registry.register('falsy:value', null, {\n instantiate: false\n });\n assert.strictEqual(container.lookup('falsy:value'), container.lookup('falsy:value'));\n };\n\n _proto['@test Destroying the container destroys any cached singletons'] = function testDestroyingTheContainerDestroysAnyCachedSingletons(assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n var PostController = (0, _internalTestHelpers.factory)();\n var PostView = (0, _internalTestHelpers.factory)();\n\n var template = function () {};\n\n registry.register('controller:post', PostController);\n registry.register('view:post', PostView, {\n singleton: false\n });\n registry.register('template:post', template, {\n instantiate: false\n });\n registry.injection('controller:post', 'postView', 'view:post');\n var postController = container.lookup('controller:post');\n var postView = postController.postView;\n assert.ok(postView instanceof PostView, 'The non-singleton was injected');\n container.destroy();\n assert.ok(postController.isDestroyed, 'Singletons are destroyed');\n assert.ok(!postView.isDestroyed, 'Non-singletons are not destroyed');\n };\n\n _proto['@test The container can use a registry hook to resolve factories lazily'] = function testTheContainerCanUseARegistryHookToResolveFactoriesLazily(assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n var PostController = (0, _internalTestHelpers.factory)();\n registry.resolver = {\n resolve: function (fullName) {\n if (fullName === 'controller:post') {\n return PostController;\n }\n }\n };\n var postController = container.lookup('controller:post');\n assert.ok(postController instanceof PostController, 'The correct factory was provided');\n };\n\n _proto['@test The container normalizes names before resolving'] = function testTheContainerNormalizesNamesBeforeResolving(assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n var PostController = (0, _internalTestHelpers.factory)();\n\n registry.normalizeFullName = function () {\n return 'controller:post';\n };\n\n registry.register('controller:post', PostController);\n var postController = container.lookup('controller:normalized');\n assert.ok(postController instanceof PostController, 'Normalizes the name before resolving');\n };\n\n _proto['@test The container normalizes names when looking factory up'] = function testTheContainerNormalizesNamesWhenLookingFactoryUp(assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n var PostController = (0, _internalTestHelpers.factory)();\n\n registry.normalizeFullName = function () {\n return 'controller:post';\n };\n\n registry.register('controller:post', PostController);\n var fact = container.factoryFor('controller:normalized');\n var factInstance = fact.create();\n assert.ok(factInstance instanceof PostController, 'Normalizes the name');\n };\n\n _proto['@test Options can be registered that should be applied to a given factory'] = function testOptionsCanBeRegisteredThatShouldBeAppliedToAGivenFactory(assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n var PostView = (0, _internalTestHelpers.factory)();\n registry.resolver = {\n resolve: function (fullName) {\n if (fullName === 'view:post') {\n return PostView;\n }\n }\n };\n registry.options('view:post', {\n instantiate: true,\n singleton: false\n });\n var postView1 = container.lookup('view:post');\n var postView2 = container.lookup('view:post');\n assert.ok(postView1 instanceof PostView, 'The correct factory was provided');\n assert.ok(postView2 instanceof PostView, 'The correct factory was provided');\n assert.ok(postView1 !== postView2, 'The two lookups are different');\n };\n\n _proto['@test Options can be registered that should be applied to all factories for a given type'] = function testOptionsCanBeRegisteredThatShouldBeAppliedToAllFactoriesForAGivenType(assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n var PostView = (0, _internalTestHelpers.factory)();\n registry.resolver = {\n resolve: function (fullName) {\n if (fullName === 'view:post') {\n return PostView;\n }\n }\n };\n registry.optionsForType('view', {\n singleton: false\n });\n var postView1 = container.lookup('view:post');\n var postView2 = container.lookup('view:post');\n assert.ok(postView1 instanceof PostView, 'The correct factory was provided');\n assert.ok(postView2 instanceof PostView, 'The correct factory was provided');\n assert.ok(postView1 !== postView2, 'The two lookups are different');\n };\n\n _proto['@test An injected non-singleton instance is never cached'] = function testAnInjectedNonSingletonInstanceIsNeverCached(assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n var PostView = (0, _internalTestHelpers.factory)();\n var PostViewHelper = (0, _internalTestHelpers.factory)();\n registry.register('view:post', PostView, {\n singleton: false\n });\n registry.register('view_helper:post', PostViewHelper, {\n singleton: false\n });\n registry.injection('view:post', 'viewHelper', 'view_helper:post');\n var postView1 = container.lookup('view:post');\n var postView2 = container.lookup('view:post');\n assert.ok(postView1.viewHelper !== postView2.viewHelper, 'Injected non-singletons are not cached');\n };\n\n _proto['@test Factory resolves are cached'] = function testFactoryResolvesAreCached(assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n var PostController = (0, _internalTestHelpers.factory)();\n var resolveWasCalled = [];\n\n registry.resolve = function (fullName) {\n resolveWasCalled.push(fullName);\n return PostController;\n };\n\n assert.deepEqual(resolveWasCalled, []);\n container.factoryFor('controller:post');\n assert.deepEqual(resolveWasCalled, ['controller:post']);\n container.factoryFor('controller:post');\n assert.deepEqual(resolveWasCalled, ['controller:post']);\n };\n\n _proto['@test factory for non extendables (MODEL) resolves are cached'] = function testFactoryForNonExtendablesMODELResolvesAreCached(assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n var PostController = (0, _internalTestHelpers.factory)();\n var resolveWasCalled = [];\n\n registry.resolve = function (fullName) {\n resolveWasCalled.push(fullName);\n return PostController;\n };\n\n assert.deepEqual(resolveWasCalled, []);\n container.factoryFor('model:post');\n assert.deepEqual(resolveWasCalled, ['model:post']);\n container.factoryFor('model:post');\n assert.deepEqual(resolveWasCalled, ['model:post']);\n };\n\n _proto['@test factory for non extendables resolves are cached'] = function testFactoryForNonExtendablesResolvesAreCached(assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n var PostController = {};\n var resolveWasCalled = [];\n\n registry.resolve = function (fullName) {\n resolveWasCalled.push(fullName);\n return PostController;\n };\n\n assert.deepEqual(resolveWasCalled, []);\n container.factoryFor('foo:post');\n assert.deepEqual(resolveWasCalled, ['foo:post']);\n container.factoryFor('foo:post');\n assert.deepEqual(resolveWasCalled, ['foo:post']);\n };\n\n _proto[\"@test A factory's lazy injections are validated when first instantiated\"] = function () {\n var registry = new _container.Registry();\n var container = registry.container();\n var Apple = (0, _internalTestHelpers.factory)();\n var Orange = (0, _internalTestHelpers.factory)();\n Apple.reopenClass({\n _lazyInjections: function () {\n return [{\n specifier: 'orange:main'\n }, {\n specifier: 'banana:main'\n }];\n }\n });\n registry.register('apple:main', Apple);\n registry.register('orange:main', Orange);\n expectAssertion(function () {\n container.lookup('apple:main');\n }, /Attempting to inject an unknown injection: 'banana:main'/);\n };\n\n _proto['@test Lazy injection validations are cached'] = function testLazyInjectionValidationsAreCached(assert) {\n if (!false\n /* DEBUG */\n ) {\n assert.expect(0);\n return;\n }\n\n assert.expect(1);\n var registry = new _container.Registry();\n var container = registry.container();\n var Apple = (0, _internalTestHelpers.factory)();\n var Orange = (0, _internalTestHelpers.factory)();\n Apple.reopenClass({\n _lazyInjections: function () {\n assert.ok(true, 'should call lazy injection method');\n return [{\n specifier: 'orange:main'\n }];\n }\n });\n registry.register('apple:main', Apple);\n registry.register('orange:main', Orange);\n container.lookup('apple:main');\n container.lookup('apple:main');\n };\n\n _proto['@test An object with its owner pre-set should be returned from ownerInjection'] = function testAnObjectWithItsOwnerPreSetShouldBeReturnedFromOwnerInjection(assert) {\n var owner = {};\n var registry = new _container.Registry();\n var container = registry.container({\n owner: owner\n });\n var result = container.ownerInjection();\n assert.equal(result[_owner.OWNER], owner, 'owner is properly included');\n };\n\n _proto['@test lookup passes options through to expandlocallookup'] = function testLookupPassesOptionsThroughToExpandlocallookup(assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n var PostController = (0, _internalTestHelpers.factory)();\n registry.register('controller:post', PostController);\n\n registry.expandLocalLookup = function (fullName, options) {\n assert.ok(true, 'expandLocalLookup was called');\n assert.equal(fullName, 'foo:bar');\n assert.deepEqual(options, {\n source: 'baz:qux'\n });\n return 'controller:post';\n };\n\n var PostControllerLookupResult = container.lookup('foo:bar', {\n source: 'baz:qux'\n });\n assert.ok(PostControllerLookupResult instanceof PostController);\n };\n\n _proto['@test #factoryFor class is registered class'] = function testFactoryForClassIsRegisteredClass(assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n var Component = (0, _internalTestHelpers.factory)();\n registry.register('component:foo-bar', Component);\n var factoryManager = container.factoryFor('component:foo-bar');\n assert.deepEqual(factoryManager.class, Component, 'No double extend');\n };\n\n _proto['@test #factoryFor must supply a fullname'] = function testFactoryForMustSupplyAFullname() {\n var registry = new _container.Registry();\n var container = registry.container();\n expectAssertion(function () {\n container.factoryFor('chad-bar');\n }, /fullName must be a proper full name/);\n };\n\n _proto['@test #factoryFor returns a factory manager'] = function testFactoryForReturnsAFactoryManager(assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n var Component = (0, _internalTestHelpers.factory)();\n registry.register('component:foo-bar', Component);\n var factoryManager = container.factoryFor('component:foo-bar');\n assert.ok(factoryManager.create);\n assert.ok(factoryManager.class);\n };\n\n _proto['@test #factoryFor returns a cached factory manager for the same type'] = function testFactoryForReturnsACachedFactoryManagerForTheSameType(assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n var Component = (0, _internalTestHelpers.factory)();\n registry.register('component:foo-bar', Component);\n registry.register('component:baz-bar', Component);\n var factoryManager1 = container.factoryFor('component:foo-bar');\n var factoryManager2 = container.factoryFor('component:foo-bar');\n var factoryManager3 = container.factoryFor('component:baz-bar');\n assert.equal(factoryManager1, factoryManager2, 'cache hit');\n assert.notEqual(factoryManager1, factoryManager3, 'cache miss');\n };\n\n _proto['@test #factoryFor class returns the factory function'] = function testFactoryForClassReturnsTheFactoryFunction(assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n var Component = (0, _internalTestHelpers.factory)();\n registry.register('component:foo-bar', Component);\n var factoryManager = container.factoryFor('component:foo-bar');\n assert.deepEqual(factoryManager.class, Component, 'No double extend');\n };\n\n _proto['@test #factoryFor instance have a common parent'] = function testFactoryForInstanceHaveACommonParent(assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n var Component = (0, _internalTestHelpers.factory)();\n registry.register('component:foo-bar', Component);\n var factoryManager1 = container.factoryFor('component:foo-bar');\n var factoryManager2 = container.factoryFor('component:foo-bar');\n var instance1 = factoryManager1.create({\n foo: 'foo'\n });\n var instance2 = factoryManager2.create({\n bar: 'bar'\n });\n assert.deepEqual(instance1.constructor, instance2.constructor);\n };\n\n _proto['@test can properly reset cache'] = function testCanProperlyResetCache(assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n var Component = (0, _internalTestHelpers.factory)();\n registry.register('component:foo-bar', Component);\n var factory1 = container.factoryFor('component:foo-bar');\n var factory2 = container.factoryFor('component:foo-bar');\n var instance1 = container.lookup('component:foo-bar');\n var instance2 = container.lookup('component:foo-bar');\n assert.equal(instance1, instance2);\n assert.equal(factory1, factory2);\n container.reset();\n var factory3 = container.factoryFor('component:foo-bar');\n var instance3 = container.lookup('component:foo-bar');\n assert.notEqual(instance1, instance3);\n assert.notEqual(factory1, factory3);\n };\n\n _proto['@test #factoryFor created instances come with instance injections'] = function testFactoryForCreatedInstancesComeWithInstanceInjections(assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n var Component = (0, _internalTestHelpers.factory)();\n var Ajax = (0, _internalTestHelpers.factory)();\n registry.register('component:foo-bar', Component);\n registry.register('util:ajax', Ajax);\n registry.injection('component:foo-bar', 'ajax', 'util:ajax');\n var componentFactory = container.factoryFor('component:foo-bar');\n var component = componentFactory.create();\n assert.ok(component.ajax);\n assert.ok(component.ajax instanceof Ajax);\n };\n\n _proto['@test #factoryFor options passed to create clobber injections'] = function testFactoryForOptionsPassedToCreateClobberInjections(assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n var Component = (0, _internalTestHelpers.factory)();\n var Ajax = (0, _internalTestHelpers.factory)();\n registry.register('component:foo-bar', Component);\n registry.register('util:ajax', Ajax);\n registry.injection('component:foo-bar', 'ajax', 'util:ajax');\n var componentFactory = container.factoryFor('component:foo-bar');\n var instrance = componentFactory.create({\n ajax: 'fetch'\n });\n assert.equal(instrance.ajax, 'fetch');\n };\n\n _proto['@test #factoryFor does not add properties to the object being instantiated when _initFactory is present'] = function testFactoryForDoesNotAddPropertiesToTheObjectBeingInstantiatedWhen_initFactoryIsPresent(assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n\n var Component =\n /*#__PURE__*/\n function () {\n function Component() {}\n\n Component._initFactory = function _initFactory() {};\n\n Component.create = function create(options) {\n var instance = new this();\n (0, _polyfills.assign)(instance, options);\n return instance;\n };\n\n return Component;\n }();\n\n registry.register('component:foo-bar', Component);\n var componentFactory = container.factoryFor('component:foo-bar');\n var instance = componentFactory.create(); // note: _guid and isDestroyed are being set in the `factory` constructor\n // not via registry/container shenanigans\n\n assert.deepEqual(Object.keys(instance), []);\n };\n\n _proto[\"@test assert when calling lookup after destroy on a container\"] = function (assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n var Component = (0, _internalTestHelpers.factory)();\n registry.register('component:foo-bar', Component);\n var instance = container.lookup('component:foo-bar');\n assert.ok(instance, 'precond lookup successful');\n (0, _internalTestHelpers.runTask)(function () {\n container.destroy();\n container.finalizeDestroy();\n });\n expectAssertion(function () {\n container.lookup('component:foo-bar');\n });\n };\n\n _proto[\"@test assert when calling factoryFor after destroy on a container\"] = function (assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n var Component = (0, _internalTestHelpers.factory)();\n registry.register('component:foo-bar', Component);\n var instance = container.factoryFor('component:foo-bar');\n assert.ok(instance, 'precond lookup successful');\n (0, _internalTestHelpers.runTask)(function () {\n container.destroy();\n container.finalizeDestroy();\n });\n expectAssertion(function () {\n container.factoryFor('component:foo-bar');\n });\n } // this is skipped until templates and the glimmer environment do not require `OWNER` to be\n // passed in as constructor args\n ;\n\n _proto['@skip #factoryFor does not add properties to the object being instantiated'] = function skipFactoryForDoesNotAddPropertiesToTheObjectBeingInstantiated(assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n\n var Component =\n /*#__PURE__*/\n function () {\n function Component() {}\n\n Component.create = function create(options) {\n var instance = new this();\n (0, _polyfills.assign)(instance, options);\n return instance;\n };\n\n return Component;\n }();\n\n registry.register('component:foo-bar', Component);\n var componentFactory = container.factoryFor('component:foo-bar');\n var instance = componentFactory.create(); // note: _guid and isDestroyed are being set in the `factory` constructor\n // not via registry/container shenanigans\n\n assert.deepEqual(Object.keys(instance), []);\n };\n\n return _class;\n }(_internalTestHelpers.AbstractTestCase));\n\n if (false\n /* EMBER_MODULE_UNIFICATION */\n ) {\n (0, _internalTestHelpers.moduleFor)('Container module unification',\n /*#__PURE__*/\n function (_AbstractTestCase2) {\n (0, _emberBabel.inheritsLoose)(_class2, _AbstractTestCase2);\n\n function _class2() {\n return _AbstractTestCase2.apply(this, arguments) || this;\n }\n\n var _proto2 = _class2.prototype;\n\n _proto2['@test The container can expand and resolve a source to factoryFor'] = function testTheContainerCanExpandAndResolveASourceToFactoryFor(assert) {\n var _this = this;\n\n var PrivateComponent = (0, _internalTestHelpers.factory)();\n var lookup = 'component:my-input';\n var expectedSource = 'template:routes/application';\n var registry = new _container.Registry();\n var resolveCount = 0;\n var expandedKey = 'boom, special expanded key';\n\n registry.expandLocalLookup = function (specifier, options) {\n _this.assert.strictEqual(specifier, lookup, 'specifier is expanded');\n\n _this.assert.strictEqual(options.source, expectedSource, 'source is expanded');\n\n return expandedKey;\n };\n\n registry.resolve = function (fullName) {\n resolveCount++;\n\n if (fullName === expandedKey) {\n return PrivateComponent;\n }\n };\n\n var container = registry.container();\n assert.strictEqual(container.factoryFor(lookup, {\n source: expectedSource\n }).class, PrivateComponent, 'The correct factory was provided');\n assert.strictEqual(container.factoryFor(lookup, {\n source: expectedSource\n }).class, PrivateComponent, 'The correct factory was provided again');\n assert.equal(resolveCount, 1, 'resolve called only once and a cached factory was returned the second time');\n };\n\n _proto2['@test The container can expand and resolve a source to lookup'] = function testTheContainerCanExpandAndResolveASourceToLookup() {\n var _this2 = this;\n\n var PrivateComponent = (0, _internalTestHelpers.factory)();\n var lookup = 'component:my-input';\n var expectedSource = 'template:routes/application';\n var registry = new _container.Registry();\n var expandedKey = 'boom, special expanded key';\n\n registry.expandLocalLookup = function (specifier, options) {\n _this2.assert.strictEqual(specifier, lookup, 'specifier is expanded');\n\n _this2.assert.strictEqual(options.source, expectedSource, 'source is expanded');\n\n return expandedKey;\n };\n\n registry.resolve = function (fullName) {\n if (fullName === expandedKey) {\n return PrivateComponent;\n }\n };\n\n var container = registry.container();\n var result = container.lookup(lookup, {\n source: expectedSource\n });\n this.assert.ok(result instanceof PrivateComponent, 'The correct factory was provided');\n this.assert.ok(container.cache[expandedKey] instanceof PrivateComponent, 'The correct factory was stored in the cache with the correct key which includes the source.');\n };\n\n _proto2['@test The container can expand and resolve a namespace to factoryFor'] = function testTheContainerCanExpandAndResolveANamespaceToFactoryFor(assert) {\n var _this3 = this;\n\n var PrivateComponent = (0, _internalTestHelpers.factory)();\n var lookup = 'component:my-input';\n var expectedNamespace = 'my-addon';\n var registry = new _container.Registry();\n var resolveCount = 0;\n var expandedKey = 'boom, special expanded key';\n\n registry.expandLocalLookup = function (specifier, options) {\n _this3.assert.strictEqual(specifier, lookup, 'specifier is expanded');\n\n _this3.assert.strictEqual(options.namespace, expectedNamespace, 'namespace is expanded');\n\n return expandedKey;\n };\n\n registry.resolve = function (fullName) {\n resolveCount++;\n\n if (fullName === expandedKey) {\n return PrivateComponent;\n }\n };\n\n var container = registry.container();\n assert.strictEqual(container.factoryFor(lookup, {\n namespace: expectedNamespace\n }).class, PrivateComponent, 'The correct factory was provided');\n assert.strictEqual(container.factoryFor(lookup, {\n namespace: expectedNamespace\n }).class, PrivateComponent, 'The correct factory was provided again');\n assert.equal(resolveCount, 1, 'resolve called only once and a cached factory was returned the second time');\n };\n\n _proto2['@test The container can expand and resolve a namespace to lookup'] = function testTheContainerCanExpandAndResolveANamespaceToLookup() {\n var _this4 = this;\n\n var PrivateComponent = (0, _internalTestHelpers.factory)();\n var lookup = 'component:my-input';\n var expectedNamespace = 'my-addon';\n var registry = new _container.Registry();\n var expandedKey = 'boom, special expanded key';\n\n registry.expandLocalLookup = function (specifier, options) {\n _this4.assert.strictEqual(specifier, lookup, 'specifier is expanded');\n\n _this4.assert.strictEqual(options.namespace, expectedNamespace, 'namespace is expanded');\n\n return expandedKey;\n };\n\n registry.resolve = function (fullName) {\n if (fullName === expandedKey) {\n return PrivateComponent;\n }\n };\n\n var container = registry.container();\n var result = container.lookup(lookup, {\n namespace: expectedNamespace\n });\n this.assert.ok(result instanceof PrivateComponent, 'The correct factory was provided');\n this.assert.ok(container.cache[expandedKey] instanceof PrivateComponent, 'The correct factory was stored in the cache with the correct key which includes the source.');\n };\n\n return _class2;\n }(_internalTestHelpers.AbstractTestCase));\n }\n});","enifed(\"@ember/-internals/container/tests/owner_test\", [\"ember-babel\", \"@ember/-internals/owner\", \"internal-test-helpers\"], function (_emberBabel, _owner, _internalTestHelpers) {\n \"use strict\";\n\n (0, _internalTestHelpers.moduleFor)('Owner',\n /*#__PURE__*/\n function (_AbstractTestCase) {\n (0, _emberBabel.inheritsLoose)(_class, _AbstractTestCase);\n\n function _class() {\n return _AbstractTestCase.apply(this, arguments) || this;\n }\n\n var _proto = _class.prototype;\n\n _proto['@test An owner can be set with `setOwner` and retrieved with `getOwner`'] = function testAnOwnerCanBeSetWithSetOwnerAndRetrievedWithGetOwner(assert) {\n var owner = {};\n var obj = {};\n assert.strictEqual((0, _owner.getOwner)(obj), undefined, 'owner has not been set');\n (0, _owner.setOwner)(obj, owner);\n assert.strictEqual((0, _owner.getOwner)(obj), owner, 'owner has been set');\n assert.strictEqual(obj[_owner.OWNER], owner, 'owner has been set to the OWNER symbol');\n };\n\n return _class;\n }(_internalTestHelpers.AbstractTestCase));\n});","enifed(\"@ember/-internals/container/tests/registry_test\", [\"ember-babel\", \"@ember/-internals/container\", \"internal-test-helpers\"], function (_emberBabel, _container, _internalTestHelpers) {\n \"use strict\";\n\n (0, _internalTestHelpers.moduleFor)('Registry',\n /*#__PURE__*/\n function (_AbstractTestCase) {\n (0, _emberBabel.inheritsLoose)(_class, _AbstractTestCase);\n\n function _class() {\n return _AbstractTestCase.apply(this, arguments) || this;\n }\n\n var _proto = _class.prototype;\n\n _proto['@test A registered factory is returned from resolve'] = function testARegisteredFactoryIsReturnedFromResolve(assert) {\n var registry = new _container.Registry();\n var PostController = (0, _internalTestHelpers.factory)();\n registry.register('controller:post', PostController);\n var PostControllerFactory = registry.resolve('controller:post');\n assert.ok(PostControllerFactory, 'factory is returned');\n assert.ok(PostControllerFactory.create() instanceof PostController, 'The return of factory.create is an instance of PostController');\n };\n\n _proto['@test The registered factory returned from resolve is the same factory each time'] = function testTheRegisteredFactoryReturnedFromResolveIsTheSameFactoryEachTime(assert) {\n var registry = new _container.Registry();\n var PostController = (0, _internalTestHelpers.factory)();\n registry.register('controller:post', PostController);\n assert.deepEqual(registry.resolve('controller:post'), registry.resolve('controller:post'), 'The return of resolve is always the same');\n };\n\n _proto['@test The registered value returned from resolve is the same value each time even if the value is falsy'] = function testTheRegisteredValueReturnedFromResolveIsTheSameValueEachTimeEvenIfTheValueIsFalsy(assert) {\n var registry = new _container.Registry();\n registry.register('falsy:value', null, {\n instantiate: false\n });\n assert.strictEqual(registry.resolve('falsy:value'), registry.resolve('falsy:value'), 'The return of resolve is always the same');\n };\n\n _proto['@test The value returned from resolver is the same value as the original value even if the value is falsy'] = function testTheValueReturnedFromResolverIsTheSameValueAsTheOriginalValueEvenIfTheValueIsFalsy(assert) {\n var resolver = {\n resolve: function (fullName) {\n if (fullName === 'falsy:value') {\n return null;\n }\n }\n };\n var registry = new _container.Registry({\n resolver: resolver\n });\n assert.strictEqual(registry.resolve('falsy:value'), null);\n };\n\n _proto['@test A registered factory returns true for `has` if an item is registered'] = function testARegisteredFactoryReturnsTrueForHasIfAnItemIsRegistered(assert) {\n var registry = new _container.Registry();\n var PostController = (0, _internalTestHelpers.factory)();\n registry.register('controller:post', PostController);\n assert.equal(registry.has('controller:post'), true, 'The `has` method returned true for registered factories');\n assert.equal(registry.has('controller:posts'), false, 'The `has` method returned false for unregistered factories');\n };\n\n _proto['@test Throw exception when trying to inject `type:thing` on all type(s)'] = function testThrowExceptionWhenTryingToInjectTypeThingOnAllTypeS() {\n var registry = new _container.Registry();\n var PostController = (0, _internalTestHelpers.factory)();\n registry.register('controller:post', PostController);\n expectAssertion(function () {\n registry.typeInjection('controller', 'injected', 'controller:post');\n }, /Cannot inject a 'controller:post' on other controller\\(s\\)\\./);\n };\n\n _proto['@test The registry can take a hook to resolve factories lazily'] = function testTheRegistryCanTakeAHookToResolveFactoriesLazily(assert) {\n var PostController = (0, _internalTestHelpers.factory)();\n var resolver = {\n resolve: function (fullName) {\n if (fullName === 'controller:post') {\n return PostController;\n }\n }\n };\n var registry = new _container.Registry({\n resolver: resolver\n });\n assert.strictEqual(registry.resolve('controller:post'), PostController, 'The correct factory was provided');\n };\n\n _proto['@test The registry respects the resolver hook for `has`'] = function testTheRegistryRespectsTheResolverHookForHas(assert) {\n var PostController = (0, _internalTestHelpers.factory)();\n var resolver = {\n resolve: function (fullName) {\n if (fullName === 'controller:post') {\n return PostController;\n }\n }\n };\n var registry = new _container.Registry({\n resolver: resolver\n });\n assert.ok(registry.has('controller:post'), 'the `has` method uses the resolver hook');\n };\n\n _proto['@test The registry normalizes names when resolving'] = function testTheRegistryNormalizesNamesWhenResolving(assert) {\n var registry = new _container.Registry();\n var PostController = (0, _internalTestHelpers.factory)();\n\n registry.normalizeFullName = function () {\n return 'controller:post';\n };\n\n registry.register('controller:post', PostController);\n var type = registry.resolve('controller:normalized');\n assert.strictEqual(type, PostController, 'Normalizes the name when resolving');\n };\n\n _proto['@test The registry normalizes names when checking if the factory is registered'] = function testTheRegistryNormalizesNamesWhenCheckingIfTheFactoryIsRegistered(assert) {\n var registry = new _container.Registry();\n var PostController = (0, _internalTestHelpers.factory)();\n\n registry.normalizeFullName = function (fullName) {\n return fullName === 'controller:normalized' ? 'controller:post' : fullName;\n };\n\n registry.register('controller:post', PostController);\n var isPresent = registry.has('controller:normalized');\n assert.equal(isPresent, true, 'Normalizes the name when checking if the factory or instance is present');\n };\n\n _proto['@test The registry normalizes names when injecting'] = function testTheRegistryNormalizesNamesWhenInjecting(assert) {\n var registry = new _container.Registry();\n var PostController = (0, _internalTestHelpers.factory)();\n var user = {\n name: 'Stef'\n };\n\n registry.normalize = function () {\n return 'controller:post';\n };\n\n registry.register('controller:post', PostController);\n registry.register('user:post', user, {\n instantiate: false\n });\n registry.injection('controller:post', 'user', 'controller:normalized');\n assert.deepEqual(registry.resolve('controller:post'), user, 'Normalizes the name when injecting');\n };\n\n _proto['@test cannot register an `undefined` factory'] = function testCannotRegisterAnUndefinedFactory() {\n var registry = new _container.Registry();\n expectAssertion(function () {\n registry.register('controller:apple', undefined);\n }, '');\n };\n\n _proto['@test can re-register a factory'] = function testCanReRegisterAFactory(assert) {\n var registry = new _container.Registry();\n var FirstApple = (0, _internalTestHelpers.factory)('first');\n var SecondApple = (0, _internalTestHelpers.factory)('second');\n registry.register('controller:apple', FirstApple);\n registry.register('controller:apple', SecondApple);\n assert.ok(registry.resolve('controller:apple').create() instanceof SecondApple);\n };\n\n _proto['@test cannot re-register a factory if it has been resolved'] = function testCannotReRegisterAFactoryIfItHasBeenResolved(assert) {\n var registry = new _container.Registry();\n var FirstApple = (0, _internalTestHelpers.factory)('first');\n var SecondApple = (0, _internalTestHelpers.factory)('second');\n registry.register('controller:apple', FirstApple);\n assert.strictEqual(registry.resolve('controller:apple'), FirstApple);\n expectAssertion(function () {\n registry.register('controller:apple', SecondApple);\n }, /Cannot re-register: 'controller:apple', as it has already been resolved\\./);\n assert.strictEqual(registry.resolve('controller:apple'), FirstApple);\n };\n\n _proto['@test registry.has should not accidentally cause injections on that factory to be run. (Mitigate merely on observing)'] = function testRegistryHasShouldNotAccidentallyCauseInjectionsOnThatFactoryToBeRunMitigateMerelyOnObserving(assert) {\n assert.expect(1);\n var registry = new _container.Registry();\n var FirstApple = (0, _internalTestHelpers.factory)('first');\n var SecondApple = (0, _internalTestHelpers.factory)('second');\n\n SecondApple.extend = function () {\n assert.ok(false, 'should not extend or touch the injected model, merely to inspect existence of another');\n };\n\n registry.register('controller:apple', FirstApple);\n registry.register('controller:second-apple', SecondApple);\n registry.injection('controller:apple', 'badApple', 'controller:second-apple');\n assert.ok(registry.has('controller:apple'));\n };\n\n _proto['@test registry.has should not error for invalid fullNames'] = function testRegistryHasShouldNotErrorForInvalidFullNames(assert) {\n var registry = new _container.Registry();\n assert.ok(!registry.has('foo:bar:baz'));\n };\n\n _proto['@test once resolved, always return the same result'] = function testOnceResolvedAlwaysReturnTheSameResult(assert) {\n var registry = new _container.Registry();\n registry.resolver = {\n resolve: function () {\n return 'bar';\n }\n };\n var Bar = registry.resolve('models:bar');\n registry.resolver = {\n resolve: function () {\n return 'not bar';\n }\n };\n assert.equal(registry.resolve('models:bar'), Bar);\n };\n\n _proto['@test factory resolves are cached'] = function testFactoryResolvesAreCached(assert) {\n var registry = new _container.Registry();\n var PostController = (0, _internalTestHelpers.factory)();\n var resolveWasCalled = [];\n registry.resolver = {\n resolve: function (fullName) {\n resolveWasCalled.push(fullName);\n return PostController;\n }\n };\n assert.deepEqual(resolveWasCalled, []);\n registry.resolve('controller:post');\n assert.deepEqual(resolveWasCalled, ['controller:post']);\n registry.resolve('controller:post');\n assert.deepEqual(resolveWasCalled, ['controller:post']);\n };\n\n _proto['@test factory for non extendables (MODEL) resolves are cached'] = function testFactoryForNonExtendablesMODELResolvesAreCached(assert) {\n var registry = new _container.Registry();\n var PostController = (0, _internalTestHelpers.factory)();\n var resolveWasCalled = [];\n registry.resolver = {\n resolve: function (fullName) {\n resolveWasCalled.push(fullName);\n return PostController;\n }\n };\n assert.deepEqual(resolveWasCalled, []);\n registry.resolve('model:post');\n assert.deepEqual(resolveWasCalled, ['model:post']);\n registry.resolve('model:post');\n assert.deepEqual(resolveWasCalled, ['model:post']);\n };\n\n _proto['@test factory for non extendables resolves are cached'] = function testFactoryForNonExtendablesResolvesAreCached(assert) {\n var registry = new _container.Registry();\n var PostController = {};\n var resolveWasCalled = [];\n registry.resolver = {\n resolve: function (fullName) {\n resolveWasCalled.push(fullName);\n return PostController;\n }\n };\n assert.deepEqual(resolveWasCalled, []);\n registry.resolve('foo:post');\n assert.deepEqual(resolveWasCalled, ['foo:post']);\n registry.resolve('foo:post');\n assert.deepEqual(resolveWasCalled, ['foo:post']);\n };\n\n _proto['@test registry.container creates a container'] = function testRegistryContainerCreatesAContainer(assert) {\n var registry = new _container.Registry();\n var PostController = (0, _internalTestHelpers.factory)();\n registry.register('controller:post', PostController);\n var container = registry.container();\n var postController = container.lookup('controller:post');\n assert.ok(postController instanceof PostController, 'The lookup is an instance of the registered factory');\n };\n\n _proto['@test `describe` will be handled by the resolver, then by the fallback registry, if available'] = function testDescribeWillBeHandledByTheResolverThenByTheFallbackRegistryIfAvailable(assert) {\n var fallback = {\n describe: function (fullName) {\n return fullName + \"-fallback\";\n }\n };\n var resolver = {\n lookupDescription: function (fullName) {\n return fullName + \"-resolver\";\n }\n };\n var registry = new _container.Registry({\n fallback: fallback,\n resolver: resolver\n });\n assert.equal(registry.describe('controller:post'), 'controller:post-resolver', '`describe` handled by the resolver first.');\n registry.resolver = null;\n assert.equal(registry.describe('controller:post'), 'controller:post-fallback', '`describe` handled by fallback registry next.');\n registry.fallback = null;\n assert.equal(registry.describe('controller:post'), 'controller:post', '`describe` by default returns argument.');\n };\n\n _proto['@test `normalizeFullName` will be handled by the resolver, then by the fallback registry, if available'] = function testNormalizeFullNameWillBeHandledByTheResolverThenByTheFallbackRegistryIfAvailable(assert) {\n var fallback = {\n normalizeFullName: function (fullName) {\n return fullName + \"-fallback\";\n }\n };\n var resolver = {\n normalize: function (fullName) {\n return fullName + \"-resolver\";\n }\n };\n var registry = new _container.Registry({\n fallback: fallback,\n resolver: resolver\n });\n assert.equal(registry.normalizeFullName('controller:post'), 'controller:post-resolver', '`normalizeFullName` handled by the resolver first.');\n registry.resolver = null;\n assert.equal(registry.normalizeFullName('controller:post'), 'controller:post-fallback', '`normalizeFullName` handled by fallback registry next.');\n registry.fallback = null;\n assert.equal(registry.normalizeFullName('controller:post'), 'controller:post', '`normalizeFullName` by default returns argument.');\n };\n\n _proto['@test `makeToString` will be handled by the resolver, then by the fallback registry, if available'] = function testMakeToStringWillBeHandledByTheResolverThenByTheFallbackRegistryIfAvailable(assert) {\n var fallback = {\n makeToString: function (fullName) {\n return fullName + \"-fallback\";\n }\n };\n var resolver = {\n makeToString: function (fullName) {\n return fullName + \"-resolver\";\n }\n };\n var registry = new _container.Registry({\n fallback: fallback,\n resolver: resolver\n });\n assert.equal(registry.makeToString('controller:post'), 'controller:post-resolver', '`makeToString` handled by the resolver first.');\n registry.resolver = null;\n assert.equal(registry.makeToString('controller:post'), 'controller:post-fallback', '`makeToString` handled by fallback registry next.');\n registry.fallback = null;\n assert.equal(registry.makeToString('controller:post'), 'controller:post', '`makeToString` by default returns argument.');\n };\n\n _proto['@test `resolve` can be handled by a fallback registry'] = function testResolveCanBeHandledByAFallbackRegistry(assert) {\n var fallback = new _container.Registry();\n var registry = new _container.Registry({\n fallback: fallback\n });\n var PostController = (0, _internalTestHelpers.factory)();\n fallback.register('controller:post', PostController);\n var PostControllerFactory = registry.resolve('controller:post');\n assert.ok(PostControllerFactory, 'factory is returned');\n assert.ok(PostControllerFactory.create() instanceof PostController, 'The return of factory.create is an instance of PostController');\n };\n\n _proto['@test `has` can be handled by a fallback registry'] = function testHasCanBeHandledByAFallbackRegistry(assert) {\n var fallback = new _container.Registry();\n var registry = new _container.Registry({\n fallback: fallback\n });\n var PostController = (0, _internalTestHelpers.factory)();\n fallback.register('controller:post', PostController);\n assert.equal(registry.has('controller:post'), true, 'Fallback registry is checked for registration');\n };\n\n _proto['@test `getInjections` includes injections from a fallback registry'] = function testGetInjectionsIncludesInjectionsFromAFallbackRegistry(assert) {\n var fallback = new _container.Registry();\n var registry = new _container.Registry({\n fallback: fallback\n });\n assert.strictEqual(registry.getInjections('model:user'), undefined, 'No injections in the primary registry');\n fallback.injection('model:user', 'post', 'model:post');\n assert.equal(registry.getInjections('model:user').length, 1, 'Injections from the fallback registry are merged');\n };\n\n _proto['@test `getTypeInjections` includes type injections from a fallback registry'] = function testGetTypeInjectionsIncludesTypeInjectionsFromAFallbackRegistry(assert) {\n var fallback = new _container.Registry();\n var registry = new _container.Registry({\n fallback: fallback\n });\n assert.strictEqual(registry.getTypeInjections('model'), undefined, 'No injections in the primary registry');\n fallback.injection('model', 'source', 'source:main');\n assert.equal(registry.getTypeInjections('model').length, 1, 'Injections from the fallback registry are merged');\n };\n\n _proto['@test `knownForType` contains keys for each item of a given type'] = function testKnownForTypeContainsKeysForEachItemOfAGivenType(assert) {\n var registry = new _container.Registry();\n registry.register('foo:bar-baz', 'baz');\n registry.register('foo:qux-fez', 'fez');\n var found = registry.knownForType('foo');\n assert.deepEqual(found, {\n 'foo:bar-baz': true,\n 'foo:qux-fez': true\n });\n };\n\n _proto['@test `knownForType` includes fallback registry results'] = function testKnownForTypeIncludesFallbackRegistryResults(assert) {\n var fallback = new _container.Registry();\n var registry = new _container.Registry({\n fallback: fallback\n });\n registry.register('foo:bar-baz', 'baz');\n registry.register('foo:qux-fez', 'fez');\n fallback.register('foo:zurp-zorp', 'zorp');\n var found = registry.knownForType('foo');\n assert.deepEqual(found, {\n 'foo:bar-baz': true,\n 'foo:qux-fez': true,\n 'foo:zurp-zorp': true\n });\n };\n\n _proto['@test `knownForType` is called on the resolver if present'] = function testKnownForTypeIsCalledOnTheResolverIfPresent(assert) {\n assert.expect(3);\n var resolver = {\n knownForType: function (type) {\n assert.ok(true, 'knownForType called on the resolver');\n assert.equal(type, 'foo', 'the type was passed through');\n return {\n 'foo:yorp': true\n };\n }\n };\n var registry = new _container.Registry({\n resolver: resolver\n });\n registry.register('foo:bar-baz', 'baz');\n var found = registry.knownForType('foo');\n assert.deepEqual(found, {\n 'foo:yorp': true,\n 'foo:bar-baz': true\n });\n };\n\n _proto['@test resolver.expandLocalLookup is not required'] = function testResolverExpandLocalLookupIsNotRequired(assert) {\n var registry = new _container.Registry({\n resolver: {}\n });\n var result = registry.expandLocalLookup('foo:bar', {\n source: 'baz:qux'\n });\n assert.equal(result, null);\n };\n\n _proto['@test expandLocalLookup is called on the resolver if present'] = function testExpandLocalLookupIsCalledOnTheResolverIfPresent(assert) {\n assert.expect(4);\n var resolver = {\n expandLocalLookup: function (targetFullName, sourceFullName) {\n assert.ok(true, 'expandLocalLookup is called on the resolver');\n assert.equal(targetFullName, 'foo:bar', 'the targetFullName was passed through');\n assert.equal(sourceFullName, 'baz:qux', 'the sourceFullName was passed through');\n return 'foo:qux/bar';\n }\n };\n var registry = new _container.Registry({\n resolver: resolver\n });\n var result = registry.expandLocalLookup('foo:bar', {\n source: 'baz:qux'\n });\n assert.equal(result, 'foo:qux/bar');\n };\n\n _proto['@test `expandLocalLookup` is handled by the resolver, then by the fallback registry, if available'] = function testExpandLocalLookupIsHandledByTheResolverThenByTheFallbackRegistryIfAvailable(assert) {\n assert.expect(9);\n var fallbackResolver = {\n expandLocalLookup: function (targetFullName, sourceFullName) {\n assert.ok(true, 'expandLocalLookup is called on the fallback resolver');\n assert.equal(targetFullName, 'foo:bar', 'the targetFullName was passed through');\n assert.equal(sourceFullName, 'baz:qux', 'the sourceFullName was passed through');\n return 'foo:qux/bar-fallback';\n }\n };\n var resolver = {\n expandLocalLookup: function (targetFullName, sourceFullName) {\n assert.ok(true, 'expandLocalLookup is called on the resolver');\n assert.equal(targetFullName, 'foo:bar', 'the targetFullName was passed through');\n assert.equal(sourceFullName, 'baz:qux', 'the sourceFullName was passed through');\n return 'foo:qux/bar-resolver';\n }\n };\n var fallbackRegistry = new _container.Registry({\n resolver: fallbackResolver\n });\n var registry = new _container.Registry({\n fallback: fallbackRegistry,\n resolver: resolver\n });\n var result = registry.expandLocalLookup('foo:bar', {\n source: 'baz:qux'\n });\n assert.equal(result, 'foo:qux/bar-resolver', 'handled by the resolver');\n registry.resolver = null;\n result = registry.expandLocalLookup('foo:bar', {\n source: 'baz:qux'\n });\n assert.equal(result, 'foo:qux/bar-fallback', 'handled by the fallback registry');\n registry.fallback = null;\n result = registry.expandLocalLookup('foo:bar', {\n source: 'baz:qux'\n });\n assert.equal(result, null, 'null is returned by default when no resolver or fallback registry is present');\n };\n\n _proto['@test resolver.expandLocalLookup result is cached'] = function testResolverExpandLocalLookupResultIsCached(assert) {\n assert.expect(3);\n var result;\n var resolver = {\n expandLocalLookup: function () {\n assert.ok(true, 'expandLocalLookup is called on the resolver');\n return 'foo:qux/bar';\n }\n };\n var registry = new _container.Registry({\n resolver: resolver\n });\n result = registry.expandLocalLookup('foo:bar', {\n source: 'baz:qux'\n });\n assert.equal(result, 'foo:qux/bar');\n result = registry.expandLocalLookup('foo:bar', {\n source: 'baz:qux'\n });\n assert.equal(result, 'foo:qux/bar');\n };\n\n _proto['@test resolver.expandLocalLookup cache is busted when any unregister is called'] = function testResolverExpandLocalLookupCacheIsBustedWhenAnyUnregisterIsCalled(assert) {\n assert.expect(4);\n var result;\n var resolver = {\n expandLocalLookup: function () {\n assert.ok(true, 'expandLocalLookup is called on the resolver');\n return 'foo:qux/bar';\n }\n };\n var registry = new _container.Registry({\n resolver: resolver\n });\n result = registry.expandLocalLookup('foo:bar', {\n source: 'baz:qux'\n });\n assert.equal(result, 'foo:qux/bar');\n registry.unregister('foo:bar');\n result = registry.expandLocalLookup('foo:bar', {\n source: 'baz:qux'\n });\n assert.equal(result, 'foo:qux/bar');\n };\n\n _proto['@test resolve calls expandLocallookup when it receives options.source'] = function testResolveCallsExpandLocallookupWhenItReceivesOptionsSource(assert) {\n assert.expect(3);\n var resolver = {\n resolve: function () {},\n expandLocalLookup: function (targetFullName, sourceFullName) {\n assert.ok(true, 'expandLocalLookup is called on the resolver');\n assert.equal(targetFullName, 'foo:bar', 'the targetFullName was passed through');\n assert.equal(sourceFullName, 'baz:qux', 'the sourceFullName was passed through');\n return 'foo:qux/bar';\n }\n };\n var registry = new _container.Registry({\n resolver: resolver\n });\n registry.resolve('foo:bar', {\n source: 'baz:qux'\n });\n };\n\n _proto['@test has uses expandLocalLookup'] = function testHasUsesExpandLocalLookup(assert) {\n assert.expect(5);\n var resolvedFullNames = [];\n var result;\n var resolver = {\n resolve: function (name) {\n resolvedFullNames.push(name);\n return 'yippie!';\n },\n expandLocalLookup: function (targetFullName) {\n assert.ok(true, 'expandLocalLookup is called on the resolver');\n\n if (targetFullName === 'foo:bar') {\n return 'foo:qux/bar';\n } else {\n return null;\n }\n }\n };\n var registry = new _container.Registry({\n resolver: resolver\n });\n result = registry.has('foo:bar', {\n source: 'baz:qux'\n });\n assert.ok(result, 'found foo:bar/qux');\n result = registry.has('foo:baz', {\n source: 'baz:qux'\n });\n assert.ok(!result, 'foo:baz/qux not found');\n assert.deepEqual(['foo:qux/bar'], resolvedFullNames);\n };\n\n return _class;\n }(_internalTestHelpers.AbstractTestCase));\n (0, _internalTestHelpers.moduleFor)('Registry privatize',\n /*#__PURE__*/\n function (_AbstractTestCase2) {\n (0, _emberBabel.inheritsLoose)(_class2, _AbstractTestCase2);\n\n function _class2() {\n return _AbstractTestCase2.apply(this, arguments) || this;\n }\n\n var _proto2 = _class2.prototype;\n\n _proto2['@test valid format'] = function testValidFormat(assert) {\n var privatized = (0, _container.privatize)(['secret:factory']);\n var matched = privatized.match(/^([^:]+):([^:]+)-(\\d+)$/);\n assert.ok(matched, 'privatized format was recognized');\n assert.equal(matched[1], 'secret');\n assert.equal(matched[2], 'factory');\n assert.ok(/^\\d+$/.test(matched[3]));\n };\n\n return _class2;\n }(_internalTestHelpers.AbstractTestCase));\n\n if (false\n /* EMBER_MODULE_UNIFICATION */\n ) {\n (0, _internalTestHelpers.moduleFor)('Registry module unification',\n /*#__PURE__*/\n function (_AbstractTestCase3) {\n (0, _emberBabel.inheritsLoose)(_class3, _AbstractTestCase3);\n\n function _class3() {\n return _AbstractTestCase3.apply(this, arguments) || this;\n }\n\n var _proto3 = _class3.prototype;\n\n _proto3['@test The registry can pass a source to the resolver'] = function testTheRegistryCanPassASourceToTheResolver(assert) {\n var PrivateComponent = (0, _internalTestHelpers.factory)();\n var type = 'component';\n var name = 'my-input';\n var specifier = type + \":\" + name;\n var source = 'template:routes/application';\n var resolver = new _internalTestHelpers.ModuleBasedTestResolver();\n resolver.add({\n specifier: specifier,\n source: source\n }, PrivateComponent);\n var registry = new _container.Registry({\n resolver: resolver\n });\n assert.strictEqual(registry.resolve(specifier), undefined, 'Not returned when specifier not scoped');\n assert.strictEqual(registry.resolve(specifier, {\n source: source\n }), PrivateComponent, 'The correct factory was provided');\n assert.strictEqual(registry.resolve(specifier, {\n source: source\n }), PrivateComponent, 'The correct factory was provided again');\n };\n\n _proto3['@test The registry can pass a namespace to the resolver'] = function testTheRegistryCanPassANamespaceToTheResolver(assert) {\n var PrivateComponent = (0, _internalTestHelpers.factory)();\n var type = 'component';\n var name = 'my-input';\n var specifier = type + \":\" + name;\n var source = 'template:routes/application';\n var namespace = 'my-addon';\n var resolver = new _internalTestHelpers.ModuleBasedTestResolver();\n resolver.add({\n specifier: specifier,\n source: source,\n namespace: namespace\n }, PrivateComponent);\n var registry = new _container.Registry({\n resolver: resolver\n });\n assert.strictEqual(registry.resolve(specifier), undefined, 'Not returned when specifier not scoped');\n assert.strictEqual(registry.resolve(specifier, {\n source: source\n }), undefined, 'Not returned when specifier is missing namespace');\n assert.strictEqual(registry.resolve(specifier, {\n source: source,\n namespace: namespace\n }), PrivateComponent, 'The correct factory was provided');\n assert.strictEqual(registry.resolve(specifier, {\n source: source,\n namespace: namespace\n }), PrivateComponent, 'The correct factory was provided again');\n };\n\n return _class3;\n }(_internalTestHelpers.AbstractTestCase));\n }\n});","enifed(\"@ember/-internals/extension-support/tests/container_debug_adapter_test\", [\"ember-babel\", \"internal-test-helpers\", \"@ember/polyfills\", \"@ember/runloop\", \"@ember/controller\", \"@ember/-internals/extension-support/index\", \"@ember/debug\"], function (_emberBabel, _internalTestHelpers, _polyfills, _runloop, _controller, _index, _debug) {\n \"use strict\";\n\n // Must be required to export Ember.ContainerDebugAdapter.\n var originalDebug = (0, _debug.getDebugFunction)('debug');\n (0, _internalTestHelpers.moduleFor)('Container Debug Adapter',\n /*#__PURE__*/\n function (_ApplicationTestCase) {\n (0, _emberBabel.inheritsLoose)(_class, _ApplicationTestCase);\n\n function _class() {\n var _this;\n\n (0, _debug.setDebugFunction)('debug', function () {});\n _this = _ApplicationTestCase.call(this) || this;\n _this.adapter = _this.application.__deprecatedInstance__.lookup('container-debug-adapter:main');\n return _this;\n }\n\n var _proto = _class.prototype;\n\n _proto.teardown = function teardown() {\n var _this2 = this;\n\n (0, _debug.setDebugFunction)('debug', originalDebug);\n (0, _runloop.run)(function () {\n _this2.adapter.destroy();\n });\n\n _ApplicationTestCase.prototype.teardown.call(this);\n };\n\n _proto['@test default ContainerDebugAdapter cannot catalog certain entries by type'] = function testDefaultContainerDebugAdapterCannotCatalogCertainEntriesByType(assert) {\n assert.equal(this.adapter.canCatalogEntriesByType('model'), false, 'canCatalogEntriesByType should return false for model');\n assert.equal(this.adapter.canCatalogEntriesByType('template'), false, 'canCatalogEntriesByType should return false for template');\n };\n\n _proto['@test default ContainerDebugAdapter can catalog typical entries by type'] = function testDefaultContainerDebugAdapterCanCatalogTypicalEntriesByType(assert) {\n assert.equal(this.adapter.canCatalogEntriesByType('controller'), true, 'canCatalogEntriesByType should return true for controller');\n assert.equal(this.adapter.canCatalogEntriesByType('route'), true, 'canCatalogEntriesByType should return true for route');\n assert.equal(this.adapter.canCatalogEntriesByType('view'), true, 'canCatalogEntriesByType should return true for view');\n };\n\n _proto['@test default ContainerDebugAdapter catalogs controller entries'] = function testDefaultContainerDebugAdapterCatalogsControllerEntries(assert) {\n this.application.PostController = _controller.default.extend();\n var controllerClasses = this.adapter.catalogEntriesByType('controller');\n assert.equal(controllerClasses.length, 1, 'found 1 class');\n assert.equal(controllerClasses[0], 'post', 'found the right class');\n };\n\n (0, _emberBabel.createClass)(_class, [{\n key: \"applicationOptions\",\n get: function () {\n return (0, _polyfills.assign)(_ApplicationTestCase.prototype.applicationOptions, {\n autoboot: true\n });\n }\n }]);\n return _class;\n }(_internalTestHelpers.ApplicationTestCase));\n});","enifed(\"@ember/-internals/extension-support/tests/data_adapter_test\", [\"ember-babel\", \"@ember/runloop\", \"@ember/-internals/metal\", \"@ember/-internals/runtime\", \"@ember/-internals/extension-support/lib/data_adapter\", \"internal-test-helpers\"], function (_emberBabel, _runloop, _metal, _runtime, _data_adapter, _internalTestHelpers) {\n \"use strict\";\n\n var adapter;\n\n var Model = _runtime.Object.extend();\n\n var PostClass = Model.extend();\n\n var DataAdapter = _data_adapter.default.extend({\n detect: function (klass) {\n return klass !== Model && Model.detect(klass);\n },\n init: function () {\n this._super.apply(this, arguments);\n\n this.set('containerDebugAdapter', {\n canCatalogEntriesByType: function () {\n return true;\n },\n catalogEntriesByType: function () {\n return (0, _runtime.A)(['post']);\n }\n });\n }\n });\n\n (0, _internalTestHelpers.moduleFor)('Data Adapter',\n /*#__PURE__*/\n function (_ApplicationTestCase) {\n (0, _emberBabel.inheritsLoose)(_class, _ApplicationTestCase);\n\n function _class() {\n return _ApplicationTestCase.apply(this, arguments) || this;\n }\n\n var _proto = _class.prototype;\n\n _proto.teardown = function teardown() {\n _ApplicationTestCase.prototype.teardown.call(this);\n\n adapter = undefined;\n };\n\n _proto['@test Model types added'] = function testModelTypesAdded(assert) {\n var _this = this;\n\n this.add('data-adapter:main', DataAdapter.extend({\n getRecords: function () {\n return (0, _runtime.A)([1, 2, 3]);\n },\n columnsForType: function () {\n return [{\n name: 'title',\n desc: 'Title'\n }];\n }\n }));\n this.add('model:post', PostClass);\n return this.visit('/').then(function () {\n var adapter = _this.applicationInstance.lookup('data-adapter:main');\n\n function modelTypesAdded(types) {\n assert.equal(types.length, 1);\n var postType = types[0];\n assert.equal(postType.name, 'post', 'Correctly sets the name');\n assert.equal(postType.count, 3, 'Correctly sets the record count');\n assert.strictEqual(postType.object, PostClass, 'Correctly sets the object');\n assert.deepEqual(postType.columns, [{\n name: 'title',\n desc: 'Title'\n }], 'Correctly sets the columns');\n }\n\n adapter.watchModelTypes(modelTypesAdded);\n });\n };\n\n _proto['@test getRecords gets a model name as second argument'] = function testGetRecordsGetsAModelNameAsSecondArgument(assert) {\n var _this2 = this;\n\n this.add('data-adapter:main', DataAdapter.extend({\n getRecords: function (klass, name) {\n assert.equal(name, 'post');\n return (0, _runtime.A)();\n }\n }));\n this.add('model:post', PostClass);\n return this.visit('/').then(function () {\n adapter = _this2.applicationInstance.lookup('data-adapter:main');\n adapter.watchModelTypes(function () {});\n });\n };\n\n _proto['@test Model types added with custom container-debug-adapter'] = function testModelTypesAddedWithCustomContainerDebugAdapter(assert) {\n var _this3 = this;\n\n var StubContainerDebugAdapter = _runtime.Object.extend({\n canCatalogEntriesByType: function () {\n return true;\n },\n catalogEntriesByType: function () {\n return (0, _runtime.A)(['post']);\n }\n });\n\n this.add('container-debug-adapter:main', StubContainerDebugAdapter);\n this.add('data-adapter:main', DataAdapter.extend({\n getRecords: function () {\n return (0, _runtime.A)([1, 2, 3]);\n },\n columnsForType: function () {\n return [{\n name: 'title',\n desc: 'Title'\n }];\n }\n }));\n this.add('model:post', PostClass);\n return this.visit('/').then(function () {\n var adapter = _this3.applicationInstance.lookup('data-adapter:main');\n\n function modelTypesAdded(types) {\n assert.equal(types.length, 1);\n var postType = types[0];\n assert.equal(postType.name, 'post', 'Correctly sets the name');\n assert.equal(postType.count, 3, 'Correctly sets the record count');\n assert.strictEqual(postType.object, PostClass, 'Correctly sets the object');\n assert.deepEqual(postType.columns, [{\n name: 'title',\n desc: 'Title'\n }], 'Correctly sets the columns');\n }\n\n adapter.watchModelTypes(modelTypesAdded);\n });\n };\n\n _proto['@test Model Types Updated'] = function testModelTypesUpdated(assert) {\n var _this4 = this;\n\n var records = (0, _runtime.A)([1, 2, 3]);\n this.add('data-adapter:main', DataAdapter.extend({\n getRecords: function () {\n return records;\n }\n }));\n this.add('model:post', PostClass);\n return this.visit('/').then(function () {\n adapter = _this4.applicationInstance.lookup('data-adapter:main');\n\n function modelTypesAdded() {\n (0, _runloop.run)(function () {\n records.pushObject(4);\n });\n }\n\n function modelTypesUpdated(types) {\n var postType = types[0];\n assert.equal(postType.count, 4, 'Correctly updates the count');\n }\n\n adapter.watchModelTypes(modelTypesAdded, modelTypesUpdated);\n });\n };\n\n _proto['@test Model Types Updated but Unchanged Do not Trigger Callbacks'] = function testModelTypesUpdatedButUnchangedDoNotTriggerCallbacks(assert) {\n var _this5 = this;\n\n assert.expect(0);\n var records = (0, _runtime.A)([1, 2, 3]);\n this.add('data-adapter:main', DataAdapter.extend({\n getRecords: function () {\n return records;\n }\n }));\n this.add('model:post', PostClass);\n return this.visit('/').then(function () {\n adapter = _this5.applicationInstance.lookup('data-adapter:main');\n\n function modelTypesAdded() {\n (0, _runloop.run)(function () {\n records.arrayContentDidChange(0, 0, 0);\n });\n }\n\n function modelTypesUpdated() {\n assert.ok(false, \"modelTypesUpdated should not be triggered if the array didn't change\");\n }\n\n adapter.watchModelTypes(modelTypesAdded, modelTypesUpdated);\n });\n };\n\n _proto['@test Records Added'] = function testRecordsAdded(assert) {\n var _this6 = this;\n\n var countAdded = 1;\n var post = PostClass.create();\n var recordList = (0, _runtime.A)([post]);\n this.add('data-adapter:main', DataAdapter.extend({\n getRecords: function () {\n return recordList;\n },\n getRecordColor: function () {\n return 'blue';\n },\n getRecordColumnValues: function () {\n return {\n title: 'Post ' + countAdded\n };\n },\n getRecordKeywords: function () {\n return ['Post ' + countAdded];\n }\n }));\n this.add('model:post', PostClass);\n return this.visit('/').then(function () {\n adapter = _this6.applicationInstance.lookup('data-adapter:main');\n\n function recordsAdded(records) {\n var record = records[0];\n assert.equal(record.color, 'blue', 'Sets the color correctly');\n assert.deepEqual(record.columnValues, {\n title: 'Post ' + countAdded\n }, 'Sets the column values correctly');\n assert.deepEqual(record.searchKeywords, ['Post ' + countAdded], 'Sets search keywords correctly');\n assert.strictEqual(record.object, post, 'Sets the object to the record instance');\n }\n\n adapter.watchRecords('post', recordsAdded);\n countAdded++;\n post = PostClass.create();\n recordList.pushObject(post);\n });\n };\n\n _proto['@test Observes and releases a record correctly'] = function testObservesAndReleasesARecordCorrectly(assert) {\n var _this7 = this;\n\n var updatesCalled = 0;\n var post = PostClass.create({\n title: 'Post'\n });\n var recordList = (0, _runtime.A)([post]);\n this.add('data-adapter:main', DataAdapter.extend({\n getRecords: function () {\n return recordList;\n },\n observeRecord: function (record, recordUpdated) {\n var self = this;\n\n function callback() {\n recordUpdated(self.wrapRecord(record));\n }\n\n (0, _metal.addObserver)(record, 'title', callback);\n return function () {\n (0, _metal.removeObserver)(record, 'title', callback);\n };\n },\n getRecordColumnValues: function (record) {\n return {\n title: (0, _metal.get)(record, 'title')\n };\n }\n }));\n this.add('model:post', PostClass);\n return this.visit('/').then(function () {\n adapter = _this7.applicationInstance.lookup('data-adapter:main');\n\n function recordsAdded() {\n (0, _metal.set)(post, 'title', 'Post Modified');\n }\n\n function recordsUpdated(records) {\n updatesCalled++;\n assert.equal(records[0].columnValues.title, 'Post Modified');\n }\n\n var release = adapter.watchRecords('post', recordsAdded, recordsUpdated);\n release();\n (0, _metal.set)(post, 'title', 'New Title');\n assert.equal(updatesCalled, 1, 'Release function removes observers');\n });\n };\n\n _proto['@test _nameToClass does not error when not found'] = function test_nameToClassDoesNotErrorWhenNotFound(assert) {\n var _this8 = this;\n\n this.add('data-adapter:main', DataAdapter);\n return this.visit('/').then(function () {\n adapter = _this8.applicationInstance.lookup('data-adapter:main');\n\n var klass = adapter._nameToClass('foo');\n\n assert.equal(klass, undefined, 'returns undefined');\n });\n };\n\n return _class;\n }(_internalTestHelpers.ApplicationTestCase));\n});","enifed(\"@ember/-internals/glimmer/tests/integration/application/actions-test\", [\"ember-babel\", \"internal-test-helpers\", \"@ember/controller\", \"@ember/debug\", \"@ember/-internals/glimmer/tests/utils/helpers\"], function (_emberBabel, _internalTestHelpers, _controller, _debug, _helpers) {\n \"use strict\";\n\n var originalDebug = (0, _debug.getDebugFunction)('debug');\n\n var noop = function () {};\n\n (0, _internalTestHelpers.moduleFor)('Application test: actions',\n /*#__PURE__*/\n function (_ApplicationTestCase) {\n (0, _emberBabel.inheritsLoose)(_class, _ApplicationTestCase);\n\n function _class() {\n (0, _debug.setDebugFunction)('debug', noop);\n return _ApplicationTestCase.apply(this, arguments) || this;\n }\n\n var _proto = _class.prototype;\n\n _proto.teardown = function teardown() {\n (0, _debug.setDebugFunction)('debug', originalDebug);\n };\n\n _proto['@test actions in top level template application template target application controller'] = function testActionsInTopLevelTemplateApplicationTemplateTargetApplicationController(assert) {\n var _this = this;\n\n assert.expect(1);\n this.add('controller:application', _controller.default.extend({\n actions: {\n handleIt: function () {\n assert.ok(true, 'controller received action properly');\n }\n }\n }));\n this.addTemplate('application', '');\n return this.visit('/').then(function () {\n (0, _internalTestHelpers.runTask)(function () {\n return _this.$('#handle-it').click();\n });\n });\n };\n\n _proto['@test actions in nested outlet template target their controller'] = function testActionsInNestedOutletTemplateTargetTheirController(assert) {\n var _this2 = this;\n\n assert.expect(1);\n this.add('controller:application', _controller.default.extend({\n actions: {\n handleIt: function () {\n assert.ok(false, 'application controller should not have received action!');\n }\n }\n }));\n this.add('controller:index', _controller.default.extend({\n actions: {\n handleIt: function () {\n assert.ok(true, 'controller received action properly');\n }\n }\n }));\n this.addTemplate('index', '');\n return this.visit('/').then(function () {\n (0, _internalTestHelpers.runTask)(function () {\n return _this2.$('#handle-it').click();\n });\n });\n };\n\n return _class;\n }(_internalTestHelpers.ApplicationTestCase));\n (0, _internalTestHelpers.moduleFor)('Rendering test: non-interactive actions',\n /*#__PURE__*/\n function (_RenderingTestCase) {\n (0, _emberBabel.inheritsLoose)(_class2, _RenderingTestCase);\n\n function _class2() {\n return _RenderingTestCase.apply(this, arguments) || this;\n }\n\n var _proto2 = _class2.prototype;\n\n _proto2.getBootOptions = function getBootOptions() {\n return {\n isInteractive: false\n };\n };\n\n _proto2[\"@test doesn't attatch actions\"] = function (assert) {\n this.registerComponent('foo-bar', {\n ComponentClass: _helpers.Component.extend({\n actions: {\n fire: function () {\n assert.ok(false);\n }\n }\n }),\n template: \"\"\n });\n this.render('{{foo-bar tagName=\"\"}}');\n this.assertHTML('');\n this.$('button').click();\n };\n\n return _class2;\n }(_internalTestHelpers.RenderingTestCase));\n});","enifed(\"@ember/-internals/glimmer/tests/integration/application/engine-test\", [\"ember-babel\", \"internal-test-helpers\", \"@ember/controller\", \"@ember/-internals/runtime\", \"@ember/-internals/glimmer\", \"@ember/engine\", \"@ember/-internals/routing\", \"@ember/runloop\", \"@ember/-internals/glimmer/tests/utils/helpers\"], function (_emberBabel, _internalTestHelpers, _controller, _runtime, _glimmer, _engine, _routing, _runloop, _helpers) {\n \"use strict\";\n\n function _templateObject6() {\n const data = _taggedTemplateLiteralLoose([\"\\n

Component!

\\n \"]);\n\n _templateObject6 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject5() {\n const data = _taggedTemplateLiteralLoose([\"\\n

Engine

\\n {{my-component}}\\n {{outlet}}\\n \"]);\n\n _templateObject5 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject4() {\n const data = _taggedTemplateLiteralLoose([\"\\n

Application

\\n {{my-component ambiguous-curlies=\\\"Local Data!\\\"}}\\n {{outlet}}\\n \"]);\n\n _templateObject4 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject3() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{ambiguous-curlies}}\\n \"]);\n\n _templateObject3 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject2() {\n const data = _taggedTemplateLiteralLoose([\"\\n

Component!

\\n \"]);\n\n _templateObject2 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject() {\n const data = _taggedTemplateLiteralLoose([\"\\n

{{contextType}}

\\n {{ambiguous-curlies}}\\n\\n {{outlet}}\\n \"]);\n\n _templateObject = function () {\n return data;\n };\n\n return data;\n }\n\n function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }\n\n (0, _internalTestHelpers.moduleFor)('Application test: engine rendering',\n /*#__PURE__*/\n function (_ApplicationTestCase) {\n (0, _emberBabel.inheritsLoose)(_class, _ApplicationTestCase);\n\n function _class() {\n return _ApplicationTestCase.apply(this, arguments) || this;\n }\n\n var _proto = _class.prototype;\n\n _proto.setupAppAndRoutableEngine = function setupAppAndRoutableEngine() {\n var hooks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n var self = this;\n this.addTemplate('application', 'Application{{outlet}}');\n this.router.map(function () {\n this.mount('blog');\n });\n this.add('route-map:blog', function () {\n this.route('post', function () {\n this.route('comments');\n this.route('likes');\n });\n this.route('category', {\n path: 'category/:id'\n });\n this.route('author', {\n path: 'author/:id'\n });\n });\n this.add('route:application', _routing.Route.extend({\n model: function () {\n hooks.push('application - application');\n }\n }));\n this.add('engine:blog', _engine.default.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n this.register('controller:application', _controller.default.extend({\n queryParams: ['lang'],\n lang: ''\n }));\n this.register('controller:category', _controller.default.extend({\n queryParams: ['type']\n }));\n this.register('controller:authorKtrl', _controller.default.extend({\n queryParams: ['official']\n }));\n this.register('template:application', (0, _helpers.compile)('Engine{{lang}}{{outlet}}'));\n this.register('route:application', _routing.Route.extend({\n model: function () {\n hooks.push('engine - application');\n }\n }));\n this.register('route:author', _routing.Route.extend({\n controllerName: 'authorKtrl'\n }));\n\n if (self._additionalEngineRegistrations) {\n self._additionalEngineRegistrations.call(this);\n }\n }\n }));\n };\n\n _proto.setupAppAndRoutelessEngine = function setupAppAndRoutelessEngine(hooks) {\n this.setupRoutelessEngine(hooks);\n this.add('engine:chat-engine', _engine.default.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n this.register('template:application', (0, _helpers.compile)('Engine'));\n this.register('controller:application', _controller.default.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n hooks.push('engine - application');\n }\n }));\n }\n }));\n };\n\n _proto.setupAppAndRoutableEngineWithPartial = function setupAppAndRoutableEngineWithPartial(hooks) {\n this.addTemplate('application', 'Application{{outlet}}');\n this.router.map(function () {\n this.mount('blog');\n });\n this.add('route-map:blog', function () {});\n this.add('route:application', _routing.Route.extend({\n model: function () {\n hooks.push('application - application');\n }\n }));\n this.add('engine:blog', _engine.default.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n this.register('template:foo', (0, _helpers.compile)('foo partial'));\n this.register('template:application', (0, _helpers.compile)('Engine{{outlet}} {{partial \"foo\"}}'));\n this.register('route:application', _routing.Route.extend({\n model: function () {\n hooks.push('engine - application');\n }\n }));\n }\n }));\n };\n\n _proto.setupRoutelessEngine = function setupRoutelessEngine(hooks) {\n this.addTemplate('application', 'Application{{mount \"chat-engine\"}}');\n this.add('route:application', _routing.Route.extend({\n model: function () {\n hooks.push('application - application');\n }\n }));\n };\n\n _proto.setupAppAndRoutlessEngineWithPartial = function setupAppAndRoutlessEngineWithPartial(hooks) {\n this.setupRoutelessEngine(hooks);\n this.add('engine:chat-engine', _engine.default.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n this.register('template:foo', (0, _helpers.compile)('foo partial'));\n this.register('template:application', (0, _helpers.compile)('Engine {{partial \"foo\"}}'));\n this.register('controller:application', _controller.default.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n hooks.push('engine - application');\n }\n }));\n }\n }));\n };\n\n _proto.additionalEngineRegistrations = function additionalEngineRegistrations(callback) {\n this._additionalEngineRegistrations = callback;\n };\n\n _proto.setupEngineWithAttrs = function setupEngineWithAttrs() {\n this.addTemplate('application', 'Application{{mount \"chat-engine\"}}');\n this.add('engine:chat-engine', _engine.default.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n this.register('template:components/foo-bar', (0, _helpers.compile)(\"{{partial \\\"troll\\\"}}\"));\n this.register('template:troll', (0, _helpers.compile)('{{attrs.wat}}'));\n this.register('controller:application', _controller.default.extend({\n contextType: 'Engine'\n }));\n this.register('template:application', (0, _helpers.compile)('Engine {{foo-bar wat=contextType}}'));\n }\n }));\n };\n\n _proto.stringsEndWith = function stringsEndWith(str, suffix) {\n return str.indexOf(suffix, str.length - suffix.length) !== -1;\n };\n\n _proto['@test attrs in an engine'] = function testAttrsInAnEngine() {\n var _this = this;\n\n this.setupEngineWithAttrs([]);\n return this.visit('/').then(function () {\n _this.assertText('ApplicationEngine Engine');\n });\n };\n\n _proto['@test sharing a template between engine and application has separate refinements'] = function testSharingATemplateBetweenEngineAndApplicationHasSeparateRefinements() {\n var _this2 = this;\n\n this.assert.expect(1);\n var sharedTemplate = (0, _helpers.compile)((0, _internalTestHelpers.strip)(_templateObject()));\n this.add('template:application', sharedTemplate);\n this.add('controller:application', _controller.default.extend({\n contextType: 'Application',\n 'ambiguous-curlies': 'Controller Data!'\n }));\n this.router.map(function () {\n this.mount('blog');\n });\n this.add('route-map:blog', function () {});\n this.add('engine:blog', _engine.default.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n this.register('controller:application', _controller.default.extend({\n contextType: 'Engine'\n }));\n this.register('template:application', sharedTemplate);\n this.register('template:components/ambiguous-curlies', (0, _helpers.compile)((0, _internalTestHelpers.strip)(_templateObject2())));\n }\n }));\n return this.visit('/blog').then(function () {\n _this2.assertText('ApplicationController Data!EngineComponent!');\n });\n };\n\n _proto['@test sharing a layout between engine and application has separate refinements'] = function testSharingALayoutBetweenEngineAndApplicationHasSeparateRefinements() {\n var _this3 = this;\n\n this.assert.expect(1);\n var sharedLayout = (0, _helpers.compile)((0, _internalTestHelpers.strip)(_templateObject3()));\n\n var sharedComponent = _glimmer.Component.extend({\n layout: sharedLayout\n });\n\n this.addTemplate('application', (0, _internalTestHelpers.strip)(_templateObject4()));\n this.add('component:my-component', sharedComponent);\n this.router.map(function () {\n this.mount('blog');\n });\n this.add('route-map:blog', function () {});\n this.add('engine:blog', _engine.default.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n this.register('template:application', (0, _helpers.compile)((0, _internalTestHelpers.strip)(_templateObject5())));\n this.register('component:my-component', sharedComponent);\n this.register('template:components/ambiguous-curlies', (0, _helpers.compile)((0, _internalTestHelpers.strip)(_templateObject6())));\n }\n }));\n return this.visit('/blog').then(function () {\n _this3.assertText('ApplicationLocal Data!EngineComponent!');\n });\n };\n\n _proto['@test visit() with `shouldRender: true` returns a promise that resolves when application and engine templates have rendered'] = function testVisitWithShouldRenderTrueReturnsAPromiseThatResolvesWhenApplicationAndEngineTemplatesHaveRendered(assert) {\n var _this4 = this;\n\n assert.expect(2);\n var hooks = [];\n this.setupAppAndRoutableEngine(hooks);\n return this.visit('/blog', {\n shouldRender: true\n }).then(function () {\n _this4.assertText('ApplicationEngine');\n\n _this4.assert.deepEqual(hooks, ['application - application', 'engine - application'], 'the expected model hooks were fired');\n });\n };\n\n _proto['@test visit() with `shouldRender: false` returns a promise that resolves without rendering'] = function testVisitWithShouldRenderFalseReturnsAPromiseThatResolvesWithoutRendering(assert) {\n var _this5 = this;\n\n assert.expect(2);\n var hooks = [];\n this.setupAppAndRoutableEngine(hooks);\n return this.visit('/blog', {\n shouldRender: false\n }).then(function () {\n assert.strictEqual(document.getElementById('qunit-fixture').children.length, 0, \"there are no elements in the qunit-fixture element\");\n\n _this5.assert.deepEqual(hooks, ['application - application', 'engine - application'], 'the expected model hooks were fired');\n });\n };\n\n _proto['@test visit() with `shouldRender: true` returns a promise that resolves when application and routeless engine templates have rendered'] = function testVisitWithShouldRenderTrueReturnsAPromiseThatResolvesWhenApplicationAndRoutelessEngineTemplatesHaveRendered(assert) {\n var _this6 = this;\n\n assert.expect(2);\n var hooks = [];\n this.setupAppAndRoutelessEngine(hooks);\n return this.visit('/', {\n shouldRender: true\n }).then(function () {\n _this6.assertText('ApplicationEngine');\n\n _this6.assert.deepEqual(hooks, ['application - application', 'engine - application'], 'the expected hooks were fired');\n });\n };\n\n _proto['@test visit() with partials in routable engine'] = function testVisitWithPartialsInRoutableEngine(assert) {\n var _this7 = this;\n\n assert.expect(2);\n var hooks = [];\n this.setupAppAndRoutableEngineWithPartial(hooks);\n return this.visit('/blog', {\n shouldRender: true\n }).then(function () {\n _this7.assertText('ApplicationEngine foo partial');\n\n _this7.assert.deepEqual(hooks, ['application - application', 'engine - application'], 'the expected hooks were fired');\n });\n };\n\n _proto['@test visit() with partials in non-routable engine'] = function testVisitWithPartialsInNonRoutableEngine(assert) {\n var _this8 = this;\n\n assert.expect(2);\n var hooks = [];\n this.setupAppAndRoutlessEngineWithPartial(hooks);\n return this.visit('/', {\n shouldRender: true\n }).then(function () {\n _this8.assertText('ApplicationEngine foo partial');\n\n _this8.assert.deepEqual(hooks, ['application - application', 'engine - application'], 'the expected hooks were fired');\n });\n };\n\n _proto['@test deactivate should be called on Engine Routes before destruction'] = function testDeactivateShouldBeCalledOnEngineRoutesBeforeDestruction(assert) {\n var _this9 = this;\n\n assert.expect(3);\n this.setupAppAndRoutableEngine();\n this.add('engine:blog', _engine.default.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n this.register('template:application', (0, _helpers.compile)('Engine{{outlet}}'));\n this.register('route:application', _routing.Route.extend({\n deactivate: function () {\n assert.notOk(this.isDestroyed, 'Route is not destroyed');\n assert.notOk(this.isDestroying, 'Route is not being destroyed');\n }\n }));\n }\n }));\n return this.visit('/blog').then(function () {\n _this9.assertText('ApplicationEngine');\n });\n };\n\n _proto['@test engine should lookup and use correct controller'] = function testEngineShouldLookupAndUseCorrectController() {\n var _this10 = this;\n\n this.setupAppAndRoutableEngine();\n return this.visit('/blog?lang=English').then(function () {\n _this10.assertText('ApplicationEngineEnglish');\n });\n };\n\n _proto['@test error substate route works for the application route of an Engine'] = function testErrorSubstateRouteWorksForTheApplicationRouteOfAnEngine(assert) {\n var _this11 = this;\n\n assert.expect(2);\n\n var errorEntered = _runtime.RSVP.defer();\n\n this.setupAppAndRoutableEngine();\n this.additionalEngineRegistrations(function () {\n this.register('route:application_error', _routing.Route.extend({\n activate: function () {\n (0, _runloop.next)(errorEntered.resolve);\n }\n }));\n this.register('template:application_error', (0, _helpers.compile)('Error! {{model.message}}'));\n this.register('route:post', _routing.Route.extend({\n model: function () {\n return _runtime.RSVP.reject(new Error('Oh, noes!'));\n }\n }));\n });\n return this.visit('/').then(function () {\n _this11.assertText('Application');\n\n return _this11.transitionTo('blog.post');\n }).then(function () {\n return errorEntered.promise;\n }).then(function () {\n _this11.assertText('ApplicationError! Oh, noes!');\n });\n };\n\n _proto['@test error route works for the application route of an Engine'] = function testErrorRouteWorksForTheApplicationRouteOfAnEngine(assert) {\n var _this12 = this;\n\n assert.expect(2);\n\n var errorEntered = _runtime.RSVP.defer();\n\n this.setupAppAndRoutableEngine();\n this.additionalEngineRegistrations(function () {\n this.register('route:error', _routing.Route.extend({\n activate: function () {\n (0, _runloop.next)(errorEntered.resolve);\n }\n }));\n this.register('template:error', (0, _helpers.compile)('Error! {{model.message}}'));\n this.register('route:post', _routing.Route.extend({\n model: function () {\n return _runtime.RSVP.reject(new Error('Oh, noes!'));\n }\n }));\n });\n return this.visit('/').then(function () {\n _this12.assertText('Application');\n\n return _this12.transitionTo('blog.post');\n }).then(function () {\n return errorEntered.promise;\n }).then(function () {\n _this12.assertText('ApplicationEngineError! Oh, noes!');\n });\n };\n\n _proto['@test error substate route works for a child route of an Engine'] = function testErrorSubstateRouteWorksForAChildRouteOfAnEngine(assert) {\n var _this13 = this;\n\n assert.expect(2);\n\n var errorEntered = _runtime.RSVP.defer();\n\n this.setupAppAndRoutableEngine();\n this.additionalEngineRegistrations(function () {\n this.register('route:post_error', _routing.Route.extend({\n activate: function () {\n (0, _runloop.next)(errorEntered.resolve);\n }\n }));\n this.register('template:post_error', (0, _helpers.compile)('Error! {{model.message}}'));\n this.register('route:post', _routing.Route.extend({\n model: function () {\n return _runtime.RSVP.reject(new Error('Oh, noes!'));\n }\n }));\n });\n return this.visit('/').then(function () {\n _this13.assertText('Application');\n\n return _this13.transitionTo('blog.post');\n }).then(function () {\n return errorEntered.promise;\n }).then(function () {\n _this13.assertText('ApplicationEngineError! Oh, noes!');\n });\n };\n\n _proto['@test error route works for a child route of an Engine'] = function testErrorRouteWorksForAChildRouteOfAnEngine(assert) {\n var _this14 = this;\n\n assert.expect(2);\n\n var errorEntered = _runtime.RSVP.defer();\n\n this.setupAppAndRoutableEngine();\n this.additionalEngineRegistrations(function () {\n this.register('route:post.error', _routing.Route.extend({\n activate: function () {\n (0, _runloop.next)(errorEntered.resolve);\n }\n }));\n this.register('template:post.error', (0, _helpers.compile)('Error! {{model.message}}'));\n this.register('route:post.comments', _routing.Route.extend({\n model: function () {\n return _runtime.RSVP.reject(new Error('Oh, noes!'));\n }\n }));\n });\n return this.visit('/').then(function () {\n _this14.assertText('Application');\n\n return _this14.transitionTo('blog.post.comments');\n }).then(function () {\n return errorEntered.promise;\n }).then(function () {\n _this14.assertText('ApplicationEngineError! Oh, noes!');\n });\n };\n\n _proto['@test loading substate route works for the application route of an Engine'] = function testLoadingSubstateRouteWorksForTheApplicationRouteOfAnEngine(assert) {\n var _this15 = this;\n\n assert.expect(3);\n var done = assert.async();\n\n var loadingEntered = _runtime.RSVP.defer();\n\n var resolveLoading = _runtime.RSVP.defer();\n\n this.setupAppAndRoutableEngine();\n this.additionalEngineRegistrations(function () {\n this.register('route:application_loading', _routing.Route.extend({\n activate: function () {\n (0, _runloop.next)(loadingEntered.resolve);\n }\n }));\n this.register('template:application_loading', (0, _helpers.compile)('Loading'));\n this.register('template:post', (0, _helpers.compile)('Post'));\n this.register('route:post', _routing.Route.extend({\n model: function () {\n return resolveLoading.promise;\n }\n }));\n });\n return this.visit('/').then(function () {\n _this15.assertText('Application');\n\n var transition = _this15.transitionTo('blog.post');\n\n loadingEntered.promise.then(function () {\n _this15.assertText('ApplicationLoading');\n\n resolveLoading.resolve();\n return (0, _internalTestHelpers.runTaskNext)().then(function () {\n _this15.assertText('ApplicationEnginePost');\n\n done();\n });\n });\n return transition;\n });\n };\n\n _proto['@test loading route works for the application route of an Engine'] = function testLoadingRouteWorksForTheApplicationRouteOfAnEngine(assert) {\n var _this16 = this;\n\n assert.expect(3);\n var done = assert.async();\n\n var loadingEntered = _runtime.RSVP.defer();\n\n var resolveLoading = _runtime.RSVP.defer();\n\n this.setupAppAndRoutableEngine();\n this.additionalEngineRegistrations(function () {\n this.register('route:loading', _routing.Route.extend({\n activate: function () {\n (0, _runloop.next)(loadingEntered.resolve);\n }\n }));\n this.register('template:loading', (0, _helpers.compile)('Loading'));\n this.register('template:post', (0, _helpers.compile)('Post'));\n this.register('route:post', _routing.Route.extend({\n model: function () {\n return resolveLoading.promise;\n }\n }));\n });\n return this.visit('/').then(function () {\n _this16.assertText('Application');\n\n var transition = _this16.transitionTo('blog.post');\n\n loadingEntered.promise.then(function () {\n _this16.assertText('ApplicationEngineLoading');\n\n resolveLoading.resolve();\n return (0, _internalTestHelpers.runTaskNext)().then(function () {\n _this16.assertText('ApplicationEnginePost');\n\n done();\n });\n });\n return transition;\n });\n };\n\n _proto['@test loading substate route works for a child route of an Engine'] = function testLoadingSubstateRouteWorksForAChildRouteOfAnEngine(assert) {\n var _this17 = this;\n\n assert.expect(3);\n var resolveLoading;\n this.setupAppAndRoutableEngine();\n this.additionalEngineRegistrations(function () {\n this.register('template:post', (0, _helpers.compile)('{{outlet}}'));\n this.register('template:post.comments', (0, _helpers.compile)('Comments'));\n this.register('template:post.likes_loading', (0, _helpers.compile)('Loading'));\n this.register('template:post.likes', (0, _helpers.compile)('Likes'));\n this.register('route:post.likes', _routing.Route.extend({\n model: function () {\n return new _runtime.RSVP.Promise(function (resolve) {\n resolveLoading = resolve;\n });\n }\n }));\n });\n return this.visit('/blog/post/comments').then(function () {\n _this17.assertText('ApplicationEngineComments');\n\n var transition = _this17.transitionTo('blog.post.likes');\n\n (0, _internalTestHelpers.runTaskNext)().then(function () {\n _this17.assertText('ApplicationEngineLoading');\n\n resolveLoading();\n });\n return transition.then(function () {\n return (0, _internalTestHelpers.runTaskNext)();\n }).then(function () {\n return _this17.assertText('ApplicationEngineLikes');\n });\n });\n };\n\n _proto['@test loading route works for a child route of an Engine'] = function testLoadingRouteWorksForAChildRouteOfAnEngine(assert) {\n var _this18 = this;\n\n assert.expect(3);\n var done = assert.async();\n\n var loadingEntered = _runtime.RSVP.defer();\n\n var resolveLoading = _runtime.RSVP.defer();\n\n this.setupAppAndRoutableEngine();\n this.additionalEngineRegistrations(function () {\n this.register('template:post', (0, _helpers.compile)('{{outlet}}'));\n this.register('template:post.comments', (0, _helpers.compile)('Comments'));\n this.register('route:post.loading', _routing.Route.extend({\n activate: function () {\n (0, _runloop.next)(loadingEntered.resolve);\n }\n }));\n this.register('template:post.loading', (0, _helpers.compile)('Loading'));\n this.register('template:post.likes', (0, _helpers.compile)('Likes'));\n this.register('route:post.likes', _routing.Route.extend({\n model: function () {\n return resolveLoading.promise;\n }\n }));\n });\n return this.visit('/blog/post/comments').then(function () {\n _this18.assertText('ApplicationEngineComments');\n\n var transition = _this18.transitionTo('blog.post.likes');\n\n loadingEntered.promise.then(function () {\n _this18.assertText('ApplicationEngineLoading');\n\n resolveLoading.resolve();\n return (0, _internalTestHelpers.runTaskNext)().then(function () {\n _this18.assertText('ApplicationEngineLikes');\n\n done();\n });\n });\n return transition;\n });\n };\n\n _proto[\"@test query params don't have stickiness by default between model\"] = function testQueryParamsDonTHaveStickinessByDefaultBetweenModel(assert) {\n var _this19 = this;\n\n assert.expect(1);\n var tmpl = '{{#link-to \"blog.category\" 1337}}Category 1337{{/link-to}}';\n this.setupAppAndRoutableEngine();\n this.additionalEngineRegistrations(function () {\n this.register('template:category', (0, _helpers.compile)(tmpl));\n });\n return this.visit('/blog/category/1?type=news').then(function () {\n var suffix = '/blog/category/1337';\n\n var href = _this19.element.querySelector('a').href; // check if link ends with the suffix\n\n\n assert.ok(_this19.stringsEndWith(href, suffix));\n });\n };\n\n _proto['@test query params in customized controllerName have stickiness by default between model'] = function testQueryParamsInCustomizedControllerNameHaveStickinessByDefaultBetweenModel(assert) {\n var _this20 = this;\n\n assert.expect(2);\n var tmpl = '{{#link-to \"blog.author\" 1337 class=\"author-1337\"}}Author 1337{{/link-to}}{{#link-to \"blog.author\" 1 class=\"author-1\"}}Author 1{{/link-to}}';\n this.setupAppAndRoutableEngine();\n this.additionalEngineRegistrations(function () {\n this.register('template:author', (0, _helpers.compile)(tmpl));\n });\n return this.visit('/blog/author/1?official=true').then(function () {\n var suffix1 = '/blog/author/1?official=true';\n\n var href1 = _this20.element.querySelector('.author-1').href;\n\n var suffix1337 = '/blog/author/1337';\n\n var href1337 = _this20.element.querySelector('.author-1337').href; // check if link ends with the suffix\n\n\n assert.ok(_this20.stringsEndWith(href1, suffix1), href1 + \" ends with \" + suffix1);\n assert.ok(_this20.stringsEndWith(href1337, suffix1337), href1337 + \" ends with \" + suffix1337);\n });\n };\n\n _proto['@test visit() routable engine which errors on init'] = function testVisitRoutableEngineWhichErrorsOnInit(assert) {\n var _this21 = this;\n\n assert.expect(1);\n var hooks = [];\n this.additionalEngineRegistrations(function () {\n this.register('route:application', _routing.Route.extend({\n init: function () {\n throw new Error('Whoops! Something went wrong...');\n }\n }));\n });\n this.setupAppAndRoutableEngine(hooks);\n return this.visit('/', {\n shouldRender: true\n }).then(function () {\n return _this21.visit('/blog');\n }).catch(function (error) {\n assert.equal(error.message, 'Whoops! Something went wrong...');\n });\n };\n\n (0, _emberBabel.createClass)(_class, [{\n key: \"routerOptions\",\n get: function () {\n return {\n location: 'none',\n setupRouter: function () {\n var _this22 = this;\n\n this._super.apply(this, arguments);\n\n var getRoute = this._routerMicrolib.getRoute;\n this._enginePromises = Object.create(null);\n this._resolvedEngines = Object.create(null);\n\n this._routerMicrolib.getRoute = function (name) {\n var engineInfo = _this22._engineInfoByRoute[name];\n\n if (!engineInfo) {\n return getRoute(name);\n }\n\n var engineName = engineInfo.name;\n\n if (_this22._resolvedEngines[engineName]) {\n return getRoute(name);\n }\n\n var enginePromise = _this22._enginePromises[engineName];\n\n if (!enginePromise) {\n enginePromise = new _runtime.RSVP.Promise(function (resolve) {\n setTimeout(function () {\n _this22._resolvedEngines[engineName] = true;\n resolve();\n }, 1);\n });\n _this22._enginePromises[engineName] = enginePromise;\n }\n\n return enginePromise.then(function () {\n return getRoute(name);\n });\n };\n }\n };\n }\n }]);\n return _class;\n }(_internalTestHelpers.ApplicationTestCase));\n});","enifed(\"@ember/-internals/glimmer/tests/integration/application/helper-registration-test\", [\"ember-babel\", \"internal-test-helpers\", \"@ember/controller\", \"@ember/service\", \"@ember/-internals/glimmer\"], function (_emberBabel, _internalTestHelpers, _controller, _service, _glimmer) {\n \"use strict\";\n\n (0, _internalTestHelpers.moduleFor)('Application Lifecycle - Helper Registration',\n /*#__PURE__*/\n function (_ApplicationTestCase) {\n (0, _emberBabel.inheritsLoose)(_class, _ApplicationTestCase);\n\n function _class() {\n return _ApplicationTestCase.apply(this, arguments) || this;\n }\n\n var _proto = _class.prototype;\n\n _proto['@test Unbound dashed helpers registered on the container can be late-invoked'] = function testUnboundDashedHelpersRegisteredOnTheContainerCanBeLateInvoked(assert) {\n var _this = this;\n\n this.addTemplate('application', \"
{{x-borf}} {{x-borf 'YES'}}
\");\n var myHelper = (0, _glimmer.helper)(function (params) {\n return params[0] || 'BORF';\n });\n this.application.register('helper:x-borf', myHelper);\n return this.visit('/').then(function () {\n assert.equal(_this.$('#wrapper').text(), 'BORF YES', 'The helper was invoked from the container');\n });\n };\n\n _proto['@test Bound helpers registered on the container can be late-invoked'] = function testBoundHelpersRegisteredOnTheContainerCanBeLateInvoked(assert) {\n var _this2 = this;\n\n this.addTemplate('application', \"
{{x-reverse}} {{x-reverse foo}}
\");\n this.add('controller:application', _controller.default.extend({\n foo: 'alex'\n }));\n this.application.register('helper:x-reverse', (0, _glimmer.helper)(function (_ref) {\n var value = _ref[0];\n return value ? value.split('').reverse().join('') : '--';\n }));\n return this.visit('/').then(function () {\n assert.equal(_this2.$('#wrapper').text(), '-- xela', 'The bound helper was invoked from the container');\n });\n };\n\n _proto['@test Undashed helpers registered on the container can be invoked'] = function testUndashedHelpersRegisteredOnTheContainerCanBeInvoked(assert) {\n var _this3 = this;\n\n this.addTemplate('application', \"
{{omg}}|{{yorp 'boo'}}|{{yorp 'ya'}}
\");\n this.application.register('helper:omg', (0, _glimmer.helper)(function () {\n return 'OMG';\n }));\n this.application.register('helper:yorp', (0, _glimmer.helper)(function (_ref2) {\n var value = _ref2[0];\n return value;\n }));\n return this.visit('/').then(function () {\n assert.equal(_this3.$('#wrapper').text(), 'OMG|boo|ya', 'The helper was invoked from the container');\n });\n };\n\n _proto['@test Helpers can receive injections'] = function testHelpersCanReceiveInjections(assert) {\n this.addTemplate('application', \"
{{full-name}}
\");\n var serviceCalled = false;\n this.add('service:name-builder', _service.default.extend({\n build: function () {\n serviceCalled = true;\n }\n }));\n this.add('helper:full-name', _glimmer.Helper.extend({\n nameBuilder: (0, _service.inject)('name-builder'),\n compute: function () {\n this.get('nameBuilder').build();\n }\n }));\n return this.visit('/').then(function () {\n assert.ok(serviceCalled, 'service was injected, method called');\n });\n };\n\n return _class;\n }(_internalTestHelpers.ApplicationTestCase));\n});","enifed(\"@ember/-internals/glimmer/tests/integration/application/hot-reload-test\", [\"ember-babel\", \"internal-test-helpers\", \"@ember/-internals/environment\", \"@ember/service\", \"@ember/-internals/glimmer\", \"@glimmer/util\"], function (_emberBabel, _internalTestHelpers, _environment, _service, _glimmer, _util) {\n \"use strict\";\n\n function _templateObject12() {\n const data = _taggedTemplateLiteralLoose([\"\\n [x-foo: first (8)]\\n [x-foo: second (9)]\\n [x-bar (10)]\\n \"]);\n\n _templateObject12 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject11() {\n const data = _taggedTemplateLiteralLoose([\"\\n [x-foo first (6)]\\n [x-foo second (7)]\\n [

wow (5)

]\\n \"]);\n\n _templateObject11 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject10() {\n const data = _taggedTemplateLiteralLoose([\"\\n [

first (3)

]\\n [

second (4)

]\\n [

wow (5)

]\\n \"]);\n\n _templateObject10 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject9() {\n const data = _taggedTemplateLiteralLoose([\"\\n [

first (3)

]\\n [

second (4)

]\\n [x-bar (2)]\\n \"]);\n\n _templateObject9 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject8() {\n const data = _taggedTemplateLiteralLoose([\"\\n [x-foo: first (0)]\\n [x-foo: second (1)]\\n [x-bar (2)]\\n \"]);\n\n _templateObject8 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject7() {\n const data = _taggedTemplateLiteralLoose([\"\\n [{{component (hot-reload \\\"x-foo\\\") name=\\\"first\\\"}}]\\n [{{component (hot-reload \\\"x-foo\\\") name=\\\"second\\\"}}]\\n [{{component (hot-reload \\\"x-bar\\\")}}]\\n \"]);\n\n _templateObject7 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject6() {\n const data = _taggedTemplateLiteralLoose([\"\\n [x-foo: first]\\n [x-foo: second]\\n [x-bar]\\n \"]);\n\n _templateObject6 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject5() {\n const data = _taggedTemplateLiteralLoose([\"\\n [x-foo first]\\n [x-foo second]\\n [

wow

]\\n \"]);\n\n _templateObject5 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject4() {\n const data = _taggedTemplateLiteralLoose([\"\\n [

first

]\\n [

second

]\\n [

wow

]\\n \"]);\n\n _templateObject4 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject3() {\n const data = _taggedTemplateLiteralLoose([\"\\n [

first

]\\n [

second

]\\n [x-bar]\\n \"]);\n\n _templateObject3 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject2() {\n const data = _taggedTemplateLiteralLoose([\"\\n [x-foo: first]\\n [x-foo: second]\\n [x-bar]\\n \"]);\n\n _templateObject2 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject() {\n const data = _taggedTemplateLiteralLoose([\"\\n [{{component (hot-reload \\\"x-foo\\\") name=\\\"first\\\"}}]\\n [{{component (hot-reload \\\"x-foo\\\") name=\\\"second\\\"}}]\\n [{{component (hot-reload \\\"x-bar\\\")}}]\\n \"]);\n\n _templateObject = function () {\n return data;\n };\n\n return data;\n }\n\n function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }\n\n // This simuates what the template hot-reloading would do in development mode\n // to avoid regressions\n (0, _internalTestHelpers.moduleFor)('Appliation test: template hot reloading',\n /*#__PURE__*/\n function (_ApplicationTestCase) {\n (0, _emberBabel.inheritsLoose)(_class, _ApplicationTestCase);\n\n function _class() {\n var _this;\n\n _this = _ApplicationTestCase.apply(this, arguments) || this;\n _this._APPLICATION_TEMPLATE_WRAPPER = _environment.ENV._APPLICATION_TEMPLATE_WRAPPER;\n _this._TEMPLATE_ONLY_GLIMMER_COMPONENTS = _environment.ENV._TEMPLATE_ONLY_GLIMMER_COMPONENTS;\n _environment.ENV._APPLICATION_TEMPLATE_WRAPPER = false;\n _environment.ENV._TEMPLATE_ONLY_GLIMMER_COMPONENTS = true;\n\n var didCreateReloader = function (reloader) {\n _this.reloader = reloader;\n };\n\n _this.add('service:reloader', _service.default.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n this.revisions = {};\n this.callbacks = [];\n didCreateReloader(this);\n },\n onReload: function (callback) {\n this.callbacks.push(callback);\n },\n revisionFor: function (name) {\n return this.revisions[name];\n },\n invalidate: function (name) {\n var revision = this.revisions[name];\n\n if (revision === undefined) {\n revision = 0;\n }\n\n this.revisions[name] = ++revision;\n this.callbacks.forEach(function (callback) {\n return callback();\n });\n }\n }));\n\n _this.add('helper:hot-reload', _glimmer.Helper.extend({\n reloader: (0, _service.inject)(),\n init: function () {\n var _this2 = this;\n\n this._super.apply(this, arguments);\n\n this.reloader.onReload(function () {\n return _this2.recompute();\n });\n },\n compute: function (_ref) {\n var name = _ref[0];\n var revision = this.reloader.revisionFor(name);\n\n if (revision === undefined) {\n return name;\n } else {\n return name + \"--hot-reload-\" + revision;\n }\n }\n }));\n\n return _this;\n }\n\n var _proto = _class.prototype;\n\n _proto.teardown = function teardown() {\n _ApplicationTestCase.prototype.teardown.call(this);\n\n _environment.ENV._APPLICATION_TEMPLATE_WRAPPER = this._APPLICATION_TEMPLATE_WRAPPER;\n _environment.ENV._TEMPLATE_ONLY_GLIMMER_COMPONENTS = this._TEMPLATE_ONLY_GLIMMER_COMPONENTS;\n };\n\n _proto.hotReload = function hotReload(name, template) {\n var reloader = (0, _util.expect)(this.reloader);\n var revision = (reloader.revisionFor(name) || 0) + 1;\n var ComponentClass = this.applicationInstance.resolveRegistration(\"component:\" + name) || null;\n this.addComponent(name + \"--hot-reload-\" + revision, {\n ComponentClass: ComponentClass,\n template: template\n });\n reloader.invalidate(name);\n };\n\n _proto['@test hot reloading template-only components'] = function testHotReloadingTemplateOnlyComponents() {\n var _this3 = this;\n\n this.addTemplate('application', (0, _internalTestHelpers.strip)(_templateObject()));\n this.addComponent('x-foo', {\n ComponentClass: null,\n template: 'x-foo: {{@name}}'\n });\n this.addComponent('x-bar', {\n ComponentClass: null,\n template: 'x-bar'\n });\n return this.visit('/').then(function () {\n _this3.assertInnerHTML((0, _internalTestHelpers.strip)(_templateObject2()));\n\n (0, _internalTestHelpers.runTask)(function () {\n _this3.hotReload('x-foo', '

{{@name}}

');\n });\n\n _this3.assertInnerHTML((0, _internalTestHelpers.strip)(_templateObject3()));\n\n (0, _internalTestHelpers.runTask)(function () {\n _this3.hotReload('x-bar', '

wow

');\n });\n\n _this3.assertInnerHTML((0, _internalTestHelpers.strip)(_templateObject4()));\n\n (0, _internalTestHelpers.runTask)(function () {\n _this3.hotReload('x-foo', 'x-foo {{@name}}');\n });\n\n _this3.assertInnerHTML((0, _internalTestHelpers.strip)(_templateObject5()));\n\n (0, _internalTestHelpers.runTask)(function () {\n _this3.hotReload('x-foo', 'x-foo: {{@name}}');\n\n _this3.hotReload('x-bar', 'x-bar');\n });\n\n _this3.assertInnerHTML((0, _internalTestHelpers.strip)(_templateObject6()));\n });\n };\n\n _proto['@test hot reloading class-based components'] = function testHotReloadingClassBasedComponents() {\n var _this4 = this;\n\n this.addTemplate('application', (0, _internalTestHelpers.strip)(_templateObject7()));\n var id = 0;\n this.addComponent('x-foo', {\n ComponentClass: _glimmer.Component.extend({\n tagName: '',\n init: function () {\n this._super.apply(this, arguments);\n\n this.set('id', id++);\n }\n }),\n template: 'x-foo: {{@name}} ({{this.id}})'\n });\n this.addComponent('x-bar', {\n ComponentClass: _glimmer.Component.extend({\n tagName: '',\n init: function () {\n this._super.apply(this, arguments);\n\n this.set('id', id++);\n }\n }),\n template: 'x-bar ({{this.id}})'\n });\n return this.visit('/').then(function () {\n _this4.assertInnerHTML((0, _internalTestHelpers.strip)(_templateObject8()));\n\n (0, _internalTestHelpers.runTask)(function () {\n _this4.hotReload('x-foo', '

{{@name}} ({{this.id}})

');\n });\n\n _this4.assertInnerHTML((0, _internalTestHelpers.strip)(_templateObject9()));\n\n (0, _internalTestHelpers.runTask)(function () {\n _this4.hotReload('x-bar', '

wow ({{this.id}})

');\n });\n\n _this4.assertInnerHTML((0, _internalTestHelpers.strip)(_templateObject10()));\n\n (0, _internalTestHelpers.runTask)(function () {\n _this4.hotReload('x-foo', 'x-foo {{@name}} ({{this.id}})');\n });\n\n _this4.assertInnerHTML((0, _internalTestHelpers.strip)(_templateObject11()));\n\n (0, _internalTestHelpers.runTask)(function () {\n _this4.hotReload('x-foo', 'x-foo: {{@name}} ({{this.id}})');\n\n _this4.hotReload('x-bar', 'x-bar ({{this.id}})');\n });\n\n _this4.assertInnerHTML((0, _internalTestHelpers.strip)(_templateObject12()));\n });\n };\n\n return _class;\n }(_internalTestHelpers.ApplicationTestCase));\n});","enifed(\"@ember/-internals/glimmer/tests/integration/application/rendering-test\", [\"ember-babel\", \"internal-test-helpers\", \"@ember/-internals/environment\", \"@ember/controller\", \"@ember/-internals/routing\", \"@ember/-internals/glimmer\"], function (_emberBabel, _internalTestHelpers, _environment, _controller, _routing, _glimmer) {\n \"use strict\";\n\n function _templateObject12() {\n const data = _taggedTemplateLiteralLoose([\"\\n \\n
\\n \\n
\\n \"]);\n\n _templateObject12 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject11() {\n const data = _taggedTemplateLiteralLoose([\"\\n \\n \"]);\n\n _templateObject11 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject10() {\n const data = _taggedTemplateLiteralLoose([\"\\n Ember\\n \"]);\n\n _templateObject10 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject9() {\n const data = _taggedTemplateLiteralLoose([\"\\n \\n
{{outlet}}
\\n \"]);\n\n _templateObject9 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject8() {\n const data = _taggedTemplateLiteralLoose([\"\\n \\n
\\n \\n
\\n \"]);\n\n _templateObject8 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject7() {\n const data = _taggedTemplateLiteralLoose([\"\\n \\n \"]);\n\n _templateObject7 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject6() {\n const data = _taggedTemplateLiteralLoose([\"\\n Ember\\n \"]);\n\n _templateObject6 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject5() {\n const data = _taggedTemplateLiteralLoose([\"\\n \\n
{{outlet}}
\\n \"]);\n\n _templateObject5 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject4() {\n const data = _taggedTemplateLiteralLoose([\"\\n \\n \"]);\n\n _templateObject4 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject3() {\n const data = _taggedTemplateLiteralLoose([\"\\n \\n \"]);\n\n _templateObject3 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject2() {\n const data = _taggedTemplateLiteralLoose([\"\\n \\n \"]);\n\n _templateObject2 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject() {\n const data = _taggedTemplateLiteralLoose([\"\\n \\n \"]);\n\n _templateObject = function () {\n return data;\n };\n\n return data;\n }\n\n function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }\n\n (0, _internalTestHelpers.moduleFor)('Application test: rendering',\n /*#__PURE__*/\n function (_ApplicationTestCase) {\n (0, _emberBabel.inheritsLoose)(_class, _ApplicationTestCase);\n\n function _class() {\n var _this;\n\n _this = _ApplicationTestCase.apply(this, arguments) || this;\n _this._APPLICATION_TEMPLATE_WRAPPER = _environment.ENV._APPLICATION_TEMPLATE_WRAPPER;\n return _this;\n }\n\n var _proto = _class.prototype;\n\n _proto.teardown = function teardown() {\n _ApplicationTestCase.prototype.teardown.call(this);\n\n _environment.ENV._APPLICATION_TEMPLATE_WRAPPER = this._APPLICATION_TEMPLATE_WRAPPER;\n };\n\n _proto['@test it can render the application template with a wrapper'] = function testItCanRenderTheApplicationTemplateWithAWrapper() {\n var _this2 = this;\n\n _environment.ENV._APPLICATION_TEMPLATE_WRAPPER = true;\n this.addTemplate('application', 'Hello world!');\n return this.visit('/').then(function () {\n _this2.assertComponentElement(_this2.element, {\n content: 'Hello world!'\n });\n });\n };\n\n _proto['@test it can render the application template without a wrapper'] = function testItCanRenderTheApplicationTemplateWithoutAWrapper() {\n var _this3 = this;\n\n _environment.ENV._APPLICATION_TEMPLATE_WRAPPER = false;\n this.addTemplate('application', 'Hello world!');\n return this.visit('/').then(function () {\n _this3.assertInnerHTML('Hello world!');\n });\n };\n\n _proto['@test it can access the model provided by the route'] = function testItCanAccessTheModelProvidedByTheRoute() {\n var _this4 = this;\n\n this.add('route:application', _routing.Route.extend({\n model: function () {\n return ['red', 'yellow', 'blue'];\n }\n }));\n this.addTemplate('application', (0, _internalTestHelpers.strip)(_templateObject()));\n return this.visit('/').then(function () {\n _this4.assertInnerHTML((0, _internalTestHelpers.strip)(_templateObject2()));\n });\n };\n\n _proto['@test it can render a nested route'] = function testItCanRenderANestedRoute() {\n var _this5 = this;\n\n this.router.map(function () {\n this.route('lists', function () {\n this.route('colors', function () {\n this.route('favorite');\n });\n });\n }); // The \"favorite\" route will inherit the model\n\n this.add('route:lists.colors', _routing.Route.extend({\n model: function () {\n return ['red', 'yellow', 'blue'];\n }\n }));\n this.addTemplate('lists.colors.favorite', (0, _internalTestHelpers.strip)(_templateObject3()));\n return this.visit('/lists/colors/favorite').then(function () {\n _this5.assertInnerHTML((0, _internalTestHelpers.strip)(_templateObject4()));\n });\n };\n\n _proto['@test it can render into named outlets'] = function testItCanRenderIntoNamedOutlets() {\n var _this6 = this;\n\n this.router.map(function () {\n this.route('colors');\n });\n this.addTemplate('application', (0, _internalTestHelpers.strip)(_templateObject5()));\n this.addTemplate('nav', (0, _internalTestHelpers.strip)(_templateObject6()));\n this.add('route:application', _routing.Route.extend({\n renderTemplate: function () {\n this.render();\n this.render('nav', {\n into: 'application',\n outlet: 'nav'\n });\n }\n }));\n this.add('route:colors', _routing.Route.extend({\n model: function () {\n return ['red', 'yellow', 'blue'];\n }\n }));\n this.addTemplate('colors', (0, _internalTestHelpers.strip)(_templateObject7()));\n return this.visit('/colors').then(function () {\n _this6.assertInnerHTML((0, _internalTestHelpers.strip)(_templateObject8()));\n });\n };\n\n _proto['@test it can render into named outlets'] = function testItCanRenderIntoNamedOutlets() {\n var _this7 = this;\n\n this.router.map(function () {\n this.route('colors');\n });\n this.addTemplate('application', (0, _internalTestHelpers.strip)(_templateObject9()));\n this.addTemplate('nav', (0, _internalTestHelpers.strip)(_templateObject10()));\n this.add('route:application', _routing.Route.extend({\n renderTemplate: function () {\n this.render();\n this.render('nav', {\n into: 'application',\n outlet: 'nav'\n });\n }\n }));\n this.add('route:colors', _routing.Route.extend({\n model: function () {\n return ['red', 'yellow', 'blue'];\n }\n }));\n this.addTemplate('colors', (0, _internalTestHelpers.strip)(_templateObject11()));\n return this.visit('/colors').then(function () {\n _this7.assertInnerHTML((0, _internalTestHelpers.strip)(_templateObject12()));\n });\n };\n\n _proto['@test it should update the outlets when switching between routes'] = function testItShouldUpdateTheOutletsWhenSwitchingBetweenRoutes() {\n var _this8 = this;\n\n this.router.map(function () {\n this.route('a');\n this.route('b', function () {\n this.route('c');\n this.route('d');\n });\n });\n this.addTemplate('a', 'A{{outlet}}');\n this.addTemplate('b', 'B{{outlet}}');\n this.addTemplate('b.c', 'C');\n this.addTemplate('b.d', 'D');\n return this.visit('/b/c').then(function () {\n // this.assertComponentElement(this.firstChild, { content: 'BC' });\n _this8.assertText('BC');\n\n return _this8.visit('/a');\n }).then(function () {\n // this.assertComponentElement(this.firstChild, { content: 'A' });\n _this8.assertText('A');\n\n return _this8.visit('/b/d');\n }).then(function () {\n _this8.assertText('BD'); // this.assertComponentElement(this.firstChild, { content: 'BD' });\n\n });\n };\n\n _proto['@test it should produce a stable DOM when the model changes'] = function testItShouldProduceAStableDOMWhenTheModelChanges() {\n var _this9 = this;\n\n this.router.map(function () {\n this.route('color', {\n path: '/colors/:color'\n });\n });\n this.add('route:color', _routing.Route.extend({\n model: function (params) {\n return params.color;\n }\n }));\n this.addTemplate('color', 'color: {{model}}');\n return this.visit('/colors/red').then(function () {\n _this9.assertInnerHTML('color: red');\n\n _this9.takeSnapshot();\n\n return _this9.visit('/colors/green');\n }).then(function () {\n _this9.assertInnerHTML('color: green');\n\n _this9.assertInvariants();\n });\n };\n\n _proto['@test it should have the right controller in scope for the route template'] = function testItShouldHaveTheRightControllerInScopeForTheRouteTemplate() {\n var _this10 = this;\n\n this.router.map(function () {\n this.route('a');\n this.route('b');\n });\n this.add('controller:a', _controller.default.extend({\n value: 'a'\n }));\n this.add('controller:b', _controller.default.extend({\n value: 'b'\n }));\n this.addTemplate('a', '{{value}}');\n this.addTemplate('b', '{{value}}');\n return this.visit('/a').then(function () {\n _this10.assertText('a');\n\n return _this10.visit('/b');\n }).then(function () {\n return _this10.assertText('b');\n });\n };\n\n _proto['@test it should update correctly when the controller changes'] = function testItShouldUpdateCorrectlyWhenTheControllerChanges() {\n var _this11 = this;\n\n this.router.map(function () {\n this.route('color', {\n path: '/colors/:color'\n });\n });\n this.add('route:color', _routing.Route.extend({\n model: function (params) {\n return {\n color: params.color\n };\n },\n renderTemplate: function (controller, model) {\n this.render({\n controller: model.color,\n model: model\n });\n }\n }));\n this.add('controller:red', _controller.default.extend({\n color: 'red'\n }));\n this.add('controller:green', _controller.default.extend({\n color: 'green'\n }));\n this.addTemplate('color', 'model color: {{model.color}}, controller color: {{color}}');\n return this.visit('/colors/red').then(function () {\n _this11.assertInnerHTML('model color: red, controller color: red');\n\n return _this11.visit('/colors/green');\n }).then(function () {\n _this11.assertInnerHTML('model color: green, controller color: green');\n });\n };\n\n _proto['@test it should produce a stable DOM when two routes render the same template'] = function testItShouldProduceAStableDOMWhenTwoRoutesRenderTheSameTemplate() {\n var _this12 = this;\n\n this.router.map(function () {\n this.route('a');\n this.route('b');\n });\n this.add('route:a', _routing.Route.extend({\n model: function () {\n return 'A';\n },\n renderTemplate: function (controller, model) {\n this.render('common', {\n controller: 'common',\n model: model\n });\n }\n }));\n this.add('route:b', _routing.Route.extend({\n model: function () {\n return 'B';\n },\n renderTemplate: function (controller, model) {\n this.render('common', {\n controller: 'common',\n model: model\n });\n }\n }));\n this.add('controller:common', _controller.default.extend({\n prefix: 'common'\n }));\n this.addTemplate('common', '{{prefix}} {{model}}');\n return this.visit('/a').then(function () {\n _this12.assertInnerHTML('common A');\n\n _this12.takeSnapshot();\n\n return _this12.visit('/b');\n }).then(function () {\n _this12.assertInnerHTML('common B');\n\n _this12.assertInvariants();\n });\n } // Regression test, glimmer child outlets tried to assume the first element.\n // but the if put-args clobbered the args used by did-create-element.\n // I wish there was a way to assert that the OutletComponentManager did not\n // receive a didCreateElement.\n ;\n\n _proto['@test a child outlet is always a fragment'] = function testAChildOutletIsAlwaysAFragment() {\n var _this13 = this;\n\n this.addTemplate('application', '{{outlet}}');\n this.addTemplate('index', '{{#if true}}1{{/if}}
2
');\n return this.visit('/').then(function () {\n _this13.assertInnerHTML('1
2
');\n });\n };\n\n _proto['@test it allows a transition during route activate'] = function testItAllowsATransitionDuringRouteActivate() {\n var _this14 = this;\n\n this.router.map(function () {\n this.route('a');\n });\n this.add('route:index', _routing.Route.extend({\n activate: function () {\n this.transitionTo('a');\n }\n }));\n this.addTemplate('a', 'Hello from A!');\n return this.visit('/').then(function () {\n _this14.assertInnerHTML('Hello from A!');\n });\n };\n\n _proto['@test it emits a useful backtracking re-render assertion message'] = function testItEmitsAUsefulBacktrackingReRenderAssertionMessage() {\n var _this15 = this;\n\n this.router.map(function () {\n this.route('routeWithError');\n });\n this.add('route:routeWithError', _routing.Route.extend({\n model: function () {\n return {\n name: 'Alex'\n };\n }\n }));\n this.addTemplate('routeWithError', 'Hi {{model.name}} {{x-foo person=model}}');\n this.addComponent('x-foo', {\n ComponentClass: _glimmer.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n this.set('person.name', 'Ben');\n }\n }),\n template: 'Hi {{person.name}} from component'\n });\n var expectedBacktrackingMessage = /modified \"model\\.name\" twice on \\[object Object\\] in a single render\\. It was rendered in \"template:my-app\\/templates\\/routeWithError.hbs\" and modified in \"component:x-foo\"/;\n return this.visit('/').then(function () {\n expectAssertion(function () {\n _this15.visit('/routeWithError');\n }, expectedBacktrackingMessage);\n });\n };\n\n _proto['@test route templates with {{{undefined}}} [GH#14924] [GH#16172]'] = function testRouteTemplatesWithUndefinedGH14924GH16172() {\n var _this16 = this;\n\n this.router.map(function () {\n this.route('first');\n this.route('second');\n });\n this.addTemplate('first', 'first');\n this.addTemplate('second', '{{{undefined}}}second');\n return this.visit('/first').then(function () {\n _this16.assertText('first');\n\n return _this16.visit('/second');\n }).then(function () {\n _this16.assertText('second');\n\n return _this16.visit('/first');\n }).then(function () {\n _this16.assertText('first');\n });\n };\n\n return _class;\n }(_internalTestHelpers.ApplicationTestCase));\n});","enifed(\"@ember/-internals/glimmer/tests/integration/components/angle-bracket-invocation-test\", [\"ember-babel\", \"internal-test-helpers\", \"@ember/-internals/environment\", \"@ember/-internals/metal\", \"@ember/-internals/glimmer/tests/utils/helpers\"], function (_emberBabel, _internalTestHelpers, _environment, _metal, _helpers) {\n \"use strict\";\n\n function _templateObject9() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#let (component \\\"foo-bar/inner\\\") as |Inner|}}\\n {{yield}}\\n

Inside the let

\\n {{/let}}\\n

Outside the let

\\n \"]);\n\n _templateObject9 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject8() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#let (component 'x-outer') as |Thing|}}\\n Hello!\\n {{/let}}\\n \"]);\n\n _templateObject8 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject7() {\n const data = _taggedTemplateLiteralLoose([\"\\n \\n \"]);\n\n _templateObject7 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject6() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#if (has-block)}}\\n Yes\\n {{else}}\\n No\\n {{/if}}\"]);\n\n _templateObject6 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject5() {\n const data = _taggedTemplateLiteralLoose([\"{{test-harness foo=(hash bar=(component 'foo-bar'))}}\"]);\n\n _templateObject5 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject4() {\n const data = _taggedTemplateLiteralLoose([\"{{test-harness foo=(component 'foo-bar')}}\"]);\n\n _templateObject4 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject3() {\n const data = _taggedTemplateLiteralLoose([\"{{test-harness foo=(component 'foo-bar')}}\"]);\n\n _templateObject3 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject2() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#with (component 'foo-bar') as |Other|}}\\n \\n {{/with}}\\n \"]);\n\n _templateObject2 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject() {\n const data = _taggedTemplateLiteralLoose([\"\\n \\n \\n \\n \"]);\n\n _templateObject = function () {\n return data;\n };\n\n return data;\n }\n\n function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }\n\n (0, _internalTestHelpers.moduleFor)('AngleBracket Invocation',\n /*#__PURE__*/\n function (_RenderingTestCase) {\n (0, _emberBabel.inheritsLoose)(_class, _RenderingTestCase);\n\n function _class() {\n return _RenderingTestCase.apply(this, arguments) || this;\n }\n\n var _proto = _class.prototype;\n\n _proto['@test it can resolve to x-blah'] = function testItCanResolveXBlahToXBlah() {\n var _this = this;\n\n this.registerComponent('x-blah', {\n template: 'hello'\n });\n this.render('');\n this.assertComponentElement(this.firstChild, {\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello'\n });\n };\n\n _proto['@test it can resolve to x-blah'] = function testItCanResolveXBlahToXBlah() {\n var _this2 = this;\n\n this.registerComponent('x-blah', {\n template: 'hello'\n });\n this.render('');\n this.assertComponentElement(this.firstChild, {\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this2.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello'\n });\n };\n\n _proto['@test it can render a basic template only component'] = function testItCanRenderABasicTemplateOnlyComponent() {\n var _this3 = this;\n\n this.registerComponent('foo-bar', {\n template: 'hello'\n });\n this.render('');\n this.assertComponentElement(this.firstChild, {\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this3.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello'\n });\n };\n\n _proto['@test it can render a basic component with template and javascript'] = function testItCanRenderABasicComponentWithTemplateAndJavascript() {\n this.registerComponent('foo-bar', {\n template: 'FIZZ BAR {{local}}',\n ComponentClass: _helpers.Component.extend({\n local: 'hey'\n })\n });\n this.render('');\n this.assertComponentElement(this.firstChild, {\n content: 'FIZZ BAR hey'\n });\n };\n\n _proto['@test it can render a single word component name'] = function testItCanRenderASingleWordComponentName() {\n var _this4 = this;\n\n this.registerComponent('foo', {\n template: 'hello'\n });\n this.render('');\n this.assertComponentElement(this.firstChild, {\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this4.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello'\n });\n };\n\n _proto['@test it can not render a component name without initial capital letter'] = function testItCanNotRenderAComponentNameWithoutInitialCapitalLetter(assert) {\n this.registerComponent('div', {\n ComponentClass: _helpers.Component.extend({\n init: function () {\n assert.ok(false, 'should not have created component');\n }\n })\n });\n this.render('
');\n this.assertElement(this.firstChild, {\n tagName: 'div',\n content: ''\n });\n };\n\n _proto['@test it can have a custom id and it is not bound'] = function testItCanHaveACustomIdAndItIsNotBound() {\n var _this5 = this;\n\n this.registerComponent('foo-bar', {\n template: '{{id}} {{elementId}}'\n });\n this.render('', {\n customId: 'bizz'\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n id: 'bizz'\n },\n content: 'bizz bizz'\n });\n this.assertStableRerender();\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this5.context, 'customId', 'bar');\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n id: 'bizz'\n },\n content: 'bar bizz'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this5.context, 'customId', 'bizz');\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n id: 'bizz'\n },\n content: 'bizz bizz'\n });\n };\n\n _proto['@test it can have a custom id attribute and it is bound'] = function testItCanHaveACustomIdAttributeAndItIsBound() {\n var _this6 = this;\n\n this.registerComponent('foo-bar', {\n template: 'hello'\n });\n this.render('', {\n customId: 'bizz'\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n id: 'bizz'\n },\n content: 'hello'\n });\n this.assertStableRerender();\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this6.context, 'customId', 'bar');\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n id: 'bar'\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this6.context, 'customId', 'bizz');\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n id: 'bizz'\n },\n content: 'hello'\n });\n };\n\n _proto['@test it can have a custom tagName'] = function testItCanHaveACustomTagName() {\n var _this7 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n tagName: 'foo-bar'\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render('');\n this.assertComponentElement(this.firstChild, {\n tagName: 'foo-bar',\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this7.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'foo-bar',\n content: 'hello'\n });\n };\n\n _proto['@test it can have a custom tagName from the invocation'] = function testItCanHaveACustomTagNameFromTheInvocation() {\n var _this8 = this;\n\n this.registerComponent('foo-bar', {\n template: 'hello'\n });\n this.render('');\n this.assertComponentElement(this.firstChild, {\n tagName: 'foo-bar',\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this8.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'foo-bar',\n content: 'hello'\n });\n };\n\n _proto['@test it can have custom classNames'] = function testItCanHaveCustomClassNames() {\n var _this9 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n classNames: ['foo', 'bar']\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render('');\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo bar')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this9.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo bar')\n },\n content: 'hello'\n });\n };\n\n _proto['@test class property on components can be dynamic'] = function testClassPropertyOnComponentsCanBeDynamic() {\n var _this10 = this;\n\n this.registerComponent('foo-bar', {\n template: 'hello'\n });\n this.render('', {\n fooBar: true\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo-bar')\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this10.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo-bar')\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this10.context, 'fooBar', false);\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view')\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this10.context, 'fooBar', true);\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo-bar')\n }\n });\n };\n\n _proto['@test it can set custom classNames from the invocation'] = function testItCanSetCustomClassNamesFromTheInvocation() {\n var _this11 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n classNames: ['foo']\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject()));\n this.assertComponentElement(this.nthChild(0), {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo bar baz')\n },\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(1), {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo bar baz')\n },\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(2), {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this11.rerender();\n });\n this.assertComponentElement(this.nthChild(0), {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo bar baz')\n },\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(1), {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo bar baz')\n },\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(2), {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo')\n },\n content: 'hello'\n });\n };\n\n _proto['@test it has an element'] = function testItHasAnElement() {\n var _this12 = this;\n\n var instance;\n\n var FooBarComponent = _helpers.Component.extend({\n init: function () {\n this._super();\n\n instance = this;\n }\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render('');\n var element1 = instance.element;\n this.assertComponentElement(element1, {\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this12.rerender();\n });\n var element2 = instance.element;\n this.assertComponentElement(element2, {\n content: 'hello'\n });\n this.assertSameNode(element2, element1);\n };\n\n _proto['@test it has the right parentView and childViews'] = function testItHasTheRightParentViewAndChildViews(assert) {\n var _this13 = this;\n\n var fooBarInstance, fooBarBazInstance;\n\n var FooBarComponent = _helpers.Component.extend({\n init: function () {\n this._super();\n\n fooBarInstance = this;\n }\n });\n\n var FooBarBazComponent = _helpers.Component.extend({\n init: function () {\n this._super();\n\n fooBarBazInstance = this;\n }\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'foo-bar {{foo-bar-baz}}'\n });\n this.registerComponent('foo-bar-baz', {\n ComponentClass: FooBarBazComponent,\n template: 'foo-bar-baz'\n });\n this.render('');\n this.assertText('foo-bar foo-bar-baz');\n assert.equal(fooBarInstance.parentView, this.component);\n assert.equal(fooBarBazInstance.parentView, fooBarInstance);\n assert.deepEqual(this.component.childViews, [fooBarInstance]);\n assert.deepEqual(fooBarInstance.childViews, [fooBarBazInstance]);\n (0, _internalTestHelpers.runTask)(function () {\n return _this13.rerender();\n });\n this.assertText('foo-bar foo-bar-baz');\n assert.equal(fooBarInstance.parentView, this.component);\n assert.equal(fooBarBazInstance.parentView, fooBarInstance);\n assert.deepEqual(this.component.childViews, [fooBarInstance]);\n assert.deepEqual(fooBarInstance.childViews, [fooBarBazInstance]);\n };\n\n _proto['@test it renders passed named arguments'] = function testItRendersPassedNamedArguments() {\n var _this14 = this;\n\n this.registerComponent('foo-bar', {\n template: '{{@foo}}'\n });\n this.render('', {\n model: {\n bar: 'Hola'\n }\n });\n this.assertText('Hola');\n (0, _internalTestHelpers.runTask)(function () {\n return _this14.rerender();\n });\n this.assertText('Hola');\n (0, _internalTestHelpers.runTask)(function () {\n return _this14.context.set('model.bar', 'Hello');\n });\n this.assertText('Hello');\n (0, _internalTestHelpers.runTask)(function () {\n return _this14.context.set('model', {\n bar: 'Hola'\n });\n });\n this.assertText('Hola');\n };\n\n _proto['@test it reflects named arguments as properties'] = function testItReflectsNamedArgumentsAsProperties() {\n var _this15 = this;\n\n this.registerComponent('foo-bar', {\n template: '{{foo}}'\n });\n this.render('', {\n model: {\n bar: 'Hola'\n }\n });\n this.assertText('Hola');\n (0, _internalTestHelpers.runTask)(function () {\n return _this15.rerender();\n });\n this.assertText('Hola');\n (0, _internalTestHelpers.runTask)(function () {\n return _this15.context.set('model.bar', 'Hello');\n });\n this.assertText('Hello');\n (0, _internalTestHelpers.runTask)(function () {\n return _this15.context.set('model', {\n bar: 'Hola'\n });\n });\n this.assertText('Hola');\n };\n\n _proto['@test it can render a basic component with a block'] = function testItCanRenderABasicComponentWithABlock() {\n var _this16 = this;\n\n this.registerComponent('foo-bar', {\n template: '{{yield}} - In component'\n });\n this.render('hello');\n this.assertComponentElement(this.firstChild, {\n content: 'hello - In component'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this16.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello - In component'\n });\n };\n\n _proto['@test it can yield internal and external properties positionally'] = function testItCanYieldInternalAndExternalPropertiesPositionally() {\n var _this17 = this;\n\n var instance;\n\n var FooBarComponent = _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n instance = this;\n },\n greeting: 'hello'\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: '{{yield greeting greetee.firstName}}'\n });\n this.render('{{name}} {{person.lastName}}, {{greeting}}', {\n person: {\n firstName: 'Joel',\n lastName: 'Kang'\n }\n });\n this.assertComponentElement(this.firstChild, {\n content: 'Joel Kang, hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this17.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n content: 'Joel Kang, hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this17.context, 'person', {\n firstName: 'Dora',\n lastName: 'the Explorer'\n });\n });\n this.assertComponentElement(this.firstChild, {\n content: 'Dora the Explorer, hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(instance, 'greeting', 'hola');\n });\n this.assertComponentElement(this.firstChild, {\n content: 'Dora the Explorer, hola'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(instance, 'greeting', 'hello');\n (0, _metal.set)(_this17.context, 'person', {\n firstName: 'Joel',\n lastName: 'Kang'\n });\n });\n this.assertComponentElement(this.firstChild, {\n content: 'Joel Kang, hello'\n });\n };\n\n _proto['@test positional parameters are not allowed'] = function testPositionalParametersAreNotAllowed() {\n this.registerComponent('sample-component', {\n ComponentClass: _helpers.Component.extend().reopenClass({\n positionalParams: ['first', 'second']\n }),\n template: '{{first}}{{second}}'\n }); // this is somewhat silly as the browser \"corrects\" for these as\n // attribute names, but regardless the thing we care about here is that\n // they are **not** used as positional params\n\n this.render('');\n this.assertText('');\n };\n\n _proto['@test can invoke curried components with capitalized block param names'] = function testCanInvokeCurriedComponentsWithCapitalizedBlockParamNames() {\n var _this18 = this;\n\n this.registerComponent('foo-bar', {\n template: 'hello'\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject2()));\n this.assertComponentElement(this.firstChild, {\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this18.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello'\n });\n this.assertStableRerender();\n };\n\n _proto['@test can invoke curried components with named args'] = function testCanInvokeCurriedComponentsWithNamedArgs() {\n var _this19 = this;\n\n this.registerComponent('foo-bar', {\n template: 'hello'\n });\n this.registerComponent('test-harness', {\n template: '<@foo />'\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject3()));\n this.assertComponentElement(this.firstChild.firstChild, {\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this19.rerender();\n });\n this.assertComponentElement(this.firstChild.firstChild, {\n content: 'hello'\n });\n this.assertStableRerender();\n };\n\n _proto['@test can invoke curried components with a path'] = function testCanInvokeCurriedComponentsWithAPath() {\n var _this20 = this;\n\n this.registerComponent('foo-bar', {\n template: 'hello'\n });\n this.registerComponent('test-harness', {\n template: ''\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject4()));\n this.assertComponentElement(this.firstChild.firstChild, {\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this20.rerender();\n });\n this.assertComponentElement(this.firstChild.firstChild, {\n content: 'hello'\n });\n this.assertStableRerender();\n };\n\n _proto['@test can not invoke curried components with an implicit `this` path'] = function testCanNotInvokeCurriedComponentsWithAnImplicitThisPath(assert) {\n assert.expect(0);\n this.registerComponent('foo-bar', {\n template: 'hello',\n ComponentClass: _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n assert.ok(false, 'should not have instantiated');\n }\n })\n });\n this.registerComponent('test-harness', {\n template: ''\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject5()));\n };\n\n _proto['@test has-block'] = function testHasBlock() {\n this.registerComponent('check-block', {\n template: (0, _internalTestHelpers.strip)(_templateObject6())\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject7()));\n this.assertComponentElement(this.firstChild, {\n content: 'No'\n });\n this.assertComponentElement(this.nthChild(1), {\n content: 'Yes'\n });\n this.assertStableRerender();\n };\n\n _proto['@test includes invocation specified attributes in root element (\"splattributes\")'] = function testIncludesInvocationSpecifiedAttributesInRootElementSplattributes() {\n var _this21 = this;\n\n this.registerComponent('foo-bar', {\n ComponentClass: _helpers.Component.extend(),\n template: 'hello'\n });\n this.render('', {\n foo: 'foo',\n bar: 'bar'\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n 'data-foo': 'foo',\n 'data-bar': 'bar'\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this21.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n 'data-foo': 'foo',\n 'data-bar': 'bar'\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this21.context, 'foo', 'FOO');\n (0, _metal.set)(_this21.context, 'bar', undefined);\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n 'data-foo': 'FOO'\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this21.context, 'foo', 'foo');\n (0, _metal.set)(_this21.context, 'bar', 'bar');\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n 'data-foo': 'foo',\n 'data-bar': 'bar'\n },\n content: 'hello'\n });\n };\n\n _proto['@test attributes without values passed at invocation are included in `...attributes` (\"splattributes\")'] = function testAttributesWithoutValuesPassedAtInvocationAreIncludedInAttributesSplattributes() {\n this.registerComponent('foo-bar', {\n ComponentClass: _helpers.Component.extend({\n tagName: ''\n }),\n template: '
hello
'\n });\n this.render('');\n this.assertElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n 'data-bar': ''\n },\n content: 'hello'\n });\n this.assertStableRerender();\n };\n\n _proto['@test attributes without values at definition are included in `...attributes` (\"splattributes\")'] = function testAttributesWithoutValuesAtDefinitionAreIncludedInAttributesSplattributes() {\n this.registerComponent('foo-bar', {\n ComponentClass: _helpers.Component.extend({\n tagName: ''\n }),\n template: '
hello
'\n });\n this.render('');\n this.assertElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n 'data-bar': ''\n },\n content: 'hello'\n });\n this.assertStableRerender();\n };\n\n _proto['@test includes invocation specified attributes in `...attributes` slot in tagless component (\"splattributes\")'] = function testIncludesInvocationSpecifiedAttributesInAttributesSlotInTaglessComponentSplattributes() {\n var _this22 = this;\n\n this.registerComponent('foo-bar', {\n ComponentClass: _helpers.Component.extend({\n tagName: ''\n }),\n template: '
hello
'\n });\n this.render('', {\n foo: 'foo',\n bar: 'bar'\n });\n this.assertElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n 'data-foo': 'foo',\n 'data-bar': 'bar'\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this22.rerender();\n });\n this.assertElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n 'data-foo': 'foo',\n 'data-bar': 'bar'\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this22.context, 'foo', 'FOO');\n (0, _metal.set)(_this22.context, 'bar', undefined);\n });\n this.assertElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n 'data-foo': 'FOO'\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this22.context, 'foo', 'foo');\n (0, _metal.set)(_this22.context, 'bar', 'bar');\n });\n this.assertElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n 'data-foo': 'foo',\n 'data-bar': 'bar'\n },\n content: 'hello'\n });\n };\n\n _proto['@test merges attributes with `...attributes` in tagless component (\"splattributes\")'] = function testMergesAttributesWithAttributesInTaglessComponentSplattributes() {\n var _this23 = this;\n\n var instance;\n this.registerComponent('foo-bar', {\n ComponentClass: _helpers.Component.extend({\n tagName: '',\n init: function () {\n instance = this;\n\n this._super.apply(this, arguments);\n\n this.localProp = 'qux';\n }\n }),\n template: '
hello
'\n });\n this.render('', {\n foo: 'foo',\n bar: 'bar'\n });\n this.assertElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n 'data-derp': 'qux',\n 'data-foo': 'foo',\n 'data-bar': 'bar'\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this23.rerender();\n });\n this.assertElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n 'data-derp': 'qux',\n 'data-foo': 'foo',\n 'data-bar': 'bar'\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this23.context, 'foo', 'FOO');\n (0, _metal.set)(_this23.context, 'bar', undefined);\n (0, _metal.set)(instance, 'localProp', 'QUZ');\n });\n this.assertElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n 'data-derp': 'QUZ',\n 'data-foo': 'FOO'\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this23.context, 'foo', 'foo');\n (0, _metal.set)(_this23.context, 'bar', 'bar');\n (0, _metal.set)(instance, 'localProp', 'qux');\n });\n this.assertElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n 'data-derp': 'qux',\n 'data-foo': 'foo',\n 'data-bar': 'bar'\n },\n content: 'hello'\n });\n };\n\n _proto['@test merges class attribute with `...attributes` in tagless component (\"splattributes\")'] = function testMergesClassAttributeWithAttributesInTaglessComponentSplattributes() {\n var _this24 = this;\n\n var instance;\n this.registerComponent('foo-bar', {\n ComponentClass: _helpers.Component.extend({\n tagName: '',\n init: function () {\n instance = this;\n\n this._super.apply(this, arguments);\n\n this.localProp = 'qux';\n }\n }),\n template: '
hello
'\n });\n this.render('', {\n bar: 'bar'\n });\n this.assertElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('qux bar')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this24.rerender();\n });\n this.assertElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('qux bar')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this24.context, 'bar', undefined);\n (0, _metal.set)(instance, 'localProp', 'QUZ');\n });\n this.assertElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('QUZ')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this24.context, 'bar', 'bar');\n (0, _metal.set)(instance, 'localProp', 'qux');\n });\n this.assertElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('qux bar')\n },\n content: 'hello'\n });\n };\n\n _proto['@test merges trailing class attribute with `...attributes` in tagless component (\"splattributes\")'] = function testMergesTrailingClassAttributeWithAttributesInTaglessComponentSplattributes() {\n var _this25 = this;\n\n var instance;\n this.registerComponent('foo-bar', {\n ComponentClass: _helpers.Component.extend({\n tagName: '',\n init: function () {\n instance = this;\n\n this._super.apply(this, arguments);\n\n this.localProp = 'qux';\n }\n }),\n template: '
hello
'\n });\n this.render('', {\n bar: 'bar'\n });\n this.assertElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('bar qux')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this25.rerender();\n });\n this.assertElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('bar qux')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this25.context, 'bar', undefined);\n (0, _metal.set)(instance, 'localProp', 'QUZ');\n });\n this.assertElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('QUZ')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this25.context, 'bar', 'bar');\n (0, _metal.set)(instance, 'localProp', 'qux');\n });\n this.assertElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('bar qux')\n },\n content: 'hello'\n });\n };\n\n _proto['@test merges class attribute with `...attributes` in yielded contextual component (\"splattributes\")'] = function testMergesClassAttributeWithAttributesInYieldedContextualComponentSplattributes() {\n this.registerComponent('foo-bar', {\n ComponentClass: _helpers.Component.extend({\n tagName: ''\n }),\n template: '{{yield (hash baz=(component \"foo-bar/baz\"))}}'\n });\n this.registerComponent('foo-bar/baz', {\n ComponentClass: _helpers.Component.extend({\n tagName: ''\n }),\n template: '
hello
'\n });\n this.render('');\n this.assertElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('default-class custom-class'),\n title: 'foo'\n },\n content: 'hello'\n });\n };\n\n _proto['@test merges trailing class attribute with `...attributes` in yielded contextual component (\"splattributes\")'] = function testMergesTrailingClassAttributeWithAttributesInYieldedContextualComponentSplattributes() {\n this.registerComponent('foo-bar', {\n ComponentClass: _helpers.Component.extend({\n tagName: ''\n }),\n template: '{{yield (hash baz=(component \"foo-bar/baz\"))}}'\n });\n this.registerComponent('foo-bar/baz', {\n ComponentClass: _helpers.Component.extend({\n tagName: ''\n }),\n template: '
hello
'\n });\n this.render('');\n this.assertElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('custom-class default-class'),\n title: 'foo'\n },\n content: 'hello'\n });\n };\n\n _proto['@test the attributes passed on invocation trump over the default ones on elements with `...attributes` in yielded contextual component (\"splattributes\")'] = function testTheAttributesPassedOnInvocationTrumpOverTheDefaultOnesOnElementsWithAttributesInYieldedContextualComponentSplattributes() {\n this.registerComponent('foo-bar', {\n ComponentClass: _helpers.Component.extend({\n tagName: ''\n }),\n template: '{{yield (hash baz=(component \"foo-bar/baz\"))}}'\n });\n this.registerComponent('foo-bar/baz', {\n ComponentClass: _helpers.Component.extend({\n tagName: ''\n }),\n template: '
hello
'\n });\n this.render('');\n this.assertElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n title: 'foo'\n },\n content: 'hello'\n });\n };\n\n _proto['@test can forward ...attributes to dynamic component invocation (\"splattributes\")'] = function testCanForwardAttributesToDynamicComponentInvocationSplattributes() {\n this.registerComponent('x-outer', {\n ComponentClass: _helpers.Component.extend({\n tagName: ''\n }),\n template: '{{yield}}'\n });\n this.registerComponent('x-inner', {\n ComponentClass: _helpers.Component.extend({\n tagName: ''\n }),\n template: '
{{yield}}
'\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject8()));\n this.assertElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n 'data-foo': ''\n },\n content: 'Hello!'\n });\n };\n\n _proto['@test an inner angle invocation can forward ...attributes through dynamic component invocation (\"splattributes\")'] = function testAnInnerAngleInvocationCanForwardAttributesThroughDynamicComponentInvocationSplattributes() {\n this.registerComponent('x-outer', {\n ComponentClass: _helpers.Component.extend({\n tagName: ''\n }),\n template: \"{{#let (component 'x-inner') as |Thing|}}{{yield}}{{/let}}\"\n });\n this.registerComponent('x-inner', {\n ComponentClass: _helpers.Component.extend({\n tagName: ''\n }),\n template: '
{{yield}}
'\n });\n this.render('Hello!');\n this.assertElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n 'data-foo': ''\n },\n content: 'Hello!'\n });\n };\n\n _proto['@test an inner angle invocation can forward ...attributes through static component invocation (\"splattributes\")'] = function testAnInnerAngleInvocationCanForwardAttributesThroughStaticComponentInvocationSplattributes() {\n this.registerComponent('x-outer', {\n ComponentClass: _helpers.Component.extend({\n tagName: ''\n }),\n template: \"{{yield}}\"\n });\n this.registerComponent('x-inner', {\n ComponentClass: _helpers.Component.extend({\n tagName: ''\n }),\n template: '
{{yield}}
'\n });\n this.render('Hello!');\n this.assertElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n 'data-foo': ''\n },\n content: 'Hello!'\n });\n };\n\n _proto['@test can include `...attributes` in multiple elements in tagless component (\"splattributes\")'] = function testCanIncludeAttributesInMultipleElementsInTaglessComponentSplattributes() {\n var _this26 = this;\n\n this.registerComponent('foo-bar', {\n ComponentClass: _helpers.Component.extend({\n tagName: ''\n }),\n template: '
hello

world

'\n });\n this.render('', {\n foo: 'foo',\n bar: 'bar'\n });\n this.assertElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n 'data-foo': 'foo',\n 'data-bar': 'bar'\n },\n content: 'hello'\n });\n this.assertElement(this.nthChild(1), {\n tagName: 'p',\n attrs: {\n 'data-foo': 'foo',\n 'data-bar': 'bar'\n },\n content: 'world'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this26.rerender();\n });\n this.assertElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n 'data-foo': 'foo',\n 'data-bar': 'bar'\n },\n content: 'hello'\n });\n this.assertElement(this.nthChild(1), {\n tagName: 'p',\n attrs: {\n 'data-foo': 'foo',\n 'data-bar': 'bar'\n },\n content: 'world'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this26.context, 'foo', 'FOO');\n (0, _metal.set)(_this26.context, 'bar', undefined);\n });\n this.assertElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n 'data-foo': 'FOO'\n },\n content: 'hello'\n });\n this.assertElement(this.nthChild(1), {\n tagName: 'p',\n attrs: {\n 'data-foo': 'FOO'\n },\n content: 'world'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this26.context, 'foo', 'foo');\n (0, _metal.set)(_this26.context, 'bar', 'bar');\n });\n this.assertElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n 'data-foo': 'foo',\n 'data-bar': 'bar'\n },\n content: 'hello'\n });\n this.assertElement(this.nthChild(1), {\n tagName: 'p',\n attrs: {\n 'data-foo': 'foo',\n 'data-bar': 'bar'\n },\n content: 'world'\n });\n };\n\n _proto['@test can yield content to contextual components invoked with angle-bracket components that receives splattributes'] = function testCanYieldContentToContextualComponentsInvokedWithAngleBracketComponentsThatReceivesSplattributes() {\n this.registerComponent('foo-bar/inner', {\n ComponentClass: _helpers.Component.extend({\n tagName: ''\n }),\n template: '

{{yield}}

'\n });\n this.registerComponent('foo-bar', {\n ComponentClass: _helpers.Component.extend({\n tagName: ''\n }),\n // If doesn't receive splattributes this test passes\n template: (0, _internalTestHelpers.strip)(_templateObject9())\n });\n this.render('Yielded content');\n this.assertElement(this.firstChild, {\n tagName: 'h1',\n attrs: {},\n content: 'Yielded content'\n });\n this.assertElement(this.nthChild(1), {\n tagName: 'h2',\n attrs: {},\n content: 'Inside the let'\n });\n this.assertElement(this.nthChild(2), {\n tagName: 'h3',\n attrs: {},\n content: 'Outside the let'\n });\n };\n\n return _class;\n }(_internalTestHelpers.RenderingTestCase));\n (0, _internalTestHelpers.moduleFor)('AngleBracket Invocation (splattributes)',\n /*#__PURE__*/\n function (_RenderingTestCase2) {\n (0, _emberBabel.inheritsLoose)(_class2, _RenderingTestCase2);\n\n function _class2() {\n var _this27;\n\n _this27 = _RenderingTestCase2.apply(this, arguments) || this;\n _this27._TEMPLATE_ONLY_GLIMMER_COMPONENTS = _environment.ENV._TEMPLATE_ONLY_GLIMMER_COMPONENTS;\n _environment.ENV._TEMPLATE_ONLY_GLIMMER_COMPONENTS = true;\n return _this27;\n }\n\n var _proto2 = _class2.prototype;\n\n _proto2.teardown = function teardown() {\n _RenderingTestCase2.prototype.teardown.call(this);\n\n _environment.ENV._TEMPLATE_ONLY_GLIMMER_COMPONENTS = this._TEMPLATE_ONLY_GLIMMER_COMPONENTS;\n };\n\n _proto2.registerComponent = function registerComponent(name, template) {\n _RenderingTestCase2.prototype.registerComponent.call(this, name, {\n template: template,\n ComponentClass: null\n });\n };\n\n _proto2['@test angle bracket invocation can pass merge ...attributes'] = function testAngleBracketInvocationCanPassMergeAttributes() {\n this.registerComponent('qux', '
');\n this.registerComponent('bar', '');\n this.registerComponent('foo', '');\n this.render('');\n this.assertHTML(\"\");\n };\n\n _proto2['@test angle bracket invocation can allow invocation side to override attributes with ...attributes'] = function testAngleBracketInvocationCanAllowInvocationSideToOverrideAttributesWithAttributes() {\n this.registerComponent('qux', '
');\n this.registerComponent('bar', '');\n this.registerComponent('foo', '');\n this.render('');\n this.assertHTML('
');\n };\n\n _proto2['@test angle bracket invocation can override invocation side attributes with ...attributes'] = function testAngleBracketInvocationCanOverrideInvocationSideAttributesWithAttributes() {\n this.registerComponent('qux', '
');\n this.registerComponent('bar', '');\n this.registerComponent('foo', '');\n this.render('');\n this.assertHTML('
');\n };\n\n _proto2['@test angle bracket invocation can forward classes before ...attributes to a nested component'] = function testAngleBracketInvocationCanForwardClassesBeforeAttributesToANestedComponent() {\n this.registerComponent('qux', '
');\n this.registerComponent('bar', '');\n this.registerComponent('foo', '');\n this.render('');\n this.assertHTML('
');\n };\n\n _proto2['@test angle bracket invocation can forward classes after ...attributes to a nested component'] = function testAngleBracketInvocationCanForwardClassesAfterAttributesToANestedComponent() {\n this.registerComponent('qux', '
');\n this.registerComponent('bar', '');\n this.registerComponent('foo', '');\n this.render('');\n this.assertHTML('
');\n };\n\n return _class2;\n }(_internalTestHelpers.RenderingTestCase));\n\n if (true\n /* EMBER_GLIMMER_ANGLE_BRACKET_NESTED_LOOKUP */\n ) {\n (0, _internalTestHelpers.moduleFor)('AngleBracket Invocation Nested Lookup',\n /*#__PURE__*/\n function (_RenderingTestCase3) {\n (0, _emberBabel.inheritsLoose)(_class3, _RenderingTestCase3);\n\n function _class3() {\n return _RenderingTestCase3.apply(this, arguments) || this;\n }\n\n var _proto3 = _class3.prototype;\n\n _proto3['@test it can resolve to foo/bar/baz-bing'] = function testItCanResolveFooBarBazBingToFooBarBazBing() {\n var _this28 = this;\n\n this.registerComponent('foo/bar/baz-bing', {\n template: 'hello'\n });\n this.render('');\n this.assertComponentElement(this.firstChild, {\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this28.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello'\n });\n };\n\n return _class3;\n }(_internalTestHelpers.RenderingTestCase));\n }\n});","enifed(\"@ember/-internals/glimmer/tests/integration/components/append-test\", [\"ember-babel\", \"internal-test-helpers\", \"@ember/-internals/metal\", \"@ember/-internals/glimmer/tests/utils/helpers\"], function (_emberBabel, _internalTestHelpers, _metal, _helpers) {\n \"use strict\";\n\n function _templateObject() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#if showFooBar}}\\n {{foo-bar}}\\n {{else}}\\n {{baz-qux}}\\n {{/if}}\\n \"]);\n\n _templateObject = function () {\n return data;\n };\n\n return data;\n }\n\n function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }\n\n var AbstractAppendTest =\n /*#__PURE__*/\n function (_RenderingTestCase) {\n (0, _emberBabel.inheritsLoose)(AbstractAppendTest, _RenderingTestCase);\n\n function AbstractAppendTest() {\n var _this;\n\n _this = _RenderingTestCase.apply(this, arguments) || this;\n _this.components = [];\n _this.ids = [];\n return _this;\n }\n\n var _proto = AbstractAppendTest.prototype;\n\n _proto.teardown = function teardown() {\n this.component = null;\n this.components.forEach(function (component) {\n (0, _internalTestHelpers.runTask)(function () {\n return component.destroy();\n });\n });\n this.ids.forEach(function (id) {\n var $element = document.getElementById(id);\n\n if ($element) {\n $element.parentNode.removeChild($element);\n } // this.assert.strictEqual($element.length, 0, `Should not leak element: #${id}`);\n\n });\n\n _RenderingTestCase.prototype.teardown.call(this);\n }\n /* abstract append(component): Element; */\n ;\n\n _proto.didAppend = function didAppend(component) {\n this.components.push(component);\n this.ids.push(component.elementId);\n };\n\n _proto['@test lifecycle hooks during component append'] = function testLifecycleHooksDuringComponentAppend(assert) {\n var _this2 = this;\n\n var hooks = [];\n var oldRegisterComponent = this.registerComponent;\n var componentsByName = {}; // TODO: refactor/combine with other life-cycle tests\n\n this.registerComponent = function (name, _options) {\n function pushHook(hookName) {\n hooks.push([name, hookName]);\n }\n\n var options = {\n ComponentClass: _options.ComponentClass.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n if (name in componentsByName) {\n throw new TypeError('Component named: ` ' + name + ' ` already registered');\n }\n\n componentsByName[name] = this;\n pushHook('init');\n this.on('init', function () {\n return pushHook('on(init)');\n });\n },\n didReceiveAttrs: function () {\n pushHook('didReceiveAttrs');\n },\n willInsertElement: function () {\n pushHook('willInsertElement');\n },\n willRender: function () {\n pushHook('willRender');\n },\n didInsertElement: function () {\n pushHook('didInsertElement');\n },\n didRender: function () {\n pushHook('didRender');\n },\n didUpdateAttrs: function () {\n pushHook('didUpdateAttrs');\n },\n willUpdate: function () {\n pushHook('willUpdate');\n },\n didUpdate: function () {\n pushHook('didUpdate');\n },\n willDestroyElement: function () {\n pushHook('willDestroyElement');\n },\n willClearRender: function () {\n pushHook('willClearRender');\n },\n didDestroyElement: function () {\n pushHook('didDestroyElement');\n },\n willDestroy: function () {\n pushHook('willDestroy');\n\n this._super.apply(this, arguments);\n }\n }),\n template: _options.template\n };\n oldRegisterComponent.call(this, name, options);\n };\n\n this.registerComponent('x-parent', {\n ComponentClass: _helpers.Component.extend({\n layoutName: 'components/x-parent'\n }),\n template: '[parent: {{foo}}]{{#x-child bar=foo}}[yielded: {{foo}}]{{/x-child}}'\n });\n this.registerComponent('x-child', {\n ComponentClass: _helpers.Component.extend({\n tagName: ''\n }),\n template: '[child: {{bar}}]{{yield}}'\n });\n var XParent;\n XParent = this.owner.factoryFor('component:x-parent');\n this.component = XParent.create({\n foo: 'zomg'\n });\n assert.deepEqual(hooks, [['x-parent', 'init'], ['x-parent', 'on(init)']], 'creation of x-parent');\n hooks.length = 0;\n this.element = this.append(this.component);\n assert.deepEqual(hooks, [['x-parent', 'willInsertElement'], ['x-child', 'init'], ['x-child', 'on(init)'], ['x-child', 'didReceiveAttrs'], ['x-child', 'willRender'], ['x-child', 'willInsertElement'], ['x-child', 'didInsertElement'], ['x-child', 'didRender'], ['x-parent', 'didInsertElement'], ['x-parent', 'didRender']], 'appending of x-parent');\n hooks.length = 0;\n (0, _internalTestHelpers.runTask)(function () {\n return componentsByName['x-parent'].rerender();\n });\n assert.deepEqual(hooks, [['x-parent', 'willUpdate'], ['x-parent', 'willRender'], ['x-parent', 'didUpdate'], ['x-parent', 'didRender']], 'rerender x-parent');\n hooks.length = 0;\n (0, _internalTestHelpers.runTask)(function () {\n return componentsByName['x-child'].rerender();\n });\n assert.deepEqual(hooks, [['x-parent', 'willUpdate'], ['x-parent', 'willRender'], ['x-child', 'willUpdate'], ['x-child', 'willRender'], ['x-child', 'didUpdate'], ['x-child', 'didRender'], ['x-parent', 'didUpdate'], ['x-parent', 'didRender']], 'rerender x-child');\n hooks.length = 0;\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this2.component, 'foo', 'wow');\n });\n assert.deepEqual(hooks, [['x-parent', 'willUpdate'], ['x-parent', 'willRender'], ['x-child', 'didUpdateAttrs'], ['x-child', 'didReceiveAttrs'], ['x-child', 'willUpdate'], ['x-child', 'willRender'], ['x-child', 'didUpdate'], ['x-child', 'didRender'], ['x-parent', 'didUpdate'], ['x-parent', 'didRender']], 'set foo = wow');\n hooks.length = 0;\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this2.component, 'foo', 'zomg');\n });\n assert.deepEqual(hooks, [['x-parent', 'willUpdate'], ['x-parent', 'willRender'], ['x-child', 'didUpdateAttrs'], ['x-child', 'didReceiveAttrs'], ['x-child', 'willUpdate'], ['x-child', 'willRender'], ['x-child', 'didUpdate'], ['x-child', 'didRender'], ['x-parent', 'didUpdate'], ['x-parent', 'didRender']], 'set foo = zomg');\n hooks.length = 0;\n (0, _internalTestHelpers.runTask)(function () {\n return _this2.component.destroy();\n });\n assert.deepEqual(hooks, [['x-parent', 'willDestroyElement'], ['x-parent', 'willClearRender'], ['x-child', 'willDestroyElement'], ['x-child', 'willClearRender'], ['x-child', 'didDestroyElement'], ['x-parent', 'didDestroyElement'], ['x-parent', 'willDestroy'], ['x-child', 'willDestroy']], 'destroy');\n };\n\n _proto['@test appending, updating and destroying a single component'] = function testAppendingUpdatingAndDestroyingASingleComponent(assert) {\n var _this3 = this;\n\n var willDestroyCalled = 0;\n this.registerComponent('x-parent', {\n ComponentClass: _helpers.Component.extend({\n layoutName: 'components/x-parent',\n willDestroyElement: function () {\n willDestroyCalled++;\n }\n }),\n template: '[parent: {{foo}}]{{#x-child bar=foo}}[yielded: {{foo}}]{{/x-child}}'\n });\n this.registerComponent('x-child', {\n ComponentClass: _helpers.Component.extend({\n tagName: ''\n }),\n template: '[child: {{bar}}]{{yield}}'\n });\n var XParent;\n XParent = this.owner.factoryFor('component:x-parent');\n this.component = XParent.create({\n foo: 'zomg'\n });\n assert.ok(!this.component.element, 'precond - should not have an element');\n this.element = this.append(this.component);\n var componentElement = this.component.element;\n this.assertComponentElement(componentElement, {\n content: '[parent: zomg][child: zomg][yielded: zomg]'\n });\n assert.equal(componentElement.parentElement, this.element, 'It should be attached to the target');\n (0, _internalTestHelpers.runTask)(function () {\n return _this3.rerender();\n });\n this.assertComponentElement(componentElement, {\n content: '[parent: zomg][child: zomg][yielded: zomg]'\n });\n assert.equal(componentElement.parentElement, this.element, 'It should be attached to the target');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this3.component, 'foo', 'wow');\n });\n this.assertComponentElement(componentElement, {\n content: '[parent: wow][child: wow][yielded: wow]'\n });\n assert.equal(componentElement.parentElement, this.element, 'It should be attached to the target');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this3.component, 'foo', 'zomg');\n });\n this.assertComponentElement(componentElement, {\n content: '[parent: zomg][child: zomg][yielded: zomg]'\n });\n assert.equal(componentElement.parentElement, this.element, 'It should be attached to the target');\n (0, _internalTestHelpers.runTask)(function () {\n return _this3.component.destroy();\n });\n assert.ok(!this.component.element, 'It should not have an element');\n assert.ok(!componentElement.parentElement, 'The component element should be detached');\n this.assert.equal(willDestroyCalled, 1);\n };\n\n _proto['@test releasing a root component after it has been destroy'] = function testReleasingARootComponentAfterItHasBeenDestroy(assert) {\n var _this4 = this;\n\n var renderer = this.owner.lookup('renderer:-dom');\n this.registerComponent('x-component', {\n ComponentClass: _helpers.Component.extend()\n });\n this.component = this.owner.factoryFor('component:x-component').create();\n this.append(this.component);\n assert.equal(renderer._roots.length, 1, 'added a root component');\n (0, _internalTestHelpers.runTask)(function () {\n return _this4.component.destroy();\n });\n assert.equal(renderer._roots.length, 0, 'released the root component');\n };\n\n _proto['@test appending, updating and destroying multiple components'] = function testAppendingUpdatingAndDestroyingMultipleComponents(assert) {\n var _this5 = this;\n\n var willDestroyCalled = 0;\n this.registerComponent('x-first', {\n ComponentClass: _helpers.Component.extend({\n layoutName: 'components/x-first',\n willDestroyElement: function () {\n willDestroyCalled++;\n }\n }),\n template: 'x-first {{foo}}!'\n });\n this.registerComponent('x-second', {\n ComponentClass: _helpers.Component.extend({\n layoutName: 'components/x-second',\n willDestroyElement: function () {\n willDestroyCalled++;\n }\n }),\n template: 'x-second {{bar}}!'\n });\n var First, Second;\n First = this.owner.factoryFor('component:x-first');\n Second = this.owner.factoryFor('component:x-second');\n var first = First.create({\n foo: 'foo'\n });\n var second = Second.create({\n bar: 'bar'\n });\n this.assert.ok(!first.element, 'precond - should not have an element');\n this.assert.ok(!second.element, 'precond - should not have an element');\n var wrapper1, wrapper2;\n (0, _internalTestHelpers.runTask)(function () {\n return wrapper1 = _this5.append(first);\n });\n (0, _internalTestHelpers.runTask)(function () {\n return wrapper2 = _this5.append(second);\n });\n var componentElement1 = first.element;\n var componentElement2 = second.element;\n this.assertComponentElement(componentElement1, {\n content: 'x-first foo!'\n });\n this.assertComponentElement(componentElement2, {\n content: 'x-second bar!'\n });\n assert.equal(componentElement1.parentElement, wrapper1, 'The first component should be attached to the target');\n assert.equal(componentElement2.parentElement, wrapper2, 'The second component should be attached to the target');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(first, 'foo', 'FOO');\n });\n this.assertComponentElement(componentElement1, {\n content: 'x-first FOO!'\n });\n this.assertComponentElement(componentElement2, {\n content: 'x-second bar!'\n });\n assert.equal(componentElement1.parentElement, wrapper1, 'The first component should be attached to the target');\n assert.equal(componentElement2.parentElement, wrapper2, 'The second component should be attached to the target');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(second, 'bar', 'BAR');\n });\n this.assertComponentElement(componentElement1, {\n content: 'x-first FOO!'\n });\n this.assertComponentElement(componentElement2, {\n content: 'x-second BAR!'\n });\n assert.equal(componentElement1.parentElement, wrapper1, 'The first component should be attached to the target');\n assert.equal(componentElement2.parentElement, wrapper2, 'The second component should be attached to the target');\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(first, 'foo', 'foo');\n (0, _metal.set)(second, 'bar', 'bar');\n });\n this.assertComponentElement(componentElement1, {\n content: 'x-first foo!'\n });\n this.assertComponentElement(componentElement2, {\n content: 'x-second bar!'\n });\n assert.equal(componentElement1.parentElement, wrapper1, 'The first component should be attached to the target');\n assert.equal(componentElement2.parentElement, wrapper2, 'The second component should be attached to the target');\n (0, _internalTestHelpers.runTask)(function () {\n first.destroy();\n second.destroy();\n });\n assert.ok(!first.element, 'The first component should not have an element');\n assert.ok(!second.element, 'The second component should not have an element');\n assert.ok(!componentElement1.parentElement, 'The first component element should be detached');\n assert.ok(!componentElement2.parentElement, 'The second component element should be detached');\n this.assert.equal(willDestroyCalled, 2);\n };\n\n _proto['@test can appendTo while rendering'] = function testCanAppendToWhileRendering() {\n var _this6 = this;\n\n var owner = this.owner;\n\n var append = function (component) {\n return _this6.append(component);\n };\n\n var element1, element2;\n this.registerComponent('first-component', {\n ComponentClass: _helpers.Component.extend({\n layout: (0, _helpers.compile)('component-one'),\n didInsertElement: function () {\n element1 = this.element;\n var SecondComponent = owner.factoryFor('component:second-component');\n append(SecondComponent.create());\n }\n })\n });\n this.registerComponent('second-component', {\n ComponentClass: _helpers.Component.extend({\n layout: (0, _helpers.compile)(\"component-two\"),\n didInsertElement: function () {\n element2 = this.element;\n }\n })\n });\n var FirstComponent = this.owner.factoryFor('component:first-component');\n (0, _internalTestHelpers.runTask)(function () {\n return append(FirstComponent.create());\n });\n this.assertComponentElement(element1, {\n content: 'component-one'\n });\n this.assertComponentElement(element2, {\n content: 'component-two'\n });\n };\n\n _proto['@test can appendTo and remove while rendering'] = function testCanAppendToAndRemoveWhileRendering(assert) {\n var _this7 = this;\n\n var owner = this.owner;\n\n var append = function (component) {\n return _this7.append(component);\n };\n\n var element1, element2, element3, element4, component1, component2;\n this.registerComponent('foo-bar', {\n ComponentClass: _helpers.Component.extend({\n layout: (0, _helpers.compile)('foo-bar'),\n init: function () {\n this._super.apply(this, arguments);\n\n component1 = this;\n },\n didInsertElement: function () {\n element1 = this.element;\n var OtherRoot = owner.factoryFor('component:other-root');\n this._instance = OtherRoot.create({\n didInsertElement: function () {\n element2 = this.element;\n }\n });\n append(this._instance);\n },\n willDestroy: function () {\n this._instance.destroy();\n }\n })\n });\n this.registerComponent('baz-qux', {\n ComponentClass: _helpers.Component.extend({\n layout: (0, _helpers.compile)('baz-qux'),\n init: function () {\n this._super.apply(this, arguments);\n\n component2 = this;\n },\n didInsertElement: function () {\n element3 = this.element;\n var OtherRoot = owner.factoryFor('component:other-root');\n this._instance = OtherRoot.create({\n didInsertElement: function () {\n element4 = this.element;\n }\n });\n append(this._instance);\n },\n willDestroy: function () {\n this._instance.destroy();\n }\n })\n });\n var instantiatedRoots = 0;\n var destroyedRoots = 0;\n this.registerComponent('other-root', {\n ComponentClass: _helpers.Component.extend({\n layout: (0, _helpers.compile)(\"fake-thing: {{counter}}\"),\n init: function () {\n this._super.apply(this, arguments);\n\n this.counter = instantiatedRoots++;\n },\n willDestroy: function () {\n destroyedRoots++;\n\n this._super.apply(this, arguments);\n }\n })\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject()), {\n showFooBar: true\n });\n this.assertComponentElement(element1, {});\n this.assertComponentElement(element2, {\n content: 'fake-thing: 0'\n });\n assert.equal(instantiatedRoots, 1);\n this.assertStableRerender();\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this7.context, 'showFooBar', false);\n });\n assert.equal(instantiatedRoots, 2);\n assert.equal(destroyedRoots, 1);\n this.assertComponentElement(element3, {});\n this.assertComponentElement(element4, {\n content: 'fake-thing: 1'\n });\n (0, _internalTestHelpers.runTask)(function () {\n component1.destroy();\n component2.destroy();\n });\n assert.equal(instantiatedRoots, 2);\n assert.equal(destroyedRoots, 2);\n };\n\n return AbstractAppendTest;\n }(_internalTestHelpers.RenderingTestCase);\n\n (0, _internalTestHelpers.moduleFor)('append: no arguments (attaching to document.body)',\n /*#__PURE__*/\n function (_AbstractAppendTest) {\n (0, _emberBabel.inheritsLoose)(_class, _AbstractAppendTest);\n\n function _class() {\n return _AbstractAppendTest.apply(this, arguments) || this;\n }\n\n var _proto2 = _class.prototype;\n\n _proto2.append = function append(component) {\n (0, _internalTestHelpers.runTask)(function () {\n return component.append();\n });\n this.didAppend(component);\n return document.body;\n };\n\n return _class;\n }(AbstractAppendTest));\n (0, _internalTestHelpers.moduleFor)('appendTo: a selector',\n /*#__PURE__*/\n function (_AbstractAppendTest2) {\n (0, _emberBabel.inheritsLoose)(_class2, _AbstractAppendTest2);\n\n function _class2() {\n return _AbstractAppendTest2.apply(this, arguments) || this;\n }\n\n var _proto3 = _class2.prototype;\n\n _proto3.append = function append(component) {\n (0, _internalTestHelpers.runTask)(function () {\n return component.appendTo('#qunit-fixture');\n });\n this.didAppend(component);\n return document.getElementById('qunit-fixture');\n };\n\n _proto3['@test raises an assertion when the target does not exist in the DOM'] = function testRaisesAnAssertionWhenTheTargetDoesNotExistInTheDOM(assert) {\n var _this8 = this;\n\n this.registerComponent('foo-bar', {\n ComponentClass: _helpers.Component.extend({\n layoutName: 'components/foo-bar'\n }),\n template: 'FOO BAR!'\n });\n var FooBar = this.owner.factoryFor('component:foo-bar');\n this.component = FooBar.create();\n assert.ok(!this.component.element, 'precond - should not have an element');\n (0, _internalTestHelpers.runTask)(function () {\n expectAssertion(function () {\n _this8.component.appendTo('#does-not-exist-in-dom');\n }, /You tried to append to \\(#does-not-exist-in-dom\\) but that isn't in the DOM/);\n });\n assert.ok(!this.component.element, 'component should not have an element');\n };\n\n return _class2;\n }(AbstractAppendTest));\n (0, _internalTestHelpers.moduleFor)('appendTo: an element',\n /*#__PURE__*/\n function (_AbstractAppendTest3) {\n (0, _emberBabel.inheritsLoose)(_class3, _AbstractAppendTest3);\n\n function _class3() {\n return _AbstractAppendTest3.apply(this, arguments) || this;\n }\n\n var _proto4 = _class3.prototype;\n\n _proto4.append = function append(component) {\n var element = document.getElementById('qunit-fixture');\n (0, _internalTestHelpers.runTask)(function () {\n return component.appendTo(element);\n });\n this.didAppend(component);\n return element;\n };\n\n return _class3;\n }(AbstractAppendTest));\n (0, _internalTestHelpers.moduleFor)('appendTo: with multiple components',\n /*#__PURE__*/\n function (_AbstractAppendTest4) {\n (0, _emberBabel.inheritsLoose)(_class4, _AbstractAppendTest4);\n\n function _class4() {\n return _AbstractAppendTest4.apply(this, arguments) || this;\n }\n\n var _proto5 = _class4.prototype;\n\n _proto5.append = function append(component) {\n (0, _internalTestHelpers.runTask)(function () {\n return component.appendTo('#qunit-fixture');\n });\n this.didAppend(component);\n return document.getElementById('qunit-fixture');\n };\n\n return _class4;\n }(AbstractAppendTest));\n});","enifed(\"@ember/-internals/glimmer/tests/integration/components/attribute-bindings-test\", [\"ember-babel\", \"internal-test-helpers\", \"@ember/-internals/metal\", \"@ember/-internals/glimmer/tests/utils/helpers\"], function (_emberBabel, _internalTestHelpers, _metal, _helpers) {\n \"use strict\";\n\n function _templateObject() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{foo-bar hasFoo=true foo=foo hasBar=false bar=bar}}\\n {{foo-bar hasFoo=false foo=foo hasBar=true bar=bar}}\\n {{foo-bar hasFoo=true foo=foo hasBar=true bar=bar}}\\n {{foo-bar hasFoo=false foo=foo hasBar=false bar=bar}}\\n \"]);\n\n _templateObject = function () {\n return data;\n };\n\n return data;\n }\n\n function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }\n\n (0, _internalTestHelpers.moduleFor)('Attribute bindings integration',\n /*#__PURE__*/\n function (_RenderingTestCase) {\n (0, _emberBabel.inheritsLoose)(_class, _RenderingTestCase);\n\n function _class() {\n return _RenderingTestCase.apply(this, arguments) || this;\n }\n\n var _proto = _class.prototype;\n\n _proto['@test it can have attribute bindings'] = function testItCanHaveAttributeBindings() {\n var _this = this;\n\n var FooBarComponent = _helpers.Component.extend({\n attributeBindings: ['foo:data-foo', 'bar:data-bar']\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render('{{foo-bar foo=foo bar=bar}}', {\n foo: 'foo',\n bar: 'bar'\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n 'data-foo': 'foo',\n 'data-bar': 'bar'\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n 'data-foo': 'foo',\n 'data-bar': 'bar'\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this.context, 'foo', 'FOO');\n (0, _metal.set)(_this.context, 'bar', undefined);\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n 'data-foo': 'FOO'\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this.context, 'foo', 'foo');\n (0, _metal.set)(_this.context, 'bar', 'bar');\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n 'data-foo': 'foo',\n 'data-bar': 'bar'\n },\n content: 'hello'\n });\n };\n\n _proto['@test it can have attribute bindings with attrs'] = function testItCanHaveAttributeBindingsWithAttrs() {\n var _this2 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n attributeBindings: ['attrs.foo:data-foo', 'attrs.baz.bar:data-bar']\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render('{{foo-bar foo=model.foo baz=model.baz}}', {\n model: {\n foo: undefined,\n baz: {\n bar: 'bar'\n }\n }\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n content: 'hello',\n attrs: {\n 'data-bar': 'bar'\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this2.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n content: 'hello',\n attrs: {\n 'data-bar': 'bar'\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this2.context, 'model.foo', 'foo');\n (0, _metal.set)(_this2.context, 'model.baz.bar', undefined);\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n 'data-foo': 'foo'\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this2.context, 'model', {\n foo: undefined,\n baz: {\n bar: 'bar'\n }\n });\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n content: 'hello',\n attrs: {\n 'data-bar': 'bar'\n }\n });\n };\n\n _proto['@test it can have attribute bindings with a nested path'] = function testItCanHaveAttributeBindingsWithANestedPath() {\n var _this3 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n attributeBindings: ['foo.bar:data-foo-bar']\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render('{{foo-bar foo=foo}}', {\n foo: {\n bar: 'foo-bar'\n }\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n 'data-foo-bar': 'foo-bar'\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this3.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n 'data-foo-bar': 'foo-bar'\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this3.context, 'foo.bar', 'FOO-BAR');\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n 'data-foo-bar': 'FOO-BAR'\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this3.context, 'foo.bar', undefined);\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {},\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this3.context, 'foo', undefined);\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {},\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this3.context, 'foo', {\n bar: 'foo-bar'\n });\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n 'data-foo-bar': 'foo-bar'\n },\n content: 'hello'\n });\n };\n\n _proto['@test handles non-microsyntax attributeBindings'] = function testHandlesNonMicrosyntaxAttributeBindings() {\n var _this4 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n attributeBindings: ['type']\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render('{{foo-bar type=submit}}', {\n submit: 'submit'\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n type: 'submit'\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this4.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n type: 'submit'\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this4.context, 'submit', 'password');\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n type: 'password'\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this4.context, 'submit', null);\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {},\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this4.context, 'submit', 'submit');\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n type: 'submit'\n },\n content: 'hello'\n });\n };\n\n _proto['@test non-microsyntax attributeBindings cannot contain nested paths'] = function testNonMicrosyntaxAttributeBindingsCannotContainNestedPaths() {\n var _this5 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n attributeBindings: ['foo.bar']\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n expectAssertion(function () {\n _this5.render('{{foo-bar foo=foo}}', {\n foo: {\n bar: 'foo-bar'\n }\n });\n }, /Illegal attributeBinding: 'foo.bar' is not a valid attribute name./);\n };\n\n _proto['@test normalizes attributeBindings for property names'] = function testNormalizesAttributeBindingsForPropertyNames() {\n var _this6 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n attributeBindings: ['tiTLe']\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render('{{foo-bar tiTLe=name}}', {\n name: 'qux'\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n title: 'qux'\n },\n content: 'hello'\n });\n this.assertStableRerender();\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this6.context, 'name', null);\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {},\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this6.context, 'name', 'qux');\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n title: 'qux'\n },\n content: 'hello'\n });\n };\n\n _proto['@test normalizes attributeBindings for attribute names'] = function testNormalizesAttributeBindingsForAttributeNames() {\n var _this7 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n attributeBindings: ['foo:data-FOO']\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render('{{foo-bar foo=foo}}', {\n foo: 'qux'\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n 'data-foo': 'qux'\n },\n content: 'hello'\n });\n this.assertStableRerender();\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this7.context, 'foo', null);\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {},\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this7.context, 'foo', 'qux');\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n 'data-foo': 'qux'\n },\n content: 'hello'\n });\n };\n\n _proto['@test attributeBindings preserves case for mixed-case attributes'] = function testAttributeBindingsPreservesCaseForMixedCaseAttributes() {\n var _this8 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n tagName: 'svg',\n attributeBindings: ['viewBox']\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: ''\n });\n this.render('{{foo-bar viewBox=foo}}', {\n foo: '0 0 100 100'\n });\n this.assert.equal(this.firstChild.getAttribute('viewBox'), '0 0 100 100', 'viewBox attribute');\n this.assertStableRerender();\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this8.context, 'foo', null);\n });\n this.assert.ok(!this.firstChild.hasAttribute('viewBox'), 'viewBox attribute removed');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this8.context, 'foo', '0 0 100 200');\n });\n this.assert.equal(this.firstChild.getAttribute('viewBox'), '0 0 100 200', 'viewBox attribute');\n };\n\n _proto['@test attributeBindings handles null/undefined'] = function testAttributeBindingsHandlesNullUndefined() {\n var _this9 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n attributeBindings: ['fizz', 'bar']\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render('{{foo-bar fizz=fizz bar=bar}}', {\n fizz: null,\n bar: undefined\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {},\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this9.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {},\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this9.context, 'fizz', 'fizz');\n (0, _metal.set)(_this9.context, 'bar', 'bar');\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n fizz: 'fizz',\n bar: 'bar'\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this9.context, 'fizz', null);\n (0, _metal.set)(_this9.context, 'bar', undefined);\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {},\n content: 'hello'\n });\n };\n\n _proto['@test attributeBindings handles number value'] = function testAttributeBindingsHandlesNumberValue() {\n var _this10 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n attributeBindings: ['size']\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render('{{foo-bar size=size}}', {\n size: 21\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n size: '21'\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this10.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n size: '21'\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this10.context, 'size', 0);\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n size: '0'\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this10.context, 'size', 21);\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n size: '21'\n },\n content: 'hello'\n });\n };\n\n _proto['@test handles internal and external changes'] = function testHandlesInternalAndExternalChanges() {\n var _this11 = this;\n\n var component;\n\n var FooBarComponent = _helpers.Component.extend({\n attributeBindings: ['type'],\n type: 'password',\n init: function () {\n this._super.apply(this, arguments);\n\n component = this;\n }\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render('{{foo-bar}}');\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n type: 'password'\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this11.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n type: 'password'\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(component, 'type', 'checkbox');\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n type: 'checkbox'\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(component, 'type', 'password');\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n type: 'password'\n },\n content: 'hello'\n });\n };\n\n _proto['@test can set attributeBindings on component with a different tagName'] = function testCanSetAttributeBindingsOnComponentWithADifferentTagName() {\n var _this12 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n tagName: 'input',\n attributeBindings: ['type', 'isDisabled:disabled']\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent\n });\n this.render('{{foo-bar type=type isDisabled=disabled}}', {\n type: 'password',\n disabled: false\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'input',\n attrs: {\n type: 'password'\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this12.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'input',\n attrs: {\n type: 'password'\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this12.context, 'type', 'checkbox');\n (0, _metal.set)(_this12.context, 'disabled', true);\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'input',\n attrs: {\n type: 'checkbox',\n disabled: ''\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this12.context, 'type', 'password');\n (0, _metal.set)(_this12.context, 'disabled', false);\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'input',\n attrs: {\n type: 'password'\n }\n });\n };\n\n _proto['@test should allow namespaced attributes in micro syntax'] = function testShouldAllowNamespacedAttributesInMicroSyntax() {\n var _this13 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n attributeBindings: ['xlinkHref:xlink:href']\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent\n });\n this.render('{{foo-bar type=type xlinkHref=xlinkHref}}', {\n xlinkHref: '/foo.png'\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n 'xlink:href': '/foo.png'\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this13.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n 'xlink:href': '/foo.png'\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this13.context, 'xlinkHref', '/lol.png');\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n 'xlink:href': '/lol.png'\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this13.context, 'xlinkHref', '/foo.png');\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n 'xlink:href': '/foo.png'\n }\n });\n } // This comes into play when using the {{#each}} helper. If the\n // passed array item is a String, it will be converted into a\n // String object instead of a normal string.\n ;\n\n _proto['@test should allow for String objects'] = function testShouldAllowForStringObjects() {\n var _this14 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n attributeBindings: ['foo']\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent\n });\n this.render('{{foo-bar foo=foo}}', {\n foo: function () {\n return this;\n }.call('bar')\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n foo: 'bar'\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this14.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n foo: 'bar'\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this14.context, 'foo', function () {\n return this;\n }.call('baz'));\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n foo: 'baz'\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this14.context, 'foo', function () {\n return this;\n }.call('bar'));\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n foo: 'bar'\n }\n });\n };\n\n _proto['@test can set id initially via attributeBindings '] = function testCanSetIdInitiallyViaAttributeBindings() {\n var _this15 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n attributeBindings: ['specialSauce:id']\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent\n });\n this.render('{{foo-bar specialSauce=sauce}}', {\n sauce: 'special-sauce'\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n id: 'special-sauce'\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this15.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n id: 'special-sauce'\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this15.context, 'sauce', 'foo');\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n id: 'special-sauce'\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this15.context, 'sauce', 'special-sauce');\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n id: 'special-sauce'\n }\n });\n };\n\n _proto['@test attributeBindings are overwritten'] = function testAttributeBindingsAreOverwritten() {\n var _this16 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n attributeBindings: ['href'],\n href: 'a href'\n });\n\n var FizzBarComponent = FooBarComponent.extend({\n attributeBindings: ['newHref:href']\n });\n this.registerComponent('fizz-bar', {\n ComponentClass: FizzBarComponent\n });\n this.render('{{fizz-bar newHref=href}}', {\n href: 'dog.html'\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n href: 'dog.html'\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this16.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n href: 'dog.html'\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this16.context, 'href', 'cat.html');\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n href: 'cat.html'\n }\n });\n };\n\n _proto['@test it can set attribute bindings in the constructor'] = function testItCanSetAttributeBindingsInTheConstructor() {\n var _this17 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n init: function () {\n this._super();\n\n var bindings = [];\n\n if (this.get('hasFoo')) {\n bindings.push('foo:data-foo');\n }\n\n if (this.get('hasBar')) {\n bindings.push('bar:data-bar');\n }\n\n this.attributeBindings = bindings;\n }\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject()), {\n foo: 'foo',\n bar: 'bar'\n });\n this.assertComponentElement(this.nthChild(0), {\n tagName: 'div',\n attrs: {\n 'data-foo': 'foo'\n },\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(1), {\n tagName: 'div',\n attrs: {\n 'data-bar': 'bar'\n },\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(2), {\n tagName: 'div',\n attrs: {\n 'data-foo': 'foo',\n 'data-bar': 'bar'\n },\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(3), {\n tagName: 'div',\n attrs: {},\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this17.rerender();\n });\n this.assertComponentElement(this.nthChild(0), {\n tagName: 'div',\n attrs: {\n 'data-foo': 'foo'\n },\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(1), {\n tagName: 'div',\n attrs: {\n 'data-bar': 'bar'\n },\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(2), {\n tagName: 'div',\n attrs: {\n 'data-foo': 'foo',\n 'data-bar': 'bar'\n },\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(3), {\n tagName: 'div',\n attrs: {},\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this17.context, 'foo', 'FOO');\n (0, _metal.set)(_this17.context, 'bar', undefined);\n });\n this.assertComponentElement(this.nthChild(0), {\n tagName: 'div',\n attrs: {\n 'data-foo': 'FOO'\n },\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(1), {\n tagName: 'div',\n attrs: {},\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(2), {\n tagName: 'div',\n attrs: {\n 'data-foo': 'FOO'\n },\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(3), {\n tagName: 'div',\n attrs: {},\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this17.context, 'bar', 'BAR');\n });\n this.assertComponentElement(this.nthChild(0), {\n tagName: 'div',\n attrs: {\n 'data-foo': 'FOO'\n },\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(1), {\n tagName: 'div',\n attrs: {\n 'data-bar': 'BAR'\n },\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(2), {\n tagName: 'div',\n attrs: {\n 'data-foo': 'FOO',\n 'data-bar': 'BAR'\n },\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(3), {\n tagName: 'div',\n attrs: {},\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this17.context, 'foo', 'foo');\n (0, _metal.set)(_this17.context, 'bar', 'bar');\n });\n this.assertComponentElement(this.nthChild(0), {\n tagName: 'div',\n attrs: {\n 'data-foo': 'foo'\n },\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(1), {\n tagName: 'div',\n attrs: {\n 'data-bar': 'bar'\n },\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(2), {\n tagName: 'div',\n attrs: {\n 'data-foo': 'foo',\n 'data-bar': 'bar'\n },\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(3), {\n tagName: 'div',\n attrs: {},\n content: 'hello'\n });\n };\n\n _proto['@test asserts if an attributeBinding is setup on class'] = function testAssertsIfAnAttributeBindingIsSetupOnClass() {\n var _this18 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n attributeBindings: ['class']\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n expectAssertion(function () {\n _this18.render('{{foo-bar}}');\n }, /You cannot use class as an attributeBinding, use classNameBindings instead./i);\n };\n\n _proto['@test blacklists href bindings based on protocol'] = function testBlacklistsHrefBindingsBasedOnProtocol() {\n var FooBarComponent = _helpers.Component.extend({\n tagName: 'a',\n attributeBindings: ['href']\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render('{{foo-bar href=xss}}', {\n xss: \"javascript:alert('foo')\"\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'a',\n attrs: {\n href: \"unsafe:javascript:alert('foo')\"\n }\n });\n };\n\n _proto['@test it can bind the role attribute (issue #14007)'] = function testItCanBindTheRoleAttributeIssue14007() {\n var _this19 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n attributeBindings: ['role']\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render('{{foo-bar role=role}}', {\n role: 'button'\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n role: 'button'\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this19.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n role: 'button'\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this19.context, 'role', 'combobox');\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n role: 'combobox'\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this19.context, 'role', null);\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div'\n });\n };\n\n _proto['@test component with an `id` attribute binding of undefined'] = function testComponentWithAnIdAttributeBindingOfUndefined() {\n this.registerComponent('foo-bar', {\n ComponentClass: _helpers.Component.extend({\n attributeBindings: ['id'],\n id: undefined\n })\n });\n this.registerComponent('baz-qux', {\n ComponentClass: _helpers.Component.extend({\n attributeBindings: ['somethingUndefined:id'],\n somethingUndefined: undefined\n })\n });\n this.render(\"{{foo-bar}}{{baz-qux}}\");\n this.assertComponentElement(this.nthChild(0), {\n content: ''\n });\n this.assertComponentElement(this.nthChild(1), {\n content: ''\n });\n this.assert.ok(this.nthChild(0).id.match(/ember\\d+/), 'a valid `id` was used');\n this.assert.ok(this.nthChild(1).id.match(/ember\\d+/), 'a valid `id` was used');\n };\n\n _proto['@test component with an `id` attribute binding of null'] = function testComponentWithAnIdAttributeBindingOfNull() {\n this.registerComponent('foo-bar', {\n ComponentClass: _helpers.Component.extend({\n attributeBindings: ['id'],\n id: null\n })\n });\n this.registerComponent('baz-qux', {\n ComponentClass: _helpers.Component.extend({\n attributeBindings: ['somethingNull:id'],\n somethingNull: null\n })\n });\n this.render(\"{{foo-bar}}{{baz-qux}}\");\n this.assertComponentElement(this.nthChild(0), {\n content: ''\n });\n this.assertComponentElement(this.nthChild(1), {\n content: ''\n });\n this.assert.ok(this.nthChild(0).id.match(/ember\\d+/), 'a valid `id` was used');\n this.assert.ok(this.nthChild(1).id.match(/ember\\d+/), 'a valid `id` was used');\n };\n\n return _class;\n }(_internalTestHelpers.RenderingTestCase));\n});","enifed(\"@ember/-internals/glimmer/tests/integration/components/attrs-lookup-test\", [\"ember-babel\", \"internal-test-helpers\", \"@ember/-internals/metal\", \"@ember/-internals/glimmer/tests/utils/helpers\"], function (_emberBabel, _internalTestHelpers, _metal, _helpers) {\n \"use strict\";\n\n (0, _internalTestHelpers.moduleFor)('Components test: attrs lookup',\n /*#__PURE__*/\n function (_RenderingTestCase) {\n (0, _emberBabel.inheritsLoose)(_class, _RenderingTestCase);\n\n function _class() {\n return _RenderingTestCase.apply(this, arguments) || this;\n }\n\n var _proto = _class.prototype;\n\n _proto['@test it should be able to lookup attrs without `attrs.` - template access'] = function testItShouldBeAbleToLookupAttrsWithoutAttrsTemplateAccess() {\n var _this = this;\n\n this.registerComponent('foo-bar', {\n template: '{{first}}'\n });\n this.render(\"{{foo-bar first=firstAttr}}\", {\n firstAttr: 'first attr'\n });\n this.assertText('first attr');\n (0, _internalTestHelpers.runTask)(function () {\n return _this.rerender();\n });\n this.assertText('first attr');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this.context, 'firstAttr', 'second attr');\n });\n this.assertText('second attr');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this.context, 'firstAttr', 'first attr');\n });\n this.assertText('first attr');\n };\n\n _proto['@test it should be able to lookup attrs without `attrs.` - component access'] = function testItShouldBeAbleToLookupAttrsWithoutAttrsComponentAccess(assert) {\n var _this2 = this;\n\n var instance;\n\n var FooBarComponent = _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n instance = this;\n }\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: '{{first}}'\n });\n this.render(\"{{foo-bar first=firstAttr}}\", {\n firstAttr: 'first attr'\n });\n assert.equal(instance.get('first'), 'first attr');\n (0, _internalTestHelpers.runTask)(function () {\n return _this2.rerender();\n });\n assert.equal(instance.get('first'), 'first attr');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this2.context, 'firstAttr', 'second attr');\n });\n assert.equal(instance.get('first'), 'second attr');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this2.context, 'firstAttr', 'first attr');\n });\n this.assertText('first attr');\n };\n\n _proto['@test should be able to modify a provided attr into local state #11571 / #11559'] = function testShouldBeAbleToModifyAProvidedAttrIntoLocalState1157111559(assert) {\n var _this3 = this;\n\n var instance;\n\n var FooBarComponent = _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n instance = this;\n },\n didReceiveAttrs: function () {\n this.set('first', this.get('first').toUpperCase());\n }\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: '{{first}}'\n });\n this.render(\"{{foo-bar first=\\\"first attr\\\"}}\");\n assert.equal(instance.get('first'), 'FIRST ATTR', 'component lookup uses local state');\n this.assertText('FIRST ATTR');\n (0, _internalTestHelpers.runTask)(function () {\n return _this3.rerender();\n });\n assert.equal(instance.get('first'), 'FIRST ATTR', 'component lookup uses local state during rerender');\n this.assertText('FIRST ATTR'); // This is testing that passing string literals for use as initial values,\n // so there is no update step\n };\n\n _proto['@test should be able to access unspecified attr #12035'] = function testShouldBeAbleToAccessUnspecifiedAttr12035(assert) {\n var _this4 = this;\n\n var instance;\n var wootVal = 'yes';\n\n var FooBarComponent = _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n instance = this;\n },\n didReceiveAttrs: function () {\n assert.equal(this.get('woot'), wootVal, 'found attr in didReceiveAttrs');\n }\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent\n });\n this.render(\"{{foo-bar woot=woot}}\", {\n woot: wootVal\n });\n assert.equal(instance.get('woot'), 'yes', 'component found attr');\n (0, _internalTestHelpers.runTask)(function () {\n return _this4.rerender();\n });\n assert.equal(instance.get('woot'), 'yes', 'component found attr after rerender');\n (0, _internalTestHelpers.runTask)(function () {\n wootVal = 'nope';\n (0, _metal.set)(_this4.context, 'woot', wootVal);\n });\n assert.equal(instance.get('woot'), 'nope', 'component found attr after attr change');\n (0, _internalTestHelpers.runTask)(function () {\n wootVal = 'yes';\n (0, _metal.set)(_this4.context, 'woot', wootVal);\n });\n assert.equal(instance.get('woot'), 'yes', 'component found attr after reset');\n };\n\n _proto['@test getAttr() should return the same value as get()'] = function testGetAttrShouldReturnTheSameValueAsGet(assert) {\n var _this5 = this;\n\n assert.expect(33);\n var instance;\n\n var FooBarComponent = _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n instance = this;\n },\n didReceiveAttrs: function () {\n var rootFirstPositional = this.get('firstPositional');\n var rootFirst = this.get('first');\n var rootSecond = this.get('second');\n var attrFirstPositional = this.getAttr('firstPositional');\n var attrFirst = this.getAttr('first');\n var attrSecond = this.getAttr('second');\n assert.equal(rootFirstPositional, attrFirstPositional, 'root property matches attrs value');\n assert.equal(rootFirst, attrFirst, 'root property matches attrs value');\n assert.equal(rootSecond, attrSecond, 'root property matches attrs value');\n }\n });\n\n FooBarComponent.reopenClass({\n positionalParams: ['firstPositional']\n });\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent\n });\n this.render(\"{{foo-bar firstPositional first=first second=second}}\", {\n firstPositional: 'firstPositional',\n first: 'first',\n second: 'second'\n });\n assert.equal(instance.get('firstPositional'), 'firstPositional', 'matches known value');\n assert.equal(instance.get('first'), 'first', 'matches known value');\n assert.equal(instance.get('second'), 'second', 'matches known value');\n (0, _internalTestHelpers.runTask)(function () {\n return _this5.rerender();\n });\n assert.equal(instance.get('firstPositional'), 'firstPositional', 'matches known value');\n assert.equal(instance.get('first'), 'first', 'matches known value');\n assert.equal(instance.get('second'), 'second', 'matches known value');\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this5.context, 'first', 'third');\n });\n assert.equal(instance.get('firstPositional'), 'firstPositional', 'matches known value');\n assert.equal(instance.get('first'), 'third', 'matches known value');\n assert.equal(instance.get('second'), 'second', 'matches known value');\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this5.context, 'second', 'fourth');\n });\n assert.equal(instance.get('firstPositional'), 'firstPositional', 'matches known value');\n assert.equal(instance.get('first'), 'third', 'matches known value');\n assert.equal(instance.get('second'), 'fourth', 'matches known value');\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this5.context, 'firstPositional', 'fifth');\n });\n assert.equal(instance.get('firstPositional'), 'fifth', 'matches known value');\n assert.equal(instance.get('first'), 'third', 'matches known value');\n assert.equal(instance.get('second'), 'fourth', 'matches known value');\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this5.context, 'firstPositional', 'firstPositional');\n (0, _metal.set)(_this5.context, 'first', 'first');\n (0, _metal.set)(_this5.context, 'second', 'second');\n });\n assert.equal(instance.get('firstPositional'), 'firstPositional', 'matches known value');\n assert.equal(instance.get('first'), 'first', 'matches known value');\n assert.equal(instance.get('second'), 'second', 'matches known value');\n };\n\n _proto['@test bound computed properties can be overridden in extensions, set during init, and passed in as attrs'] = function testBoundComputedPropertiesCanBeOverriddenInExtensionsSetDuringInitAndPassedInAsAttrs() {\n var FooClass = _helpers.Component.extend({\n attributeBindings: ['style'],\n style: (0, _metal.computed)('height', 'color', function () {\n var height = this.get('height');\n var color = this.get('color');\n return (0, _helpers.htmlSafe)(\"height: \" + height + \"px; background-color: \" + color + \";\");\n }),\n color: 'red',\n height: 20\n });\n\n var BarClass = FooClass.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n this.height = 150;\n },\n color: 'yellow'\n });\n this.registerComponent('x-foo', {\n ComponentClass: FooClass\n });\n this.registerComponent('x-bar', {\n ComponentClass: BarClass\n });\n this.render('{{x-foo}}{{x-bar}}{{x-bar color=\"green\"}}');\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n style: (0, _internalTestHelpers.styles)('height: 20px; background-color: red;')\n }\n });\n this.assertComponentElement(this.nthChild(1), {\n tagName: 'div',\n attrs: {\n style: (0, _internalTestHelpers.styles)('height: 150px; background-color: yellow;')\n }\n });\n this.assertComponentElement(this.nthChild(2), {\n tagName: 'div',\n attrs: {\n style: (0, _internalTestHelpers.styles)('height: 150px; background-color: green;')\n }\n });\n this.assertStableRerender(); // No U-R\n };\n\n return _class;\n }(_internalTestHelpers.RenderingTestCase));\n});","enifed(\"@ember/-internals/glimmer/tests/integration/components/class-bindings-test\", [\"ember-babel\", \"internal-test-helpers\", \"@ember/-internals/metal\", \"@ember/-internals/glimmer/tests/utils/helpers\"], function (_emberBabel, _internalTestHelpers, _metal, _helpers) {\n \"use strict\";\n\n function _templateObject() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{foo-bar foo=foo bindIsEnabled=true isEnabled=isEnabled bindIsHappy=false isHappy=isHappy}}\\n {{foo-bar foo=foo bindIsEnabled=false isEnabled=isEnabled bindIsHappy=true isHappy=isHappy}}\\n {{foo-bar foo=foo bindIsEnabled=true isEnabled=isEnabled bindIsHappy=true isHappy=isHappy}}\\n {{foo-bar foo=foo bindIsEnabled=false isEnabled=isEnabled bindIsHappy=false isHappy=isHappy}}\\n \"]);\n\n _templateObject = function () {\n return data;\n };\n\n return data;\n }\n\n function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }\n\n (0, _internalTestHelpers.moduleFor)('ClassNameBindings integration',\n /*#__PURE__*/\n function (_RenderingTestCase) {\n (0, _emberBabel.inheritsLoose)(_class, _RenderingTestCase);\n\n function _class() {\n return _RenderingTestCase.apply(this, arguments) || this;\n }\n\n var _proto = _class.prototype;\n\n _proto['@test it can have class name bindings on the class definition'] = function testItCanHaveClassNameBindingsOnTheClassDefinition() {\n var _this = this;\n\n var FooBarComponent = _helpers.Component.extend({\n classNameBindings: ['foo', 'isEnabled:enabled', 'isHappy:happy:sad']\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render('{{foo-bar foo=foo isEnabled=isEnabled isHappy=isHappy}}', {\n foo: 'foo',\n isEnabled: true,\n isHappy: false\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo enabled sad')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo enabled sad')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this.context, 'foo', 'FOO');\n (0, _metal.set)(_this.context, 'isEnabled', false);\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view FOO sad')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this.context, 'foo', undefined);\n (0, _metal.set)(_this.context, 'isHappy', true);\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view happy')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this.context, 'foo', 'foo');\n (0, _metal.set)(_this.context, 'isEnabled', true);\n (0, _metal.set)(_this.context, 'isHappy', false);\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo enabled sad')\n },\n content: 'hello'\n });\n };\n\n _proto['@test attrs in classNameBindings'] = function testAttrsInClassNameBindings() {\n var _this2 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n classNameBindings: ['attrs.joker:purple:green', 'attrs.batman.robin:black:red']\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render('{{foo-bar joker=model.wat batman=model.super}}', {\n model: {\n wat: false,\n super: {\n robin: true\n }\n }\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view green black')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this2.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view green black')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this2.context, 'model.wat', true);\n (0, _metal.set)(_this2.context, 'model.super.robin', false);\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view purple red')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this2.context, 'model', {\n wat: false,\n super: {\n robin: true\n }\n });\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view green black')\n },\n content: 'hello'\n });\n };\n\n _proto['@test it can have class name bindings in the template'] = function testItCanHaveClassNameBindingsInTheTemplate() {\n var _this3 = this;\n\n this.registerComponent('foo-bar', {\n template: 'hello'\n });\n this.render('{{foo-bar classNameBindings=\"model.someInitiallyTrueProperty model.someInitiallyFalseProperty model.someInitiallyUndefinedProperty :static model.isBig:big model.isOpen:open:closed model.isUp::down model.bar:isTruthy:isFalsy\"}}', {\n model: {\n someInitiallyTrueProperty: true,\n someInitiallyFalseProperty: false,\n isBig: true,\n isOpen: false,\n isUp: true,\n bar: true\n }\n });\n this.assertComponentElement(this.firstChild, {\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view some-initially-true-property static big closed isTruthy')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this3.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view some-initially-true-property static big closed isTruthy')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this3.context, 'model.someInitiallyTrueProperty', false);\n (0, _metal.set)(_this3.context, 'model.someInitiallyFalseProperty', true);\n (0, _metal.set)(_this3.context, 'model.someInitiallyUndefinedProperty', true);\n (0, _metal.set)(_this3.context, 'model.isBig', false);\n (0, _metal.set)(_this3.context, 'model.isOpen', true);\n (0, _metal.set)(_this3.context, 'model.isUp', false);\n (0, _metal.set)(_this3.context, 'model.bar', false);\n });\n this.assertComponentElement(this.firstChild, {\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view some-initially-false-property some-initially-undefined-property static open down isFalsy')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this3.context, 'model', {\n someInitiallyTrueProperty: true,\n someInitiallyFalseProperty: false,\n someInitiallyUndefinedProperty: undefined,\n isBig: true,\n isOpen: false,\n isUp: true,\n bar: true\n });\n });\n this.assertComponentElement(this.firstChild, {\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view some-initially-true-property static big closed isTruthy')\n },\n content: 'hello'\n });\n };\n\n _proto['@test it can have class name bindings with nested paths'] = function testItCanHaveClassNameBindingsWithNestedPaths() {\n var _this4 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n classNameBindings: ['foo.bar', 'is.enabled:enabled', 'is.happy:happy:sad']\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render('{{foo-bar foo=foo is=is}}', {\n foo: {\n bar: 'foo-bar'\n },\n is: {\n enabled: true,\n happy: false\n }\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo-bar enabled sad')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this4.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo-bar enabled sad')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this4.context, 'foo.bar', 'FOO-BAR');\n (0, _metal.set)(_this4.context, 'is.enabled', false);\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view FOO-BAR sad')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this4.context, 'foo.bar', null);\n (0, _metal.set)(_this4.context, 'is.happy', true);\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view happy')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this4.context, 'foo', null);\n (0, _metal.set)(_this4.context, 'is', null);\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view sad')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this4.context, 'foo', {\n bar: 'foo-bar'\n });\n (0, _metal.set)(_this4.context, 'is', {\n enabled: true,\n happy: false\n });\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo-bar enabled sad')\n },\n content: 'hello'\n });\n };\n\n _proto['@test it should dasherize the path when the it resolves to true'] = function testItShouldDasherizeThePathWhenTheItResolvesToTrue() {\n var _this5 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n classNameBindings: ['fooBar', 'nested.fooBarBaz']\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render('{{foo-bar fooBar=fooBar nested=nested}}', {\n fooBar: true,\n nested: {\n fooBarBaz: false\n }\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo-bar')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this5.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo-bar')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this5.context, 'fooBar', false);\n (0, _metal.set)(_this5.context, 'nested.fooBarBaz', true);\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo-bar-baz')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this5.context, 'fooBar', 'FOO-BAR');\n (0, _metal.set)(_this5.context, 'nested.fooBarBaz', null);\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view FOO-BAR')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this5.context, 'nested', null);\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view FOO-BAR')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this5.context, 'fooBar', true);\n (0, _metal.set)(_this5.context, 'nested', {\n fooBarBaz: false\n });\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo-bar')\n },\n content: 'hello'\n });\n };\n\n _proto['@test const bindings can be set as attrs'] = function testConstBindingsCanBeSetAsAttrs() {\n var _this6 = this;\n\n this.registerComponent('foo-bar', {\n template: 'hello'\n });\n this.render('{{foo-bar classNameBindings=\"foo:enabled:disabled\"}}', {\n foo: true\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view enabled')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this6.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view enabled')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this6.context, 'foo', false);\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view disabled')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this6.context, 'foo', true);\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view enabled')\n },\n content: 'hello'\n });\n };\n\n _proto['@test :: class name syntax works with an empty true class'] = function testClassNameSyntaxWorksWithAnEmptyTrueClass() {\n var _this7 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n classNameBindings: ['isEnabled::not-enabled']\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render('{{foo-bar isEnabled=enabled}}', {\n enabled: false\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view not-enabled')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this7.context, 'enabled', true);\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this7.context, 'enabled', false);\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view not-enabled')\n },\n content: 'hello'\n });\n };\n\n _proto['@test uses all provided static class names (issue #11193)'] = function testUsesAllProvidedStaticClassNamesIssue11193() {\n var _this8 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n classNameBindings: [':class-one', ':class-two']\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render('{{foo-bar}}', {\n enabled: false\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view class-one class-two')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this8.context, 'enabled', true);\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view class-one class-two')\n },\n content: 'hello'\n });\n };\n\n _proto['@test Providing a binding with a space in it asserts'] = function testProvidingABindingWithASpaceInItAsserts() {\n var _this9 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n classNameBindings: 'i:think:i am:so:clever'\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n expectAssertion(function () {\n _this9.render('{{foo-bar}}');\n }, /classNameBindings must not have spaces in them/i);\n };\n\n _proto['@test it asserts that items must be strings'] = function testItAssertsThatItemsMustBeStrings() {\n var _this10 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n foo: 'foo',\n bar: 'bar',\n classNameBindings: ['foo',, 'bar'] // eslint-disable-line no-sparse-arrays\n\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n expectAssertion(function () {\n _this10.render('{{foo-bar}}');\n }, /classNameBindings must be non-empty strings/);\n };\n\n _proto['@test it asserts that items must be non-empty strings'] = function testItAssertsThatItemsMustBeNonEmptyStrings() {\n var _this11 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n foo: 'foo',\n bar: 'bar',\n classNameBindings: ['foo', '', 'bar']\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n expectAssertion(function () {\n _this11.render('{{foo-bar}}');\n }, /classNameBindings must be non-empty strings/);\n };\n\n _proto['@test it can set class name bindings in the constructor'] = function testItCanSetClassNameBindingsInTheConstructor() {\n var _this12 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n classNameBindings: ['foo'],\n init: function () {\n this._super();\n\n var bindings = this.classNameBindings = this.classNameBindings.slice();\n\n if (this.get('bindIsEnabled')) {\n bindings.push('isEnabled:enabled');\n }\n\n if (this.get('bindIsHappy')) {\n bindings.push('isHappy:happy:sad');\n }\n }\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject()), {\n foo: 'foo',\n isEnabled: true,\n isHappy: false\n });\n this.assertComponentElement(this.nthChild(0), {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo enabled')\n },\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(1), {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo sad')\n },\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(2), {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo enabled sad')\n },\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(3), {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this12.rerender();\n });\n this.assertComponentElement(this.nthChild(0), {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo enabled')\n },\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(1), {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo sad')\n },\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(2), {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo enabled sad')\n },\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(3), {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this12.context, 'foo', 'FOO');\n (0, _metal.set)(_this12.context, 'isEnabled', false);\n });\n this.assertComponentElement(this.nthChild(0), {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view FOO')\n },\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(1), {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view FOO sad')\n },\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(2), {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view FOO sad')\n },\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(3), {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view FOO')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this12.context, 'foo', undefined);\n (0, _metal.set)(_this12.context, 'isHappy', true);\n });\n this.assertComponentElement(this.nthChild(0), {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view')\n },\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(1), {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view happy')\n },\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(2), {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view happy')\n },\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(3), {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this12.context, 'foo', 'foo');\n (0, _metal.set)(_this12.context, 'isEnabled', true);\n (0, _metal.set)(_this12.context, 'isHappy', false);\n });\n this.assertComponentElement(this.nthChild(0), {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo enabled')\n },\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(1), {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo sad')\n },\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(2), {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo enabled sad')\n },\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(3), {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo')\n },\n content: 'hello'\n });\n };\n\n _proto['@test using a computed property for classNameBindings triggers an assertion'] = function testUsingAComputedPropertyForClassNameBindingsTriggersAnAssertion() {\n var _this13 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n classNameBindings: (0, _metal.computed)(function () {\n return ['isHappy:happy:sad'];\n })\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n expectAssertion(function () {\n _this13.render('{{foo-bar}}');\n }, /Only arrays are allowed/);\n };\n\n return _class;\n }(_internalTestHelpers.RenderingTestCase));\n (0, _internalTestHelpers.moduleFor)('ClassBinding integration',\n /*#__PURE__*/\n function (_RenderingTestCase2) {\n (0, _emberBabel.inheritsLoose)(_class2, _RenderingTestCase2);\n\n function _class2() {\n return _RenderingTestCase2.apply(this, arguments) || this;\n }\n\n var _proto2 = _class2.prototype;\n\n _proto2['@test it should apply classBinding without condition always'] = function testItShouldApplyClassBindingWithoutConditionAlways() {\n var _this14 = this;\n\n this.registerComponent('foo-bar', {\n template: 'hello'\n });\n this.render('{{foo-bar classBinding=\":foo\"}}');\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n content: 'hello',\n attrs: {\n class: (0, _internalTestHelpers.classes)('foo ember-view')\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this14.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n content: 'hello',\n attrs: {\n class: (0, _internalTestHelpers.classes)('foo ember-view')\n }\n });\n };\n\n _proto2['@test it should merge classBinding with class'] = function testItShouldMergeClassBindingWithClass() {\n var _this15 = this;\n\n this.registerComponent('foo-bar', {\n template: 'hello'\n });\n this.render('{{foo-bar classBinding=\"birdman:respeck\" class=\"myName\"}}', {\n birdman: true\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n content: 'hello',\n attrs: {\n class: (0, _internalTestHelpers.classes)('respeck myName ember-view')\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this15.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n content: 'hello',\n attrs: {\n class: (0, _internalTestHelpers.classes)('respeck myName ember-view')\n }\n });\n };\n\n _proto2['@test it should apply classBinding with only truthy condition'] = function testItShouldApplyClassBindingWithOnlyTruthyCondition() {\n var _this16 = this;\n\n this.registerComponent('foo-bar', {\n template: 'hello'\n });\n this.render('{{foo-bar classBinding=\"myName:respeck\"}}', {\n myName: true\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n content: 'hello',\n attrs: {\n class: (0, _internalTestHelpers.classes)('respeck ember-view')\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this16.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n content: 'hello',\n attrs: {\n class: (0, _internalTestHelpers.classes)('respeck ember-view')\n }\n });\n };\n\n _proto2['@test it should apply classBinding with only falsy condition'] = function testItShouldApplyClassBindingWithOnlyFalsyCondition() {\n var _this17 = this;\n\n this.registerComponent('foo-bar', {\n template: 'hello'\n });\n this.render('{{foo-bar classBinding=\"myName::shade\"}}', {\n myName: false\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n content: 'hello',\n attrs: {\n class: (0, _internalTestHelpers.classes)('shade ember-view')\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this17.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n content: 'hello',\n attrs: {\n class: (0, _internalTestHelpers.classes)('shade ember-view')\n }\n });\n };\n\n _proto2['@test it should apply nothing when classBinding is falsy but only supplies truthy class'] = function testItShouldApplyNothingWhenClassBindingIsFalsyButOnlySuppliesTruthyClass() {\n var _this18 = this;\n\n this.registerComponent('foo-bar', {\n template: 'hello'\n });\n this.render('{{foo-bar classBinding=\"myName:respeck\"}}', {\n myName: false\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n content: 'hello',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view')\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this18.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n content: 'hello',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view')\n }\n });\n };\n\n _proto2['@test it should apply nothing when classBinding is truthy but only supplies falsy class'] = function testItShouldApplyNothingWhenClassBindingIsTruthyButOnlySuppliesFalsyClass() {\n var _this19 = this;\n\n this.registerComponent('foo-bar', {\n template: 'hello'\n });\n this.render('{{foo-bar classBinding=\"myName::shade\"}}', {\n myName: true\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n content: 'hello',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view')\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this19.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n content: 'hello',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view')\n }\n });\n };\n\n _proto2['@test it should apply classBinding with falsy condition'] = function testItShouldApplyClassBindingWithFalsyCondition() {\n var _this20 = this;\n\n this.registerComponent('foo-bar', {\n template: 'hello'\n });\n this.render('{{foo-bar classBinding=\"swag:fresh:scrub\"}}', {\n swag: false\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n content: 'hello',\n attrs: {\n class: (0, _internalTestHelpers.classes)('scrub ember-view')\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this20.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n content: 'hello',\n attrs: {\n class: (0, _internalTestHelpers.classes)('scrub ember-view')\n }\n });\n };\n\n _proto2['@test it should apply classBinding with truthy condition'] = function testItShouldApplyClassBindingWithTruthyCondition() {\n var _this21 = this;\n\n this.registerComponent('foo-bar', {\n template: 'hello'\n });\n this.render('{{foo-bar classBinding=\"swag:fresh:scrub\"}}', {\n swag: true\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n content: 'hello',\n attrs: {\n class: (0, _internalTestHelpers.classes)('fresh ember-view')\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this21.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n content: 'hello',\n attrs: {\n class: (0, _internalTestHelpers.classes)('fresh ember-view')\n }\n });\n };\n\n return _class2;\n }(_internalTestHelpers.RenderingTestCase));\n});","enifed(\"@ember/-internals/glimmer/tests/integration/components/contextual-components-test\", [\"ember-babel\", \"internal-test-helpers\", \"@ember/polyfills\", \"@ember/-internals/metal\", \"@ember/-internals/runtime\", \"@ember/-internals/glimmer/tests/utils/helpers\"], function (_emberBabel, _internalTestHelpers, _polyfills, _metal, _runtime, _helpers) {\n \"use strict\";\n\n function _templateObject21() {\n const data = _taggedTemplateLiteralLoose([\"\\n \"]);\n\n _templateObject21 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject20() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#let 'foo-bar' as |foo|}}\\n {{foo 1 2 3}}\\n {{/let}}\\n \"]);\n\n _templateObject20 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject19() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#let (component 'foo-bar') as |foo|}}\\n {{foo 1 2 3}}\\n {{/let}}\\n \"]);\n\n _templateObject19 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject18() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#let (component 'foo-bar') as |foo|}}\\n {{foo}}\\n {{/let}}\\n \"]);\n\n _templateObject18 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject17() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#with (hash ctxCmp=(component compName isOpen=isOpen)) as |thing|}}\\n {{#thing.ctxCmp}}This is a contextual component{{/thing.ctxCmp}}\\n {{/with}}\\n \"]);\n\n _templateObject17 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject16() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#with (hash ctxCmp=(component compName isOpen=isOpen)) as |thing|}}\\n {{#thing.ctxCmp}}This is a contextual component{{/thing.ctxCmp}}\\n {{/with}}\\n \"]);\n\n _templateObject16 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject15() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#with (hash ctxCmp=(component \\\"my-comp\\\" isOpen=isOpen)) as |thing|}}\\n {{#thing.ctxCmp}}This is a contextual component{{/thing.ctxCmp}}\\n {{/with}}\\n \"]);\n\n _templateObject15 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject14() {\n const data = _taggedTemplateLiteralLoose([\"\\n message: {{message}}{{inner-component message=message}}\\n \"]);\n\n _templateObject12 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject11() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#select-box as |sb|}}\\n {{sb.option label=\\\"Foo\\\"}}\\n {{sb.option}}\\n {{/select-box}}\"]);\n\n _templateObject11 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject10() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#my-component my-attr=myProp as |api|}}\\n {{api.my-nested-component}}\\n {{/my-component}}\\n
\\n \"]);\n\n _templateObject10 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject9() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#with (hash my-component=(component 'my-component' first)) as |c|}}\\n {{c.my-component}}\\n {{/with}}\"]);\n\n _templateObject9 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject8() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#with (hash lookedup=(component \\\"-looked-up\\\")) as |object|}}\\n {{object.lookedup model.expectedText \\\"Hola\\\"}}\\n {{/with}}\"]);\n\n _templateObject8 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject7() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#with (hash lookedup=(component \\\"-looked-up\\\" expectedText=model.expectedText)) as |object|}}\\n {{object.lookedup}}\\n {{/with}}\"]);\n\n _templateObject7 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject6() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#with (hash lookedup=(component \\\"-looked-up\\\")) as |object|}}\\n {{object.lookedup expectedText=model.expectedText}}\\n {{/with}}\"]);\n\n _templateObject6 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject5() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#with (hash lookedup=(component \\\"-looked-up\\\")) as |object|}}\\n {{object.lookedup}}\\n {{/with}}\"]);\n\n _templateObject5 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject4() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#with (component \\\"-looked-up\\\" greeting=\\\"Hola\\\" name=\\\"Dolores\\\" age=33) as |first|}}\\n {{#with (component first greeting=\\\"Hej\\\" name=\\\"Sigmundur\\\") as |second|}}\\n {{component second greeting=model.greeting}}\\n {{/with}}\\n {{/with}}\"]);\n\n _templateObject4 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject3() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#with (hash comp=(component \\\"-looked-up\\\" greeting=model.greeting)) as |my|}}\\n {{#my.comp}}{{/my.comp}}\\n {{/with}}\"]);\n\n _templateObject3 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject2() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{component (component \\\"-looked-up\\\" \\\"Hodari\\\" greeting=\\\"Hodi\\\")\\n greeting=\\\"Hola\\\"}}\"]);\n\n _templateObject2 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{component (component \\\"-looked-up\\\") \\\"Hodari\\\" greeting=\\\"Hodi\\\"}}\"]);\n\n _templateObject = function () {\n return data;\n };\n\n return data;\n }\n\n function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }\n\n (0, _internalTestHelpers.moduleFor)('Components test: contextual components',\n /*#__PURE__*/\n function (_RenderingTestCase) {\n (0, _emberBabel.inheritsLoose)(_class, _RenderingTestCase);\n\n function _class() {\n return _RenderingTestCase.apply(this, arguments) || this;\n }\n\n var _proto = _class.prototype;\n\n _proto['@test renders with component helper'] = function testRendersWithComponentHelper() {\n var _this = this;\n\n var expectedText = 'Hodi';\n this.registerComponent('-looked-up', {\n template: expectedText\n });\n this.render('{{component (component \"-looked-up\")}}');\n this.assertText(expectedText);\n (0, _internalTestHelpers.runTask)(function () {\n return _this.rerender();\n });\n this.assertText(expectedText);\n };\n\n _proto['@test renders with component helper with invocation params, hash'] = function testRendersWithComponentHelperWithInvocationParamsHash() {\n var _this2 = this;\n\n this.registerComponent('-looked-up', {\n ComponentClass: _helpers.Component.extend().reopenClass({\n positionalParams: ['name']\n }),\n template: '{{greeting}} {{name}}'\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject()));\n this.assertText('Hodi Hodari');\n (0, _internalTestHelpers.runTask)(function () {\n return _this2.rerender();\n });\n this.assertText('Hodi Hodari');\n };\n\n _proto['@test GH#13742 keeps nested rest positional parameters if rendered with no positional parameters'] = function testGH13742KeepsNestedRestPositionalParametersIfRenderedWithNoPositionalParameters() {\n var _this3 = this;\n\n this.registerComponent('-looked-up', {\n ComponentClass: _helpers.Component.extend().reopenClass({\n positionalParams: 'params'\n }),\n template: '{{#each params as |p|}}{{p}}{{/each}}'\n });\n this.render('{{component (component \"-looked-up\" model.greeting model.name)}}', {\n model: {\n greeting: 'Gabon ',\n name: 'Zack'\n }\n });\n this.assertText('Gabon Zack');\n (0, _internalTestHelpers.runTask)(function () {\n return _this3.rerender();\n });\n this.assertText('Gabon Zack');\n (0, _internalTestHelpers.runTask)(function () {\n return _this3.context.set('model.greeting', 'Good morning ');\n });\n this.assertText('Good morning Zack');\n (0, _internalTestHelpers.runTask)(function () {\n return _this3.context.set('model.name', 'Matthew');\n });\n this.assertText('Good morning Matthew');\n (0, _internalTestHelpers.runTask)(function () {\n return _this3.context.set('model', {\n greeting: 'Gabon ',\n name: 'Zack'\n });\n });\n this.assertText('Gabon Zack');\n } // Take a look at this one. Seems to pass even when currying isn't implemented.\n ;\n\n _proto['@test overwrites nested rest positional parameters if rendered with positional parameters'] = function testOverwritesNestedRestPositionalParametersIfRenderedWithPositionalParameters() {\n var _this4 = this;\n\n this.registerComponent('-looked-up', {\n ComponentClass: _helpers.Component.extend().reopenClass({\n positionalParams: 'params'\n }),\n template: '{{#each params as |p|}}{{p}}{{/each}}'\n });\n this.render('{{component (component \"-looked-up\" model.greeting model.name) model.name model.greeting}}', {\n model: {\n greeting: 'Gabon ',\n name: 'Zack '\n }\n });\n this.assertText('Gabon Zack Zack Gabon ');\n (0, _internalTestHelpers.runTask)(function () {\n return _this4.rerender();\n });\n this.assertText('Gabon Zack Zack Gabon ');\n (0, _internalTestHelpers.runTask)(function () {\n return _this4.context.set('model.greeting', 'Good morning ');\n });\n this.assertText('Good morning Zack Zack Good morning ');\n (0, _internalTestHelpers.runTask)(function () {\n return _this4.context.set('model.name', 'Matthew ');\n });\n this.assertText('Good morning Matthew Matthew Good morning ');\n (0, _internalTestHelpers.runTask)(function () {\n return _this4.context.set('model', {\n greeting: 'Gabon ',\n name: 'Zack '\n });\n });\n this.assertText('Gabon Zack Zack Gabon ');\n };\n\n _proto['@test GH#13742 keeps nested rest positional parameters if nested and rendered with no positional parameters'] = function testGH13742KeepsNestedRestPositionalParametersIfNestedAndRenderedWithNoPositionalParameters() {\n var _this5 = this;\n\n this.registerComponent('-looked-up', {\n ComponentClass: _helpers.Component.extend().reopenClass({\n positionalParams: 'params'\n }),\n template: '{{#each params as |p|}}{{p}}{{/each}}'\n });\n this.render('{{component (component (component \"-looked-up\" model.greeting model.name))}}', {\n model: {\n greeting: 'Gabon ',\n name: 'Zack'\n }\n });\n this.assertText('Gabon Zack');\n (0, _internalTestHelpers.runTask)(function () {\n return _this5.rerender();\n });\n this.assertText('Gabon Zack');\n (0, _internalTestHelpers.runTask)(function () {\n return _this5.context.set('model.greeting', 'Good morning ');\n });\n this.assertText('Good morning Zack');\n (0, _internalTestHelpers.runTask)(function () {\n return _this5.context.set('model.name', 'Matthew');\n });\n this.assertText('Good morning Matthew');\n (0, _internalTestHelpers.runTask)(function () {\n return _this5.context.set('model', {\n greeting: 'Gabon ',\n name: 'Zack'\n });\n });\n this.assertText('Gabon Zack');\n };\n\n _proto['@test overwrites nested rest positional parameters if nested with new pos params and rendered with no positional parameters'] = function testOverwritesNestedRestPositionalParametersIfNestedWithNewPosParamsAndRenderedWithNoPositionalParameters() {\n var _this6 = this;\n\n this.registerComponent('-looked-up', {\n ComponentClass: _helpers.Component.extend().reopenClass({\n positionalParams: 'params'\n }),\n template: '{{#each params as |p|}}{{p}}{{/each}}'\n });\n this.render('{{component (component (component \"-looked-up\" model.greeting model.name) model.name model.greeting)}}', {\n model: {\n greeting: 'Gabon ',\n name: 'Zack '\n }\n });\n this.assertText('Gabon Zack Zack Gabon ');\n (0, _internalTestHelpers.runTask)(function () {\n return _this6.rerender();\n });\n this.assertText('Gabon Zack Zack Gabon ');\n (0, _internalTestHelpers.runTask)(function () {\n return _this6.context.set('model.greeting', 'Good morning ');\n });\n this.assertText('Good morning Zack Zack Good morning ');\n (0, _internalTestHelpers.runTask)(function () {\n return _this6.context.set('model.name', 'Matthew ');\n });\n this.assertText('Good morning Matthew Matthew Good morning ');\n (0, _internalTestHelpers.runTask)(function () {\n return _this6.context.set('model', {\n greeting: 'Gabon ',\n name: 'Zack '\n });\n });\n this.assertText('Gabon Zack Zack Gabon ');\n };\n\n _proto['@test renders with component helper with curried params, hash'] = function testRendersWithComponentHelperWithCurriedParamsHash() {\n var _this7 = this;\n\n this.registerComponent('-looked-up', {\n ComponentClass: _helpers.Component.extend().reopenClass({\n positionalParams: ['name']\n }),\n template: '{{greeting}} {{name}}'\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject2()));\n this.assertText('Hola Hodari');\n (0, _internalTestHelpers.runTask)(function () {\n return _this7.rerender();\n });\n this.assertText('Hola Hodari');\n };\n\n _proto['@test updates when component path is bound'] = function testUpdatesWhenComponentPathIsBound() {\n var _this8 = this;\n\n this.registerComponent('-mandarin', {\n template: 'ni hao'\n });\n this.registerComponent('-hindi', {\n template: 'Namaste'\n });\n this.render('{{component (component model.lookupComponent)}}', {\n model: {\n lookupComponent: '-mandarin'\n }\n });\n this.assertText('ni hao');\n (0, _internalTestHelpers.runTask)(function () {\n return _this8.rerender();\n });\n this.assertText('ni hao');\n (0, _internalTestHelpers.runTask)(function () {\n return _this8.context.set('model.lookupComponent', '-hindi');\n });\n this.assertText('Namaste');\n (0, _internalTestHelpers.runTask)(function () {\n return _this8.context.set('model', {\n lookupComponent: '-mandarin'\n });\n });\n this.assertText('ni hao');\n };\n\n _proto['@test updates when curried hash argument is bound'] = function testUpdatesWhenCurriedHashArgumentIsBound() {\n var _this9 = this;\n\n this.registerComponent('-looked-up', {\n template: '{{greeting}}'\n });\n this.render(\"{{component (component \\\"-looked-up\\\" greeting=model.greeting)}}\", {\n model: {\n greeting: 'Hodi'\n }\n });\n this.assertText('Hodi');\n (0, _internalTestHelpers.runTask)(function () {\n return _this9.rerender();\n });\n this.assertText('Hodi');\n (0, _internalTestHelpers.runTask)(function () {\n return _this9.context.set('model.greeting', 'Hola');\n });\n this.assertText('Hola');\n (0, _internalTestHelpers.runTask)(function () {\n return _this9.context.set('model', {\n greeting: 'Hodi'\n });\n });\n this.assertText('Hodi');\n };\n\n _proto['@test updates when curried hash arguments is bound in block form'] = function testUpdatesWhenCurriedHashArgumentsIsBoundInBlockForm() {\n var _this10 = this;\n\n this.registerComponent('-looked-up', {\n template: '{{greeting}}'\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject3()), {\n model: {\n greeting: 'Hodi'\n }\n });\n this.assertText('Hodi');\n (0, _internalTestHelpers.runTask)(function () {\n return _this10.rerender();\n });\n this.assertText('Hodi');\n (0, _internalTestHelpers.runTask)(function () {\n return _this10.context.set('model.greeting', 'Hola');\n });\n this.assertText('Hola');\n (0, _internalTestHelpers.runTask)(function () {\n return _this10.context.set('model', {\n greeting: 'Hodi'\n });\n });\n this.assertText('Hodi');\n };\n\n _proto['@test nested components do not overwrite positional parameters'] = function testNestedComponentsDoNotOverwritePositionalParameters() {\n var _this11 = this;\n\n this.registerComponent('-looked-up', {\n ComponentClass: _helpers.Component.extend().reopenClass({\n positionalParams: ['name', 'age']\n }),\n template: '{{name}} {{age}}'\n });\n this.render('{{component (component (component \"-looked-up\" \"Sergio\" 29) \"Marvin\" 21) \"Hodari\"}}');\n this.assertText('Sergio 29');\n (0, _internalTestHelpers.runTask)(function () {\n return _this11.rerender();\n });\n this.assertText('Sergio 29');\n };\n\n _proto['@test positional parameters are combined not clobbered'] = function testPositionalParametersAreCombinedNotClobbered() {\n var _this12 = this;\n\n this.registerComponent('-looked-up', {\n ComponentClass: _helpers.Component.extend().reopenClass({\n positionalParams: ['greeting', 'name', 'age']\n }),\n template: '{{greeting}} {{name}} {{age}}'\n });\n this.render('{{component (component (component \"-looked-up\" \"Hi\") \"Max\") 9}}');\n this.assertText('Hi Max 9');\n (0, _internalTestHelpers.runTask)(function () {\n return _this12.rerender();\n });\n this.assertText('Hi Max 9');\n };\n\n _proto['@test nested components overwrite hash parameters'] = function testNestedComponentsOverwriteHashParameters() {\n var _this13 = this;\n\n this.registerComponent('-looked-up', {\n template: '{{greeting}} {{name}} {{age}}'\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject4()), {\n model: {\n greeting: 'Hodi'\n }\n });\n this.assertText('Hodi Sigmundur 33');\n (0, _internalTestHelpers.runTask)(function () {\n return _this13.rerender();\n });\n this.assertText('Hodi Sigmundur 33');\n (0, _internalTestHelpers.runTask)(function () {\n return _this13.context.set('model.greeting', 'Kaixo');\n });\n this.assertText('Kaixo Sigmundur 33');\n (0, _internalTestHelpers.runTask)(function () {\n return _this13.context.set('model', {\n greeting: 'Hodi'\n });\n });\n this.assertText('Hodi Sigmundur 33');\n };\n\n _proto['@test bound outer named parameters get updated in the right scope'] = function testBoundOuterNamedParametersGetUpdatedInTheRightScope() {\n var _this14 = this;\n\n this.registerComponent('-inner-component', {\n ComponentClass: _helpers.Component.extend().reopenClass({\n positionalParams: ['comp']\n }),\n template: '{{component comp \"Inner\"}}'\n });\n this.registerComponent('-looked-up', {\n ComponentClass: _helpers.Component.extend().reopenClass({\n positionalParams: ['name', 'age']\n }),\n template: '{{name}} {{age}}'\n });\n this.render('{{component \"-inner-component\" (component \"-looked-up\" model.outerName model.outerAge)}}', {\n model: {\n outerName: 'Outer',\n outerAge: 28\n }\n });\n this.assertText('Outer 28');\n (0, _internalTestHelpers.runTask)(function () {\n return _this14.rerender();\n });\n this.assertText('Outer 28');\n (0, _internalTestHelpers.runTask)(function () {\n return _this14.context.set('model.outerAge', 29);\n });\n this.assertText('Outer 29');\n (0, _internalTestHelpers.runTask)(function () {\n return _this14.context.set('model.outerName', 'Not outer');\n });\n this.assertText('Not outer 29');\n (0, _internalTestHelpers.runTask)(function () {\n _this14.context.set('model', {\n outerName: 'Outer',\n outerAge: 28\n });\n });\n this.assertText('Outer 28');\n };\n\n _proto['@test bound outer hash parameters get updated in the right scope'] = function testBoundOuterHashParametersGetUpdatedInTheRightScope() {\n var _this15 = this;\n\n this.registerComponent('-inner-component', {\n ComponentClass: _helpers.Component.extend().reopenClass({\n positionalParams: ['comp']\n }),\n template: '{{component comp name=\"Inner\"}}'\n });\n this.registerComponent('-looked-up', {\n template: '{{name}} {{age}}'\n });\n this.render('{{component \"-inner-component\" (component \"-looked-up\" name=model.outerName age=model.outerAge)}}', {\n model: {\n outerName: 'Outer',\n outerAge: 28\n }\n });\n this.assertText('Inner 28');\n (0, _internalTestHelpers.runTask)(function () {\n return _this15.rerender();\n });\n this.assertText('Inner 28');\n (0, _internalTestHelpers.runTask)(function () {\n return _this15.context.set('model.outerAge', 29);\n });\n this.assertText('Inner 29');\n (0, _internalTestHelpers.runTask)(function () {\n return _this15.context.set('model.outerName', 'Not outer');\n });\n this.assertText('Inner 29');\n (0, _internalTestHelpers.runTask)(function () {\n _this15.context.set('model', {\n outerName: 'Outer',\n outerAge: 28\n });\n });\n this.assertText('Inner 28');\n };\n\n _proto['@test conflicting positional and hash parameters does not raise an assertion if rerendered'] = function testConflictingPositionalAndHashParametersDoesNotRaiseAnAssertionIfRerendered() {\n var _this16 = this; // In some cases, rerendering with a positional param used to cause an\n // assertion. This test checks it does not.\n\n\n this.registerComponent('-looked-up', {\n ComponentClass: _helpers.Component.extend().reopenClass({\n positionalParams: ['name']\n }),\n template: '{{greeting}} {{name}}'\n });\n this.render('{{component (component \"-looked-up\" model.name greeting=\"Hodi\")}}', {\n model: {\n name: 'Hodari'\n }\n });\n this.assertText('Hodi Hodari');\n (0, _internalTestHelpers.runTask)(function () {\n return _this16.rerender();\n });\n this.assertText('Hodi Hodari');\n (0, _internalTestHelpers.runTask)(function () {\n return _this16.context.set('model.name', 'Sergio');\n });\n this.assertText('Hodi Sergio');\n (0, _internalTestHelpers.runTask)(function () {\n return _this16.context.set('model', {\n name: 'Hodari'\n });\n });\n this.assertText('Hodi Hodari');\n };\n\n _proto['@test component with dynamic component name resolving to undefined, then an existing component'] = function testComponentWithDynamicComponentNameResolvingToUndefinedThenAnExistingComponent() {\n var _this17 = this;\n\n this.registerComponent('foo-bar', {\n template: 'hello {{name}}'\n });\n this.render('{{component (component componentName name=name)}}', {\n componentName: undefined,\n name: 'Alex'\n });\n this.assertText('');\n (0, _internalTestHelpers.runTask)(function () {\n return _this17.rerender();\n });\n this.assertText('');\n (0, _internalTestHelpers.runTask)(function () {\n return _this17.context.set('componentName', 'foo-bar');\n });\n this.assertText('hello Alex');\n (0, _internalTestHelpers.runTask)(function () {\n return _this17.context.set('componentName', undefined);\n });\n this.assertText('');\n };\n\n _proto['@test component with dynamic component name resolving to a component, then undefined'] = function testComponentWithDynamicComponentNameResolvingToAComponentThenUndefined() {\n var _this18 = this;\n\n this.registerComponent('foo-bar', {\n template: 'hello {{name}}'\n });\n this.render('{{component (component componentName name=name)}}', {\n componentName: 'foo-bar',\n name: 'Alex'\n });\n this.assertText('hello Alex');\n (0, _internalTestHelpers.runTask)(function () {\n return _this18.rerender();\n });\n this.assertText('hello Alex');\n (0, _internalTestHelpers.runTask)(function () {\n return _this18.context.set('componentName', undefined);\n });\n this.assertText('');\n (0, _internalTestHelpers.runTask)(function () {\n return _this18.context.set('componentName', 'foo-bar');\n });\n this.assertText('hello Alex');\n };\n\n _proto['@test component with dynamic component name resolving to null, then an existing component'] = function testComponentWithDynamicComponentNameResolvingToNullThenAnExistingComponent() {\n var _this19 = this;\n\n this.registerComponent('foo-bar', {\n template: 'hello {{name}}'\n });\n this.render('{{component (component componentName name=name)}}', {\n componentName: null,\n name: 'Alex'\n });\n this.assertText('');\n (0, _internalTestHelpers.runTask)(function () {\n return _this19.rerender();\n });\n this.assertText('');\n (0, _internalTestHelpers.runTask)(function () {\n return _this19.context.set('componentName', 'foo-bar');\n });\n this.assertText('hello Alex');\n (0, _internalTestHelpers.runTask)(function () {\n return _this19.context.set('componentName', null);\n });\n this.assertText('');\n };\n\n _proto['@test component with dynamic component name resolving to a component, then null'] = function testComponentWithDynamicComponentNameResolvingToAComponentThenNull() {\n var _this20 = this;\n\n this.registerComponent('foo-bar', {\n template: 'hello {{name}}'\n });\n this.render('{{component (component componentName name=name)}}', {\n componentName: 'foo-bar',\n name: 'Alex'\n });\n this.assertText('hello Alex');\n (0, _internalTestHelpers.runTask)(function () {\n return _this20.rerender();\n });\n this.assertText('hello Alex');\n (0, _internalTestHelpers.runTask)(function () {\n return _this20.context.set('componentName', null);\n });\n this.assertText('');\n (0, _internalTestHelpers.runTask)(function () {\n return _this20.context.set('componentName', 'foo-bar');\n });\n this.assertText('hello Alex');\n };\n\n _proto['@test raises an assertion when component path is not a component name (static)'] = function testRaisesAnAssertionWhenComponentPathIsNotAComponentNameStatic() {\n var _this21 = this;\n\n expectAssertion(function () {\n _this21.render('{{component (component \"not-a-component\")}}');\n }, 'Could not find component named \"not-a-component\" (no component or template with that name was found)');\n };\n\n _proto['@test raises an assertion when component path is not a component name (dynamic)'] = function testRaisesAnAssertionWhenComponentPathIsNotAComponentNameDynamic() {\n var _this22 = this;\n\n expectAssertion(function () {\n _this22.render('{{component (component compName)}}', {\n compName: 'not-a-component'\n });\n }, 'Could not find component named \"not-a-component\" (no component or template with that name was found)');\n };\n\n _proto['@test renders with dot path'] = function testRendersWithDotPath() {\n var _this23 = this;\n\n var expectedText = 'Hodi';\n this.registerComponent('-looked-up', {\n template: expectedText\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject5()));\n this.assertText(expectedText);\n (0, _internalTestHelpers.runTask)(function () {\n return _this23.rerender();\n });\n this.assertText(expectedText);\n };\n\n _proto['@test renders with dot path and attr'] = function testRendersWithDotPathAndAttr() {\n var _this24 = this;\n\n var expectedText = 'Hodi';\n this.registerComponent('-looked-up', {\n template: '{{expectedText}}'\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject6()), {\n model: {\n expectedText: expectedText\n }\n });\n this.assertText(expectedText);\n (0, _internalTestHelpers.runTask)(function () {\n return _this24.rerender();\n });\n this.assertText(expectedText);\n (0, _internalTestHelpers.runTask)(function () {\n return _this24.context.set('model.expectedText', 'Hola');\n });\n this.assertText('Hola');\n (0, _internalTestHelpers.runTask)(function () {\n return _this24.context.set('model', {\n expectedText: expectedText\n });\n });\n this.assertText(expectedText);\n };\n\n _proto['@test renders with dot path and curried over attr'] = function testRendersWithDotPathAndCurriedOverAttr() {\n var _this25 = this;\n\n var expectedText = 'Hodi';\n this.registerComponent('-looked-up', {\n template: '{{expectedText}}'\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject7()), {\n model: {\n expectedText: expectedText\n }\n });\n this.assertText(expectedText);\n (0, _internalTestHelpers.runTask)(function () {\n return _this25.rerender();\n });\n this.assertText(expectedText);\n (0, _internalTestHelpers.runTask)(function () {\n return _this25.context.set('model.expectedText', 'Hola');\n });\n this.assertText('Hola');\n (0, _internalTestHelpers.runTask)(function () {\n return _this25.context.set('model', {\n expectedText: expectedText\n });\n });\n this.assertText(expectedText);\n };\n\n _proto['@test renders with dot path and with rest positional parameters'] = function testRendersWithDotPathAndWithRestPositionalParameters() {\n var _this26 = this;\n\n this.registerComponent('-looked-up', {\n ComponentClass: _helpers.Component.extend().reopenClass({\n positionalParams: 'params'\n }),\n template: '{{params}}'\n });\n var expectedText = 'Hodi';\n this.render((0, _internalTestHelpers.strip)(_templateObject8()), {\n model: {\n expectedText: expectedText\n }\n });\n this.assertText(expectedText + \",Hola\");\n (0, _internalTestHelpers.runTask)(function () {\n return _this26.rerender();\n });\n this.assertText(expectedText + \",Hola\");\n (0, _internalTestHelpers.runTask)(function () {\n return _this26.context.set('model.expectedText', 'Kaixo');\n });\n this.assertText('Kaixo,Hola');\n (0, _internalTestHelpers.runTask)(function () {\n return _this26.context.set('model', {\n expectedText: expectedText\n });\n });\n this.assertText(expectedText + \",Hola\");\n };\n\n _proto['@test renders with dot path and rest parameter does not leak'] = function testRendersWithDotPathAndRestParameterDoesNotLeak(assert) {\n // In the original implementation, positional parameters were not handled\n // correctly causing the first positional parameter to be the contextual\n // component itself.\n var value = false;\n this.registerComponent('my-component', {\n ComponentClass: _helpers.Component.extend({\n didReceiveAttrs: function () {\n value = this.getAttr('value');\n }\n }).reopenClass({\n positionalParams: ['value']\n })\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject9()), {\n first: 'first'\n });\n assert.equal(value, 'first', 'value is the expected parameter');\n };\n\n _proto['@test renders with dot path and updates attributes'] = function testRendersWithDotPathAndUpdatesAttributes(assert) {\n var _this27 = this;\n\n this.registerComponent('my-nested-component', {\n ComponentClass: _helpers.Component.extend({\n didReceiveAttrs: function () {\n this.set('myProp', this.getAttr('my-parent-attr'));\n }\n }),\n template: '{{myProp}}'\n });\n this.registerComponent('my-component', {\n template: '{{yield (hash my-nested-component=(component \"my-nested-component\" my-parent-attr=my-attr))}}'\n });\n this.registerComponent('my-action-component', {\n ComponentClass: _helpers.Component.extend({\n actions: {\n changeValue: function () {\n this.incrementProperty('myProp');\n }\n }\n }),\n template: (0, _internalTestHelpers.strip)(_templateObject10())\n });\n this.render('{{my-action-component myProp=model.myProp}}', {\n model: {\n myProp: 1\n }\n });\n assert.equal(this.$('#nested-prop').text(), '1');\n (0, _internalTestHelpers.runTask)(function () {\n return _this27.rerender();\n });\n assert.equal(this.$('#nested-prop').text(), '1');\n (0, _internalTestHelpers.runTask)(function () {\n return _this27.$('button').click();\n });\n assert.equal(this.$('#nested-prop').text(), '2');\n (0, _internalTestHelpers.runTask)(function () {\n return _this27.$('button').click();\n });\n assert.equal(this.$('#nested-prop').text(), '3');\n (0, _internalTestHelpers.runTask)(function () {\n return _this27.context.set('model', {\n myProp: 1\n });\n });\n assert.equal(this.$('#nested-prop').text(), '1');\n };\n\n _proto[\"@test adding parameters to a contextual component's instance does not add it to other instances\"] = function testAddingParametersToAContextualComponentSInstanceDoesNotAddItToOtherInstances() {\n var _this28 = this; // If parameters and attributes are not handled correctly, setting a value\n // in an invokation can leak to others invocation.\n\n\n this.registerComponent('select-box', {\n template: '{{yield (hash option=(component \"select-box-option\"))}}'\n });\n this.registerComponent('select-box-option', {\n template: '{{label}}'\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject11()));\n this.assertText('Foo');\n (0, _internalTestHelpers.runTask)(function () {\n return _this28.rerender();\n });\n this.assertText('Foo');\n };\n\n _proto['@test parameters in a contextual component are mutable when value is a param'] = function testParametersInAContextualComponentAreMutableWhenValueIsAParam(assert) {\n var _this29 = this; // This checks that a `(mut)` is added to parameters and attributes to\n // contextual components when it is a param.\n\n\n this.registerComponent('change-button', {\n ComponentClass: _helpers.Component.extend().reopenClass({\n positionalParams: ['val']\n }),\n template: (0, _internalTestHelpers.strip)(_templateObject12())\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject13()), {\n model: {\n val2: 8\n }\n });\n assert.equal(this.$('.value').text(), '8');\n (0, _internalTestHelpers.runTask)(function () {\n return _this29.rerender();\n });\n assert.equal(this.$('.value').text(), '8');\n (0, _internalTestHelpers.runTask)(function () {\n return _this29.$('.my-button').click();\n });\n assert.equal(this.$('.value').text(), '10');\n (0, _internalTestHelpers.runTask)(function () {\n return _this29.context.set('model', {\n val2: 8\n });\n });\n assert.equal(this.$('.value').text(), '8');\n };\n\n _proto['@test tagless blockless components render'] = function testTaglessBlocklessComponentsRender(assert) {\n var _this30 = this;\n\n this.registerComponent('my-comp', {\n ComponentClass: _helpers.Component.extend({\n tagName: ''\n })\n });\n this.render(\"{{my-comp}}\");\n (0, _internalTestHelpers.runTask)(function () {\n return _this30.rerender();\n });\n assert.equal(this.$().text(), '');\n };\n\n _proto['@test GH#13494 tagless blockless component with property binding'] = function testGH13494TaglessBlocklessComponentWithPropertyBinding(assert) {\n var _this31 = this;\n\n this.registerComponent('outer-component', {\n ComponentClass: _helpers.Component.extend({\n message: 'hello',\n actions: {\n change: function () {\n this.set('message', 'goodbye');\n }\n }\n }),\n template: (0, _internalTestHelpers.strip)(_templateObject14())\n });\n this.registerComponent('inner-component', {\n ComponentClass: _helpers.Component.extend({\n tagName: ''\n })\n });\n this.render(\"{{outer-component}}\");\n assert.equal(this.$().text(), 'message: hello');\n (0, _internalTestHelpers.runTask)(function () {\n return _this31.rerender();\n });\n assert.equal(this.$().text(), 'message: hello');\n (0, _internalTestHelpers.runTask)(function () {\n return _this31.$('button').click();\n });\n assert.equal(this.$().text(), 'message: goodbye');\n (0, _internalTestHelpers.runTask)(function () {\n return _this31.rerender();\n });\n assert.equal(this.$().text(), 'message: goodbye');\n };\n\n _proto['@test GH#13982 contextual component ref is stable even when bound params change'] = function testGH13982ContextualComponentRefIsStableEvenWhenBoundParamsChange(assert) {\n var _this32 = this;\n\n var instance, previousInstance;\n var initCount = 0;\n this.registerComponent('my-comp', {\n ComponentClass: _helpers.Component.extend({\n init: function () {\n this._super();\n\n previousInstance = instance;\n instance = this;\n initCount++;\n },\n isOpen: undefined\n }),\n template: '{{if isOpen \"open\" \"closed\"}}'\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject15()), {\n isOpen: true\n });\n assert.ok(!(0, _metal.isEmpty)(instance), 'a instance was created');\n assert.equal(previousInstance, undefined, 'no previous component exists');\n assert.equal(initCount, 1, 'the component was constructed exactly 1 time');\n assert.equal(this.$().text(), 'open', 'the components text is \"open\"');\n (0, _internalTestHelpers.runTask)(function () {\n return _this32.rerender();\n });\n assert.ok(!(0, _metal.isEmpty)(instance), 'the component instance exists');\n assert.equal(previousInstance, undefined, 'no previous component exists');\n assert.equal(initCount, 1, 'the component was constructed exactly 1 time');\n assert.equal(this.$().text(), 'open', 'the components text is \"open\"');\n (0, _internalTestHelpers.runTask)(function () {\n return _this32.context.set('isOpen', false);\n });\n assert.ok(!(0, _metal.isEmpty)(instance), 'the component instance exists');\n assert.equal(previousInstance, undefined, 'no previous component exists');\n assert.equal(initCount, 1, 'the component was constructed exactly 1 time');\n assert.equal(this.$().text(), 'closed', 'the component text is \"closed\"');\n (0, _internalTestHelpers.runTask)(function () {\n return _this32.rerender();\n });\n assert.ok(!(0, _metal.isEmpty)(instance), 'the component instance exists');\n assert.equal(previousInstance, undefined, 'no previous component exists');\n assert.equal(initCount, 1, 'the component was constructed exactly 1 time');\n assert.equal(this.$().text(), 'closed', 'the component text is \"closed\"');\n (0, _internalTestHelpers.runTask)(function () {\n return _this32.context.set('isOpen', true);\n });\n assert.ok(!(0, _metal.isEmpty)(instance), 'the component instance exists');\n assert.equal(previousInstance, undefined, 'no previous component exists');\n assert.equal(initCount, 1, 'the component was constructed exactly 1 time');\n assert.equal(this.$().text(), 'open', 'the components text is \"open\"');\n };\n\n _proto['@test GH#13982 contextual component ref is stable even when bound params change (bound name param)'] = function testGH13982ContextualComponentRefIsStableEvenWhenBoundParamsChangeBoundNameParam(assert) {\n var _this33 = this;\n\n var instance, previousInstance;\n var initCount = 0;\n this.registerComponent('my-comp', {\n ComponentClass: _helpers.Component.extend({\n init: function () {\n this._super();\n\n previousInstance = instance;\n instance = this;\n initCount++;\n },\n isOpen: undefined\n }),\n template: '{{if isOpen \"open\" \"closed\"}}'\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject16()), {\n compName: 'my-comp',\n isOpen: true\n });\n assert.ok(!(0, _metal.isEmpty)(instance), 'a instance was created');\n assert.equal(previousInstance, undefined, 'no previous component exists');\n assert.equal(initCount, 1, 'the component was constructed exactly 1 time');\n assert.equal(this.$().text(), 'open', 'the components text is \"open\"');\n (0, _internalTestHelpers.runTask)(function () {\n return _this33.rerender();\n });\n assert.ok(!(0, _metal.isEmpty)(instance), 'the component instance exists');\n assert.equal(previousInstance, undefined, 'no previous component exists');\n assert.equal(initCount, 1, 'the component was constructed exactly 1 time');\n assert.equal(this.$().text(), 'open', 'the components text is \"open\"');\n (0, _internalTestHelpers.runTask)(function () {\n return _this33.context.set('isOpen', false);\n });\n assert.ok(!(0, _metal.isEmpty)(instance), 'the component instance exists');\n assert.equal(previousInstance, undefined, 'no previous component exists');\n assert.equal(initCount, 1, 'the component was constructed exactly 1 time');\n assert.equal(this.$().text(), 'closed', 'the component text is \"closed\"');\n (0, _internalTestHelpers.runTask)(function () {\n return _this33.rerender();\n });\n assert.ok(!(0, _metal.isEmpty)(instance), 'the component instance exists');\n assert.equal(previousInstance, undefined, 'no previous component exists');\n assert.equal(initCount, 1, 'the component was constructed exactly 1 time');\n assert.equal(this.$().text(), 'closed', 'the component text is \"closed\"');\n (0, _internalTestHelpers.runTask)(function () {\n return _this33.context.set('isOpen', true);\n });\n assert.ok(!(0, _metal.isEmpty)(instance), 'the component instance exists');\n assert.equal(previousInstance, undefined, 'no previous component exists');\n assert.equal(initCount, 1, 'the component was constructed exactly 1 time');\n assert.equal(this.$().text(), 'open', 'the components text is \"open\"');\n };\n\n _proto['@test GH#13982 contextual component ref is recomputed when component name param changes'] = function testGH13982ContextualComponentRefIsRecomputedWhenComponentNameParamChanges(assert) {\n var _this34 = this;\n\n var instance, previousInstance;\n var initCount = 0;\n this.registerComponent('my-comp', {\n ComponentClass: _helpers.Component.extend({\n init: function () {\n this._super();\n\n previousInstance = instance;\n instance = this;\n initCount++;\n },\n isOpen: undefined\n }),\n template: 'my-comp: {{if isOpen \"open\" \"closed\"}}'\n });\n this.registerComponent('your-comp', {\n ComponentClass: _helpers.Component.extend({\n init: function () {\n this._super();\n\n previousInstance = instance;\n instance = this;\n initCount++;\n },\n isOpen: undefined\n }),\n template: 'your-comp: {{if isOpen \"open\" \"closed\"}}'\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject17()), {\n compName: 'my-comp',\n isOpen: true\n });\n assert.ok(!(0, _metal.isEmpty)(instance), 'a instance was created');\n assert.equal(previousInstance, undefined, 'there is no previous instance');\n assert.equal(initCount, 1, 'the component was constructed exactly 1 time');\n assert.equal(this.$().text(), 'my-comp: open');\n (0, _internalTestHelpers.runTask)(function () {\n return _this34.rerender();\n });\n assert.ok(!(0, _metal.isEmpty)(instance), 'a instance exists after rerender');\n assert.equal(previousInstance, undefined, 'there is no previous instance after rerender');\n assert.equal(initCount, 1, 'the component was constructed exactly 1 time');\n assert.equal(this.$().text(), 'my-comp: open');\n (0, _internalTestHelpers.runTask)(function () {\n return _this34.context.set('compName', 'your-comp');\n });\n assert.ok(!(0, _metal.isEmpty)(instance), 'an instance was created after component name changed');\n assert.ok(!(0, _metal.isEmpty)(previousInstance), 'a previous instance now exists');\n assert.notEqual(instance, previousInstance, 'the instance and previous instance are not the same object');\n assert.equal(initCount, 2, 'the component was constructed exactly 2 times');\n assert.equal(this.$().text(), 'your-comp: open');\n (0, _internalTestHelpers.runTask)(function () {\n return _this34.rerender();\n });\n assert.ok(!(0, _metal.isEmpty)(instance), 'an instance was created after component name changed (rerender)');\n assert.ok(!(0, _metal.isEmpty)(previousInstance), 'a previous instance now exists (rerender)');\n assert.notEqual(instance, previousInstance, 'the instance and previous instance are not the same object (rerender)');\n assert.equal(initCount, 2, 'the component was constructed exactly 2 times (rerender)');\n assert.equal(this.$().text(), 'your-comp: open');\n (0, _internalTestHelpers.runTask)(function () {\n return _this34.context.set('compName', 'my-comp');\n });\n assert.ok(!(0, _metal.isEmpty)(instance), 'an instance was created after component name changed');\n assert.ok(!(0, _metal.isEmpty)(previousInstance), 'a previous instance still exists');\n assert.notEqual(instance, previousInstance, 'the instance and previous instance are not the same object');\n assert.equal(initCount, 3, 'the component was constructed exactly 3 times (rerender)');\n assert.equal(this.$().text(), 'my-comp: open');\n };\n\n _proto['@test GH#14508 rest positional params are received when passed as named parameter'] = function testGH14508RestPositionalParamsAreReceivedWhenPassedAsNamedParameter() {\n var _this35 = this;\n\n this.registerComponent('my-link', {\n ComponentClass: _helpers.Component.extend().reopenClass({\n positionalParams: 'params'\n }),\n template: '{{#each params as |p|}}{{p}}{{/each}}'\n });\n this.render('{{component (component \"my-link\") params=allParams}}', {\n allParams: (0, _runtime.A)(['a', 'b'])\n });\n this.assertText('ab');\n (0, _internalTestHelpers.runTask)(function () {\n return _this35.rerender();\n });\n this.assertText('ab');\n (0, _internalTestHelpers.runTask)(function () {\n return _this35.context.get('allParams').pushObject('c');\n });\n this.assertText('abc');\n (0, _internalTestHelpers.runTask)(function () {\n return _this35.context.get('allParams').popObject();\n });\n this.assertText('ab');\n (0, _internalTestHelpers.runTask)(function () {\n return _this35.context.get('allParams').clear();\n });\n this.assertText('');\n (0, _internalTestHelpers.runTask)(function () {\n return _this35.context.set('allParams', (0, _runtime.A)(['1', '2']));\n });\n this.assertText('12');\n (0, _internalTestHelpers.runTask)(function () {\n return _this35.context.set('allParams', (0, _runtime.A)(['a', 'b']));\n });\n this.assertText('ab');\n };\n\n _proto['@test GH#14508 rest positional params are received when passed as named parameter with dot notation'] = function testGH14508RestPositionalParamsAreReceivedWhenPassedAsNamedParameterWithDotNotation() {\n var _this36 = this;\n\n this.registerComponent('my-link', {\n ComponentClass: _helpers.Component.extend().reopenClass({\n positionalParams: 'params'\n }),\n template: '{{#each params as |p|}}{{p}}{{/each}}'\n });\n this.render('{{#with (hash link=(component \"my-link\")) as |c|}}{{c.link params=allParams}}{{/with}}', {\n allParams: (0, _runtime.A)(['a', 'b'])\n });\n this.assertText('ab');\n (0, _internalTestHelpers.runTask)(function () {\n return _this36.rerender();\n });\n this.assertText('ab');\n (0, _internalTestHelpers.runTask)(function () {\n return _this36.context.get('allParams').pushObject('c');\n });\n this.assertText('abc');\n (0, _internalTestHelpers.runTask)(function () {\n return _this36.context.get('allParams').popObject();\n });\n this.assertText('ab');\n (0, _internalTestHelpers.runTask)(function () {\n return _this36.context.get('allParams').clear();\n });\n this.assertText('');\n (0, _internalTestHelpers.runTask)(function () {\n return _this36.context.set('allParams', (0, _runtime.A)(['1', '2']));\n });\n this.assertText('12');\n (0, _internalTestHelpers.runTask)(function () {\n return _this36.context.set('allParams', (0, _runtime.A)(['a', 'b']));\n });\n this.assertText('ab');\n };\n\n _proto['@feature(!ember-glimmer-angle-bracket-built-ins) GH#14632 give useful warning when calling contextual components with input as a name'] = function featureEmberGlimmerAngleBracketBuiltInsGH14632GiveUsefulWarningWhenCallingContextualComponentsWithInputAsAName() {\n var _this37 = this;\n\n expectAssertion(function () {\n _this37.render('{{component (component \"input\" type=\"text\")}}');\n }, 'Invoking `{{input}}` using angle bracket syntax or `component` helper is not yet supported.');\n };\n\n _proto['@feature(ember-glimmer-angle-bracket-built-ins) it can invoke input component'] = function featureEmberGlimmerAngleBracketBuiltInsItCanInvokeInputComponent() {\n var _this38 = this;\n\n this.render('{{component (component \"input\" type=\"text\" value=value)}}', {\n value: 'foo'\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'input',\n attrs: {\n class: 'ember-text-field ember-view',\n type: 'text'\n }\n });\n this.assert.strictEqual('foo', this.firstChild.value);\n this.assertStableRerender();\n (0, _internalTestHelpers.runTask)(function () {\n return _this38.context.set('value', 'bar');\n });\n this.assert.strictEqual('bar', this.firstChild.value);\n (0, _internalTestHelpers.runTask)(function () {\n return _this38.context.set('value', 'foo');\n });\n this.assert.strictEqual('foo', this.firstChild.value);\n };\n\n _proto['@feature(!ember-glimmer-angle-bracket-built-ins) GH#14632 give useful warning when calling contextual components with textarea as a name'] = function featureEmberGlimmerAngleBracketBuiltInsGH14632GiveUsefulWarningWhenCallingContextualComponentsWithTextareaAsAName() {\n var _this39 = this;\n\n expectAssertion(function () {\n _this39.render('{{component (component \"textarea\")}}');\n }, 'Invoking `{{textarea}}` using angle bracket syntax or `component` helper is not yet supported.');\n };\n\n _proto['@feature(ember-glimmer-angle-bracket-built-ins) it can invoke textarea component'] = function featureEmberGlimmerAngleBracketBuiltInsItCanInvokeTextareaComponent() {\n var _this40 = this;\n\n this.render('{{component (component \"textarea\" value=value)}}', {\n value: 'foo'\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'textarea',\n attrs: {\n class: 'ember-text-area ember-view'\n }\n });\n this.assert.strictEqual('foo', this.firstChild.value);\n this.assertStableRerender();\n (0, _internalTestHelpers.runTask)(function () {\n return _this40.context.set('value', 'bar');\n });\n this.assert.strictEqual('bar', this.firstChild.value);\n (0, _internalTestHelpers.runTask)(function () {\n return _this40.context.set('value', 'foo');\n });\n this.assert.strictEqual('foo', this.firstChild.value);\n };\n\n _proto['@test GH#17121 local variable should win over helper (without arguments)'] = function testGH17121LocalVariableShouldWinOverHelperWithoutArguments() {\n this.registerHelper('foo', function () {\n return 'foo helper';\n });\n this.registerComponent('foo-bar', {\n template: 'foo-bar component'\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject18()));\n this.assertText('foo-bar component');\n this.assertStableRerender();\n };\n\n _proto['@test GH#17121 local variable should win over helper (with arguments)'] = function testGH17121LocalVariableShouldWinOverHelperWithArguments() {\n this.registerHelper('foo', function (params) {\n return \"foo helper: \" + params.join(' ');\n });\n this.registerComponent('foo-bar', {\n ComponentClass: _helpers.Component.extend().reopenClass({\n positionalParams: 'params'\n }),\n template: 'foo-bar component:{{#each params as |param|}} {{param}}{{/each}}'\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject19()));\n this.assertText('foo-bar component: 1 2 3');\n this.assertStableRerender();\n };\n\n _proto['@test GH#17121 implicit component invocations should not perform string lookup'] = function testGH17121ImplicitComponentInvocationsShouldNotPerformStringLookup() {\n var _this41 = this;\n\n this.registerComponent('foo-bar', {\n template: 'foo-bar component'\n });\n expectAssertion(function () {\n return _this41.render((0, _internalTestHelpers.strip)(_templateObject20()));\n }, \"expected `foo` to be a contextual component but found a string. Did you mean `(component foo)`? ('-top-level' @ L1:C29) \");\n };\n\n _proto['@test RFC#311 invoking named args (without arguments)'] = function testRFC311InvokingNamedArgsWithoutArguments() {\n this.registerComponent('x-outer', {\n template: '{{@inner}}'\n });\n this.registerComponent('x-inner', {\n template: 'inner'\n });\n this.render('{{x-outer inner=(component \"x-inner\")}}');\n this.assertText('inner');\n this.assertStableRerender();\n };\n\n _proto['@test RFC#311 invoking named args (with arguments)'] = function testRFC311InvokingNamedArgsWithArguments() {\n this.registerComponent('x-outer', {\n template: '{{@inner 1 2 3}}'\n });\n this.registerComponent('x-inner', {\n ComponentClass: _helpers.Component.extend().reopenClass({\n positionalParams: 'params'\n }),\n template: 'inner:{{#each params as |param|}} {{param}}{{/each}}'\n });\n this.render('{{x-outer inner=(component \"x-inner\")}}');\n this.assertText('inner: 1 2 3');\n this.assertStableRerender();\n };\n\n _proto['@test RFC#311 invoking named args (with a block)'] = function testRFC311InvokingNamedArgsWithABlock() {\n this.registerComponent('x-outer', {\n template: '{{#@inner}}outer{{/@inner}}'\n });\n this.registerComponent('x-inner', {\n template: 'inner {{yield}}'\n });\n this.render('{{x-outer inner=(component \"x-inner\")}}');\n this.assertText('inner outer');\n this.assertStableRerender();\n };\n\n return _class;\n }(_internalTestHelpers.RenderingTestCase));\n\n var ContextualComponentMutableParamsTest =\n /*#__PURE__*/\n function (_RenderingTestCase2) {\n (0, _emberBabel.inheritsLoose)(ContextualComponentMutableParamsTest, _RenderingTestCase2);\n\n function ContextualComponentMutableParamsTest() {\n return _RenderingTestCase2.apply(this, arguments) || this;\n }\n\n var _proto2 = ContextualComponentMutableParamsTest.prototype;\n\n _proto2.render = function render(templateStr) {\n var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n _RenderingTestCase2.prototype.render.call(this, templateStr + \"{{model.val2}}\", (0, _polyfills.assign)(context, {\n model: {\n val2: 8\n }\n }));\n };\n\n return ContextualComponentMutableParamsTest;\n }(_internalTestHelpers.RenderingTestCase);\n\n var MutableParamTestGenerator =\n /*#__PURE__*/\n function () {\n function MutableParamTestGenerator(cases) {\n this.cases = cases;\n }\n\n var _proto3 = MutableParamTestGenerator.prototype;\n\n _proto3.generate = function generate(_ref) {\n var _ref2;\n\n var title = _ref.title,\n setup = _ref.setup;\n return _ref2 = {}, _ref2[\"@test parameters in a contextual component are mutable when value is a \" + title] = function (assert) {\n var _this42 = this;\n\n this.registerComponent('change-button', {\n ComponentClass: _helpers.Component.extend().reopenClass({\n positionalParams: ['val']\n }),\n template: (0, _internalTestHelpers.strip)(_templateObject21())\n });\n setup.call(this, assert);\n assert.equal(this.$('.value').text(), '8');\n (0, _internalTestHelpers.runTask)(function () {\n return _this42.rerender();\n });\n assert.equal(this.$('.value').text(), '8');\n (0, _internalTestHelpers.runTask)(function () {\n return _this42.$('.my-button').click();\n });\n assert.equal(this.$('.value').text(), '10');\n (0, _internalTestHelpers.runTask)(function () {\n return _this42.context.set('model', {\n val2: 8\n });\n });\n assert.equal(this.$('.value').text(), '8');\n }, _ref2;\n };\n\n return MutableParamTestGenerator;\n }();\n\n (0, _internalTestHelpers.applyMixins)(ContextualComponentMutableParamsTest, new MutableParamTestGenerator([{\n title: 'param',\n setup: function () {\n this.render('{{component (component \"change-button\" model.val2)}}');\n }\n }, {\n title: 'nested param',\n setup: function () {\n this.registerComponent('my-comp', {\n ComponentClass: _helpers.Component.extend().reopenClass({\n positionalParams: ['components']\n }),\n template: '{{component components.comp}}'\n });\n this.render('{{my-comp (hash comp=(component \"change-button\" model.val2))}}');\n }\n }, {\n title: 'hash value',\n setup: function () {\n this.registerComponent('my-comp', {\n template: '{{component component}}'\n });\n this.render('{{my-comp component=(component \"change-button\" val=model.val2)}}');\n }\n }, {\n title: 'nested hash value',\n setup: function () {\n this.registerComponent('my-comp', {\n template: '{{component components.button}}'\n });\n this.render('{{my-comp components=(hash button=(component \"change-button\" val=model.val2))}}');\n }\n }]));\n (0, _internalTestHelpers.moduleFor)('Components test: contextual components -- mutable params', ContextualComponentMutableParamsTest);\n});","enifed(\"@ember/-internals/glimmer/tests/integration/components/curly-components-test\", [\"ember-babel\", \"internal-test-helpers\", \"@ember/runloop\", \"@ember/-internals/metal\", \"@ember/service\", \"@ember/-internals/runtime\", \"@ember/-internals/views\", \"@ember/-internals/glimmer/tests/utils/helpers\"], function (_emberBabel, _internalTestHelpers, _runloop, _metal, _service, _runtime, _views, _helpers) {\n \"use strict\";\n\n function _templateObject55() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#list-items items=items as |thing|}}\\n |{{thing}}|\\n\\n {{#if editMode}}\\n Remove {{thing}}\\n {{/if}}\\n {{/list-items}}\\n \"]);\n\n _templateObject55 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject54() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#x-select value=value as |select|}}\\n {{#x-option value=\\\"1\\\" select=select}}1{{/x-option}}\\n {{#x-option value=\\\"2\\\" select=select}}2{{/x-option}}\\n {{/x-select}}\\n \"]);\n\n _templateObject54 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject53() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#some-clicky-thing blahzz=\\\"baz\\\"}}\\n Click Me\\n {{/some-clicky-thing}}\"]);\n\n _templateObject53 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject52() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#each blahzz as |p|}}\\n {{p}}\\n {{/each}}\\n - {{yield}}\"]);\n\n _templateObject52 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject51() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#some-clicky-thing classNames=\\\"baz\\\"}}\\n Click Me\\n {{/some-clicky-thing}}\"]);\n\n _templateObject51 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject50() {\n const data = _taggedTemplateLiteralLoose([\"\\n In layout. {{#each items as |item|}}\\n [{{child-non-block item=item}}]\\n {{/each}}\"]);\n\n _templateObject50 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject49() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#x-outer}}\\n {{#if showInner}}\\n {{x-inner}}\\n {{/if}}\\n {{/x-outer}}\"]);\n\n _templateObject49 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject48() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#check-helper}}{{/check-helper}}\\n {{#check-helper as |something|}}{{/check-helper}}\"]);\n\n _templateObject48 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject47() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#check-helper}}{{/check-helper}}\\n {{#check-helper as |something|}}{{/check-helper}}\"]);\n\n _templateObject47 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject46() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#check-helper}}{{/check-helper}}\\n {{#check-helper as |something|}}{{/check-helper}}\"]);\n\n _templateObject46 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject45() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#check-helper}}{{/check-helper}}\\n {{#check-helper}}{{else}}{{/check-helper}}\"]);\n\n _templateObject45 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject44() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{check-helper}}\\n {{#check-helper}}{{/check-helper}}\"]);\n\n _templateObject44 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject43() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{check-helper}}\\n {{#check-helper}}{{/check-helper}}\"]);\n\n _templateObject43 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject42() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#check-attr}}{{/check-attr}}\\n {{#check-attr as |something|}}{{/check-attr}}\"]);\n\n _templateObject42 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject41() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#check-attr}}{{/check-attr}}\\n {{#check-attr as |something|}}{{/check-attr}}\"]);\n\n _templateObject41 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject40() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#check-attr}}{{/check-attr}}\\n {{#check-attr}}{{else}}{{/check-attr}}\"]);\n\n _templateObject40 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject39() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{check-attr}}\\n {{#check-attr}}{{/check-attr}}\"]);\n\n _templateObject39 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject38() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#check-params}}{{/check-params}}\\n {{#check-params as |foo|}}{{/check-params}}\"]);\n\n _templateObject38 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject37() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#if hasBlockParams}}\\n Yes\\n {{else}}\\n No\\n {{/if}}\"]);\n\n _templateObject37 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject36() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#check-params}}{{/check-params}}\\n {{#check-params as |foo|}}{{/check-params}}\"]);\n\n _templateObject36 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject35() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#if (hasBlockParams)}}\\n Yes\\n {{else}}\\n No\\n {{/if}}\"]);\n\n _templateObject35 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject34() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{check-block}}\\n {{#check-block}}{{/check-block}}\"]);\n\n _templateObject34 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject33() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#if hasBlock}}\\n Yes\\n {{else}}\\n No\\n {{/if}}\"]);\n\n _templateObject33 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject32() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#check-block}}{{/check-block}}\\n {{#check-block as |something|}}{{/check-block}}\"]);\n\n _templateObject32 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject31() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#if (hasBlockParams)}}\\n Yes\\n {{else}}\\n No\\n {{/if}}\"]);\n\n _templateObject31 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject30() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#check-inverse}}{{/check-inverse}}\\n {{#check-inverse as |something|}}{{/check-inverse}}\"]);\n\n _templateObject30 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject29() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#if (hasBlockParams \\\"inverse\\\")}}\\n Yes\\n {{else}}\\n No\\n {{/if}}\"]);\n\n _templateObject29 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject28() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{check-block}}\\n {{#check-block}}{{/check-block}}\"]);\n\n _templateObject28 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject27() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#if (hasBlock)}}\\n Yes\\n {{else}}\\n No\\n {{/if}}\"]);\n\n _templateObject27 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject26() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#check-inverse}}{{/check-inverse}}\\n {{#check-inverse}}{{else}}{{/check-inverse}}\"]);\n\n _templateObject26 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject25() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#if (hasBlock \\\"inverse\\\")}}\\n Yes\\n {{else}}\\n No\\n {{/if}}\"]);\n\n _templateObject25 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject24() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#my-if predicate=activated someValue=42 as |result|}}\\n Hello{{result}}\\n {{else}}\\n Goodbye\\n {{/my-if}}\"]);\n\n _templateObject24 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject23() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#if predicate}}\\n Yes:{{yield someValue}}\\n {{else}}\\n No:{{yield to=\\\"inverse\\\"}}\\n {{/if}}\"]);\n\n _templateObject23 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject22() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#with-block}}\\n In block\\n {{/with-block}}\"]);\n\n _templateObject22 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject21() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#if hasBlockParams}}\\n {{yield this}}\\n {{else}}\\n {{yield}} No Block Param!\\n {{/if}}\"]);\n\n _templateObject21 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject20() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#with-block as |something|}}\\n In template\\n {{/with-block}}\"]);\n\n _templateObject20 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject19() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#if hasBlockParams}}\\n {{yield this}} - In Component\\n {{else}}\\n {{yield}} No Block!\\n {{/if}}\"]);\n\n _templateObject19 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject18() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#if hasBlock}}\\n {{yield}}\\n {{else}}\\n No Block!\\n {{/if}}\"]);\n\n _templateObject18 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject17() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#with-block}}\\n In template\\n {{/with-block}}\"]);\n\n _templateObject17 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject16() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#if hasBlock}}\\n {{yield}}\\n {{else}}\\n No Block!\\n {{/if}}\"]);\n\n _templateObject16 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject15() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#with-template name=\\\"with-block\\\"}}\\n [In block - {{name}}]\\n {{/with-template}}\\n {{with-template name=\\\"without-block\\\"}}\"]);\n\n _templateObject15 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject14() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#each n as |name|}}\\n {{name}}\\n {{/each}}\"]);\n\n _templateObject14 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject13() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{sample-component \\\"one\\\" \\\"two\\\" elementId=\\\"two-positional\\\"}}\\n {{sample-component \\\"one\\\" second=\\\"two\\\" elementId=\\\"one-positional\\\"}}\\n {{sample-component first=\\\"one\\\" second=\\\"two\\\" elementId=\\\"no-positional\\\"}}\"]);\n\n _templateObject13 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject12() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#each names as |name|}}\\n {{name}}\\n {{/each}}\"]);\n\n _templateObject12 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject11() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#each names as |name|}}\\n {{name}}\\n {{/each}}\"]);\n\n _templateObject11 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject10() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{sample-component \\\"Foo\\\" 4 \\\"Bar\\\" elementId=\\\"args-3\\\"}}\\n {{sample-component \\\"Foo\\\" 4 \\\"Bar\\\" 5 \\\"Baz\\\" elementId=\\\"args-5\\\"}}\"]);\n\n _templateObject10 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject9() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#each names as |name|}}\\n {{name}}\\n {{/each}}\"]);\n\n _templateObject9 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject8() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#with-block someProp=prop}}\\n In template\\n {{/with-block}}\"]);\n\n _templateObject8 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject7() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#with-block someProp=prop}}\\n In template\\n {{/with-block}}\"]);\n\n _templateObject7 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject6() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#with-block someProp=prop}}\\n In template\\n {{/with-block}}\"]);\n\n _templateObject6 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject5() {\n const data = _taggedTemplateLiteralLoose([\"Args: lul | lul | lul | lul1111\"]);\n\n _templateObject5 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject4() {\n const data = _taggedTemplateLiteralLoose([\"\\n Args: {{this.attrs.value}} | {{attrs.value}} | {{@value}} | {{value}}\\n {{#each this.attrs.items as |item|}}\\n {{item}}\\n {{/each}}\\n {{#each attrs.items as |item|}}\\n {{item}}\\n {{/each}}\\n {{#each @items as |item|}}\\n {{item}}\\n {{/each}}\\n {{#each items as |item|}}\\n {{item}}\\n {{/each}}\\n \"]);\n\n _templateObject4 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject3() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#if isStream}}\\n true\\n {{else}}\\n false\\n {{/if}}\\n \"]);\n\n _templateObject3 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject2() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#if cond1}}\\n {{#foo-bar id=1}}\\n {{#if cond2}}\\n {{#foo-bar id=2}}{{/foo-bar}}\\n {{#if cond3}}\\n {{#foo-bar id=3}}\\n {{#if cond4}}\\n {{#foo-bar id=4}}\\n {{#if cond5}}\\n {{#foo-bar id=5}}{{/foo-bar}}\\n {{#foo-bar id=6}}{{/foo-bar}}\\n {{#foo-bar id=7}}{{/foo-bar}}\\n {{/if}}\\n {{#foo-bar id=8}}{{/foo-bar}}\\n {{/foo-bar}}\\n {{/if}}\\n {{/foo-bar}}\\n {{/if}}\\n {{/if}}\\n {{/foo-bar}}\\n {{/if}}\"]);\n\n _templateObject2 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{foo-bar class=\\\"bar baz\\\"}}\\n {{foo-bar classNames=\\\"bar baz\\\"}}\\n {{foo-bar}}\\n \"]);\n\n _templateObject = function () {\n return data;\n };\n\n return data;\n }\n\n function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }\n\n (0, _internalTestHelpers.moduleFor)('Components test: curly components',\n /*#__PURE__*/\n function (_RenderingTestCase) {\n (0, _emberBabel.inheritsLoose)(_class, _RenderingTestCase);\n\n function _class() {\n return _RenderingTestCase.apply(this, arguments) || this;\n }\n\n var _proto = _class.prototype;\n\n _proto['@test it can render a basic component'] = function testItCanRenderABasicComponent() {\n var _this = this;\n\n this.registerComponent('foo-bar', {\n template: 'hello'\n });\n this.render('{{foo-bar}}');\n this.assertComponentElement(this.firstChild, {\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello'\n });\n };\n\n _proto['@test it can have a custom id and it is not bound'] = function testItCanHaveACustomIdAndItIsNotBound() {\n var _this2 = this;\n\n this.registerComponent('foo-bar', {\n template: '{{id}} {{elementId}}'\n });\n this.render('{{foo-bar id=customId}}', {\n customId: 'bizz'\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n id: 'bizz'\n },\n content: 'bizz bizz'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this2.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n id: 'bizz'\n },\n content: 'bizz bizz'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this2.context, 'customId', 'bar');\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n id: 'bizz'\n },\n content: 'bar bizz'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this2.context, 'customId', 'bizz');\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n id: 'bizz'\n },\n content: 'bizz bizz'\n });\n };\n\n _proto['@test elementId cannot change'] = function testElementIdCannotChange(assert) {\n var component;\n\n var FooBarComponent = _helpers.Component.extend({\n elementId: 'blahzorz',\n init: function () {\n this._super.apply(this, arguments);\n\n component = this;\n }\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: '{{elementId}}'\n });\n this.render('{{foo-bar}}');\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n id: 'blahzorz'\n },\n content: 'blahzorz'\n });\n\n if (EmberDev && !EmberDev.runningProdBuild) {\n var willThrow = function () {\n return (0, _runloop.run)(null, _metal.set, component, 'elementId', 'herpyderpy');\n };\n\n assert.throws(willThrow, /Changing a view's elementId after creation is not allowed/);\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n id: 'blahzorz'\n },\n content: 'blahzorz'\n });\n }\n };\n\n _proto['@test can specify template with `layoutName` property'] = function testCanSpecifyTemplateWithLayoutNameProperty() {\n var FooBarComponent = _helpers.Component.extend({\n elementId: 'blahzorz',\n layoutName: 'fizz-bar',\n init: function () {\n this._super.apply(this, arguments);\n\n this.local = 'hey';\n }\n });\n\n this.registerTemplate('fizz-bar', \"FIZZ BAR {{local}}\");\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent\n });\n this.render('{{foo-bar}}');\n this.assertText('FIZZ BAR hey');\n };\n\n _proto['@test layout supports computed property'] = function testLayoutSupportsComputedProperty() {\n var FooBarComponent = _helpers.Component.extend({\n elementId: 'blahzorz',\n layout: (0, _metal.computed)(function () {\n return (0, _helpers.compile)('so much layout wat {{lulz}}');\n }),\n init: function () {\n this._super.apply(this, arguments);\n\n this.lulz = 'heyo';\n }\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent\n });\n this.render('{{foo-bar}}');\n this.assertText('so much layout wat heyo');\n };\n\n _proto['@test passing undefined elementId results in a default elementId'] = function testPassingUndefinedElementIdResultsInADefaultElementId(assert) {\n var _this3 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n tagName: 'h1'\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'something'\n });\n this.render('{{foo-bar id=somethingUndefined}}');\n var foundId = this.$('h1').attr('id');\n assert.ok(/^ember/.test(foundId), 'Has a reasonable id attribute (found id=' + foundId + ').');\n (0, _internalTestHelpers.runTask)(function () {\n return _this3.rerender();\n });\n var newFoundId = this.$('h1').attr('id');\n assert.ok(/^ember/.test(newFoundId), 'Has a reasonable id attribute (found id=' + newFoundId + ').');\n assert.equal(foundId, newFoundId);\n };\n\n _proto['@test id is an alias for elementId'] = function testIdIsAnAliasForElementId(assert) {\n var _this4 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n tagName: 'h1'\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'something'\n });\n this.render('{{foo-bar id=\"custom-id\"}}');\n var foundId = this.$('h1').attr('id');\n assert.equal(foundId, 'custom-id');\n (0, _internalTestHelpers.runTask)(function () {\n return _this4.rerender();\n });\n var newFoundId = this.$('h1').attr('id');\n assert.equal(newFoundId, 'custom-id');\n assert.equal(foundId, newFoundId);\n };\n\n _proto['@test cannot pass both id and elementId at the same time'] = function testCannotPassBothIdAndElementIdAtTheSameTime() {\n var _this5 = this;\n\n this.registerComponent('foo-bar', {\n template: ''\n });\n expectAssertion(function () {\n _this5.render('{{foo-bar id=\"zomg\" elementId=\"lol\"}}');\n }, /You cannot invoke a component with both 'id' and 'elementId' at the same time./);\n };\n\n _proto['@test it can have a custom tagName'] = function testItCanHaveACustomTagName() {\n var _this6 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n tagName: 'foo-bar'\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render('{{foo-bar}}');\n this.assertComponentElement(this.firstChild, {\n tagName: 'foo-bar',\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this6.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'foo-bar',\n content: 'hello'\n });\n };\n\n _proto['@test it can have a custom tagName set in the constructor'] = function testItCanHaveACustomTagNameSetInTheConstructor() {\n var _this7 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n init: function () {\n this._super();\n\n this.tagName = 'foo-bar';\n }\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render('{{foo-bar}}');\n this.assertComponentElement(this.firstChild, {\n tagName: 'foo-bar',\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this7.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'foo-bar',\n content: 'hello'\n });\n };\n\n _proto['@test it can have a custom tagName from the invocation'] = function testItCanHaveACustomTagNameFromTheInvocation() {\n var _this8 = this;\n\n this.registerComponent('foo-bar', {\n template: 'hello'\n });\n this.render('{{foo-bar tagName=\"foo-bar\"}}');\n this.assertComponentElement(this.firstChild, {\n tagName: 'foo-bar',\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this8.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'foo-bar',\n content: 'hello'\n });\n };\n\n _proto['@test tagName can not be a computed property'] = function testTagNameCanNotBeAComputedProperty() {\n var _this9 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n tagName: (0, _metal.computed)(function () {\n return 'foo-bar';\n })\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n expectAssertion(function () {\n _this9.render('{{foo-bar}}');\n }, /You cannot use a computed property for the component's `tagName` \\(<.+?>\\)\\./);\n };\n\n _proto['@test class is applied before didInsertElement'] = function testClassIsAppliedBeforeDidInsertElement(assert) {\n var componentClass;\n\n var FooBarComponent = _helpers.Component.extend({\n didInsertElement: function () {\n componentClass = this.element.className;\n }\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render('{{foo-bar class=\"foo-bar\"}}');\n assert.equal(componentClass, 'foo-bar ember-view');\n };\n\n _proto['@test it can have custom classNames'] = function testItCanHaveCustomClassNames() {\n var _this10 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n classNames: ['foo', 'bar']\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render('{{foo-bar}}');\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo bar')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this10.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo bar')\n },\n content: 'hello'\n });\n };\n\n _proto['@test should not apply falsy class name'] = function testShouldNotApplyFalsyClassName() {\n var _this11 = this;\n\n this.registerComponent('foo-bar', {\n template: 'hello'\n });\n this.render('{{foo-bar class=somethingFalsy}}', {\n somethingFalsy: false\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: 'ember-view'\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this11.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: 'ember-view'\n },\n content: 'hello'\n });\n };\n\n _proto['@test should update class using inline if, initially false, no alternate'] = function testShouldUpdateClassUsingInlineIfInitiallyFalseNoAlternate() {\n var _this12 = this;\n\n this.registerComponent('foo-bar', {\n template: 'hello'\n });\n this.render('{{foo-bar class=(if predicate \"thing\") }}', {\n predicate: false\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: 'ember-view'\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this12.context, 'predicate', true);\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this12.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view thing')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this12.context, 'predicate', false);\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this12.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: 'ember-view'\n },\n content: 'hello'\n });\n };\n\n _proto['@test should update class using inline if, initially true, no alternate'] = function testShouldUpdateClassUsingInlineIfInitiallyTrueNoAlternate() {\n var _this13 = this;\n\n this.registerComponent('foo-bar', {\n template: 'hello'\n });\n this.render('{{foo-bar class=(if predicate \"thing\") }}', {\n predicate: true\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view thing')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this13.context, 'predicate', false);\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this13.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: 'ember-view'\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this13.context, 'predicate', true);\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this13.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view thing')\n },\n content: 'hello'\n });\n };\n\n _proto['@test should apply classes of the dasherized property name when bound property specified is true'] = function testShouldApplyClassesOfTheDasherizedPropertyNameWhenBoundPropertySpecifiedIsTrue() {\n var _this14 = this;\n\n this.registerComponent('foo-bar', {\n template: 'hello'\n });\n this.render('{{foo-bar class=model.someTruth}}', {\n model: {\n someTruth: true\n }\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view some-truth')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this14.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view some-truth')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this14.context, 'model.someTruth', false);\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this14.context, 'model', {\n someTruth: true\n });\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view some-truth')\n },\n content: 'hello'\n });\n };\n\n _proto['@test class property on components can be dynamic'] = function testClassPropertyOnComponentsCanBeDynamic() {\n var _this15 = this;\n\n this.registerComponent('foo-bar', {\n template: 'hello'\n });\n this.render('{{foo-bar class=(if fooBar \"foo-bar\")}}', {\n fooBar: true\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo-bar')\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this15.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo-bar')\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this15.context, 'fooBar', false);\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view')\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this15.context, 'fooBar', true);\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo-bar')\n }\n });\n };\n\n _proto['@test it can have custom classNames from constructor'] = function testItCanHaveCustomClassNamesFromConstructor() {\n var _this16 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n init: function () {\n this._super();\n\n this.classNames = this.classNames.slice();\n this.classNames.push('foo', 'bar', \"outside-\" + this.get('extraClass'));\n }\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render('{{foo-bar extraClass=\"baz\"}}');\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo bar outside-baz')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this16.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo bar outside-baz')\n },\n content: 'hello'\n });\n };\n\n _proto['@test it can set custom classNames from the invocation'] = function testItCanSetCustomClassNamesFromTheInvocation() {\n var _this17 = this;\n\n var FooBarComponent = _helpers.Component.extend({\n classNames: ['foo']\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject()));\n this.assertComponentElement(this.nthChild(0), {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo bar baz')\n },\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(1), {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo bar baz')\n },\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(2), {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this17.rerender();\n });\n this.assertComponentElement(this.nthChild(0), {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo bar baz')\n },\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(1), {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo bar baz')\n },\n content: 'hello'\n });\n this.assertComponentElement(this.nthChild(2), {\n tagName: 'div',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view foo')\n },\n content: 'hello'\n });\n };\n\n _proto['@test it has an element'] = function testItHasAnElement() {\n var _this18 = this;\n\n var instance;\n\n var FooBarComponent = _helpers.Component.extend({\n init: function () {\n this._super();\n\n instance = this;\n }\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render('{{foo-bar}}');\n var element1 = instance.element;\n this.assertComponentElement(element1, {\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this18.rerender();\n });\n var element2 = instance.element;\n this.assertComponentElement(element2, {\n content: 'hello'\n });\n this.assertSameNode(element2, element1);\n };\n\n _proto['@test an empty component does not have childNodes'] = function testAnEmptyComponentDoesNotHaveChildNodes(assert) {\n var _this19 = this;\n\n var fooBarInstance;\n\n var FooBarComponent = _helpers.Component.extend({\n tagName: 'input',\n init: function () {\n this._super();\n\n fooBarInstance = this;\n }\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: ''\n });\n this.render('{{foo-bar}}');\n this.assertComponentElement(this.firstChild, {\n tagName: 'input'\n });\n assert.strictEqual(fooBarInstance.element.childNodes.length, 0);\n (0, _internalTestHelpers.runTask)(function () {\n return _this19.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'input'\n });\n assert.strictEqual(fooBarInstance.element.childNodes.length, 0);\n };\n\n _proto['@test it has the right parentView and childViews'] = function testItHasTheRightParentViewAndChildViews(assert) {\n var _this20 = this;\n\n var fooBarInstance, fooBarBazInstance;\n\n var FooBarComponent = _helpers.Component.extend({\n init: function () {\n this._super();\n\n fooBarInstance = this;\n }\n });\n\n var FooBarBazComponent = _helpers.Component.extend({\n init: function () {\n this._super();\n\n fooBarBazInstance = this;\n }\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'foo-bar {{foo-bar-baz}}'\n });\n this.registerComponent('foo-bar-baz', {\n ComponentClass: FooBarBazComponent,\n template: 'foo-bar-baz'\n });\n this.render('{{foo-bar}}');\n this.assertText('foo-bar foo-bar-baz');\n assert.equal(fooBarInstance.parentView, this.component);\n assert.equal(fooBarBazInstance.parentView, fooBarInstance);\n assert.deepEqual(this.component.childViews, [fooBarInstance]);\n assert.deepEqual(fooBarInstance.childViews, [fooBarBazInstance]);\n (0, _internalTestHelpers.runTask)(function () {\n return _this20.rerender();\n });\n this.assertText('foo-bar foo-bar-baz');\n assert.equal(fooBarInstance.parentView, this.component);\n assert.equal(fooBarBazInstance.parentView, fooBarInstance);\n assert.deepEqual(this.component.childViews, [fooBarInstance]);\n assert.deepEqual(fooBarInstance.childViews, [fooBarBazInstance]);\n };\n\n _proto['@test it renders passed named arguments'] = function testItRendersPassedNamedArguments() {\n var _this21 = this;\n\n this.registerComponent('foo-bar', {\n template: '{{@foo}}'\n });\n this.render('{{foo-bar foo=model.bar}}', {\n model: {\n bar: 'Hola'\n }\n });\n this.assertText('Hola');\n (0, _internalTestHelpers.runTask)(function () {\n return _this21.rerender();\n });\n this.assertText('Hola');\n (0, _internalTestHelpers.runTask)(function () {\n return _this21.context.set('model.bar', 'Hello');\n });\n this.assertText('Hello');\n (0, _internalTestHelpers.runTask)(function () {\n return _this21.context.set('model', {\n bar: 'Hola'\n });\n });\n this.assertText('Hola');\n };\n\n _proto['@test it reflects named arguments as properties'] = function testItReflectsNamedArgumentsAsProperties() {\n var _this22 = this;\n\n this.registerComponent('foo-bar', {\n template: '{{foo}}'\n });\n this.render('{{foo-bar foo=model.bar}}', {\n model: {\n bar: 'Hola'\n }\n });\n this.assertText('Hola');\n (0, _internalTestHelpers.runTask)(function () {\n return _this22.rerender();\n });\n this.assertText('Hola');\n (0, _internalTestHelpers.runTask)(function () {\n return _this22.context.set('model.bar', 'Hello');\n });\n this.assertText('Hello');\n (0, _internalTestHelpers.runTask)(function () {\n return _this22.context.set('model', {\n bar: 'Hola'\n });\n });\n this.assertText('Hola');\n };\n\n _proto['@test it can render a basic component with a block'] = function testItCanRenderABasicComponentWithABlock() {\n var _this23 = this;\n\n this.registerComponent('foo-bar', {\n template: '{{yield}} - In component'\n });\n this.render('{{#foo-bar}}hello{{/foo-bar}}');\n this.assertComponentElement(this.firstChild, {\n content: 'hello - In component'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this23.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello - In component'\n });\n };\n\n _proto['@test it can render a basic component with a block when the yield is in a partial'] = function testItCanRenderABasicComponentWithABlockWhenTheYieldIsInAPartial() {\n var _this24 = this;\n\n this.registerPartial('_partialWithYield', 'yielded: [{{yield}}]');\n this.registerComponent('foo-bar', {\n template: '{{partial \"partialWithYield\"}} - In component'\n });\n this.render('{{#foo-bar}}hello{{/foo-bar}}');\n this.assertComponentElement(this.firstChild, {\n content: 'yielded: [hello] - In component'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this24.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n content: 'yielded: [hello] - In component'\n });\n };\n\n _proto['@test it can render a basic component with a block param when the yield is in a partial'] = function testItCanRenderABasicComponentWithABlockParamWhenTheYieldIsInAPartial() {\n var _this25 = this;\n\n this.registerPartial('_partialWithYield', 'yielded: [{{yield \"hello\"}}]');\n this.registerComponent('foo-bar', {\n template: '{{partial \"partialWithYield\"}} - In component'\n });\n this.render('{{#foo-bar as |value|}}{{value}}{{/foo-bar}}');\n this.assertComponentElement(this.firstChild, {\n content: 'yielded: [hello] - In component'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this25.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n content: 'yielded: [hello] - In component'\n });\n };\n\n _proto['@test it renders the layout with the component instance as the context'] = function testItRendersTheLayoutWithTheComponentInstanceAsTheContext() {\n var _this26 = this;\n\n var instance;\n\n var FooBarComponent = _helpers.Component.extend({\n init: function () {\n this._super();\n\n instance = this;\n this.set('message', 'hello');\n }\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: '{{message}}'\n });\n this.render('{{foo-bar}}');\n this.assertComponentElement(this.firstChild, {\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this26.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(instance, 'message', 'goodbye');\n });\n this.assertComponentElement(this.firstChild, {\n content: 'goodbye'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(instance, 'message', 'hello');\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello'\n });\n };\n\n _proto['@test it preserves the outer context when yielding'] = function testItPreservesTheOuterContextWhenYielding() {\n var _this27 = this;\n\n this.registerComponent('foo-bar', {\n template: '{{yield}}'\n });\n this.render('{{#foo-bar}}{{message}}{{/foo-bar}}', {\n message: 'hello'\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this27.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this27.context, 'message', 'goodbye');\n });\n this.assertComponentElement(this.firstChild, {\n content: 'goodbye'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this27.context, 'message', 'hello');\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello'\n });\n };\n\n _proto['@test it can yield a block param named for reserved words [GH#14096]'] = function testItCanYieldABlockParamNamedForReservedWordsGH14096() {\n var instance;\n\n var FooBarComponent = _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n instance = this;\n },\n name: 'foo-bar'\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: '{{yield this}}'\n });\n this.render('{{#foo-bar as |component|}}{{component.name}}{{/foo-bar}}');\n this.assertComponentElement(this.firstChild, {\n content: 'foo-bar'\n });\n this.assertStableRerender();\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(instance, 'name', 'derp-qux');\n });\n this.assertComponentElement(this.firstChild, {\n content: 'derp-qux'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(instance, 'name', 'foo-bar');\n });\n this.assertComponentElement(this.firstChild, {\n content: 'foo-bar'\n });\n };\n\n _proto['@test it can yield internal and external properties positionally'] = function testItCanYieldInternalAndExternalPropertiesPositionally() {\n var _this28 = this;\n\n var instance;\n\n var FooBarComponent = _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n instance = this;\n },\n greeting: 'hello'\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: '{{yield greeting greetee.firstName}}'\n });\n this.render('{{#foo-bar greetee=person as |greeting name|}}{{name}} {{person.lastName}}, {{greeting}}{{/foo-bar}}', {\n person: {\n firstName: 'Joel',\n lastName: 'Kang'\n }\n });\n this.assertComponentElement(this.firstChild, {\n content: 'Joel Kang, hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this28.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n content: 'Joel Kang, hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this28.context, 'person', {\n firstName: 'Dora',\n lastName: 'the Explorer'\n });\n });\n this.assertComponentElement(this.firstChild, {\n content: 'Dora the Explorer, hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(instance, 'greeting', 'hola');\n });\n this.assertComponentElement(this.firstChild, {\n content: 'Dora the Explorer, hola'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(instance, 'greeting', 'hello');\n (0, _metal.set)(_this28.context, 'person', {\n firstName: 'Joel',\n lastName: 'Kang'\n });\n });\n this.assertComponentElement(this.firstChild, {\n content: 'Joel Kang, hello'\n });\n };\n\n _proto['@test #11519 - block param infinite loop'] = function test11519BlockParamInfiniteLoop() {\n var _this29 = this;\n\n var instance;\n\n var FooBarComponent = _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n instance = this;\n },\n danger: 0\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: '{{danger}}{{yield danger}}'\n }); // On initial render, create streams. The bug will not have manifested yet, but at this point\n // we have created streams that create a circular invalidation.\n\n this.render(\"{{#foo-bar as |dangerBlockParam|}}{{/foo-bar}}\");\n this.assertText('0'); // Trigger a non-revalidating re-render. The yielded block will not be dirtied\n // nor will block param streams, and thus no infinite loop will occur.\n\n (0, _internalTestHelpers.runTask)(function () {\n return _this29.rerender();\n });\n this.assertText('0'); // Trigger a revalidation, which will cause an infinite loop without the fix\n // in place. Note that we do not see the infinite loop is in testing mode,\n // because a deprecation warning about re-renders is issued, which Ember\n // treats as an exception.\n\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(instance, 'danger', 1);\n });\n this.assertText('1');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(instance, 'danger', 0);\n });\n this.assertText('0');\n };\n\n _proto['@test the component and its child components are destroyed'] = function testTheComponentAndItsChildComponentsAreDestroyed(assert) {\n var _this30 = this;\n\n var destroyed = {\n 1: 0,\n 2: 0,\n 3: 0,\n 4: 0,\n 5: 0,\n 6: 0,\n 7: 0,\n 8: 0\n };\n this.registerComponent('foo-bar', {\n template: '{{id}} {{yield}}',\n ComponentClass: _helpers.Component.extend({\n willDestroy: function () {\n this._super();\n\n destroyed[this.get('id')]++;\n }\n })\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject2()), {\n cond1: true,\n cond2: true,\n cond3: true,\n cond4: true,\n cond5: true\n });\n this.assertText('1 2 3 4 5 6 7 8 ');\n (0, _internalTestHelpers.runTask)(function () {\n return _this30.rerender();\n });\n assert.deepEqual(destroyed, {\n 1: 0,\n 2: 0,\n 3: 0,\n 4: 0,\n 5: 0,\n 6: 0,\n 7: 0,\n 8: 0\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this30.context, 'cond5', false);\n });\n this.assertText('1 2 3 4 8 ');\n assert.deepEqual(destroyed, {\n 1: 0,\n 2: 0,\n 3: 0,\n 4: 0,\n 5: 1,\n 6: 1,\n 7: 1,\n 8: 0\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this30.context, 'cond3', false);\n (0, _metal.set)(_this30.context, 'cond5', true);\n (0, _metal.set)(_this30.context, 'cond4', false);\n });\n assert.deepEqual(destroyed, {\n 1: 0,\n 2: 0,\n 3: 1,\n 4: 1,\n 5: 1,\n 6: 1,\n 7: 1,\n 8: 1\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this30.context, 'cond2', false);\n (0, _metal.set)(_this30.context, 'cond1', false);\n });\n assert.deepEqual(destroyed, {\n 1: 1,\n 2: 1,\n 3: 1,\n 4: 1,\n 5: 1,\n 6: 1,\n 7: 1,\n 8: 1\n });\n };\n\n _proto['@test should escape HTML in normal mustaches'] = function testShouldEscapeHTMLInNormalMustaches() {\n var _this31 = this;\n\n var component;\n\n var FooBarComponent = _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n component = this;\n },\n output: 'you need to be more bold'\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: '{{output}}'\n });\n this.render('{{foo-bar}}');\n this.assertText('you need to be more bold');\n (0, _internalTestHelpers.runTask)(function () {\n return _this31.rerender();\n });\n this.assertText('you need to be more bold');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(component, 'output', 'you are so super');\n });\n this.assertText('you are so super');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(component, 'output', 'you need to be more bold');\n });\n };\n\n _proto['@test should not escape HTML in triple mustaches'] = function testShouldNotEscapeHTMLInTripleMustaches() {\n var _this32 = this;\n\n var expectedHtmlBold = 'you need to be more bold';\n var expectedHtmlItalic = 'you are so super';\n var component;\n\n var FooBarComponent = _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n component = this;\n },\n output: expectedHtmlBold\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: '{{{output}}}'\n });\n this.render('{{foo-bar}}');\n (0, _internalTestHelpers.equalTokens)(this.firstChild, expectedHtmlBold);\n (0, _internalTestHelpers.runTask)(function () {\n return _this32.rerender();\n });\n (0, _internalTestHelpers.equalTokens)(this.firstChild, expectedHtmlBold);\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(component, 'output', expectedHtmlItalic);\n });\n (0, _internalTestHelpers.equalTokens)(this.firstChild, expectedHtmlItalic);\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(component, 'output', expectedHtmlBold);\n });\n (0, _internalTestHelpers.equalTokens)(this.firstChild, expectedHtmlBold);\n };\n\n _proto['@test should not escape HTML if string is a htmlSafe'] = function testShouldNotEscapeHTMLIfStringIsAHtmlSafe() {\n var _this33 = this;\n\n var expectedHtmlBold = 'you need to be more bold';\n var expectedHtmlItalic = 'you are so super';\n var component;\n\n var FooBarComponent = _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n component = this;\n },\n output: (0, _helpers.htmlSafe)(expectedHtmlBold)\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: '{{output}}'\n });\n this.render('{{foo-bar}}');\n (0, _internalTestHelpers.equalTokens)(this.firstChild, expectedHtmlBold);\n (0, _internalTestHelpers.runTask)(function () {\n return _this33.rerender();\n });\n (0, _internalTestHelpers.equalTokens)(this.firstChild, expectedHtmlBold);\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(component, 'output', (0, _helpers.htmlSafe)(expectedHtmlItalic));\n });\n (0, _internalTestHelpers.equalTokens)(this.firstChild, expectedHtmlItalic);\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(component, 'output', (0, _helpers.htmlSafe)(expectedHtmlBold));\n });\n (0, _internalTestHelpers.equalTokens)(this.firstChild, expectedHtmlBold);\n };\n\n _proto['@test late bound layouts return the same definition'] = function testLateBoundLayoutsReturnTheSameDefinition(assert) {\n var templateIds = []; // This is testing the scenario where you import a template and\n // set it to the layout property:\n //\n // import Component from '@ember/component';\n // import layout from './template';\n //\n // export default Component.extend({\n // layout\n // });\n\n var hello = (0, _helpers.compile)('Hello');\n var bye = (0, _helpers.compile)('Bye');\n\n var FooBarComponent = _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n this.layout = this.cond ? hello : bye;\n templateIds.push(this.layout.id);\n }\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent\n });\n this.render('{{foo-bar cond=true}}{{foo-bar cond=false}}{{foo-bar cond=true}}{{foo-bar cond=false}}');\n var t1 = templateIds[0],\n t2 = templateIds[1],\n t3 = templateIds[2],\n t4 = templateIds[3];\n assert.equal(t1, t3);\n assert.equal(t2, t4);\n };\n\n _proto['@test can use isStream property without conflict (#13271)'] = function testCanUseIsStreamPropertyWithoutConflict13271() {\n var _this34 = this;\n\n var component;\n\n var FooBarComponent = _helpers.Component.extend({\n isStream: true,\n init: function () {\n this._super.apply(this, arguments);\n\n component = this;\n }\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: (0, _internalTestHelpers.strip)(_templateObject3())\n });\n this.render('{{foo-bar}}');\n this.assertComponentElement(this.firstChild, {\n content: 'true'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this34.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n content: 'true'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(component, 'isStream', false);\n });\n this.assertComponentElement(this.firstChild, {\n content: 'false'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(component, 'isStream', true);\n });\n this.assertComponentElement(this.firstChild, {\n content: 'true'\n });\n };\n\n _proto['@test lookup of component takes priority over property'] = function testLookupOfComponentTakesPriorityOverProperty() {\n var _this35 = this;\n\n this.registerComponent('some-component', {\n template: 'some-component'\n });\n this.render('{{some-prop}} {{some-component}}', {\n 'some-component': 'not-some-component',\n 'some-prop': 'some-prop'\n });\n this.assertText('some-prop some-component');\n (0, _internalTestHelpers.runTask)(function () {\n return _this35.rerender();\n });\n this.assertText('some-prop some-component');\n };\n\n _proto['@feature(ember-glimmer-angle-bracket-built-ins) component without dash is looked up'] = function featureEmberGlimmerAngleBracketBuiltInsComponentWithoutDashIsLookedUp() {\n var _this36 = this;\n\n this.registerComponent('somecomponent', {\n template: 'somecomponent'\n });\n this.render('{{somecomponent}}', {\n somecomponent: 'notsomecomponent'\n });\n this.assertText('somecomponent');\n this.assertStableRerender();\n (0, _internalTestHelpers.runTask)(function () {\n return _this36.context.set('somecomponent', 'not not notsomecomponent');\n });\n this.assertText('somecomponent');\n (0, _internalTestHelpers.runTask)(function () {\n return _this36.context.set('somecomponent', 'notsomecomponent');\n });\n this.assertText('somecomponent');\n };\n\n _proto['@feature(!ember-glimmer-angle-bracket-built-ins) component without dash is not looked up'] = function featureEmberGlimmerAngleBracketBuiltInsComponentWithoutDashIsNotLookedUp() {\n var _this37 = this;\n\n this.registerComponent('somecomponent', {\n template: 'somecomponent'\n });\n this.render('{{somecomponent}}', {\n somecomponent: 'notsomecomponent'\n });\n this.assertText('notsomecomponent');\n (0, _internalTestHelpers.runTask)(function () {\n return _this37.rerender();\n });\n this.assertText('notsomecomponent');\n (0, _internalTestHelpers.runTask)(function () {\n return _this37.context.set('somecomponent', 'not not notsomecomponent');\n });\n this.assertText('not not notsomecomponent');\n (0, _internalTestHelpers.runTask)(function () {\n return _this37.context.set('somecomponent', 'notsomecomponent');\n });\n this.assertText('notsomecomponent');\n };\n\n _proto['@test non-block with properties on attrs'] = function testNonBlockWithPropertiesOnAttrs() {\n var _this38 = this;\n\n this.registerComponent('non-block', {\n template: 'In layout - someProp: {{attrs.someProp}}'\n });\n this.render('{{non-block someProp=prop}}', {\n prop: 'something here'\n });\n this.assertText('In layout - someProp: something here');\n (0, _internalTestHelpers.runTask)(function () {\n return _this38.rerender();\n });\n this.assertText('In layout - someProp: something here');\n (0, _internalTestHelpers.runTask)(function () {\n return _this38.context.set('prop', 'other thing there');\n });\n this.assertText('In layout - someProp: other thing there');\n (0, _internalTestHelpers.runTask)(function () {\n return _this38.context.set('prop', 'something here');\n });\n this.assertText('In layout - someProp: something here');\n };\n\n _proto['@test non-block with named argument'] = function testNonBlockWithNamedArgument() {\n var _this39 = this;\n\n this.registerComponent('non-block', {\n template: 'In layout - someProp: {{@someProp}}'\n });\n this.render('{{non-block someProp=prop}}', {\n prop: 'something here'\n });\n this.assertText('In layout - someProp: something here');\n (0, _internalTestHelpers.runTask)(function () {\n return _this39.rerender();\n });\n this.assertText('In layout - someProp: something here');\n (0, _internalTestHelpers.runTask)(function () {\n return _this39.context.set('prop', 'other thing there');\n });\n this.assertText('In layout - someProp: other thing there');\n (0, _internalTestHelpers.runTask)(function () {\n return _this39.context.set('prop', 'something here');\n });\n this.assertText('In layout - someProp: something here');\n };\n\n _proto['@test non-block with properties overridden in init'] = function testNonBlockWithPropertiesOverriddenInInit() {\n var _this40 = this;\n\n var instance;\n this.registerComponent('non-block', {\n ComponentClass: _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n instance = this;\n this.someProp = 'value set in instance';\n }\n }),\n template: 'In layout - someProp: {{someProp}}'\n });\n this.render('{{non-block someProp=prop}}', {\n prop: 'something passed when invoked'\n });\n this.assertText('In layout - someProp: value set in instance');\n (0, _internalTestHelpers.runTask)(function () {\n return _this40.rerender();\n });\n this.assertText('In layout - someProp: value set in instance');\n (0, _internalTestHelpers.runTask)(function () {\n return _this40.context.set('prop', 'updated something passed when invoked');\n });\n this.assertText('In layout - someProp: updated something passed when invoked');\n (0, _internalTestHelpers.runTask)(function () {\n return instance.set('someProp', 'update value set in instance');\n });\n this.assertText('In layout - someProp: update value set in instance');\n (0, _internalTestHelpers.runTask)(function () {\n return _this40.context.set('prop', 'something passed when invoked');\n });\n (0, _internalTestHelpers.runTask)(function () {\n return instance.set('someProp', 'value set in instance');\n });\n this.assertText('In layout - someProp: value set in instance');\n };\n\n _proto['@test rerendering component with attrs from parent'] = function testRerenderingComponentWithAttrsFromParent(assert) {\n var _this41 = this;\n\n var willUpdateCount = 0;\n var didReceiveAttrsCount = 0;\n\n function expectHooks(_ref, callback) {\n var willUpdate = _ref.willUpdate,\n didReceiveAttrs = _ref.didReceiveAttrs;\n willUpdateCount = 0;\n didReceiveAttrsCount = 0;\n callback();\n\n if (willUpdate) {\n assert.strictEqual(willUpdateCount, 1, 'The willUpdate hook was fired');\n } else {\n assert.strictEqual(willUpdateCount, 0, 'The willUpdate hook was not fired');\n }\n\n if (didReceiveAttrs) {\n assert.strictEqual(didReceiveAttrsCount, 1, 'The didReceiveAttrs hook was fired');\n } else {\n assert.strictEqual(didReceiveAttrsCount, 0, 'The didReceiveAttrs hook was not fired');\n }\n }\n\n this.registerComponent('non-block', {\n ComponentClass: _helpers.Component.extend({\n didReceiveAttrs: function () {\n didReceiveAttrsCount++;\n },\n willUpdate: function () {\n willUpdateCount++;\n }\n }),\n template: 'In layout - someProp: {{someProp}}'\n });\n expectHooks({\n willUpdate: false,\n didReceiveAttrs: true\n }, function () {\n _this41.render('{{non-block someProp=someProp}}', {\n someProp: 'wycats'\n });\n });\n this.assertText('In layout - someProp: wycats'); // Note: Hooks are not fired in Glimmer for idempotent re-renders\n\n expectHooks({\n willUpdate: false,\n didReceiveAttrs: false\n }, function () {\n (0, _internalTestHelpers.runTask)(function () {\n return _this41.rerender();\n });\n });\n this.assertText('In layout - someProp: wycats');\n expectHooks({\n willUpdate: true,\n didReceiveAttrs: true\n }, function () {\n (0, _internalTestHelpers.runTask)(function () {\n return _this41.context.set('someProp', 'tomdale');\n });\n });\n this.assertText('In layout - someProp: tomdale'); // Note: Hooks are not fired in Glimmer for idempotent re-renders\n\n expectHooks({\n willUpdate: false,\n didReceiveAttrs: false\n }, function () {\n (0, _internalTestHelpers.runTask)(function () {\n return _this41.rerender();\n });\n });\n this.assertText('In layout - someProp: tomdale');\n expectHooks({\n willUpdate: true,\n didReceiveAttrs: true\n }, function () {\n (0, _internalTestHelpers.runTask)(function () {\n return _this41.context.set('someProp', 'wycats');\n });\n });\n this.assertText('In layout - someProp: wycats');\n };\n\n _proto['@test this.attrs.foo === attrs.foo === @foo === foo'] = function testThisAttrsFooAttrsFooFooFoo() {\n var _this42 = this;\n\n this.registerComponent('foo-bar', {\n template: (0, _internalTestHelpers.strip)(_templateObject4())\n });\n this.render('{{foo-bar value=model.value items=model.items}}', {\n model: {\n value: 'wat',\n items: [1, 2, 3]\n }\n });\n this.assertStableRerender();\n (0, _internalTestHelpers.runTask)(function () {\n _this42.context.set('model.value', 'lul');\n\n _this42.context.set('model.items', [1]);\n });\n this.assertText((0, _internalTestHelpers.strip)(_templateObject5()));\n (0, _internalTestHelpers.runTask)(function () {\n return _this42.context.set('model', {\n value: 'wat',\n items: [1, 2, 3]\n });\n });\n this.assertText('Args: wat | wat | wat | wat123123123123');\n };\n\n _proto['@test non-block with properties on self'] = function testNonBlockWithPropertiesOnSelf() {\n var _this43 = this;\n\n this.registerComponent('non-block', {\n template: 'In layout - someProp: {{someProp}}'\n });\n this.render('{{non-block someProp=prop}}', {\n prop: 'something here'\n });\n this.assertText('In layout - someProp: something here');\n (0, _internalTestHelpers.runTask)(function () {\n return _this43.rerender();\n });\n this.assertText('In layout - someProp: something here');\n (0, _internalTestHelpers.runTask)(function () {\n return _this43.context.set('prop', 'something else');\n });\n this.assertText('In layout - someProp: something else');\n (0, _internalTestHelpers.runTask)(function () {\n return _this43.context.set('prop', 'something here');\n });\n this.assertText('In layout - someProp: something here');\n };\n\n _proto['@test block with properties on self'] = function testBlockWithPropertiesOnSelf() {\n var _this44 = this;\n\n this.registerComponent('with-block', {\n template: 'In layout - someProp: {{someProp}} - {{yield}}'\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject6()), {\n prop: 'something here'\n });\n this.assertText('In layout - someProp: something here - In template');\n (0, _internalTestHelpers.runTask)(function () {\n return _this44.rerender();\n });\n this.assertText('In layout - someProp: something here - In template');\n (0, _internalTestHelpers.runTask)(function () {\n return _this44.context.set('prop', 'something else');\n });\n this.assertText('In layout - someProp: something else - In template');\n (0, _internalTestHelpers.runTask)(function () {\n return _this44.context.set('prop', 'something here');\n });\n this.assertText('In layout - someProp: something here - In template');\n };\n\n _proto['@test block with properties on attrs'] = function testBlockWithPropertiesOnAttrs() {\n var _this45 = this;\n\n this.registerComponent('with-block', {\n template: 'In layout - someProp: {{attrs.someProp}} - {{yield}}'\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject7()), {\n prop: 'something here'\n });\n this.assertText('In layout - someProp: something here - In template');\n (0, _internalTestHelpers.runTask)(function () {\n return _this45.rerender();\n });\n this.assertText('In layout - someProp: something here - In template');\n (0, _internalTestHelpers.runTask)(function () {\n return _this45.context.set('prop', 'something else');\n });\n this.assertText('In layout - someProp: something else - In template');\n (0, _internalTestHelpers.runTask)(function () {\n return _this45.context.set('prop', 'something here');\n });\n this.assertText('In layout - someProp: something here - In template');\n };\n\n _proto['@test block with named argument'] = function testBlockWithNamedArgument() {\n var _this46 = this;\n\n this.registerComponent('with-block', {\n template: 'In layout - someProp: {{@someProp}} - {{yield}}'\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject8()), {\n prop: 'something here'\n });\n this.assertText('In layout - someProp: something here - In template');\n (0, _internalTestHelpers.runTask)(function () {\n return _this46.rerender();\n });\n this.assertText('In layout - someProp: something here - In template');\n (0, _internalTestHelpers.runTask)(function () {\n return _this46.context.set('prop', 'something else');\n });\n this.assertText('In layout - someProp: something else - In template');\n (0, _internalTestHelpers.runTask)(function () {\n return _this46.context.set('prop', 'something here');\n });\n this.assertText('In layout - someProp: something here - In template');\n };\n\n _proto['@test static arbitrary number of positional parameters'] = function testStaticArbitraryNumberOfPositionalParameters(assert) {\n var _this47 = this;\n\n this.registerComponent('sample-component', {\n ComponentClass: _helpers.Component.extend().reopenClass({\n positionalParams: 'names'\n }),\n template: (0, _internalTestHelpers.strip)(_templateObject9())\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject10()));\n assert.equal(this.$('#args-3').text(), 'Foo4Bar');\n assert.equal(this.$('#args-5').text(), 'Foo4Bar5Baz');\n (0, _internalTestHelpers.runTask)(function () {\n return _this47.rerender();\n });\n assert.equal(this.$('#args-3').text(), 'Foo4Bar');\n assert.equal(this.$('#args-5').text(), 'Foo4Bar5Baz');\n };\n\n _proto['@test arbitrary positional parameter conflict with hash parameter is reported'] = function testArbitraryPositionalParameterConflictWithHashParameterIsReported() {\n var _this48 = this;\n\n this.registerComponent('sample-component', {\n ComponentClass: _helpers.Component.extend().reopenClass({\n positionalParams: 'names'\n }),\n template: (0, _internalTestHelpers.strip)(_templateObject11())\n });\n expectAssertion(function () {\n _this48.render(\"{{sample-component \\\"Foo\\\" 4 \\\"Bar\\\" names=numbers id=\\\"args-3\\\"}}\", {\n numbers: [1, 2, 3]\n });\n }, 'You cannot specify positional parameters and the hash argument `names`.');\n };\n\n _proto['@test can use hash parameter instead of arbitrary positional param [GH #12444]'] = function testCanUseHashParameterInsteadOfArbitraryPositionalParamGH12444() {\n var _this49 = this;\n\n this.registerComponent('sample-component', {\n ComponentClass: _helpers.Component.extend().reopenClass({\n positionalParams: 'names'\n }),\n template: (0, _internalTestHelpers.strip)(_templateObject12())\n });\n this.render('{{sample-component names=things}}', {\n things: (0, _runtime.A)(['Foo', 4, 'Bar'])\n });\n this.assertText('Foo4Bar');\n (0, _internalTestHelpers.runTask)(function () {\n return _this49.rerender();\n });\n this.assertText('Foo4Bar');\n (0, _internalTestHelpers.runTask)(function () {\n return _this49.context.get('things').pushObject(5);\n });\n this.assertText('Foo4Bar5');\n (0, _internalTestHelpers.runTask)(function () {\n return _this49.context.get('things').shiftObject();\n });\n this.assertText('4Bar5');\n (0, _internalTestHelpers.runTask)(function () {\n return _this49.context.get('things').clear();\n });\n this.assertText('');\n (0, _internalTestHelpers.runTask)(function () {\n return _this49.context.set('things', (0, _runtime.A)(['Foo', 4, 'Bar']));\n });\n this.assertText('Foo4Bar');\n };\n\n _proto['@test can use hash parameter instead of positional param'] = function testCanUseHashParameterInsteadOfPositionalParam(assert) {\n var _this50 = this;\n\n this.registerComponent('sample-component', {\n ComponentClass: _helpers.Component.extend().reopenClass({\n positionalParams: ['first', 'second']\n }),\n template: '{{first}} - {{second}}'\n }); // TODO: Fix when id is implemented\n\n this.render((0, _internalTestHelpers.strip)(_templateObject13()));\n assert.equal(this.$('#two-positional').text(), 'one - two');\n assert.equal(this.$('#one-positional').text(), 'one - two');\n assert.equal(this.$('#no-positional').text(), 'one - two');\n (0, _internalTestHelpers.runTask)(function () {\n return _this50.rerender();\n });\n assert.equal(this.$('#two-positional').text(), 'one - two');\n assert.equal(this.$('#one-positional').text(), 'one - two');\n assert.equal(this.$('#no-positional').text(), 'one - two');\n };\n\n _proto['@test dynamic arbitrary number of positional parameters'] = function testDynamicArbitraryNumberOfPositionalParameters() {\n var _this51 = this;\n\n this.registerComponent('sample-component', {\n ComponentClass: _helpers.Component.extend().reopenClass({\n positionalParams: 'n'\n }),\n template: (0, _internalTestHelpers.strip)(_templateObject14())\n });\n this.render(\"{{sample-component user1 user2}}\", {\n user1: 'Foo',\n user2: 4\n });\n this.assertText('Foo4');\n (0, _internalTestHelpers.runTask)(function () {\n return _this51.rerender();\n });\n this.assertText('Foo4');\n (0, _internalTestHelpers.runTask)(function () {\n return _this51.context.set('user1', 'Bar');\n });\n this.assertText('Bar4');\n (0, _internalTestHelpers.runTask)(function () {\n return _this51.context.set('user2', '5');\n });\n this.assertText('Bar5');\n (0, _internalTestHelpers.runTask)(function () {\n _this51.context.set('user1', 'Foo');\n\n _this51.context.set('user2', 4);\n });\n this.assertText('Foo4');\n };\n\n _proto['@test with ariaRole specified'] = function testWithAriaRoleSpecified() {\n var _this52 = this;\n\n this.registerComponent('aria-test', {\n template: 'Here!'\n });\n this.render('{{aria-test ariaRole=role}}', {\n role: 'main'\n });\n this.assertComponentElement(this.firstChild, {\n attrs: {\n role: 'main'\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this52.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n attrs: {\n role: 'main'\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this52.context.set('role', 'input');\n });\n this.assertComponentElement(this.firstChild, {\n attrs: {\n role: 'input'\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this52.context.set('role', 'main');\n });\n this.assertComponentElement(this.firstChild, {\n attrs: {\n role: 'main'\n }\n });\n };\n\n _proto['@test with ariaRole defined but initially falsey GH#16379'] = function testWithAriaRoleDefinedButInitiallyFalseyGH16379() {\n var _this53 = this;\n\n this.registerComponent('aria-test', {\n template: 'Here!'\n });\n this.render('{{aria-test ariaRole=role}}', {\n role: undefined\n });\n this.assertComponentElement(this.firstChild, {\n attrs: {}\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this53.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n attrs: {}\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this53.context.set('role', 'input');\n });\n this.assertComponentElement(this.firstChild, {\n attrs: {\n role: 'input'\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this53.context.set('role', undefined);\n });\n this.assertComponentElement(this.firstChild, {\n attrs: {}\n });\n };\n\n _proto['@test without ariaRole defined initially'] = function testWithoutAriaRoleDefinedInitially() {\n var _this54 = this; // we are using the ability to lazily add a role as a sign that we are\n // doing extra work\n\n\n var instance;\n this.registerComponent('aria-test', {\n ComponentClass: _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n instance = this;\n }\n }),\n template: 'Here!'\n });\n this.render('{{aria-test}}');\n this.assertComponentElement(this.firstChild, {\n attrs: {}\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this54.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n attrs: {}\n });\n (0, _internalTestHelpers.runTask)(function () {\n return instance.set('ariaRole', 'input');\n });\n this.assertComponentElement(this.firstChild, {\n attrs: {}\n });\n };\n\n _proto['@test `template` specified in component is overridden by block'] = function testTemplateSpecifiedInComponentIsOverriddenByBlock() {\n var _this55 = this;\n\n this.registerComponent('with-template', {\n ComponentClass: _helpers.Component.extend({\n template: (0, _helpers.compile)('Should not be used')\n }),\n template: '[In layout - {{name}}] {{yield}}'\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject15()), {\n name: 'Whoop, whoop!'\n });\n this.assertText('[In layout - with-block] [In block - Whoop, whoop!][In layout - without-block] ');\n (0, _internalTestHelpers.runTask)(function () {\n return _this55.rerender();\n });\n this.assertText('[In layout - with-block] [In block - Whoop, whoop!][In layout - without-block] ');\n (0, _internalTestHelpers.runTask)(function () {\n return _this55.context.set('name', 'Ole, ole');\n });\n this.assertText('[In layout - with-block] [In block - Ole, ole][In layout - without-block] ');\n (0, _internalTestHelpers.runTask)(function () {\n return _this55.context.set('name', 'Whoop, whoop!');\n });\n this.assertText('[In layout - with-block] [In block - Whoop, whoop!][In layout - without-block] ');\n };\n\n _proto['@test hasBlock is true when block supplied'] = function testHasBlockIsTrueWhenBlockSupplied() {\n var _this56 = this;\n\n this.registerComponent('with-block', {\n template: (0, _internalTestHelpers.strip)(_templateObject16())\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject17()));\n this.assertText('In template');\n (0, _internalTestHelpers.runTask)(function () {\n return _this56.rerender();\n });\n this.assertText('In template');\n };\n\n _proto['@test hasBlock is false when no block supplied'] = function testHasBlockIsFalseWhenNoBlockSupplied() {\n var _this57 = this;\n\n this.registerComponent('with-block', {\n template: (0, _internalTestHelpers.strip)(_templateObject18())\n });\n this.render('{{with-block}}');\n this.assertText('No Block!');\n (0, _internalTestHelpers.runTask)(function () {\n return _this57.rerender();\n });\n this.assertText('No Block!');\n };\n\n _proto['@test hasBlockParams is true when block param supplied'] = function testHasBlockParamsIsTrueWhenBlockParamSupplied() {\n var _this58 = this;\n\n this.registerComponent('with-block', {\n template: (0, _internalTestHelpers.strip)(_templateObject19())\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject20()));\n this.assertText('In template - In Component');\n (0, _internalTestHelpers.runTask)(function () {\n return _this58.rerender();\n });\n this.assertText('In template - In Component');\n };\n\n _proto['@test hasBlockParams is false when no block param supplied'] = function testHasBlockParamsIsFalseWhenNoBlockParamSupplied() {\n var _this59 = this;\n\n this.registerComponent('with-block', {\n template: (0, _internalTestHelpers.strip)(_templateObject21())\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject22()));\n this.assertText('In block No Block Param!');\n (0, _internalTestHelpers.runTask)(function () {\n return _this59.rerender();\n });\n this.assertText('In block No Block Param!');\n };\n\n _proto['@test static named positional parameters'] = function testStaticNamedPositionalParameters() {\n var _this60 = this;\n\n this.registerComponent('sample-component', {\n ComponentClass: _helpers.Component.extend().reopenClass({\n positionalParams: ['name', 'age']\n }),\n template: '{{name}}{{age}}'\n });\n this.render('{{sample-component \"Quint\" 4}}');\n this.assertText('Quint4');\n (0, _internalTestHelpers.runTask)(function () {\n return _this60.rerender();\n });\n this.assertText('Quint4');\n };\n\n _proto['@test dynamic named positional parameters'] = function testDynamicNamedPositionalParameters() {\n var _this61 = this;\n\n this.registerComponent('sample-component', {\n ComponentClass: _helpers.Component.extend().reopenClass({\n positionalParams: ['name', 'age']\n }),\n template: '{{name}}{{age}}'\n });\n this.render('{{sample-component myName myAge}}', {\n myName: 'Quint',\n myAge: 4\n });\n this.assertText('Quint4');\n (0, _internalTestHelpers.runTask)(function () {\n return _this61.rerender();\n });\n this.assertText('Quint4');\n (0, _internalTestHelpers.runTask)(function () {\n return _this61.context.set('myName', 'Sergio');\n });\n this.assertText('Sergio4');\n (0, _internalTestHelpers.runTask)(function () {\n return _this61.context.set('myAge', 2);\n });\n this.assertText('Sergio2');\n (0, _internalTestHelpers.runTask)(function () {\n _this61.context.set('myName', 'Quint');\n\n _this61.context.set('myAge', 4);\n });\n this.assertText('Quint4');\n };\n\n _proto['@test if a value is passed as a non-positional parameter, it raises an assertion'] = function testIfAValueIsPassedAsANonPositionalParameterItRaisesAnAssertion() {\n var _this62 = this;\n\n this.registerComponent('sample-component', {\n ComponentClass: _helpers.Component.extend().reopenClass({\n positionalParams: ['name']\n }),\n template: '{{name}}'\n });\n expectAssertion(function () {\n _this62.render('{{sample-component notMyName name=myName}}', {\n myName: 'Quint',\n notMyName: 'Sergio'\n });\n }, 'You cannot specify both a positional param (at position 0) and the hash argument `name`.');\n };\n\n _proto['@test yield to inverse'] = function testYieldToInverse() {\n var _this63 = this;\n\n this.registerComponent('my-if', {\n template: (0, _internalTestHelpers.strip)(_templateObject23())\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject24()), {\n activated: true\n });\n this.assertText('Yes:Hello42');\n (0, _internalTestHelpers.runTask)(function () {\n return _this63.rerender();\n });\n this.assertText('Yes:Hello42');\n (0, _internalTestHelpers.runTask)(function () {\n return _this63.context.set('activated', false);\n });\n this.assertText('No:Goodbye');\n (0, _internalTestHelpers.runTask)(function () {\n return _this63.context.set('activated', true);\n });\n this.assertText('Yes:Hello42');\n };\n\n _proto['@test expression hasBlock inverse'] = function testExpressionHasBlockInverse() {\n this.registerComponent('check-inverse', {\n template: (0, _internalTestHelpers.strip)(_templateObject25())\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject26()));\n this.assertComponentElement(this.firstChild, {\n content: 'No'\n });\n this.assertComponentElement(this.nthChild(1), {\n content: 'Yes'\n });\n this.assertStableRerender();\n };\n\n _proto['@test expression hasBlock default'] = function testExpressionHasBlockDefault() {\n this.registerComponent('check-block', {\n template: (0, _internalTestHelpers.strip)(_templateObject27())\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject28()));\n this.assertComponentElement(this.firstChild, {\n content: 'No'\n });\n this.assertComponentElement(this.nthChild(1), {\n content: 'Yes'\n });\n this.assertStableRerender();\n };\n\n _proto['@test expression hasBlockParams inverse'] = function testExpressionHasBlockParamsInverse() {\n this.registerComponent('check-inverse', {\n template: (0, _internalTestHelpers.strip)(_templateObject29())\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject30()));\n this.assertComponentElement(this.firstChild, {\n content: 'No'\n });\n this.assertComponentElement(this.nthChild(1), {\n content: 'No'\n });\n this.assertStableRerender();\n };\n\n _proto['@test expression hasBlockParams default'] = function testExpressionHasBlockParamsDefault() {\n this.registerComponent('check-block', {\n template: (0, _internalTestHelpers.strip)(_templateObject31())\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject32()));\n this.assertComponentElement(this.firstChild, {\n content: 'No'\n });\n this.assertComponentElement(this.nthChild(1), {\n content: 'Yes'\n });\n this.assertStableRerender();\n };\n\n _proto['@test non-expression hasBlock'] = function testNonExpressionHasBlock() {\n this.registerComponent('check-block', {\n template: (0, _internalTestHelpers.strip)(_templateObject33())\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject34()));\n this.assertComponentElement(this.firstChild, {\n content: 'No'\n });\n this.assertComponentElement(this.nthChild(1), {\n content: 'Yes'\n });\n this.assertStableRerender();\n };\n\n _proto['@test expression hasBlockParams'] = function testExpressionHasBlockParams() {\n this.registerComponent('check-params', {\n template: (0, _internalTestHelpers.strip)(_templateObject35())\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject36()));\n this.assertComponentElement(this.firstChild, {\n content: 'No'\n });\n this.assertComponentElement(this.nthChild(1), {\n content: 'Yes'\n });\n this.assertStableRerender();\n };\n\n _proto['@test non-expression hasBlockParams'] = function testNonExpressionHasBlockParams() {\n this.registerComponent('check-params', {\n template: (0, _internalTestHelpers.strip)(_templateObject37())\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject38()));\n this.assertComponentElement(this.firstChild, {\n content: 'No'\n });\n this.assertComponentElement(this.nthChild(1), {\n content: 'Yes'\n });\n this.assertStableRerender();\n };\n\n _proto['@test hasBlock expression in an attribute'] = function testHasBlockExpressionInAnAttribute(assert) {\n this.registerComponent('check-attr', {\n template: ''\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject39()));\n (0, _internalTestHelpers.equalsElement)(assert, this.$('button')[0], 'button', {\n name: 'false'\n }, '');\n (0, _internalTestHelpers.equalsElement)(assert, this.$('button')[1], 'button', {\n name: 'true'\n }, '');\n this.assertStableRerender();\n };\n\n _proto['@test hasBlock inverse expression in an attribute'] = function testHasBlockInverseExpressionInAnAttribute(assert) {\n this.registerComponent('check-attr', {\n template: ''\n }, '');\n this.render((0, _internalTestHelpers.strip)(_templateObject40()));\n (0, _internalTestHelpers.equalsElement)(assert, this.$('button')[0], 'button', {\n name: 'false'\n }, '');\n (0, _internalTestHelpers.equalsElement)(assert, this.$('button')[1], 'button', {\n name: 'true'\n }, '');\n this.assertStableRerender();\n };\n\n _proto['@test hasBlockParams expression in an attribute'] = function testHasBlockParamsExpressionInAnAttribute(assert) {\n this.registerComponent('check-attr', {\n template: ''\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject41()));\n (0, _internalTestHelpers.equalsElement)(assert, this.$('button')[0], 'button', {\n name: 'false'\n }, '');\n (0, _internalTestHelpers.equalsElement)(assert, this.$('button')[1], 'button', {\n name: 'true'\n }, '');\n this.assertStableRerender();\n };\n\n _proto['@test hasBlockParams inverse expression in an attribute'] = function testHasBlockParamsInverseExpressionInAnAttribute(assert) {\n this.registerComponent('check-attr', {\n template: ''\n }, '');\n this.render((0, _internalTestHelpers.strip)(_templateObject42()));\n (0, _internalTestHelpers.equalsElement)(assert, this.$('button')[0], 'button', {\n name: 'false'\n }, '');\n (0, _internalTestHelpers.equalsElement)(assert, this.$('button')[1], 'button', {\n name: 'false'\n }, '');\n this.assertStableRerender();\n };\n\n _proto['@test hasBlock as a param to a helper'] = function testHasBlockAsAParamToAHelper() {\n this.registerComponent('check-helper', {\n template: '{{if hasBlock \"true\" \"false\"}}'\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject43()));\n this.assertComponentElement(this.firstChild, {\n content: 'false'\n });\n this.assertComponentElement(this.nthChild(1), {\n content: 'true'\n });\n this.assertStableRerender();\n };\n\n _proto['@test hasBlock as an expression param to a helper'] = function testHasBlockAsAnExpressionParamToAHelper() {\n this.registerComponent('check-helper', {\n template: '{{if (hasBlock) \"true\" \"false\"}}'\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject44()));\n this.assertComponentElement(this.firstChild, {\n content: 'false'\n });\n this.assertComponentElement(this.nthChild(1), {\n content: 'true'\n });\n this.assertStableRerender();\n };\n\n _proto['@test hasBlock inverse as a param to a helper'] = function testHasBlockInverseAsAParamToAHelper() {\n this.registerComponent('check-helper', {\n template: '{{if (hasBlock \"inverse\") \"true\" \"false\"}}'\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject45()));\n this.assertComponentElement(this.firstChild, {\n content: 'false'\n });\n this.assertComponentElement(this.nthChild(1), {\n content: 'true'\n });\n this.assertStableRerender();\n };\n\n _proto['@test hasBlockParams as a param to a helper'] = function testHasBlockParamsAsAParamToAHelper() {\n this.registerComponent('check-helper', {\n template: '{{if hasBlockParams \"true\" \"false\"}}'\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject46()));\n this.assertComponentElement(this.firstChild, {\n content: 'false'\n });\n this.assertComponentElement(this.nthChild(1), {\n content: 'true'\n });\n this.assertStableRerender();\n };\n\n _proto['@test hasBlockParams as an expression param to a helper'] = function testHasBlockParamsAsAnExpressionParamToAHelper() {\n this.registerComponent('check-helper', {\n template: '{{if (hasBlockParams) \"true\" \"false\"}}'\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject47()));\n this.assertComponentElement(this.firstChild, {\n content: 'false'\n });\n this.assertComponentElement(this.nthChild(1), {\n content: 'true'\n });\n this.assertStableRerender();\n };\n\n _proto['@test hasBlockParams inverse as a param to a helper'] = function testHasBlockParamsInverseAsAParamToAHelper() {\n this.registerComponent('check-helper', {\n template: '{{if (hasBlockParams \"inverse\") \"true\" \"false\"}}'\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject48()));\n this.assertComponentElement(this.firstChild, {\n content: 'false'\n });\n this.assertComponentElement(this.nthChild(1), {\n content: 'false'\n });\n this.assertStableRerender();\n };\n\n _proto['@test component in template of a yielding component should have the proper parentView'] = function testComponentInTemplateOfAYieldingComponentShouldHaveTheProperParentView(assert) {\n var _this64 = this;\n\n var outer, innerTemplate, innerLayout;\n this.registerComponent('x-outer', {\n ComponentClass: _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n outer = this;\n }\n }),\n template: '{{x-inner-in-layout}}{{yield}}'\n });\n this.registerComponent('x-inner-in-template', {\n ComponentClass: _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n innerTemplate = this;\n }\n })\n });\n this.registerComponent('x-inner-in-layout', {\n ComponentClass: _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n innerLayout = this;\n }\n })\n });\n this.render('{{#x-outer}}{{x-inner-in-template}}{{/x-outer}}');\n assert.equal(innerTemplate.parentView, outer, 'receives the wrapping component as its parentView in template blocks');\n assert.equal(innerLayout.parentView, outer, 'receives the wrapping component as its parentView in layout');\n assert.equal(outer.parentView, this.context, 'x-outer receives the ambient scope as its parentView');\n (0, _internalTestHelpers.runTask)(function () {\n return _this64.rerender();\n });\n assert.equal(innerTemplate.parentView, outer, 'receives the wrapping component as its parentView in template blocks');\n assert.equal(innerLayout.parentView, outer, 'receives the wrapping component as its parentView in layout');\n assert.equal(outer.parentView, this.context, 'x-outer receives the ambient scope as its parentView');\n };\n\n _proto['@test newly-added sub-components get correct parentView'] = function testNewlyAddedSubComponentsGetCorrectParentView(assert) {\n var _this65 = this;\n\n var outer, inner;\n this.registerComponent('x-outer', {\n ComponentClass: _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n outer = this;\n }\n })\n });\n this.registerComponent('x-inner', {\n ComponentClass: _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n inner = this;\n }\n })\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject49()), {\n showInner: false\n });\n assert.equal(outer.parentView, this.context, 'x-outer receives the ambient scope as its parentView');\n (0, _internalTestHelpers.runTask)(function () {\n return _this65.rerender();\n });\n assert.equal(outer.parentView, this.context, 'x-outer receives the ambient scope as its parentView (after rerender)');\n (0, _internalTestHelpers.runTask)(function () {\n return _this65.context.set('showInner', true);\n });\n assert.equal(outer.parentView, this.context, 'x-outer receives the ambient scope as its parentView');\n assert.equal(inner.parentView, outer, 'receives the wrapping component as its parentView in template blocks');\n (0, _internalTestHelpers.runTask)(function () {\n return _this65.context.set('showInner', false);\n });\n assert.equal(outer.parentView, this.context, 'x-outer receives the ambient scope as its parentView');\n };\n\n _proto[\"@test when a property is changed during children's rendering\"] = function testWhenAPropertyIsChangedDuringChildrenSRendering(assert) {\n var _this66 = this;\n\n var outer, middle;\n this.registerComponent('x-outer', {\n ComponentClass: _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n outer = this;\n },\n value: 1\n }),\n template: '{{#x-middle}}{{x-inner value=value}}{{/x-middle}}'\n });\n this.registerComponent('x-middle', {\n ComponentClass: _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n middle = this;\n },\n value: null\n }),\n template: '
{{value}}
{{yield}}'\n });\n this.registerComponent('x-inner', {\n ComponentClass: _helpers.Component.extend({\n value: null,\n pushDataUp: (0, _metal.observer)('value', function () {\n middle.set('value', this.get('value'));\n })\n }),\n template: '
{{value}}
'\n });\n this.render('{{x-outer}}');\n assert.equal(this.$('#inner-value').text(), '1', 'initial render of inner');\n assert.equal(this.$('#middle-value').text(), '', 'initial render of middle (observers do not run during init)');\n (0, _internalTestHelpers.runTask)(function () {\n return _this66.rerender();\n });\n assert.equal(this.$('#inner-value').text(), '1', 'initial render of inner');\n assert.equal(this.$('#middle-value').text(), '', 'initial render of middle (observers do not run during init)');\n var expectedBacktrackingMessage = /modified \"value\" twice on <.+?> in a single render\\. It was rendered in \"component:x-middle\" and modified in \"component:x-inner\"/;\n expectAssertion(function () {\n (0, _internalTestHelpers.runTask)(function () {\n return outer.set('value', 2);\n });\n }, expectedBacktrackingMessage);\n };\n\n _proto[\"@test when a shared dependency is changed during children's rendering\"] = function testWhenASharedDependencyIsChangedDuringChildrenSRendering() {\n var _this67 = this;\n\n this.registerComponent('x-outer', {\n ComponentClass: _helpers.Component.extend({\n value: 1,\n wrapper: _runtime.Object.create({\n content: null\n })\n }),\n template: '
{{wrapper.content}}
{{x-inner value=value wrapper=wrapper}}'\n });\n this.registerComponent('x-inner', {\n ComponentClass: _helpers.Component.extend({\n didReceiveAttrs: function () {\n this.get('wrapper').set('content', this.get('value'));\n },\n value: null\n }),\n template: '
{{wrapper.content}}
'\n });\n var expectedBacktrackingMessage = /modified \"wrapper\\.content\" twice on <.+?> in a single render\\. It was rendered in \"component:x-outer\" and modified in \"component:x-inner\"/;\n expectAssertion(function () {\n _this67.render('{{x-outer}}');\n }, expectedBacktrackingMessage);\n };\n\n _proto['@test non-block with each rendering child components'] = function testNonBlockWithEachRenderingChildComponents() {\n var _this68 = this;\n\n this.registerComponent('non-block', {\n template: (0, _internalTestHelpers.strip)(_templateObject50())\n });\n this.registerComponent('child-non-block', {\n template: 'Child: {{item}}.'\n });\n var items = (0, _runtime.A)(['Tom', 'Dick', 'Harry']);\n this.render('{{non-block items=items}}', {\n items: items\n });\n this.assertText('In layout. [Child: Tom.][Child: Dick.][Child: Harry.]');\n (0, _internalTestHelpers.runTask)(function () {\n return _this68.rerender();\n });\n this.assertText('In layout. [Child: Tom.][Child: Dick.][Child: Harry.]');\n (0, _internalTestHelpers.runTask)(function () {\n return _this68.context.get('items').pushObject('Sergio');\n });\n this.assertText('In layout. [Child: Tom.][Child: Dick.][Child: Harry.][Child: Sergio.]');\n (0, _internalTestHelpers.runTask)(function () {\n return _this68.context.get('items').shiftObject();\n });\n this.assertText('In layout. [Child: Dick.][Child: Harry.][Child: Sergio.]');\n (0, _internalTestHelpers.runTask)(function () {\n return _this68.context.set('items', (0, _runtime.A)(['Tom', 'Dick', 'Harry']));\n });\n this.assertText('In layout. [Child: Tom.][Child: Dick.][Child: Harry.]');\n };\n\n _proto['@test specifying classNames results in correct class'] = function testSpecifyingClassNamesResultsInCorrectClass(assert) {\n var _this69 = this;\n\n this.registerComponent('some-clicky-thing', {\n ComponentClass: _helpers.Component.extend({\n tagName: 'button',\n classNames: ['foo', 'bar']\n })\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject51())); // TODO: ember-view is no longer viewable in the classNames array. Bug or\n // feature?\n\n var expectedClassNames = ['ember-view', 'foo', 'bar', 'baz'];\n assert.ok(this.$('button').is('.foo.bar.baz.ember-view'), \"the element has the correct classes: \" + this.$('button').attr('class')); // `ember-view` is no longer in classNames.\n // assert.deepEqual(clickyThing.get('classNames'), expectedClassNames, 'classNames are properly combined');\n\n this.assertComponentElement(this.firstChild, {\n tagName: 'button',\n attrs: {\n class: (0, _internalTestHelpers.classes)(expectedClassNames.join(' '))\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this69.rerender();\n });\n assert.ok(this.$('button').is('.foo.bar.baz.ember-view'), \"the element has the correct classes: \" + this.$('button').attr('class') + \" (rerender)\"); // `ember-view` is no longer in classNames.\n // assert.deepEqual(clickyThing.get('classNames'), expectedClassNames, 'classNames are properly combined (rerender)');\n\n this.assertComponentElement(this.firstChild, {\n tagName: 'button',\n attrs: {\n class: (0, _internalTestHelpers.classes)(expectedClassNames.join(' '))\n }\n });\n };\n\n _proto['@test specifying custom concatenatedProperties avoids clobbering'] = function testSpecifyingCustomConcatenatedPropertiesAvoidsClobbering() {\n var _this70 = this;\n\n this.registerComponent('some-clicky-thing', {\n ComponentClass: _helpers.Component.extend({\n concatenatedProperties: ['blahzz'],\n blahzz: ['blark', 'pory']\n }),\n template: (0, _internalTestHelpers.strip)(_templateObject52())\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject53()));\n this.assertText('blarkporybaz- Click Me');\n (0, _internalTestHelpers.runTask)(function () {\n return _this70.rerender();\n });\n this.assertText('blarkporybaz- Click Me');\n };\n\n _proto['@test a two way binding flows upstream when consumed in the template'] = function testATwoWayBindingFlowsUpstreamWhenConsumedInTheTemplate() {\n var _this71 = this;\n\n var component;\n\n var FooBarComponent = _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n component = this;\n }\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: '{{bar}}'\n });\n this.render('{{localBar}} - {{foo-bar bar=localBar}}', {\n localBar: 'initial value'\n });\n this.assertText('initial value - initial value');\n (0, _internalTestHelpers.runTask)(function () {\n return _this71.rerender();\n });\n this.assertText('initial value - initial value');\n\n if (false\n /* DEBUG */\n ) {\n expectAssertion(function () {\n component.bar = 'foo-bar';\n }, /You must use set\\(\\) to set the `bar` property \\(of .+\\) to `foo-bar`\\./);\n this.assertText('initial value - initial value');\n }\n\n (0, _internalTestHelpers.runTask)(function () {\n component.set('bar', 'updated value');\n });\n this.assertText('updated value - updated value');\n (0, _internalTestHelpers.runTask)(function () {\n component.set('bar', undefined);\n });\n this.assertText(' - ');\n (0, _internalTestHelpers.runTask)(function () {\n _this71.component.set('localBar', 'initial value');\n });\n this.assertText('initial value - initial value');\n };\n\n _proto['@test a two way binding flows upstream through a CP when consumed in the template'] = function testATwoWayBindingFlowsUpstreamThroughACPWhenConsumedInTheTemplate() {\n var _this72 = this;\n\n var component;\n\n var FooBarComponent = _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n component = this;\n },\n bar: (0, _metal.computed)({\n get: function () {\n return this._bar;\n },\n set: function (key, value) {\n this._bar = value;\n return this._bar;\n }\n })\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: '{{bar}}'\n });\n this.render('{{localBar}} - {{foo-bar bar=localBar}}', {\n localBar: 'initial value'\n });\n this.assertText('initial value - initial value');\n (0, _internalTestHelpers.runTask)(function () {\n return _this72.rerender();\n });\n this.assertText('initial value - initial value');\n (0, _internalTestHelpers.runTask)(function () {\n component.set('bar', 'updated value');\n });\n this.assertText('updated value - updated value');\n (0, _internalTestHelpers.runTask)(function () {\n _this72.component.set('localBar', 'initial value');\n });\n this.assertText('initial value - initial value');\n };\n\n _proto['@test a two way binding flows upstream through a CP without template consumption'] = function testATwoWayBindingFlowsUpstreamThroughACPWithoutTemplateConsumption() {\n var _this73 = this;\n\n var component;\n\n var FooBarComponent = _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n component = this;\n },\n bar: (0, _metal.computed)({\n get: function () {\n return this._bar;\n },\n set: function (key, value) {\n this._bar = value;\n return this._bar;\n }\n })\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: ''\n });\n this.render('{{localBar}}{{foo-bar bar=localBar}}', {\n localBar: 'initial value'\n });\n this.assertText('initial value');\n (0, _internalTestHelpers.runTask)(function () {\n return _this73.rerender();\n });\n this.assertText('initial value');\n (0, _internalTestHelpers.runTask)(function () {\n component.set('bar', 'updated value');\n });\n this.assertText('updated value');\n (0, _internalTestHelpers.runTask)(function () {\n _this73.component.set('localBar', 'initial value');\n });\n this.assertText('initial value');\n };\n\n _proto['@test services can be injected into components'] = function testServicesCanBeInjectedIntoComponents() {\n var _this74 = this;\n\n var service;\n this.registerService('name', _service.default.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n service = this;\n },\n last: 'Jackson'\n }));\n this.registerComponent('foo-bar', {\n ComponentClass: _helpers.Component.extend({\n name: (0, _service.inject)()\n }),\n template: '{{name.last}}'\n });\n this.render('{{foo-bar}}');\n this.assertText('Jackson');\n (0, _internalTestHelpers.runTask)(function () {\n return _this74.rerender();\n });\n this.assertText('Jackson');\n (0, _internalTestHelpers.runTask)(function () {\n service.set('last', 'McGuffey');\n });\n this.assertText('McGuffey');\n (0, _internalTestHelpers.runTask)(function () {\n service.set('last', 'Jackson');\n });\n this.assertText('Jackson');\n };\n\n _proto['@test injecting an unknown service raises an exception'] = function testInjectingAnUnknownServiceRaisesAnException() {\n var _this75 = this;\n\n this.registerComponent('foo-bar', {\n ComponentClass: _helpers.Component.extend({\n missingService: (0, _service.inject)()\n })\n });\n expectAssertion(function () {\n _this75.render('{{foo-bar}}');\n }, \"Attempting to inject an unknown injection: 'service:missingService'\");\n };\n\n _proto['@test throws if `this._super` is not called from `init`'] = function testThrowsIfThis_superIsNotCalledFromInit() {\n var _this76 = this;\n\n this.registerComponent('foo-bar', {\n ComponentClass: _helpers.Component.extend({\n init: function () {}\n })\n });\n expectAssertion(function () {\n _this76.render('{{foo-bar}}');\n }, /You must call `this._super\\(...arguments\\);` when overriding `init` on a framework object. Please update .* to call `this._super\\(...arguments\\);` from `init`./);\n };\n\n _proto['@test should toggle visibility with isVisible'] = function testShouldToggleVisibilityWithIsVisible(assert) {\n var _this77 = this;\n\n var assertStyle = function (expected) {\n var matcher = (0, _internalTestHelpers.styles)(expected);\n\n var actual = _this77.firstChild.getAttribute('style');\n\n assert.pushResult({\n result: matcher.match(actual),\n message: matcher.message(),\n actual: actual,\n expected: expected\n });\n };\n\n this.registerComponent('foo-bar', {\n template: \"

foo

\"\n });\n this.render(\"{{foo-bar id=\\\"foo-bar\\\" isVisible=visible}}\", {\n visible: false\n });\n assertStyle('display: none;');\n this.assertStableRerender();\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this77.context, 'visible', true);\n });\n assertStyle('');\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this77.context, 'visible', false);\n });\n assertStyle('display: none;');\n };\n\n _proto['@test isVisible does not overwrite component style'] = function testIsVisibleDoesNotOverwriteComponentStyle() {\n var _this78 = this;\n\n this.registerComponent('foo-bar', {\n ComponentClass: _helpers.Component.extend({\n attributeBindings: ['style'],\n style: (0, _helpers.htmlSafe)('color: blue;')\n }),\n template: \"

foo

\"\n });\n this.render(\"{{foo-bar id=\\\"foo-bar\\\" isVisible=visible}}\", {\n visible: false\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n id: 'foo-bar',\n style: (0, _internalTestHelpers.styles)('color: blue; display: none;')\n }\n });\n this.assertStableRerender();\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this78.context, 'visible', true);\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n id: 'foo-bar',\n style: (0, _internalTestHelpers.styles)('color: blue;')\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this78.context, 'visible', false);\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'div',\n attrs: {\n id: 'foo-bar',\n style: (0, _internalTestHelpers.styles)('color: blue; display: none;')\n }\n });\n };\n\n _proto['@test adds isVisible binding when style binding is missing and other bindings exist'] = function testAddsIsVisibleBindingWhenStyleBindingIsMissingAndOtherBindingsExist(assert) {\n var _this79 = this;\n\n var assertStyle = function (expected) {\n var matcher = (0, _internalTestHelpers.styles)(expected);\n\n var actual = _this79.firstChild.getAttribute('style');\n\n assert.pushResult({\n result: matcher.match(actual),\n message: matcher.message(),\n actual: actual,\n expected: expected\n });\n };\n\n this.registerComponent('foo-bar', {\n ComponentClass: _helpers.Component.extend({\n attributeBindings: ['foo'],\n foo: 'bar'\n }),\n template: \"

foo

\"\n });\n this.render(\"{{foo-bar id=\\\"foo-bar\\\" foo=foo isVisible=visible}}\", {\n visible: false,\n foo: 'baz'\n });\n assertStyle('display: none;');\n this.assertStableRerender();\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this79.context, 'visible', true);\n });\n assertStyle('');\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this79.context, 'visible', false);\n (0, _metal.set)(_this79.context, 'foo', 'woo');\n });\n assertStyle('display: none;');\n assert.equal(this.firstChild.getAttribute('foo'), 'woo');\n };\n\n _proto['@test it can use readDOMAttr to read input value'] = function testItCanUseReadDOMAttrToReadInputValue() {\n var _this80 = this;\n\n var component;\n\n var assertElement = function (expectedValue) {\n // value is a property, not an attribute\n _this80.assertHTML(\"\");\n\n _this80.assert.equal(_this80.firstChild.value, expectedValue, 'value property is correct');\n\n _this80.assert.equal((0, _metal.get)(component, 'value'), expectedValue, 'component.get(\"value\") is correct');\n };\n\n this.registerComponent('one-way-input', {\n ComponentClass: _helpers.Component.extend({\n tagName: 'input',\n attributeBindings: ['value'],\n init: function () {\n this._super.apply(this, arguments);\n\n component = this;\n },\n change: function () {\n var value = this.readDOMAttr('value');\n this.set('value', value);\n }\n })\n });\n this.render('{{one-way-input value=value}}', {\n value: 'foo'\n });\n assertElement('foo');\n this.assertStableRerender();\n (0, _internalTestHelpers.runTask)(function () {\n _this80.firstChild.value = 'bar';\n\n _this80.$('input').trigger('change');\n });\n assertElement('bar');\n (0, _internalTestHelpers.runTask)(function () {\n _this80.firstChild.value = 'foo';\n\n _this80.$('input').trigger('change');\n });\n assertElement('foo');\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(component, 'value', 'bar');\n });\n assertElement('bar');\n (0, _internalTestHelpers.runTask)(function () {\n _this80.firstChild.value = 'foo';\n\n _this80.$('input').trigger('change');\n });\n assertElement('foo');\n };\n\n _proto['@test child triggers revalidate during parent destruction (GH#13846)'] = function testChildTriggersRevalidateDuringParentDestructionGH13846() {\n this.registerComponent('x-select', {\n ComponentClass: _helpers.Component.extend({\n tagName: 'select',\n init: function () {\n this._super();\n\n this.options = (0, _runtime.A)([]);\n this.value = null;\n },\n updateValue: function () {\n var newValue = this.get('options.lastObject.value');\n this.set('value', newValue);\n },\n registerOption: function (option) {\n this.get('options').addObject(option);\n },\n unregisterOption: function (option) {\n this.get('options').removeObject(option);\n this.updateValue();\n }\n }),\n template: '{{yield this}}'\n });\n this.registerComponent('x-option', {\n ComponentClass: _helpers.Component.extend({\n tagName: 'option',\n attributeBindings: ['selected'],\n didInsertElement: function () {\n this._super.apply(this, arguments);\n\n this.get('select').registerOption(this);\n },\n selected: (0, _metal.computed)('select.value', function () {\n return this.get('value') === this.get('select.value');\n }),\n willDestroyElement: function () {\n this._super.apply(this, arguments);\n\n this.get('select').unregisterOption(this);\n }\n })\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject54()));\n this.teardown();\n this.assert.ok(true, 'no errors during teardown');\n };\n\n _proto['@test setting a property in willDestroyElement does not assert (GH#14273)'] = function testSettingAPropertyInWillDestroyElementDoesNotAssertGH14273(assert) {\n assert.expect(2);\n this.registerComponent('foo-bar', {\n ComponentClass: _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n this.showFoo = true;\n },\n willDestroyElement: function () {\n this.set('showFoo', false);\n assert.ok(true, 'willDestroyElement was fired');\n\n this._super.apply(this, arguments);\n }\n }),\n template: \"{{#if showFoo}}things{{/if}}\"\n });\n this.render(\"{{foo-bar}}\");\n this.assertText('things');\n };\n\n _proto['@test didReceiveAttrs fires after .init() but before observers become active'] = function testDidReceiveAttrsFiresAfterInitButBeforeObserversBecomeActive(assert) {\n var _this81 = this;\n\n var barCopyDidChangeCount = 0;\n this.registerComponent('foo-bar', {\n ComponentClass: _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n this.didInit = true;\n },\n didReceiveAttrs: function () {\n assert.ok(this.didInit, 'expected init to have run before didReceiveAttrs');\n this.set('barCopy', this.attrs.bar.value + 1);\n },\n barCopyDidChange: (0, _metal.observer)('barCopy', function () {\n barCopyDidChangeCount++;\n })\n }),\n template: '{{bar}}-{{barCopy}}'\n });\n this.render(\"{{foo-bar bar=bar}}\", {\n bar: 3\n });\n this.assertText('3-4');\n assert.strictEqual(barCopyDidChangeCount, 1, 'expected observer firing for: barCopy');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this81.context, 'bar', 7);\n });\n this.assertText('7-8');\n assert.strictEqual(barCopyDidChangeCount, 2, 'expected observer firing for: barCopy');\n };\n\n _proto['@test overriding didReceiveAttrs does not trigger deprecation'] = function testOverridingDidReceiveAttrsDoesNotTriggerDeprecation(assert) {\n this.registerComponent('foo-bar', {\n ComponentClass: _helpers.Component.extend({\n didReceiveAttrs: function () {\n assert.equal(1, this.get('foo'), 'expected attrs to have correct value');\n }\n }),\n template: '{{foo}}-{{fooCopy}}-{{bar}}-{{barCopy}}'\n });\n this.render(\"{{foo-bar foo=foo bar=bar}}\", {\n foo: 1,\n bar: 3\n });\n };\n\n _proto['@test overriding didUpdateAttrs does not trigger deprecation'] = function testOverridingDidUpdateAttrsDoesNotTriggerDeprecation(assert) {\n var _this82 = this;\n\n this.registerComponent('foo-bar', {\n ComponentClass: _helpers.Component.extend({\n didUpdateAttrs: function () {\n assert.equal(5, this.get('foo'), 'expected newAttrs to have new value');\n }\n }),\n template: '{{foo}}-{{fooCopy}}-{{bar}}-{{barCopy}}'\n });\n this.render(\"{{foo-bar foo=foo bar=bar}}\", {\n foo: 1,\n bar: 3\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this82.context, 'foo', 5);\n });\n };\n\n _proto['@test returning `true` from an action does not bubble if `target` is not specified (GH#14275)'] = function testReturningTrueFromAnActionDoesNotBubbleIfTargetIsNotSpecifiedGH14275(assert) {\n var _this83 = this;\n\n this.registerComponent('display-toggle', {\n ComponentClass: _helpers.Component.extend({\n actions: {\n show: function () {\n assert.ok(true, 'display-toggle show action was called');\n return true;\n }\n }\n }),\n template: \"\"\n });\n this.render(\"{{display-toggle}}\", {\n send: function () {\n assert.notOk(true, 'send should not be called when action is not \"subscribed\" to');\n }\n });\n this.assertText('Show');\n (0, _internalTestHelpers.runTask)(function () {\n return _this83.$('button').click();\n });\n };\n\n _proto['@test returning `true` from an action bubbles to the `target` if specified'] = function testReturningTrueFromAnActionBubblesToTheTargetIfSpecified(assert) {\n var _this84 = this;\n\n assert.expect(4);\n this.registerComponent('display-toggle', {\n ComponentClass: _helpers.Component.extend({\n actions: {\n show: function () {\n assert.ok(true, 'display-toggle show action was called');\n return true;\n }\n }\n }),\n template: \"\"\n });\n this.render(\"{{display-toggle target=this}}\", {\n send: function (actionName) {\n assert.ok(true, 'send should be called when action is \"subscribed\" to');\n assert.equal(actionName, 'show');\n }\n });\n this.assertText('Show');\n (0, _internalTestHelpers.runTask)(function () {\n return _this84.$('button').click();\n });\n };\n\n _proto['@test triggering an event only attempts to invoke an identically named method, if it actually is a function (GH#15228)'] = function testTriggeringAnEventOnlyAttemptsToInvokeAnIdenticallyNamedMethodIfItActuallyIsAFunctionGH15228(assert) {\n assert.expect(3);\n var payload = ['arbitrary', 'event', 'data'];\n this.registerComponent('evented-component', {\n ComponentClass: _helpers.Component.extend({\n someTruthyProperty: true,\n init: function () {\n this._super.apply(this, arguments);\n\n this.trigger.apply(this, ['someMethod'].concat(payload));\n this.trigger.apply(this, ['someTruthyProperty'].concat(payload));\n },\n someMethod: function () {\n for (var _len = arguments.length, data = new Array(_len), _key = 0; _key < _len; _key++) {\n data[_key] = arguments[_key];\n }\n\n assert.deepEqual(data, payload, 'the method `someMethod` should be called, when `someMethod` is triggered');\n },\n listenerForSomeMethod: (0, _metal.on)('someMethod', function () {\n for (var _len2 = arguments.length, data = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n data[_key2] = arguments[_key2];\n }\n\n assert.deepEqual(data, payload, 'the listener `listenerForSomeMethod` should be called, when `someMethod` is triggered');\n }),\n listenerForSomeTruthyProperty: (0, _metal.on)('someTruthyProperty', function () {\n for (var _len3 = arguments.length, data = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n data[_key3] = arguments[_key3];\n }\n\n assert.deepEqual(data, payload, 'the listener `listenerForSomeTruthyProperty` should be called, when `someTruthyProperty` is triggered');\n })\n })\n });\n this.render(\"{{evented-component}}\");\n };\n\n _proto['@test component yielding in an {{#each}} has correct block values after rerendering (GH#14284)'] = function testComponentYieldingInAnEachHasCorrectBlockValuesAfterRerenderingGH14284() {\n var _this85 = this;\n\n this.registerComponent('list-items', {\n template: \"{{#each items as |item|}}{{yield item}}{{/each}}\"\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject55()), {\n editMode: false,\n items: ['foo', 'bar', 'qux', 'baz']\n });\n this.assertText('|foo||bar||qux||baz|');\n this.assertStableRerender();\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this85.context, 'editMode', true);\n });\n this.assertText('|foo|Remove foo|bar|Remove bar|qux|Remove qux|baz|Remove baz');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this85.context, 'editMode', false);\n });\n this.assertText('|foo||bar||qux||baz|');\n };\n\n _proto['@test unimplimented positionalParams do not cause an error GH#14416'] = function testUnimplimentedPositionalParamsDoNotCauseAnErrorGH14416() {\n this.registerComponent('foo-bar', {\n template: 'hello'\n });\n this.render('{{foo-bar wat}}');\n this.assertText('hello');\n };\n\n _proto['@test using attrs for positional params'] = function testUsingAttrsForPositionalParams() {\n var MyComponent = _helpers.Component.extend();\n\n this.registerComponent('foo-bar', {\n ComponentClass: MyComponent.reopenClass({\n positionalParams: ['myVar']\n }),\n template: 'MyVar1: {{attrs.myVar}} {{myVar}} MyVar2: {{myVar2}} {{attrs.myVar2}}'\n });\n this.render('{{foo-bar 1 myVar2=2}}');\n this.assertText('MyVar1: 1 1 MyVar2: 2 2');\n };\n\n _proto['@test using named arguments for positional params'] = function testUsingNamedArgumentsForPositionalParams() {\n var MyComponent = _helpers.Component.extend();\n\n this.registerComponent('foo-bar', {\n ComponentClass: MyComponent.reopenClass({\n positionalParams: ['myVar']\n }),\n template: 'MyVar1: {{@myVar}} {{myVar}} MyVar2: {{myVar2}} {{@myVar2}}'\n });\n this.render('{{foo-bar 1 myVar2=2}}');\n this.assertText('MyVar1: 1 1 MyVar2: 2 2');\n };\n\n _proto[\"@test can use `{{this}}` to emit the component's toString value [GH#14581]\"] = function testCanUseThisToEmitTheComponentSToStringValueGH14581() {\n this.registerComponent('foo-bar', {\n ComponentClass: _helpers.Component.extend({\n toString: function () {\n return 'special sauce goes here!';\n }\n }),\n template: '{{this}}'\n });\n this.render('{{foo-bar}}');\n this.assertText('special sauce goes here!');\n };\n\n _proto['@test can use `{{this` to access paths on current context [GH#14581]'] = function testCanUseThisToAccessPathsOnCurrentContextGH14581() {\n var instance;\n this.registerComponent('foo-bar', {\n ComponentClass: _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n instance = this;\n },\n foo: {\n bar: {\n baz: 'huzzah!'\n }\n }\n }),\n template: '{{this.foo.bar.baz}}'\n });\n this.render('{{foo-bar}}');\n this.assertText('huzzah!');\n this.assertStableRerender();\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(instance, 'foo.bar.baz', 'yippie!');\n });\n this.assertText('yippie!');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(instance, 'foo.bar.baz', 'huzzah!');\n });\n this.assertText('huzzah!');\n };\n\n _proto['@test can use custom element in component layout'] = function testCanUseCustomElementInComponentLayout() {\n this.registerComponent('foo-bar', {\n template: 'Hi!'\n });\n this.render('{{foo-bar}}');\n this.assertText('Hi!');\n };\n\n _proto['@test can use nested custom element in component layout'] = function testCanUseNestedCustomElementInComponentLayout() {\n this.registerComponent('foo-bar', {\n template: 'Hi!'\n });\n this.render('{{foo-bar}}');\n this.assertText('Hi!');\n };\n\n _proto['@test can access properties off of rest style positionalParams array'] = function testCanAccessPropertiesOffOfRestStylePositionalParamsArray() {\n this.registerComponent('foo-bar', {\n ComponentClass: _helpers.Component.extend().reopenClass({\n positionalParams: 'things'\n }),\n template: \"{{@things.length}}\"\n });\n this.render('{{foo-bar \"foo\" \"bar\" \"baz\"}}');\n this.assertText('3');\n };\n\n _proto['@test has attrs by didReceiveAttrs with native classes'] = function testHasAttrsByDidReceiveAttrsWithNativeClasses(assert) {\n var FooBarComponent =\n /*#__PURE__*/\n function (_Component) {\n (0, _emberBabel.inheritsLoose)(FooBarComponent, _Component);\n\n function FooBarComponent(injections) {\n var _this86;\n\n _this86 = _Component.call(this, injections) || this; // analagous to class field defaults\n\n _this86.foo = 'bar';\n return _this86;\n }\n\n var _proto2 = FooBarComponent.prototype;\n\n _proto2.didReceiveAttrs = function didReceiveAttrs() {\n assert.equal(this.foo, 'bar', 'received default attrs correctly');\n };\n\n return FooBarComponent;\n }(_helpers.Component);\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent\n });\n this.render('{{foo-bar}}');\n };\n\n _proto['@test ensure aliases are watched properly [GH#17243]'] = function testEnsureAliasesAreWatchedProperlyGH17243() {\n var fooInstance, barInstance;\n\n var FooComponent = _helpers.Component.extend({\n source: 'first',\n foo: (0, _metal.alias)('source'),\n init: function () {\n this._super.apply(this, arguments);\n\n fooInstance = this;\n }\n });\n\n this.registerComponent('foo', {\n ComponentClass: FooComponent,\n template: '{{this.foo}}'\n });\n\n var BarComponent = _helpers.Component.extend({\n target: null,\n init: function () {\n this._super.apply(this, arguments);\n\n barInstance = this;\n },\n bar: (0, _metal.computed)('target.foo', function () {\n if (this.target) {\n return this.target.foo.toUpperCase();\n }\n })\n });\n\n this.registerComponent('bar', {\n ComponentClass: BarComponent,\n template: '{{this.bar}}'\n });\n this.render('[][]');\n this.assertText('[first][]'); // addObserver\n\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(barInstance, 'target', fooInstance);\n });\n this.assertText('[first][FIRST]');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(fooInstance, 'source', 'second');\n });\n this.assertText('[second][SECOND]'); // removeObserver\n\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(barInstance, 'target', null);\n });\n this.assertText('[second][]');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(fooInstance, 'source', 'third');\n });\n this.assertText('[third][]');\n };\n\n return _class;\n }(_internalTestHelpers.RenderingTestCase));\n\n if (_views.jQueryDisabled) {\n (0, _internalTestHelpers.moduleFor)('Components test: curly components: jQuery disabled',\n /*#__PURE__*/\n function (_RenderingTestCase2) {\n (0, _emberBabel.inheritsLoose)(_class2, _RenderingTestCase2);\n\n function _class2() {\n return _RenderingTestCase2.apply(this, arguments) || this;\n }\n\n var _proto3 = _class2.prototype;\n\n _proto3['@test jQuery proxy is not available without jQuery'] = function testJQueryProxyIsNotAvailableWithoutJQuery() {\n var instance;\n\n var FooBarComponent = _helpers.Component.extend({\n init: function () {\n this._super();\n\n instance = this;\n }\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render('{{foo-bar}}');\n expectAssertion(function () {\n instance.$()[0];\n }, 'You cannot access this.$() with `jQuery` disabled.');\n };\n\n return _class2;\n }(_internalTestHelpers.RenderingTestCase));\n } else {\n (0, _internalTestHelpers.moduleFor)('Components test: curly components: jQuery enabled',\n /*#__PURE__*/\n function (_RenderingTestCase3) {\n (0, _emberBabel.inheritsLoose)(_class3, _RenderingTestCase3);\n\n function _class3() {\n return _RenderingTestCase3.apply(this, arguments) || this;\n }\n\n var _proto4 = _class3.prototype;\n\n _proto4['@test it has a jQuery proxy to the element'] = function testItHasAJQueryProxyToTheElement() {\n var _this87 = this;\n\n var instance;\n var element1;\n var element2;\n\n var FooBarComponent = _helpers.Component.extend({\n init: function () {\n this._super();\n\n instance = this;\n }\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render('{{foo-bar}}');\n expectDeprecation(function () {\n element1 = instance.$()[0];\n }, 'Using this.$() in a component has been deprecated, consider using this.element');\n this.assertComponentElement(element1, {\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this87.rerender();\n });\n expectDeprecation(function () {\n element2 = instance.$()[0];\n }, 'Using this.$() in a component has been deprecated, consider using this.element');\n this.assertComponentElement(element2, {\n content: 'hello'\n });\n this.assertSameNode(element2, element1);\n };\n\n _proto4['@test it scopes the jQuery proxy to the component element'] = function testItScopesTheJQueryProxyToTheComponentElement(assert) {\n var _this88 = this;\n\n var instance;\n var $span;\n\n var FooBarComponent = _helpers.Component.extend({\n init: function () {\n this._super();\n\n instance = this;\n }\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'inner'\n });\n this.render('outer{{foo-bar}}');\n expectDeprecation(function () {\n $span = instance.$('span');\n }, 'Using this.$() in a component has been deprecated, consider using this.element');\n assert.equal($span.length, 1);\n assert.equal($span.attr('class'), 'inner');\n (0, _internalTestHelpers.runTask)(function () {\n return _this88.rerender();\n });\n expectDeprecation(function () {\n $span = instance.$('span');\n }, 'Using this.$() in a component has been deprecated, consider using this.element');\n assert.equal($span.length, 1);\n assert.equal($span.attr('class'), 'inner');\n };\n\n return _class3;\n }(_internalTestHelpers.RenderingTestCase));\n }\n});","enifed(\"@ember/-internals/glimmer/tests/integration/components/destroy-test\", [\"ember-babel\", \"internal-test-helpers\", \"@ember/-internals/metal\", \"@ember/-internals/glimmer/tests/utils/helpers\"], function (_emberBabel, _internalTestHelpers, _metal, _helpers) {\n \"use strict\";\n\n (0, _internalTestHelpers.moduleFor)('Component destroy',\n /*#__PURE__*/\n function (_RenderingTestCase) {\n (0, _emberBabel.inheritsLoose)(_class, _RenderingTestCase);\n\n function _class() {\n return _RenderingTestCase.apply(this, arguments) || this;\n }\n\n var _proto = _class.prototype;\n\n _proto['@test it correctly releases the destroyed components'] = function testItCorrectlyReleasesTheDestroyedComponents(assert) {\n var _this = this;\n\n var FooBarComponent = _helpers.Component.extend({});\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render('{{#if switch}}{{#foo-bar}}{{foo-bar}}{{/foo-bar}}{{/if}}', {\n switch: true\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this.context, 'switch', false);\n });\n this.assertText('');\n assert.equal(this.env.destroyedComponents.length, 0, 'environment.destroyedComponents should be empty');\n };\n\n return _class;\n }(_internalTestHelpers.RenderingTestCase));\n});","enifed(\"@ember/-internals/glimmer/tests/integration/components/dynamic-components-test\", [\"ember-babel\", \"internal-test-helpers\", \"@ember/-internals/metal\", \"@ember/-internals/views\", \"@ember/-internals/glimmer/tests/utils/helpers\"], function (_emberBabel, _internalTestHelpers, _metal, _views, _helpers) {\n \"use strict\";\n\n function _templateObject3() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#each n as |name|}}\\n {{name}}\\n {{/each}}\"]);\n\n _templateObject3 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject2() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#each names as |name|}}\\n {{name}}\\n {{/each}}\"]);\n\n _templateObject2 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#if cond1}}\\n {{#component \\\"foo-bar\\\" id=1}}\\n {{#if cond2}}\\n {{#component \\\"foo-bar\\\" id=2}}{{/component}}\\n {{#if cond3}}\\n {{#component \\\"foo-bar\\\" id=3}}\\n {{#if cond4}}\\n {{#component \\\"foo-bar\\\" id=4}}\\n {{#if cond5}}\\n {{#component \\\"foo-bar\\\" id=5}}{{/component}}\\n {{#component \\\"foo-bar\\\" id=6}}{{/component}}\\n {{#component \\\"foo-bar\\\" id=7}}{{/component}}\\n {{/if}}\\n {{#component \\\"foo-bar\\\" id=8}}{{/component}}\\n {{/component}}\\n {{/if}}\\n {{/component}}\\n {{/if}}\\n {{/if}}\\n {{/component}}\\n {{/if}}\"]);\n\n _templateObject = function () {\n return data;\n };\n\n return data;\n }\n\n function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }\n\n (0, _internalTestHelpers.moduleFor)('Components test: dynamic components',\n /*#__PURE__*/\n function (_RenderingTestCase) {\n (0, _emberBabel.inheritsLoose)(_class, _RenderingTestCase);\n\n function _class() {\n return _RenderingTestCase.apply(this, arguments) || this;\n }\n\n var _proto = _class.prototype;\n\n _proto['@test it can render a basic component with a static component name argument'] = function testItCanRenderABasicComponentWithAStaticComponentNameArgument() {\n var _this = this;\n\n this.registerComponent('foo-bar', {\n template: 'hello {{name}}'\n });\n this.render('{{component \"foo-bar\" name=name}}', {\n name: 'Sarah'\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello Sarah'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello Sarah'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this.context, 'name', 'Gavin');\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello Gavin'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this.context, 'name', 'Sarah');\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello Sarah'\n });\n };\n\n _proto['@test it can render a basic component with a dynamic component name argument'] = function testItCanRenderABasicComponentWithADynamicComponentNameArgument() {\n var _this2 = this;\n\n this.registerComponent('foo-bar', {\n template: 'hello {{name}} from foo-bar'\n });\n this.registerComponent('foo-bar-baz', {\n template: 'hello {{name}} from foo-bar-baz'\n });\n this.render('{{component componentName name=name}}', {\n componentName: 'foo-bar',\n name: 'Alex'\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello Alex from foo-bar'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this2.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello Alex from foo-bar'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this2.context, 'name', 'Ben');\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello Ben from foo-bar'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this2.context, 'componentName', 'foo-bar-baz');\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello Ben from foo-bar-baz'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this2.context, 'componentName', 'foo-bar');\n (0, _metal.set)(_this2.context, 'name', 'Alex');\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello Alex from foo-bar'\n });\n };\n\n _proto['@test it has an element'] = function testItHasAnElement() {\n var _this3 = this;\n\n var instance;\n\n var FooBarComponent = _helpers.Component.extend({\n init: function () {\n this._super();\n\n instance = this;\n }\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render('{{component \"foo-bar\"}}');\n var element1 = instance.element;\n this.assertComponentElement(element1, {\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this3.rerender();\n });\n var element2 = instance.element;\n this.assertComponentElement(element2, {\n content: 'hello'\n });\n this.assertSameNode(element2, element1);\n };\n\n _proto['@test it has the right parentView and childViews'] = function testItHasTheRightParentViewAndChildViews(assert) {\n var _this4 = this;\n\n var fooBarInstance, fooBarBazInstance;\n\n var FooBarComponent = _helpers.Component.extend({\n init: function () {\n this._super();\n\n fooBarInstance = this;\n }\n });\n\n var FooBarBazComponent = _helpers.Component.extend({\n init: function () {\n this._super();\n\n fooBarBazInstance = this;\n }\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'foo-bar {{foo-bar-baz}}'\n });\n this.registerComponent('foo-bar-baz', {\n ComponentClass: FooBarBazComponent,\n template: 'foo-bar-baz'\n });\n this.render('{{component \"foo-bar\"}}');\n this.assertText('foo-bar foo-bar-baz');\n assert.equal(fooBarInstance.parentView, this.component);\n assert.equal(fooBarBazInstance.parentView, fooBarInstance);\n assert.deepEqual(this.component.childViews, [fooBarInstance]);\n assert.deepEqual(fooBarInstance.childViews, [fooBarBazInstance]);\n (0, _internalTestHelpers.runTask)(function () {\n return _this4.rerender();\n });\n this.assertText('foo-bar foo-bar-baz');\n assert.equal(fooBarInstance.parentView, this.component);\n assert.equal(fooBarBazInstance.parentView, fooBarInstance);\n assert.deepEqual(this.component.childViews, [fooBarInstance]);\n assert.deepEqual(fooBarInstance.childViews, [fooBarBazInstance]);\n };\n\n _proto['@test it can render a basic component with a block'] = function testItCanRenderABasicComponentWithABlock() {\n var _this5 = this;\n\n this.registerComponent('foo-bar', {\n template: '{{yield}}'\n });\n this.render('{{#component \"foo-bar\"}}hello{{/component}}');\n this.assertComponentElement(this.firstChild, {\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this5.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello'\n });\n };\n\n _proto['@test it renders the layout with the component instance as the context'] = function testItRendersTheLayoutWithTheComponentInstanceAsTheContext() {\n var _this6 = this;\n\n var instance;\n\n var FooBarComponent = _helpers.Component.extend({\n init: function () {\n this._super();\n\n instance = this;\n this.set('message', 'hello');\n }\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: '{{message}}'\n });\n this.render('{{component \"foo-bar\"}}');\n this.assertComponentElement(this.firstChild, {\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this6.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(instance, 'message', 'goodbye');\n });\n this.assertComponentElement(this.firstChild, {\n content: 'goodbye'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(instance, 'message', 'hello');\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello'\n });\n };\n\n _proto['@test it preserves the outer context when yielding'] = function testItPreservesTheOuterContextWhenYielding() {\n var _this7 = this;\n\n this.registerComponent('foo-bar', {\n template: '{{yield}}'\n });\n this.render('{{#component \"foo-bar\"}}{{message}}{{/component}}', {\n message: 'hello'\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this7.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this7.context, 'message', 'goodbye');\n });\n this.assertComponentElement(this.firstChild, {\n content: 'goodbye'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this7.context, 'message', 'hello');\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello'\n });\n };\n\n _proto['@test the component and its child components are destroyed'] = function testTheComponentAndItsChildComponentsAreDestroyed(assert) {\n var _this8 = this;\n\n var destroyed = {\n 1: 0,\n 2: 0,\n 3: 0,\n 4: 0,\n 5: 0,\n 6: 0,\n 7: 0,\n 8: 0\n };\n this.registerComponent('foo-bar', {\n template: '{{id}} {{yield}}',\n ComponentClass: _helpers.Component.extend({\n willDestroy: function () {\n this._super();\n\n destroyed[this.get('id')]++;\n }\n })\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject()), {\n cond1: true,\n cond2: true,\n cond3: true,\n cond4: true,\n cond5: true\n });\n this.assertText('1 2 3 4 5 6 7 8 ');\n (0, _internalTestHelpers.runTask)(function () {\n return _this8.rerender();\n });\n assert.deepEqual(destroyed, {\n 1: 0,\n 2: 0,\n 3: 0,\n 4: 0,\n 5: 0,\n 6: 0,\n 7: 0,\n 8: 0\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this8.context, 'cond5', false);\n });\n this.assertText('1 2 3 4 8 ');\n assert.deepEqual(destroyed, {\n 1: 0,\n 2: 0,\n 3: 0,\n 4: 0,\n 5: 1,\n 6: 1,\n 7: 1,\n 8: 0\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this8.context, 'cond3', false);\n (0, _metal.set)(_this8.context, 'cond5', true);\n (0, _metal.set)(_this8.context, 'cond4', false);\n });\n assert.deepEqual(destroyed, {\n 1: 0,\n 2: 0,\n 3: 1,\n 4: 1,\n 5: 1,\n 6: 1,\n 7: 1,\n 8: 1\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this8.context, 'cond2', false);\n (0, _metal.set)(_this8.context, 'cond1', false);\n });\n assert.deepEqual(destroyed, {\n 1: 1,\n 2: 1,\n 3: 1,\n 4: 1,\n 5: 1,\n 6: 1,\n 7: 1,\n 8: 1\n });\n };\n\n _proto['@test component helper destroys underlying component when it is swapped out'] = function testComponentHelperDestroysUnderlyingComponentWhenItIsSwappedOut(assert) {\n var _this9 = this;\n\n var destroyed = {\n 'foo-bar': 0,\n 'foo-bar-baz': 0\n };\n var testContext = this;\n this.registerComponent('foo-bar', {\n template: 'hello from foo-bar',\n ComponentClass: _helpers.Component.extend({\n willDestroyElement: function () {\n assert.equal(testContext.$(\"#\" + this.elementId).length, 1, 'element is still attached to the document');\n },\n willDestroy: function () {\n this._super();\n\n destroyed['foo-bar']++;\n }\n })\n });\n this.registerComponent('foo-bar-baz', {\n template: 'hello from foo-bar-baz',\n ComponentClass: _helpers.Component.extend({\n willDestroy: function () {\n this._super();\n\n destroyed['foo-bar-baz']++;\n }\n })\n });\n this.render('{{component componentName name=name}}', {\n componentName: 'foo-bar'\n });\n assert.deepEqual(destroyed, {\n 'foo-bar': 0,\n 'foo-bar-baz': 0\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this9.rerender();\n });\n assert.deepEqual(destroyed, {\n 'foo-bar': 0,\n 'foo-bar-baz': 0\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this9.context, 'componentName', 'foo-bar-baz');\n });\n assert.deepEqual(destroyed, {\n 'foo-bar': 1,\n 'foo-bar-baz': 0\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this9.context, 'componentName', 'foo-bar');\n });\n assert.deepEqual(destroyed, {\n 'foo-bar': 1,\n 'foo-bar-baz': 1\n });\n };\n\n _proto['@test component helper with bound properties are updating correctly in init of component'] = function testComponentHelperWithBoundPropertiesAreUpdatingCorrectlyInInitOfComponent() {\n var _this10 = this;\n\n this.registerComponent('foo-bar', {\n template: 'foo-bar {{location}} {{locationCopy}} {{yield}}',\n ComponentClass: _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n this.set('locationCopy', this.get('location'));\n }\n })\n });\n this.registerComponent('foo-bar-baz', {\n template: 'foo-bar-baz {{location}} {{locationCopy}} {{yield}}',\n ComponentClass: _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n this.set('locationCopy', this.get('location'));\n }\n })\n });\n this.registerComponent('outer-component', {\n template: '{{#component componentName location=location}}arepas!{{/component}}',\n ComponentClass: _helpers.Component.extend({\n componentName: (0, _metal.computed)('location', function () {\n if (this.get('location') === 'Caracas') {\n return 'foo-bar';\n } else {\n return 'foo-bar-baz';\n }\n })\n })\n });\n this.render('{{outer-component location=location}}', {\n location: 'Caracas'\n });\n this.assertText('foo-bar Caracas Caracas arepas!');\n (0, _internalTestHelpers.runTask)(function () {\n return _this10.rerender();\n });\n this.assertText('foo-bar Caracas Caracas arepas!');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this10.context, 'location', 'Loisaida');\n });\n this.assertText('foo-bar-baz Loisaida Loisaida arepas!');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this10.context, 'location', 'Caracas');\n });\n this.assertText('foo-bar Caracas Caracas arepas!');\n };\n\n _proto['@test component helper with actions'] = function testComponentHelperWithActions(assert) {\n var _this12 = this;\n\n this.registerComponent('inner-component', {\n template: 'inner-component {{yield}}',\n ComponentClass: _helpers.Component.extend({\n classNames: 'inner-component',\n didInsertElement: function () {\n var _this11 = this; // trigger action on click in absence of app's EventDispatcher\n\n\n var sendAction = this.eventHandler = function () {\n if (_this11.somethingClicked) {\n _this11.somethingClicked();\n }\n };\n\n this.element.addEventListener('click', sendAction);\n },\n willDestroyElement: function () {\n this.element.removeEventListener('click', this.eventHandler);\n }\n })\n });\n var actionTriggered = 0;\n this.registerComponent('outer-component', {\n template: '{{#component componentName somethingClicked=(action \"mappedAction\")}}arepas!{{/component}}',\n ComponentClass: _helpers.Component.extend({\n classNames: 'outer-component',\n componentName: 'inner-component',\n actions: {\n mappedAction: function () {\n actionTriggered++;\n }\n }\n })\n });\n this.render('{{outer-component}}');\n assert.equal(actionTriggered, 0, 'action was not triggered');\n (0, _internalTestHelpers.runTask)(function () {\n _this12.$('.inner-component').click();\n });\n assert.equal(actionTriggered, 1, 'action was triggered');\n };\n\n _proto['@test nested component helpers'] = function testNestedComponentHelpers() {\n var _this13 = this;\n\n this.registerComponent('foo-bar', {\n template: 'yippie! {{attrs.location}} {{yield}}'\n });\n this.registerComponent('baz-qux', {\n template: 'yummy {{attrs.location}} {{yield}}'\n });\n this.registerComponent('corge-grault', {\n template: 'delicious {{attrs.location}} {{yield}}'\n });\n this.render('{{#component componentName1 location=location}}{{#component componentName2 location=location}}arepas!{{/component}}{{/component}}', {\n componentName1: 'foo-bar',\n componentName2: 'baz-qux',\n location: 'Caracas'\n });\n this.assertText('yippie! Caracas yummy Caracas arepas!');\n (0, _internalTestHelpers.runTask)(function () {\n return _this13.rerender();\n });\n this.assertText('yippie! Caracas yummy Caracas arepas!');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this13.context, 'location', 'Loisaida');\n });\n this.assertText('yippie! Loisaida yummy Loisaida arepas!');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this13.context, 'componentName1', 'corge-grault');\n });\n this.assertText('delicious Loisaida yummy Loisaida arepas!');\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this13.context, 'componentName1', 'foo-bar');\n (0, _metal.set)(_this13.context, 'location', 'Caracas');\n });\n this.assertText('yippie! Caracas yummy Caracas arepas!');\n };\n\n _proto['@test component with dynamic name argument resolving to non-existent component'] = function testComponentWithDynamicNameArgumentResolvingToNonExistentComponent() {\n var _this14 = this;\n\n expectAssertion(function () {\n _this14.render('{{component componentName}}', {\n componentName: 'does-not-exist'\n });\n }, /Could not find component named \"does-not-exist\"/);\n };\n\n _proto['@test component with static name argument for non-existent component'] = function testComponentWithStaticNameArgumentForNonExistentComponent() {\n var _this15 = this;\n\n expectAssertion(function () {\n _this15.render('{{component \"does-not-exist\"}}');\n }, /Could not find component named \"does-not-exist\"/);\n };\n\n _proto['@test component with dynamic component name resolving to a component, then non-existent component'] = function testComponentWithDynamicComponentNameResolvingToAComponentThenNonExistentComponent() {\n var _this16 = this;\n\n this.registerComponent('foo-bar', {\n template: 'hello {{name}}'\n });\n this.render('{{component componentName name=name}}', {\n componentName: 'foo-bar',\n name: 'Alex'\n });\n this.assertText('hello Alex');\n (0, _internalTestHelpers.runTask)(function () {\n return _this16.rerender();\n });\n this.assertText('hello Alex');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this16.context, 'componentName', undefined);\n });\n this.assertText('');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this16.context, 'componentName', 'foo-bar');\n });\n this.assertText('hello Alex');\n };\n\n _proto['@test component helper properly invalidates hash params inside an {{each}} invocation #11044'] = function testComponentHelperProperlyInvalidatesHashParamsInsideAnEachInvocation11044() {\n var _this17 = this;\n\n this.registerComponent('foo-bar', {\n template: '[{{internalName}} - {{name}}]',\n ComponentClass: _helpers.Component.extend({\n willRender: function () {\n // store internally available name to ensure that the name available in `this.attrs.name`\n // matches the template lookup name\n (0, _metal.set)(this, 'internalName', this.get('name'));\n }\n })\n });\n this.render('{{#each items as |item|}}{{component \"foo-bar\" name=item.name}}{{/each}}', {\n items: [{\n name: 'Robert'\n }, {\n name: 'Jacquie'\n }]\n });\n this.assertText('[Robert - Robert][Jacquie - Jacquie]');\n (0, _internalTestHelpers.runTask)(function () {\n return _this17.rerender();\n });\n this.assertText('[Robert - Robert][Jacquie - Jacquie]');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this17.context, 'items', [{\n name: 'Max'\n }, {\n name: 'James'\n }]);\n });\n this.assertText('[Max - Max][James - James]');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this17.context, 'items', [{\n name: 'Robert'\n }, {\n name: 'Jacquie'\n }]);\n });\n this.assertText('[Robert - Robert][Jacquie - Jacquie]');\n };\n\n _proto['@test positional parameters does not clash when rendering different components'] = function testPositionalParametersDoesNotClashWhenRenderingDifferentComponents() {\n var _this18 = this;\n\n this.registerComponent('foo-bar', {\n template: 'hello {{name}} ({{age}}) from foo-bar',\n ComponentClass: _helpers.Component.extend().reopenClass({\n positionalParams: ['name', 'age']\n })\n });\n this.registerComponent('foo-bar-baz', {\n template: 'hello {{name}} ({{age}}) from foo-bar-baz',\n ComponentClass: _helpers.Component.extend().reopenClass({\n positionalParams: ['name', 'age']\n })\n });\n this.render('{{component componentName name age}}', {\n componentName: 'foo-bar',\n name: 'Alex',\n age: 29\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello Alex (29) from foo-bar'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this18.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello Alex (29) from foo-bar'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this18.context, 'name', 'Ben');\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello Ben (29) from foo-bar'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this18.context, 'age', 22);\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello Ben (22) from foo-bar'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this18.context, 'componentName', 'foo-bar-baz');\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello Ben (22) from foo-bar-baz'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this18.context, 'componentName', 'foo-bar');\n (0, _metal.set)(_this18.context, 'name', 'Alex');\n (0, _metal.set)(_this18.context, 'age', 29);\n });\n this.assertComponentElement(this.firstChild, {\n content: 'hello Alex (29) from foo-bar'\n });\n };\n\n _proto['@test positional parameters does not pollute the attributes when changing components'] = function testPositionalParametersDoesNotPolluteTheAttributesWhenChangingComponents() {\n var _this19 = this;\n\n this.registerComponent('normal-message', {\n template: 'Normal: {{something}}!',\n ComponentClass: _helpers.Component.extend().reopenClass({\n positionalParams: ['something']\n })\n });\n this.registerComponent('alternative-message', {\n template: 'Alternative: {{something}} {{somethingElse}}!',\n ComponentClass: _helpers.Component.extend({\n something: 'Another'\n }).reopenClass({\n positionalParams: ['somethingElse']\n })\n });\n this.render('{{component componentName message}}', {\n componentName: 'normal-message',\n message: 'Hello'\n });\n this.assertComponentElement(this.firstChild, {\n content: 'Normal: Hello!'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this19.rerender();\n });\n this.assertComponentElement(this.firstChild, {\n content: 'Normal: Hello!'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this19.context, 'componentName', 'alternative-message');\n });\n this.assertComponentElement(this.firstChild, {\n content: 'Alternative: Another Hello!'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this19.context, 'message', 'Hi');\n });\n this.assertComponentElement(this.firstChild, {\n content: 'Alternative: Another Hi!'\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this19.context, 'componentName', 'normal-message');\n (0, _metal.set)(_this19.context, 'message', 'Hello');\n });\n this.assertComponentElement(this.firstChild, {\n content: 'Normal: Hello!'\n });\n };\n\n _proto['@test static arbitrary number of positional parameters'] = function testStaticArbitraryNumberOfPositionalParameters() {\n var _this20 = this;\n\n this.registerComponent('sample-component', {\n ComponentClass: _helpers.Component.extend().reopenClass({\n positionalParams: 'names'\n }),\n template: (0, _internalTestHelpers.strip)(_templateObject2())\n });\n this.render(\"{{component \\\"sample-component\\\" \\\"Foo\\\" 4 \\\"Bar\\\" 5 \\\"Baz\\\" elementId=\\\"helper\\\"}}\");\n this.assertText('Foo4Bar5Baz');\n (0, _internalTestHelpers.runTask)(function () {\n return _this20.rerender();\n });\n this.assertText('Foo4Bar5Baz');\n };\n\n _proto['@test dynamic arbitrary number of positional parameters'] = function testDynamicArbitraryNumberOfPositionalParameters() {\n var _this21 = this;\n\n this.registerComponent('sample-component', {\n ComponentClass: _helpers.Component.extend().reopenClass({\n positionalParams: 'n'\n }),\n template: (0, _internalTestHelpers.strip)(_templateObject3())\n });\n this.render(\"{{component \\\"sample-component\\\" user1 user2}}\", {\n user1: 'Foo',\n user2: 4\n });\n this.assertText('Foo4');\n (0, _internalTestHelpers.runTask)(function () {\n return _this21.rerender();\n });\n this.assertText('Foo4');\n (0, _internalTestHelpers.runTask)(function () {\n return _this21.context.set('user1', 'Bar');\n });\n this.assertText('Bar4');\n (0, _internalTestHelpers.runTask)(function () {\n return _this21.context.set('user2', '5');\n });\n this.assertText('Bar5');\n (0, _internalTestHelpers.runTask)(function () {\n _this21.context.set('user1', 'Foo');\n\n _this21.context.set('user2', 4);\n });\n this.assertText('Foo4');\n };\n\n _proto['@test component helper emits useful backtracking re-render assertion message'] = function testComponentHelperEmitsUsefulBacktrackingReRenderAssertionMessage() {\n var _this22 = this;\n\n this.registerComponent('outer-component', {\n ComponentClass: _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n this.set('person', {\n name: 'Alex'\n });\n }\n }),\n template: \"Hi {{person.name}}! {{component \\\"error-component\\\" person=person}}\"\n });\n this.registerComponent('error-component', {\n ComponentClass: _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n this.set('person.name', {\n name: 'Ben'\n });\n }\n }),\n template: '{{person.name}}'\n });\n var expectedBacktrackingMessage = /modified \"person\\.name\" twice on \\[object Object\\] in a single render\\. It was rendered in \"component:outer-component\" and modified in \"component:error-component\"/;\n expectAssertion(function () {\n _this22.render('{{component componentName}}', {\n componentName: 'outer-component'\n });\n }, expectedBacktrackingMessage);\n };\n\n return _class;\n }(_internalTestHelpers.RenderingTestCase));\n\n if (_views.jQueryDisabled) {\n (0, _internalTestHelpers.moduleFor)('Components test: dynamic components: jQuery disabled',\n /*#__PURE__*/\n function (_RenderingTestCase2) {\n (0, _emberBabel.inheritsLoose)(_class2, _RenderingTestCase2);\n\n function _class2() {\n return _RenderingTestCase2.apply(this, arguments) || this;\n }\n\n var _proto2 = _class2.prototype;\n\n _proto2['@test jQuery proxy is not available without jQuery'] = function testJQueryProxyIsNotAvailableWithoutJQuery() {\n var instance;\n\n var FooBarComponent = _helpers.Component.extend({\n init: function () {\n this._super();\n\n instance = this;\n }\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render('{{component \"foo-bar\"}}');\n expectAssertion(function () {\n instance.$()[0];\n }, 'You cannot access this.$() with `jQuery` disabled.');\n };\n\n return _class2;\n }(_internalTestHelpers.RenderingTestCase));\n } else {\n (0, _internalTestHelpers.moduleFor)('Components test: dynamic components : jQuery enabled',\n /*#__PURE__*/\n function (_RenderingTestCase3) {\n (0, _emberBabel.inheritsLoose)(_class3, _RenderingTestCase3);\n\n function _class3() {\n return _RenderingTestCase3.apply(this, arguments) || this;\n }\n\n var _proto3 = _class3.prototype;\n\n _proto3['@test it has a jQuery proxy to the element'] = function testItHasAJQueryProxyToTheElement() {\n var _this23 = this;\n\n var instance;\n var element1;\n var element2;\n\n var FooBarComponent = _helpers.Component.extend({\n init: function () {\n this._super();\n\n instance = this;\n }\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render('{{component \"foo-bar\"}}');\n expectDeprecation(function () {\n element1 = instance.$()[0];\n }, 'Using this.$() in a component has been deprecated, consider using this.element');\n this.assertComponentElement(element1, {\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this23.rerender();\n });\n expectDeprecation(function () {\n element2 = instance.$()[0];\n }, 'Using this.$() in a component has been deprecated, consider using this.element');\n this.assertComponentElement(element2, {\n content: 'hello'\n });\n this.assertSameNode(element2, element1);\n };\n\n _proto3['@test it scopes the jQuery proxy to the component element'] = function testItScopesTheJQueryProxyToTheComponentElement(assert) {\n var _this24 = this;\n\n var instance;\n var $span;\n\n var FooBarComponent = _helpers.Component.extend({\n init: function () {\n this._super();\n\n instance = this;\n }\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'inner'\n });\n this.render('outer{{component \"foo-bar\"}}');\n expectDeprecation(function () {\n $span = instance.$('span');\n }, 'Using this.$() in a component has been deprecated, consider using this.element');\n assert.equal($span.length, 1);\n assert.equal($span.attr('class'), 'inner');\n (0, _internalTestHelpers.runTask)(function () {\n return _this24.rerender();\n });\n expectDeprecation(function () {\n $span = instance.$('span');\n }, 'Using this.$() in a component has been deprecated, consider using this.element');\n assert.equal($span.length, 1);\n assert.equal($span.attr('class'), 'inner');\n };\n\n return _class3;\n }(_internalTestHelpers.RenderingTestCase));\n }\n});","enifed(\"@ember/-internals/glimmer/tests/integration/components/error-handling-test\", [\"ember-babel\", \"internal-test-helpers\", \"@ember/-internals/metal\", \"@ember/-internals/glimmer/tests/utils/helpers\"], function (_emberBabel, _internalTestHelpers, _metal, _helpers) {\n \"use strict\";\n\n (0, _internalTestHelpers.moduleFor)('Errors thrown during render',\n /*#__PURE__*/\n function (_RenderingTestCase) {\n (0, _emberBabel.inheritsLoose)(_class, _RenderingTestCase);\n\n function _class() {\n return _RenderingTestCase.apply(this, arguments) || this;\n }\n\n var _proto = _class.prototype;\n\n _proto['@test it can recover resets the transaction when an error is thrown during initial render'] = function testItCanRecoverResetsTheTransactionWhenAnErrorIsThrownDuringInitialRender(assert) {\n var _this = this;\n\n var shouldThrow = true;\n\n var FooBarComponent = _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n if (shouldThrow) {\n throw new Error('silly mistake in init!');\n }\n }\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n assert.throws(function () {\n _this.render('{{#if switch}}{{#foo-bar}}{{foo-bar}}{{/foo-bar}}{{/if}}', {\n switch: true\n });\n }, /silly mistake in init/);\n assert.equal(this.env.inTransaction, false, 'should not be in a transaction even though an error was thrown');\n this.assertText('');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this.context, 'switch', false);\n });\n shouldThrow = false;\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this.context, 'switch', true);\n });\n this.assertText('hello');\n };\n\n _proto['@skip it can recover resets the transaction when an error is thrown during rerender'] = function skipItCanRecoverResetsTheTransactionWhenAnErrorIsThrownDuringRerender(assert) {\n var _this2 = this;\n\n var shouldThrow = false;\n\n var FooBarComponent = _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n if (shouldThrow) {\n throw new Error('silly mistake in init!');\n }\n }\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render('{{#if switch}}{{#foo-bar}}{{foo-bar}}{{/foo-bar}}{{/if}}', {\n switch: true\n });\n this.assertText('hello');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this2.context, 'switch', false);\n });\n shouldThrow = true;\n assert.throws(function () {\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this2.context, 'switch', true);\n });\n }, /silly mistake in init/);\n assert.equal(this.env.inTransaction, false, 'should not be in a transaction even though an error was thrown');\n this.assertText('');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this2.context, 'switch', false);\n });\n shouldThrow = false;\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this2.context, 'switch', true);\n });\n this.assertText('hello');\n };\n\n _proto['@test it can recover resets the transaction when an error is thrown during didInsertElement'] = function testItCanRecoverResetsTheTransactionWhenAnErrorIsThrownDuringDidInsertElement(assert) {\n var _this3 = this;\n\n var shouldThrow = true;\n\n var FooBarComponent = _helpers.Component.extend({\n didInsertElement: function () {\n this._super.apply(this, arguments);\n\n if (shouldThrow) {\n throw new Error('silly mistake!');\n }\n }\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n assert.throws(function () {\n _this3.render('{{#if switch}}{{#foo-bar}}{{foo-bar}}{{/foo-bar}}{{/if}}', {\n switch: true\n });\n }, /silly mistake/);\n assert.equal(this.env.inTransaction, false, 'should not be in a transaction even though an error was thrown');\n this.assertText('hello');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this3.context, 'switch', false);\n });\n this.assertText('');\n };\n\n _proto['@test it can recover resets the transaction when an error is thrown during destroy'] = function testItCanRecoverResetsTheTransactionWhenAnErrorIsThrownDuringDestroy(assert) {\n var _this4 = this;\n\n var shouldThrow = true;\n\n var FooBarComponent = _helpers.Component.extend({\n destroy: function () {\n this._super.apply(this, arguments);\n\n if (shouldThrow) {\n throw new Error('silly mistake!');\n }\n }\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n this.render('{{#if switch}}{{#foo-bar}}{{foo-bar}}{{/foo-bar}}{{/if}}', {\n switch: true\n });\n this.assertText('hello');\n assert.throws(function () {\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this4.context, 'switch', false);\n });\n }, /silly mistake/);\n this.assertText('');\n shouldThrow = false;\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this4.context, 'switch', true);\n });\n this.assertText('hello');\n };\n\n return _class;\n }(_internalTestHelpers.RenderingTestCase));\n});","enifed(\"@ember/-internals/glimmer/tests/integration/components/fragment-components-test\", [\"ember-babel\", \"internal-test-helpers\", \"@ember/-internals/metal\", \"@ember/-internals/glimmer/tests/utils/helpers\"], function (_emberBabel, _internalTestHelpers, _metal, _helpers) {\n \"use strict\";\n\n function _templateObject3() {\n const data = _taggedTemplateLiteralLoose([\"bizz\"]);\n\n _templateObject3 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject2() {\n const data = _taggedTemplateLiteralLoose([\"bar\"]);\n\n _templateObject2 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject() {\n const data = _taggedTemplateLiteralLoose([\"
Hey
bar\"]);\n\n _templateObject = function () {\n return data;\n };\n\n return data;\n }\n\n function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }\n\n (0, _internalTestHelpers.moduleFor)('Components test: fragment components',\n /*#__PURE__*/\n function (_RenderingTestCase) {\n (0, _emberBabel.inheritsLoose)(_class, _RenderingTestCase);\n\n function _class() {\n return _RenderingTestCase.apply(this, arguments) || this;\n }\n\n var _proto = _class.prototype;\n\n _proto.getCustomDispatcherEvents = function getCustomDispatcherEvents() {\n return {\n hitDem: 'folks'\n };\n };\n\n _proto['@test fragments do not render an outer tag'] = function testFragmentsDoNotRenderAnOuterTag() {\n var instance;\n\n var FooBarComponent = _helpers.Component.extend({\n tagName: '',\n init: function () {\n this._super();\n\n instance = this;\n this.foo = true;\n this.bar = 'bar';\n }\n });\n\n var template = \"{{#if foo}}
Hey
{{/if}}{{yield bar}}\";\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: template\n });\n this.render(\"{{#foo-bar as |bar|}}{{bar}}{{/foo-bar}}\");\n this.assertHTML((0, _internalTestHelpers.strip)(_templateObject()));\n this.assertStableRerender();\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(instance, 'foo', false);\n });\n this.assertHTML((0, _internalTestHelpers.strip)(_templateObject2()));\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(instance, 'bar', 'bizz');\n });\n this.assertHTML((0, _internalTestHelpers.strip)(_templateObject3()));\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(instance, 'bar', 'bar');\n (0, _metal.set)(instance, 'foo', true);\n });\n };\n\n _proto['@test throws an error if an event function is defined in a tagless component'] = function testThrowsAnErrorIfAnEventFunctionIsDefinedInATaglessComponent() {\n var _this = this;\n\n var template = \"hit dem folks\";\n\n var FooBarComponent = _helpers.Component.extend({\n tagName: '',\n click: function () {},\n mouseEnter: function () {}\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: template\n });\n expectAssertion(function () {\n _this.render(\"{{#foo-bar}}{{/foo-bar}}\");\n }, /You can not define `click,mouseEnter` function\\(s\\) to handle DOM event in the .* tagless component since it doesn't have any DOM element./);\n };\n\n _proto['@test throws an error if a custom defined event function is defined in a tagless component'] = function testThrowsAnErrorIfACustomDefinedEventFunctionIsDefinedInATaglessComponent() {\n var _this2 = this;\n\n var template = \"hit dem folks\";\n\n var FooBarComponent = _helpers.Component.extend({\n tagName: '',\n folks: function () {}\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: template\n });\n expectAssertion(function () {\n _this2.render(\"{{#foo-bar}}{{/foo-bar}}\");\n }, /You can not define `folks` function\\(s\\) to handle DOM event in the .* tagless component since it doesn't have any DOM element./);\n };\n\n _proto['@test throws an error if `tagName` is an empty string and `classNameBindings` are specified'] = function testThrowsAnErrorIfTagNameIsAnEmptyStringAndClassNameBindingsAreSpecified() {\n var _this3 = this;\n\n var template = \"hit dem folks\";\n\n var FooBarComponent = _helpers.Component.extend({\n tagName: '',\n foo: true,\n classNameBindings: ['foo:is-foo:is-bar']\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: template\n });\n expectAssertion(function () {\n _this3.render(\"{{#foo-bar}}{{/foo-bar}}\");\n }, /You cannot use `classNameBindings` on a tag-less component/);\n };\n\n _proto['@test throws an error if `tagName` is an empty string and `attributeBindings` are specified'] = function testThrowsAnErrorIfTagNameIsAnEmptyStringAndAttributeBindingsAreSpecified() {\n var _this4 = this;\n\n var template = \"hit dem folks\";\n\n var FooBarComponent = _helpers.Component.extend({\n tagName: '',\n attributeBindings: ['href']\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: template\n });\n expectAssertion(function () {\n _this4.render(\"{{#foo-bar}}{{/foo-bar}}\");\n }, /You cannot use `attributeBindings` on a tag-less component/);\n };\n\n _proto['@test throws an error if `tagName` is an empty string and `elementId` is specified via JS'] = function testThrowsAnErrorIfTagNameIsAnEmptyStringAndElementIdIsSpecifiedViaJS() {\n var _this5 = this;\n\n var template = \"hit dem folks\";\n\n var FooBarComponent = _helpers.Component.extend({\n tagName: '',\n elementId: 'turntUp'\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: template\n });\n expectAssertion(function () {\n _this5.render(\"{{#foo-bar}}{{/foo-bar}}\");\n }, /You cannot use `elementId` on a tag-less component/);\n };\n\n _proto['@test throws an error if `tagName` is an empty string and `elementId` is specified via template'] = function testThrowsAnErrorIfTagNameIsAnEmptyStringAndElementIdIsSpecifiedViaTemplate() {\n var _this6 = this;\n\n var template = \"hit dem folks\";\n\n var FooBarComponent = _helpers.Component.extend({\n tagName: ''\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: template\n });\n expectAssertion(function () {\n _this6.render(\"{{#foo-bar elementId='turntUp'}}{{/foo-bar}}\");\n }, /You cannot use `elementId` on a tag-less component/);\n };\n\n _proto['@test does not throw an error if `tagName` is an empty string and `id` is specified via JS'] = function testDoesNotThrowAnErrorIfTagNameIsAnEmptyStringAndIdIsSpecifiedViaJS() {\n var template = \"{{id}}\";\n\n var FooBarComponent = _helpers.Component.extend({\n tagName: '',\n id: 'baz'\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: template\n });\n this.render(\"{{#foo-bar}}{{/foo-bar}}\");\n this.assertText('baz');\n };\n\n _proto['@test does not throw an error if `tagName` is an empty string and `id` is specified via template'] = function testDoesNotThrowAnErrorIfTagNameIsAnEmptyStringAndIdIsSpecifiedViaTemplate() {\n var template = \"{{id}}\";\n\n var FooBarComponent = _helpers.Component.extend({\n tagName: ''\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: template\n });\n this.render(\"{{#foo-bar id='baz'}}{{/foo-bar}}\");\n this.assertText('baz');\n };\n\n _proto['@test does not throw an error if `tagName` is an empty string and `id` is bound property specified via template'] = function testDoesNotThrowAnErrorIfTagNameIsAnEmptyStringAndIdIsBoundPropertySpecifiedViaTemplate() {\n var _this7 = this;\n\n var template = \"{{id}}\";\n\n var FooBarComponent = _helpers.Component.extend({\n tagName: ''\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: template\n });\n this.render(\"{{#foo-bar id=fooBarId}}{{/foo-bar}}\", {\n fooBarId: 'baz'\n });\n this.assertText('baz');\n this.assertStableRerender();\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this7.context, 'fooBarId', 'qux');\n });\n this.assertText('qux');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this7.context, 'fooBarId', 'baz');\n });\n this.assertText('baz');\n };\n\n _proto['@test does not throw an error if `tagName` is an empty string and `id` is specified via template and passed to child component'] = function testDoesNotThrowAnErrorIfTagNameIsAnEmptyStringAndIdIsSpecifiedViaTemplateAndPassedToChildComponent() {\n var fooBarTemplate = \"{{#baz-child id=id}}{{/baz-child}}\";\n\n var FooBarComponent = _helpers.Component.extend({\n tagName: ''\n });\n\n var BazChildComponent = _helpers.Component.extend();\n\n var bazChildTemplate = \"{{id}}\";\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: fooBarTemplate\n });\n this.registerComponent('baz-child', {\n ComponentClass: BazChildComponent,\n template: bazChildTemplate\n });\n this.render(\"{{#foo-bar id='baz'}}{{/foo-bar}}\");\n this.assertText('baz');\n };\n\n _proto['@test throws an error if when $() is accessed on component where `tagName` is an empty string'] = function testThrowsAnErrorIfWhen$IsAccessedOnComponentWhereTagNameIsAnEmptyString() {\n var _this8 = this;\n\n var template = \"hit dem folks\";\n\n var FooBarComponent = _helpers.Component.extend({\n tagName: '',\n init: function () {\n this._super();\n\n this.$();\n }\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: template\n });\n expectAssertion(function () {\n _this8.render(\"{{#foo-bar}}{{/foo-bar}}\");\n }, /You cannot access this.\\$\\(\\) on a component with `tagName: \\'\\'` specified/);\n };\n\n _proto['@test renders a contained view with omitted start tag and tagless parent view context'] = function testRendersAContainedViewWithOmittedStartTagAndTaglessParentViewContext() {\n var _this9 = this;\n\n this.registerComponent('root-component', {\n ComponentClass: _helpers.Component.extend({\n tagName: 'section'\n }),\n template: '{{frag-ment}}'\n });\n this.registerComponent('frag-ment', {\n ComponentClass: _helpers.Component.extend({\n tagName: ''\n }),\n template: '{{my-span}}'\n });\n this.registerComponent('my-span', {\n ComponentClass: _helpers.Component.extend({\n tagName: 'span'\n }),\n template: 'dab'\n });\n this.render(\"{{root-component}}\");\n this.assertElement(this.firstChild, {\n tagName: 'section'\n });\n this.assertElement(this.firstChild.firstElementChild, {\n tagName: 'span'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this9.rerender();\n });\n this.assertElement(this.firstChild, {\n tagName: 'section'\n });\n this.assertElement(this.firstChild.firstElementChild, {\n tagName: 'span'\n });\n };\n\n return _class;\n }(_internalTestHelpers.RenderingTestCase));\n});","enifed(\"@ember/-internals/glimmer/tests/integration/components/input-angle-test\", [\"ember-babel\", \"internal-test-helpers\", \"@ember/polyfills\", \"@ember/-internals/metal\", \"@ember/-internals/views\", \"@ember/-internals/glimmer/tests/utils/helpers\"], function (_emberBabel, _internalTestHelpers, _polyfills, _metal, _views, _helpers) {\n \"use strict\";\n\n if (true\n /* EMBER_GLIMMER_ANGLE_BRACKET_BUILT_INS */\n ) {\n var InputRenderingTest =\n /*#__PURE__*/\n function (_RenderingTestCase) {\n (0, _emberBabel.inheritsLoose)(InputRenderingTest, _RenderingTestCase);\n\n function InputRenderingTest() {\n return _RenderingTestCase.apply(this, arguments) || this;\n }\n\n var _proto = InputRenderingTest.prototype;\n\n _proto.$input = function $input() {\n return this.$('input');\n };\n\n _proto.inputID = function inputID() {\n return this.$input().prop('id');\n };\n\n _proto.assertDisabled = function assertDisabled() {\n this.assert.ok(this.$('input').prop('disabled'), 'The input is disabled');\n };\n\n _proto.assertNotDisabled = function assertNotDisabled() {\n this.assert.ok(this.$('input').is(':not(:disabled)'), 'The input is not disabled');\n };\n\n _proto.assertInputId = function assertInputId(expectedId) {\n this.assert.equal(this.inputID(), expectedId, 'the input id should be `expectedId`');\n };\n\n _proto.assertSingleInput = function assertSingleInput() {\n this.assert.equal(this.$('input').length, 1, 'A single text field was inserted');\n };\n\n _proto.assertSingleCheckbox = function assertSingleCheckbox() {\n this.assert.equal(this.$('input[type=checkbox]').length, 1, 'A single checkbox is added');\n };\n\n _proto.assertCheckboxIsChecked = function assertCheckboxIsChecked() {\n this.assert.equal(this.$input().prop('checked'), true, 'the checkbox is checked');\n };\n\n _proto.assertCheckboxIsNotChecked = function assertCheckboxIsNotChecked() {\n this.assert.equal(this.$input().prop('checked'), false, 'the checkbox is not checked');\n };\n\n _proto.assertValue = function assertValue(expected) {\n this.assert.equal(this.$input().val(), expected, \"the input value should be \" + expected);\n };\n\n _proto.assertAttr = function assertAttr(name, expected) {\n this.assert.equal(this.$input().attr(name), expected, \"the input \" + name + \" attribute has the value '\" + expected + \"'\");\n };\n\n _proto.assertAllAttrs = function assertAllAttrs(names, expected) {\n var _this = this;\n\n names.forEach(function (name) {\n return _this.assertAttr(name, expected);\n });\n };\n\n _proto.assertSelectionRange = function assertSelectionRange(start, end) {\n var input = this.$input()[0];\n this.assert.equal(input.selectionStart, start, \"the cursor start position should be \" + start);\n this.assert.equal(input.selectionEnd, end, \"the cursor end position should be \" + end);\n };\n\n _proto.triggerEvent = function triggerEvent(type, options, selector) {\n var event = document.createEvent('Events');\n event.initEvent(type, true, true);\n (0, _polyfills.assign)(event, options);\n var element = this.$(selector || 'input')[0];\n (0, _internalTestHelpers.runTask)(function () {\n element.dispatchEvent(event);\n });\n };\n\n _proto.assertTriggersNativeDOMEvents = function assertTriggersNativeDOMEvents(type) {\n var _this2 = this; // Defaults from EventDispatcher\n\n\n var events = {\n touchstart: 'touchStart',\n touchmove: 'touchMove',\n touchend: 'touchEnd',\n touchcancel: 'touchCancel',\n keydown: 'keyDown',\n keyup: 'keyUp',\n keypress: 'keyPress',\n mousedown: 'mouseDown',\n mouseup: 'mouseUp',\n contextmenu: 'contextMenu',\n click: 'click',\n dblclick: 'doubleClick',\n mousemove: 'mouseMove',\n focusin: 'focusIn',\n focusout: 'focusOut',\n mouseenter: 'mouseEnter',\n mouseleave: 'mouseLeave',\n submit: 'submit',\n input: 'input',\n change: 'change',\n dragstart: 'dragStart',\n drag: 'drag',\n dragenter: 'dragEnter',\n dragleave: 'dragLeave',\n dragover: 'dragOver',\n drop: 'drop',\n dragend: 'dragEnd'\n };\n this.registerComponent('test-component', {\n ComponentClass: _helpers.Component.extend({\n tagName: 'input',\n attributeBindings: ['type']\n })\n });\n var triggered = {\n standard: [],\n custom: []\n };\n var actions = {\n didTrigger: function (id, event) {\n triggered[id].push(event);\n }\n };\n\n function argsFor(id) {\n var args = [\"id=\\\"\" + id + \"\\\"\"];\n\n if (type) {\n args.push(\"@type=\\\"\" + type + \"\\\"\");\n }\n\n Object.keys(events).forEach(function (event) {\n args.push(\"@\" + events[event] + \"={{action \\\"didTrigger\\\" \\\"\" + id + \"\\\" \\\"\" + event + \"\\\"}}\");\n });\n return args.join(' ');\n }\n\n var template = \"\\n \\n \\n \";\n this.render(template, {\n actions: actions\n });\n this.assert.ok(this.$('input').length === 2);\n var $standard = this.$('#standard');\n var $custom = this.$('#custom');\n this.assert.equal($standard.type, $custom.type);\n Object.keys(events).forEach(function (event) {\n _this2.triggerEvent(event, null, '#standard');\n\n _this2.triggerEvent(event, null, '#custom');\n });\n this.assert.ok(triggered.standard.length > 10, 'sanity check that most events are triggered (standard)');\n this.assert.ok(triggered.custom.length > 10, 'sanity check that most events are triggered (custom)');\n this.assert.deepEqual(triggered.standard, triggered.custom, 'called for all events');\n };\n\n return InputRenderingTest;\n }(_internalTestHelpers.RenderingTestCase);\n\n (0, _internalTestHelpers.moduleFor)('Components test: ',\n /*#__PURE__*/\n function (_InputRenderingTest) {\n (0, _emberBabel.inheritsLoose)(_class, _InputRenderingTest);\n\n function _class() {\n return _InputRenderingTest.apply(this, arguments) || this;\n }\n\n var _proto2 = _class.prototype;\n\n _proto2['@test a single text field is inserted into the DOM'] = function testASingleTextFieldIsInsertedIntoTheDOM() {\n var _this3 = this;\n\n this.render(\"\", {\n value: 'hello'\n });\n var id = this.inputID();\n this.assertValue('hello');\n this.assertSingleInput();\n (0, _internalTestHelpers.runTask)(function () {\n return _this3.rerender();\n });\n this.assertValue('hello');\n this.assertSingleInput();\n this.assertInputId(id);\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this3.context, 'value', 'goodbye');\n });\n this.assertValue('goodbye');\n this.assertSingleInput();\n this.assertInputId(id);\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this3.context, 'value', 'hello');\n });\n this.assertValue('hello');\n this.assertSingleInput();\n this.assertInputId(id);\n };\n\n _proto2['@test default type'] = function testDefaultType() {\n var _this4 = this;\n\n this.render(\"\");\n this.assertAttr('type', 'text');\n (0, _internalTestHelpers.runTask)(function () {\n return _this4.rerender();\n });\n this.assertAttr('type', 'text');\n };\n\n _proto2['@test dynamic attributes (HTML attribute)'] = function testDynamicAttributesHTMLAttribute() {\n var _this5 = this;\n\n this.render(\"\\n \", {\n value: 'Original value',\n disabled: false,\n placeholder: 'Original placeholder',\n name: 'original-name',\n maxlength: 10,\n minlength: 5,\n size: 20,\n tabindex: 30\n });\n this.assertNotDisabled();\n this.assertValue('Original value');\n this.assertAttr('placeholder', 'Original placeholder');\n this.assertAttr('name', 'original-name');\n this.assertAttr('maxlength', '10');\n this.assertAttr('minlength', '5'); // this.assertAttr('size', '20'); //NOTE: failing in IE (TEST_SUITE=sauce)\n // this.assertAttr('tabindex', '30'); //NOTE: failing in IE (TEST_SUITE=sauce)\n\n (0, _internalTestHelpers.runTask)(function () {\n return _this5.rerender();\n });\n this.assertNotDisabled();\n this.assertValue('Original value');\n this.assertAttr('placeholder', 'Original placeholder');\n this.assertAttr('name', 'original-name');\n this.assertAttr('maxlength', '10');\n this.assertAttr('minlength', '5'); // this.assertAttr('size', '20'); //NOTE: failing in IE (TEST_SUITE=sauce)\n // this.assertAttr('tabindex', '30'); //NOTE: failing in IE (TEST_SUITE=sauce)\n\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this5.context, 'value', 'Updated value');\n (0, _metal.set)(_this5.context, 'disabled', true);\n (0, _metal.set)(_this5.context, 'placeholder', 'Updated placeholder');\n (0, _metal.set)(_this5.context, 'name', 'updated-name');\n (0, _metal.set)(_this5.context, 'maxlength', 11);\n (0, _metal.set)(_this5.context, 'minlength', 6); // set(this.context, 'size', 21); //NOTE: failing in IE (TEST_SUITE=sauce)\n // set(this.context, 'tabindex', 31); //NOTE: failing in IE (TEST_SUITE=sauce)\n });\n this.assertDisabled();\n this.assertValue('Updated value');\n this.assertAttr('placeholder', 'Updated placeholder');\n this.assertAttr('name', 'updated-name');\n this.assertAttr('maxlength', '11');\n this.assertAttr('minlength', '6'); // this.assertAttr('size', '21'); //NOTE: failing in IE (TEST_SUITE=sauce)\n // this.assertAttr('tabindex', '31'); //NOTE: failing in IE (TEST_SUITE=sauce)\n\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this5.context, 'value', 'Original value');\n (0, _metal.set)(_this5.context, 'disabled', false);\n (0, _metal.set)(_this5.context, 'placeholder', 'Original placeholder');\n (0, _metal.set)(_this5.context, 'name', 'original-name');\n (0, _metal.set)(_this5.context, 'maxlength', 10);\n (0, _metal.set)(_this5.context, 'minlength', 5); // set(this.context, 'size', 20); //NOTE: failing in IE (TEST_SUITE=sauce)\n // set(this.context, 'tabindex', 30); //NOTE: failing in IE (TEST_SUITE=sauce)\n });\n this.assertNotDisabled();\n this.assertValue('Original value');\n this.assertAttr('placeholder', 'Original placeholder');\n this.assertAttr('name', 'original-name');\n this.assertAttr('maxlength', '10');\n this.assertAttr('minlength', '5'); // this.assertAttr('size', '20'); //NOTE: failing in IE (TEST_SUITE=sauce)\n // this.assertAttr('tabindex', '30'); //NOTE: failing in IE (TEST_SUITE=sauce)\n };\n\n _proto2['@test dynamic attributes (named argument)'] = function testDynamicAttributesNamedArgument() {\n var _this6 = this;\n\n this.render(\"\\n \", {\n value: 'Original value',\n disabled: false,\n placeholder: 'Original placeholder',\n name: 'original-name',\n maxlength: 10,\n minlength: 5,\n size: 20,\n tabindex: 30\n });\n this.assertNotDisabled();\n this.assertValue('Original value');\n this.assertAttr('placeholder', 'Original placeholder');\n this.assertAttr('name', 'original-name');\n this.assertAttr('maxlength', '10');\n this.assertAttr('minlength', '5'); // this.assertAttr('size', '20'); //NOTE: failing in IE (TEST_SUITE=sauce)\n // this.assertAttr('tabindex', '30'); //NOTE: failing in IE (TEST_SUITE=sauce)\n\n (0, _internalTestHelpers.runTask)(function () {\n return _this6.rerender();\n });\n this.assertNotDisabled();\n this.assertValue('Original value');\n this.assertAttr('placeholder', 'Original placeholder');\n this.assertAttr('name', 'original-name');\n this.assertAttr('maxlength', '10');\n this.assertAttr('minlength', '5'); // this.assertAttr('size', '20'); //NOTE: failing in IE (TEST_SUITE=sauce)\n // this.assertAttr('tabindex', '30'); //NOTE: failing in IE (TEST_SUITE=sauce)\n\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this6.context, 'value', 'Updated value');\n (0, _metal.set)(_this6.context, 'disabled', true);\n (0, _metal.set)(_this6.context, 'placeholder', 'Updated placeholder');\n (0, _metal.set)(_this6.context, 'name', 'updated-name');\n (0, _metal.set)(_this6.context, 'maxlength', 11);\n (0, _metal.set)(_this6.context, 'minlength', 6); // set(this.context, 'size', 21); //NOTE: failing in IE (TEST_SUITE=sauce)\n // set(this.context, 'tabindex', 31); //NOTE: failing in IE (TEST_SUITE=sauce)\n });\n this.assertDisabled();\n this.assertValue('Updated value');\n this.assertAttr('placeholder', 'Updated placeholder');\n this.assertAttr('name', 'updated-name');\n this.assertAttr('maxlength', '11');\n this.assertAttr('minlength', '6'); // this.assertAttr('size', '21'); //NOTE: failing in IE (TEST_SUITE=sauce)\n // this.assertAttr('tabindex', '31'); //NOTE: failing in IE (TEST_SUITE=sauce)\n\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this6.context, 'value', 'Original value');\n (0, _metal.set)(_this6.context, 'disabled', false);\n (0, _metal.set)(_this6.context, 'placeholder', 'Original placeholder');\n (0, _metal.set)(_this6.context, 'name', 'original-name');\n (0, _metal.set)(_this6.context, 'maxlength', 10);\n (0, _metal.set)(_this6.context, 'minlength', 5); // set(this.context, 'size', 20); //NOTE: failing in IE (TEST_SUITE=sauce)\n // set(this.context, 'tabindex', 30); //NOTE: failing in IE (TEST_SUITE=sauce)\n });\n this.assertNotDisabled();\n this.assertValue('Original value');\n this.assertAttr('placeholder', 'Original placeholder');\n this.assertAttr('name', 'original-name');\n this.assertAttr('maxlength', '10');\n this.assertAttr('minlength', '5'); // this.assertAttr('size', '20'); //NOTE: failing in IE (TEST_SUITE=sauce)\n // this.assertAttr('tabindex', '30'); //NOTE: failing in IE (TEST_SUITE=sauce)\n };\n\n _proto2['@test static attributes (HTML attribute)'] = function testStaticAttributesHTMLAttribute() {\n var _this7 = this;\n\n this.render(\"\\n \");\n this.assertDisabled();\n this.assertValue('Original value');\n this.assertAttr('placeholder', 'Original placeholder');\n this.assertAttr('name', 'original-name');\n this.assertAttr('maxlength', '10');\n this.assertAttr('minlength', '5'); // this.assertAttr('size', '20'); //NOTE: failing in IE (TEST_SUITE=sauce)\n // this.assertAttr('tabindex', '30'); //NOTE: failing in IE (TEST_SUITE=sauce)\n\n (0, _internalTestHelpers.runTask)(function () {\n return _this7.rerender();\n });\n this.assertDisabled();\n this.assertValue('Original value');\n this.assertAttr('placeholder', 'Original placeholder');\n this.assertAttr('name', 'original-name');\n this.assertAttr('maxlength', '10');\n this.assertAttr('minlength', '5'); // this.assertAttr('size', '20'); //NOTE: failing in IE (TEST_SUITE=sauce)\n // this.assertAttr('tabindex', '30'); //NOTE: failing in IE (TEST_SUITE=sauce)\n };\n\n _proto2['@test static attributes (named argument)'] = function testStaticAttributesNamedArgument() {\n var _this8 = this;\n\n this.render(\"\\n \");\n this.assertDisabled();\n this.assertValue('Original value');\n this.assertAttr('placeholder', 'Original placeholder');\n this.assertAttr('name', 'original-name');\n this.assertAttr('maxlength', '10');\n this.assertAttr('minlength', '5'); // this.assertAttr('size', '20'); //NOTE: failing in IE (TEST_SUITE=sauce)\n // this.assertAttr('tabindex', '30'); //NOTE: failing in IE (TEST_SUITE=sauce)\n\n (0, _internalTestHelpers.runTask)(function () {\n return _this8.rerender();\n });\n this.assertDisabled();\n this.assertValue('Original value');\n this.assertAttr('placeholder', 'Original placeholder');\n this.assertAttr('name', 'original-name');\n this.assertAttr('maxlength', '10');\n this.assertAttr('minlength', '5'); // this.assertAttr('size', '20'); //NOTE: failing in IE (TEST_SUITE=sauce)\n // this.assertAttr('tabindex', '30'); //NOTE: failing in IE (TEST_SUITE=sauce)\n };\n\n _proto2['@test cursor selection range'] = function testCursorSelectionRange() {\n var _this9 = this; // Modifying input.selectionStart, which is utilized in the cursor tests,\n // causes an event in Safari.\n\n\n (0, _internalTestHelpers.runDestroy)(this.owner.lookup('event_dispatcher:main'));\n this.render(\"\", {\n value: 'original'\n });\n var input = this.$input()[0]; // See https://ember-twiddle.com/33e506329f8176ae874422644d4cc08c?openFiles=components.input-component.js%2Ctemplates.components.input-component.hbs\n // this.assertSelectionRange(8, 8); //NOTE: this is (0, 0) on Firefox (TEST_SUITE=sauce)\n\n (0, _internalTestHelpers.runTask)(function () {\n return _this9.rerender();\n }); // this.assertSelectionRange(8, 8); //NOTE: this is (0, 0) on Firefox (TEST_SUITE=sauce)\n\n (0, _internalTestHelpers.runTask)(function () {\n input.selectionStart = 2;\n input.selectionEnd = 4;\n });\n this.assertSelectionRange(2, 4);\n (0, _internalTestHelpers.runTask)(function () {\n return _this9.rerender();\n });\n this.assertSelectionRange(2, 4); // runTask(() => set(this.context, 'value', 'updated'));\n //\n // this.assertSelectionRange(7, 7); //NOTE: this fails in IE, the range is 0 -> 0 (TEST_SUITE=sauce)\n //\n // runTask(() => set(this.context, 'value', 'original'));\n //\n // this.assertSelectionRange(8, 8); //NOTE: this fails in IE, the range is 0 -> 0 (TEST_SUITE=sauce)\n };\n\n _proto2['@test [DEPRECATED] sends an action with `` when is pressed'] = function testDEPRECATEDSendsAnActionWithInputEnterFooWhenEnterIsPressed(assert) {\n var _this10 = this;\n\n assert.expect(4);\n expectDeprecation(function () {\n _this10.render(\"\", {\n actions: {\n foo: function (value, event) {\n assert.ok(true, 'action was triggered');\n\n if (_views.jQueryDisabled) {\n assert.notOk(event.originalEvent, 'event is not a jQuery.Event');\n } else {\n assert.ok(event instanceof _views.jQuery.Event, 'jQuery event was passed');\n }\n }\n }\n });\n }, 'Passing actions to components as strings (like ``) is deprecated. Please use closure actions instead (``). (\\'-top-level\\' @ L1:C0) ');\n expectDeprecation(function () {\n _this10.triggerEvent('keyup', {\n keyCode: 13\n });\n }, 'Passing actions to components as strings (like ``) is deprecated. Please use closure actions instead (``).');\n };\n\n _proto2['@test sends an action with `` when is pressed'] = function testSendsAnActionWithInputEnterActionFooWhenEnterIsPressed(assert) {\n assert.expect(2);\n this.render(\"\", {\n actions: {\n foo: function (value, event) {\n assert.ok(true, 'action was triggered');\n\n if (_views.jQueryDisabled) {\n assert.notOk(event.originalEvent, 'event is not a jQuery.Event');\n } else {\n assert.ok(event instanceof _views.jQuery.Event, 'jQuery event was passed');\n }\n }\n }\n });\n this.triggerEvent('keyup', {\n keyCode: 13\n });\n };\n\n _proto2['@test [DEPRECATED] sends an action with `` is pressed'] = function testDEPRECATEDSendsAnActionWithInputKeyPressFooIsPressed(assert) {\n var _this11 = this;\n\n assert.expect(4);\n expectDeprecation(function () {\n _this11.render(\"\", {\n value: 'initial',\n actions: {\n foo: function (value, event) {\n assert.ok(true, 'action was triggered');\n\n if (_views.jQueryDisabled) {\n assert.notOk(event.originalEvent, 'event is not a jQuery.Event');\n } else {\n assert.ok(event instanceof _views.jQuery.Event, 'jQuery event was passed');\n }\n }\n }\n });\n }, 'Passing actions to components as strings (like ``) is deprecated. Please use closure actions instead (``). (\\'-top-level\\' @ L1:C0) ');\n expectDeprecation(function () {\n _this11.triggerEvent('keypress', {\n keyCode: 65\n });\n }, 'Passing actions to components as strings (like ``) is deprecated. Please use closure actions instead (``).');\n };\n\n _proto2['@test sends an action with `` is pressed'] = function testSendsAnActionWithInputKeyPressActionFooIsPressed(assert) {\n assert.expect(2);\n this.render(\"\", {\n value: 'initial',\n actions: {\n foo: function (value, event) {\n assert.ok(true, 'action was triggered');\n\n if (_views.jQueryDisabled) {\n assert.notOk(event.originalEvent, 'event is not a jQuery.Event');\n } else {\n assert.ok(event instanceof _views.jQuery.Event, 'jQuery event was passed');\n }\n }\n }\n });\n this.triggerEvent('keypress', {\n keyCode: 65\n });\n };\n\n _proto2['@test sends an action to the parent level when `bubbles=true` is provided'] = function testSendsAnActionToTheParentLevelWhenBubblesTrueIsProvided(assert) {\n assert.expect(1);\n\n var ParentComponent = _helpers.Component.extend({\n change: function () {\n assert.ok(true, 'bubbled upwards');\n }\n });\n\n this.registerComponent('parent', {\n ComponentClass: ParentComponent,\n template: \"\"\n });\n this.render(\"\");\n this.triggerEvent('change');\n };\n\n _proto2['@test triggers `focus-in` when focused'] = function testTriggersFocusInWhenFocused(assert) {\n var _this12 = this;\n\n var wasFocused = false;\n this.render(\"\", {\n actions: {\n foo: function () {\n wasFocused = true;\n }\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n _this12.$input().focus();\n });\n assert.ok(wasFocused, 'action was triggered');\n };\n\n _proto2['@test sends `insert-newline` when is pressed'] = function testSendsInsertNewlineWhenEnterIsPressed(assert) {\n assert.expect(2);\n this.render(\"\", {\n actions: {\n foo: function (value, event) {\n assert.ok(true, 'action was triggered');\n\n if (_views.jQueryDisabled) {\n assert.notOk(event.originalEvent, 'event is not a jQuery.Event');\n } else {\n assert.ok(event instanceof _views.jQuery.Event, 'jQuery event was passed');\n }\n }\n }\n });\n this.triggerEvent('keyup', {\n keyCode: 13\n });\n };\n\n _proto2['@test [DEPRECATED] sends an action with `` when is pressed'] = function testDEPRECATEDSendsAnActionWithInputEscapePressFooWhenEscapeIsPressed(assert) {\n var _this13 = this;\n\n assert.expect(4);\n expectDeprecation(function () {\n _this13.render(\"\", {\n actions: {\n foo: function (value, event) {\n assert.ok(true, 'action was triggered');\n\n if (_views.jQueryDisabled) {\n assert.notOk(event.originalEvent, 'event is not a jQuery.Event');\n } else {\n assert.ok(event instanceof _views.jQuery.Event, 'jQuery event was passed');\n }\n }\n }\n });\n }, 'Passing actions to components as strings (like ``) is deprecated. Please use closure actions instead (``). (\\'-top-level\\' @ L1:C0) ');\n expectDeprecation(function () {\n _this13.triggerEvent('keyup', {\n keyCode: 27\n });\n }, 'Passing actions to components as strings (like ``) is deprecated. Please use closure actions instead (``).');\n };\n\n _proto2['@test sends an action with `` when is pressed'] = function testSendsAnActionWithInputEscapePressActionFooWhenEscapeIsPressed(assert) {\n assert.expect(2);\n this.render(\"\", {\n actions: {\n foo: function (value, event) {\n assert.ok(true, 'action was triggered');\n\n if (_views.jQueryDisabled) {\n assert.notOk(event.originalEvent, 'event is not a jQuery.Event');\n } else {\n assert.ok(event instanceof _views.jQuery.Event, 'jQuery event was passed');\n }\n }\n }\n });\n this.triggerEvent('keyup', {\n keyCode: 27\n });\n };\n\n _proto2['@test [DEPRECATED] sends an action with `` when a key is pressed'] = function testDEPRECATEDSendsAnActionWithInputKeyDownFooWhenAKeyIsPressed(assert) {\n var _this14 = this;\n\n assert.expect(4);\n expectDeprecation(function () {\n _this14.render(\"\", {\n actions: {\n foo: function (value, event) {\n assert.ok(true, 'action was triggered');\n\n if (_views.jQueryDisabled) {\n assert.notOk(event.originalEvent, 'event is not a jQuery.Event');\n } else {\n assert.ok(event instanceof _views.jQuery.Event, 'jQuery event was passed');\n }\n }\n }\n });\n }, 'Passing actions to components as strings (like ``) is deprecated. Please use closure actions instead (``). (\\'-top-level\\' @ L1:C0) ');\n expectDeprecation(function () {\n _this14.triggerEvent('keydown', {\n keyCode: 65\n });\n }, 'Passing actions to components as strings (like ``) is deprecated. Please use closure actions instead (``).');\n };\n\n _proto2['@test sends an action with `` when a key is pressed'] = function testSendsAnActionWithInputKeyDownActionFooWhenAKeyIsPressed(assert) {\n assert.expect(2);\n this.render(\"\", {\n actions: {\n foo: function (value, event) {\n assert.ok(true, 'action was triggered');\n\n if (_views.jQueryDisabled) {\n assert.notOk(event.originalEvent, 'event is not a jQuery.Event');\n } else {\n assert.ok(event instanceof _views.jQuery.Event, 'jQuery event was passed');\n }\n }\n }\n });\n this.triggerEvent('keydown', {\n keyCode: 65\n });\n };\n\n _proto2['@test [DEPRECATED] sends an action with `` when a key is pressed'] = function testDEPRECATEDSendsAnActionWithInputKeyUpFooWhenAKeyIsPressed(assert) {\n var _this15 = this;\n\n assert.expect(4);\n expectDeprecation(function () {\n _this15.render(\"\", {\n actions: {\n foo: function (value, event) {\n assert.ok(true, 'action was triggered');\n\n if (_views.jQueryDisabled) {\n assert.notOk(event.originalEvent, 'event is not a jQuery.Event');\n } else {\n assert.ok(event instanceof _views.jQuery.Event, 'jQuery event was passed');\n }\n }\n }\n });\n }, 'Passing actions to components as strings (like ``) is deprecated. Please use closure actions instead (``). (\\'-top-level\\' @ L1:C0) ');\n expectDeprecation(function () {\n _this15.triggerEvent('keyup', {\n keyCode: 65\n });\n }, 'Passing actions to components as strings (like ``) is deprecated. Please use closure actions instead (``).');\n };\n\n _proto2['@test sends an action with `` when a key is pressed'] = function testSendsAnActionWithInputKeyUpActionFooWhenAKeyIsPressed(assert) {\n assert.expect(2);\n this.render(\"\", {\n actions: {\n foo: function (value, event) {\n assert.ok(true, 'action was triggered');\n\n if (_views.jQueryDisabled) {\n assert.notOk(event.originalEvent, 'event is not a jQuery.Event');\n } else {\n assert.ok(event instanceof _views.jQuery.Event, 'jQuery event was passed');\n }\n }\n }\n });\n this.triggerEvent('keyup', {\n keyCode: 65\n });\n };\n\n _proto2['@test GH#14727 can render a file input after having had render an input of other type'] = function testGH14727CanRenderAFileInputAfterHavingHadRenderAnInputOfOtherType() {\n this.render(\"\");\n this.assert.equal(this.$input()[0].type, 'text');\n this.assert.equal(this.$input()[1].type, 'file');\n };\n\n _proto2['@test sends an action with `` for native DOM events'] = function testSendsAnActionWithInputEVENTActionFooForNativeDOMEvents() {\n this.assertTriggersNativeDOMEvents();\n };\n\n return _class;\n }(InputRenderingTest));\n (0, _internalTestHelpers.moduleFor)('Components test: with dynamic type',\n /*#__PURE__*/\n function (_InputRenderingTest2) {\n (0, _emberBabel.inheritsLoose)(_class2, _InputRenderingTest2);\n\n function _class2() {\n return _InputRenderingTest2.apply(this, arguments) || this;\n }\n\n var _proto3 = _class2.prototype;\n\n _proto3['@test a bound property can be used to determine type'] = function testABoundPropertyCanBeUsedToDetermineType() {\n var _this16 = this;\n\n this.render(\"\", {\n type: 'password'\n });\n this.assertAttr('type', 'password');\n (0, _internalTestHelpers.runTask)(function () {\n return _this16.rerender();\n });\n this.assertAttr('type', 'password');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this16.context, 'type', 'text');\n });\n this.assertAttr('type', 'text');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this16.context, 'type', 'password');\n });\n this.assertAttr('type', 'password');\n };\n\n _proto3['@test a subexpression can be used to determine type'] = function testASubexpressionCanBeUsedToDetermineType() {\n var _this17 = this;\n\n this.render(\"\", {\n isTruthy: true,\n trueType: 'text',\n falseType: 'password'\n });\n this.assertAttr('type', 'text');\n (0, _internalTestHelpers.runTask)(function () {\n return _this17.rerender();\n });\n this.assertAttr('type', 'text');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this17.context, 'isTruthy', false);\n });\n this.assertAttr('type', 'password');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this17.context, 'isTruthy', true);\n });\n this.assertAttr('type', 'text');\n };\n\n _proto3['@test GH16256 input macro does not modify params in place'] = function testGH16256InputMacroDoesNotModifyParamsInPlace() {\n this.registerComponent('my-input', {\n template: \"\"\n });\n this.render(\"\", {\n firstType: 'password',\n secondType: 'email'\n });\n var inputs = this.element.querySelectorAll('input');\n this.assert.equal(inputs.length, 2, 'there are two inputs');\n this.assert.equal(inputs[0].getAttribute('type'), 'password');\n this.assert.equal(inputs[1].getAttribute('type'), 'email');\n };\n\n return _class2;\n }(InputRenderingTest));\n (0, _internalTestHelpers.moduleFor)(\"Components test: \",\n /*#__PURE__*/\n function (_InputRenderingTest3) {\n (0, _emberBabel.inheritsLoose)(_class3, _InputRenderingTest3);\n\n function _class3() {\n return _InputRenderingTest3.apply(this, arguments) || this;\n }\n\n var _proto4 = _class3.prototype;\n\n _proto4['@test dynamic attributes (HTML attribute)'] = function testDynamicAttributesHTMLAttribute() {\n var _this18 = this;\n\n this.render(\"\", {\n disabled: false,\n name: 'original-name',\n checked: false,\n tabindex: 10\n });\n this.assertSingleCheckbox();\n this.assertNotDisabled();\n this.assertAttr('name', 'original-name');\n this.assertAttr('tabindex', '10');\n (0, _internalTestHelpers.runTask)(function () {\n return _this18.rerender();\n });\n this.assertSingleCheckbox();\n this.assertNotDisabled();\n this.assertAttr('name', 'original-name');\n this.assertAttr('tabindex', '10');\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this18.context, 'disabled', true);\n (0, _metal.set)(_this18.context, 'name', 'updated-name');\n (0, _metal.set)(_this18.context, 'tabindex', 11);\n });\n this.assertSingleCheckbox();\n this.assertDisabled();\n this.assertAttr('name', 'updated-name');\n this.assertAttr('tabindex', '11');\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this18.context, 'disabled', false);\n (0, _metal.set)(_this18.context, 'name', 'original-name');\n (0, _metal.set)(_this18.context, 'tabindex', 10);\n });\n this.assertSingleCheckbox();\n this.assertNotDisabled();\n this.assertAttr('name', 'original-name');\n this.assertAttr('tabindex', '10');\n };\n\n _proto4['@test dynamic attributes (named argument)'] = function testDynamicAttributesNamedArgument() {\n var _this19 = this;\n\n this.render(\"\", {\n disabled: false,\n name: 'original-name',\n checked: false,\n tabindex: 10\n });\n this.assertSingleCheckbox();\n this.assertNotDisabled();\n this.assertAttr('name', 'original-name');\n this.assertAttr('tabindex', '10');\n (0, _internalTestHelpers.runTask)(function () {\n return _this19.rerender();\n });\n this.assertSingleCheckbox();\n this.assertNotDisabled();\n this.assertAttr('name', 'original-name');\n this.assertAttr('tabindex', '10');\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this19.context, 'disabled', true);\n (0, _metal.set)(_this19.context, 'name', 'updated-name');\n (0, _metal.set)(_this19.context, 'tabindex', 11);\n });\n this.assertSingleCheckbox();\n this.assertDisabled();\n this.assertAttr('name', 'updated-name');\n this.assertAttr('tabindex', '11');\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this19.context, 'disabled', false);\n (0, _metal.set)(_this19.context, 'name', 'original-name');\n (0, _metal.set)(_this19.context, 'tabindex', 10);\n });\n this.assertSingleCheckbox();\n this.assertNotDisabled();\n this.assertAttr('name', 'original-name');\n this.assertAttr('tabindex', '10');\n };\n\n _proto4['@test `value` property assertion'] = function testValuePropertyAssertion() {\n var _this20 = this;\n\n expectAssertion(function () {\n _this20.render(\"\", {\n value: 'value'\n });\n }, /checkbox.+@value.+not supported.+use.+@checked.+instead/);\n };\n\n _proto4['@test with a bound type'] = function testWithABoundType() {\n var _this21 = this;\n\n this.render(\"\", {\n inputType: 'checkbox',\n isChecked: true\n });\n this.assertSingleCheckbox();\n this.assertCheckboxIsChecked();\n (0, _internalTestHelpers.runTask)(function () {\n return _this21.rerender();\n });\n this.assertCheckboxIsChecked();\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this21.context, 'isChecked', false);\n });\n this.assertCheckboxIsNotChecked();\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this21.context, 'isChecked', true);\n });\n this.assertCheckboxIsChecked();\n };\n\n _proto4['@test native click changes check property'] = function testNativeClickChangesCheckProperty() {\n this.render(\"\");\n this.assertSingleCheckbox();\n this.assertCheckboxIsNotChecked();\n this.$input()[0].click();\n this.assertCheckboxIsChecked();\n this.$input()[0].click();\n this.assertCheckboxIsNotChecked();\n };\n\n _proto4['@test with static values (HTML attribute)'] = function testWithStaticValuesHTMLAttribute() {\n var _this22 = this;\n\n this.render(\"\");\n this.assertSingleCheckbox();\n this.assertCheckboxIsNotChecked();\n this.assertNotDisabled();\n this.assertAttr('tabindex', '10');\n this.assertAttr('name', 'original-name');\n (0, _internalTestHelpers.runTask)(function () {\n return _this22.rerender();\n });\n this.assertSingleCheckbox();\n this.assertCheckboxIsNotChecked();\n this.assertNotDisabled();\n this.assertAttr('tabindex', '10');\n this.assertAttr('name', 'original-name');\n };\n\n _proto4['@test with static values (named argument)'] = function testWithStaticValuesNamedArgument() {\n var _this23 = this;\n\n this.render(\"\");\n this.assertSingleCheckbox();\n this.assertCheckboxIsNotChecked();\n this.assertNotDisabled();\n this.assertAttr('tabindex', '10');\n this.assertAttr('name', 'original-name');\n (0, _internalTestHelpers.runTask)(function () {\n return _this23.rerender();\n });\n this.assertSingleCheckbox();\n this.assertCheckboxIsNotChecked();\n this.assertNotDisabled();\n this.assertAttr('tabindex', '10');\n this.assertAttr('name', 'original-name');\n };\n\n _proto4['@test sends an action with `` for native DOM events'] = function testSendsAnActionWithInputEVENTActionFooForNativeDOMEvents() {\n this.assertTriggersNativeDOMEvents('checkbox');\n };\n\n return _class3;\n }(InputRenderingTest));\n (0, _internalTestHelpers.moduleFor)(\"Components test: \",\n /*#__PURE__*/\n function (_InputRenderingTest4) {\n (0, _emberBabel.inheritsLoose)(_class4, _InputRenderingTest4);\n\n function _class4() {\n return _InputRenderingTest4.apply(this, arguments) || this;\n }\n\n var _proto5 = _class4.prototype;\n\n _proto5['@test null values (HTML attribute)'] = function testNullValuesHTMLAttribute() {\n var _this24 = this;\n\n var attributes = ['disabled', 'placeholder', 'name', 'maxlength', 'size', 'tabindex'];\n this.render(\"\\n \", {\n value: null,\n disabled: null,\n placeholder: null,\n name: null,\n maxlength: null,\n size: null,\n tabindex: null\n });\n this.assertValue('');\n this.assertAllAttrs(attributes, undefined);\n (0, _internalTestHelpers.runTask)(function () {\n return _this24.rerender();\n });\n this.assertValue('');\n this.assertAllAttrs(attributes, undefined);\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this24.context, 'disabled', true);\n (0, _metal.set)(_this24.context, 'value', 'Updated value');\n (0, _metal.set)(_this24.context, 'placeholder', 'Updated placeholder');\n (0, _metal.set)(_this24.context, 'name', 'updated-name');\n (0, _metal.set)(_this24.context, 'maxlength', 11);\n (0, _metal.set)(_this24.context, 'size', 21);\n (0, _metal.set)(_this24.context, 'tabindex', 31);\n });\n this.assertDisabled();\n this.assertValue('Updated value');\n this.assertAttr('placeholder', 'Updated placeholder');\n this.assertAttr('name', 'updated-name');\n this.assertAttr('maxlength', '11');\n this.assertAttr('size', '21');\n this.assertAttr('tabindex', '31');\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this24.context, 'disabled', null);\n (0, _metal.set)(_this24.context, 'value', null);\n (0, _metal.set)(_this24.context, 'placeholder', null);\n (0, _metal.set)(_this24.context, 'name', null);\n (0, _metal.set)(_this24.context, 'maxlength', null); // set(this.context, 'size', null); //NOTE: this fails with `Error: Failed to set the 'size' property on 'HTMLInputElement': The value provided is 0, which is an invalid size.` (TEST_SUITE=sauce)\n\n (0, _metal.set)(_this24.context, 'tabindex', null);\n });\n this.assertAttr('disabled', undefined);\n this.assertValue(''); // this.assertAttr('placeholder', undefined); //NOTE: this fails with a value of \"null\" (TEST_SUITE=sauce)\n // this.assertAttr('name', undefined); //NOTE: this fails with a value of \"null\" (TEST_SUITE=sauce)\n\n this.assertAttr('maxlength', undefined); // this.assertAttr('size', undefined); //NOTE: re-enable once `size` bug above has been addressed\n\n this.assertAttr('tabindex', undefined);\n };\n\n _proto5['@test null values (named argument)'] = function testNullValuesNamedArgument() {\n var _this25 = this;\n\n var attributes = ['disabled', 'placeholder', 'name', 'maxlength', 'size', 'tabindex'];\n this.render(\"\\n \", {\n value: null,\n disabled: null,\n placeholder: null,\n name: null,\n maxlength: null,\n size: null,\n tabindex: null\n });\n this.assertValue('');\n this.assertAllAttrs(attributes, undefined);\n (0, _internalTestHelpers.runTask)(function () {\n return _this25.rerender();\n });\n this.assertValue('');\n this.assertAllAttrs(attributes, undefined);\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this25.context, 'disabled', true);\n (0, _metal.set)(_this25.context, 'value', 'Updated value');\n (0, _metal.set)(_this25.context, 'placeholder', 'Updated placeholder');\n (0, _metal.set)(_this25.context, 'name', 'updated-name');\n (0, _metal.set)(_this25.context, 'maxlength', 11);\n (0, _metal.set)(_this25.context, 'size', 21);\n (0, _metal.set)(_this25.context, 'tabindex', 31);\n });\n this.assertDisabled();\n this.assertValue('Updated value');\n this.assertAttr('placeholder', 'Updated placeholder');\n this.assertAttr('name', 'updated-name');\n this.assertAttr('maxlength', '11');\n this.assertAttr('size', '21');\n this.assertAttr('tabindex', '31');\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this25.context, 'disabled', null);\n (0, _metal.set)(_this25.context, 'value', null);\n (0, _metal.set)(_this25.context, 'placeholder', null);\n (0, _metal.set)(_this25.context, 'name', null);\n (0, _metal.set)(_this25.context, 'maxlength', null); // set(this.context, 'size', null); //NOTE: this fails with `Error: Failed to set the 'size' property on 'HTMLInputElement': The value provided is 0, which is an invalid size.` (TEST_SUITE=sauce)\n\n (0, _metal.set)(_this25.context, 'tabindex', null);\n });\n this.assertAttr('disabled', undefined);\n this.assertValue(''); // this.assertAttr('placeholder', undefined); //NOTE: this fails with a value of \"null\" (TEST_SUITE=sauce)\n // this.assertAttr('name', undefined); //NOTE: this fails with a value of \"null\" (TEST_SUITE=sauce)\n\n this.assertAttr('maxlength', undefined); // this.assertAttr('size', undefined); //NOTE: re-enable once `size` bug above has been addressed\n\n this.assertAttr('tabindex', undefined);\n };\n\n return _class4;\n }(InputRenderingTest)); // These are the permutations of the set:\n // ['type=\"range\"', 'min=\"-5\" max=\"50\"', value=\"%x\"']\n\n [// HTML attribute\n '@type=\"range\" min=\"-5\" max=\"50\" @value=\"%x\"', '@type=\"range\" @value=\"%x\" min=\"-5\" max=\"50\"', 'min=\"-5\" max=\"50\" @type=\"range\" @value=\"%x\"', 'min=\"-5\" max=\"50\" @value=\"%x\" @type=\"range\"', '@value=\"%x\" min=\"-5\" max=\"50\" @type=\"range\"', '@value=\"%x\" @type=\"range\" min=\"-5\" max=\"50\"', // Named argument\n '@type=\"range\" @min=\"-5\" @max=\"50\" @value=\"%x\"', '@type=\"range\" @value=\"%x\" @min=\"-5\" @max=\"50\"', '@min=\"-5\" @max=\"50\" @type=\"range\" @value=\"%x\"', '@min=\"-5\" @max=\"50\" @value=\"%x\" @type=\"range\"', '@value=\"%x\" @min=\"-5\" @max=\"50\" @type=\"range\"', '@value=\"%x\" @type=\"range\" @min=\"-5\" @max=\"50\"'].forEach(function (attrs) {\n (0, _internalTestHelpers.moduleFor)(\"[GH#15675] Components test: \",\n /*#__PURE__*/\n function (_InputRenderingTest5) {\n (0, _emberBabel.inheritsLoose)(_class5, _InputRenderingTest5);\n\n function _class5() {\n return _InputRenderingTest5.apply(this, arguments) || this;\n }\n\n var _proto6 = _class5.prototype;\n\n _proto6.renderInput = function renderInput() {\n var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 25;\n this.render(\"\");\n };\n\n _proto6['@test value over default max but below set max is kept'] = function testValueOverDefaultMaxButBelowSetMaxIsKept() {\n this.renderInput('25');\n this.assertValue('25');\n };\n\n _proto6['@test value below default min but above set min is kept'] = function testValueBelowDefaultMinButAboveSetMinIsKept() {\n this.renderInput('-2');\n this.assertValue('-2');\n };\n\n _proto6['@test in the valid default range is kept'] = function testInTheValidDefaultRangeIsKept() {\n this.renderInput('5');\n this.assertValue('5');\n };\n\n _proto6['@test value above max is reset to max'] = function testValueAboveMaxIsResetToMax() {\n this.renderInput('55');\n this.assertValue('50');\n };\n\n _proto6['@test value below min is reset to min'] = function testValueBelowMinIsResetToMin() {\n this.renderInput('-10');\n this.assertValue('-5');\n };\n\n return _class5;\n }(InputRenderingTest));\n });\n } else {\n (0, _internalTestHelpers.moduleFor)('Components test: ',\n /*#__PURE__*/\n function (_RenderingTestCase2) {\n (0, _emberBabel.inheritsLoose)(_class6, _RenderingTestCase2);\n\n function _class6() {\n return _RenderingTestCase2.apply(this, arguments) || this;\n }\n\n var _proto7 = _class6.prototype;\n\n _proto7['@test it is not allowed'] = function testItIsNotAllowed() {\n var _this26 = this;\n\n expectAssertion(function () {\n _this26.render(\"\");\n }, 'Invoking `{{input}}` using angle bracket syntax or `component` helper is not yet supported.');\n };\n\n return _class6;\n }(_internalTestHelpers.RenderingTestCase));\n }\n});","enifed(\"@ember/-internals/glimmer/tests/integration/components/input-curly-test\", [\"ember-babel\", \"internal-test-helpers\", \"@ember/polyfills\", \"@ember/-internals/metal\", \"@ember/-internals/views\", \"@ember/-internals/glimmer/tests/utils/helpers\"], function (_emberBabel, _internalTestHelpers, _polyfills, _metal, _views, _helpers) {\n \"use strict\";\n\n var InputRenderingTest =\n /*#__PURE__*/\n function (_RenderingTestCase) {\n (0, _emberBabel.inheritsLoose)(InputRenderingTest, _RenderingTestCase);\n\n function InputRenderingTest() {\n return _RenderingTestCase.apply(this, arguments) || this;\n }\n\n var _proto = InputRenderingTest.prototype;\n\n _proto.$input = function $input() {\n return this.$('input');\n };\n\n _proto.inputID = function inputID() {\n return this.$input().prop('id');\n };\n\n _proto.assertDisabled = function assertDisabled() {\n this.assert.ok(this.$('input').prop('disabled'), 'The input is disabled');\n };\n\n _proto.assertNotDisabled = function assertNotDisabled() {\n this.assert.ok(this.$('input').is(':not(:disabled)'), 'The input is not disabled');\n };\n\n _proto.assertInputId = function assertInputId(expectedId) {\n this.assert.equal(this.inputID(), expectedId, 'the input id should be `expectedId`');\n };\n\n _proto.assertSingleInput = function assertSingleInput() {\n this.assert.equal(this.$('input').length, 1, 'A single text field was inserted');\n };\n\n _proto.assertSingleCheckbox = function assertSingleCheckbox() {\n this.assert.equal(this.$('input[type=checkbox]').length, 1, 'A single checkbox is added');\n };\n\n _proto.assertCheckboxIsChecked = function assertCheckboxIsChecked() {\n this.assert.equal(this.$input().prop('checked'), true, 'the checkbox is checked');\n };\n\n _proto.assertCheckboxIsNotChecked = function assertCheckboxIsNotChecked() {\n this.assert.equal(this.$input().prop('checked'), false, 'the checkbox is not checked');\n };\n\n _proto.assertValue = function assertValue(expected) {\n this.assert.equal(this.$input().val(), expected, \"the input value should be \" + expected);\n };\n\n _proto.assertAttr = function assertAttr(name, expected) {\n this.assert.equal(this.$input().attr(name), expected, \"the input \" + name + \" attribute has the value '\" + expected + \"'\");\n };\n\n _proto.assertAllAttrs = function assertAllAttrs(names, expected) {\n var _this = this;\n\n names.forEach(function (name) {\n return _this.assertAttr(name, expected);\n });\n };\n\n _proto.assertSelectionRange = function assertSelectionRange(start, end) {\n var input = this.$input()[0];\n this.assert.equal(input.selectionStart, start, \"the cursor start position should be \" + start);\n this.assert.equal(input.selectionEnd, end, \"the cursor end position should be \" + end);\n };\n\n _proto.triggerEvent = function triggerEvent(type, options) {\n var event = document.createEvent('Events');\n event.initEvent(type, true, true);\n (0, _polyfills.assign)(event, options);\n var element = this.$input()[0];\n (0, _internalTestHelpers.runTask)(function () {\n element.dispatchEvent(event);\n });\n };\n\n _proto.assertTriggersNativeDOMEvents = function assertTriggersNativeDOMEvents(type) {\n var _this2 = this; // Defaults from EventDispatcher\n\n\n var events = {\n touchstart: 'touchStart',\n touchmove: 'touchMove',\n touchend: 'touchEnd',\n touchcancel: 'touchCancel',\n keydown: 'keyDown',\n keyup: 'keyUp',\n keypress: 'keyPress',\n mousedown: 'mouseDown',\n mouseup: 'mouseUp',\n contextmenu: 'contextMenu',\n click: 'click',\n dblclick: 'doubleClick',\n mousemove: 'mouseMove',\n focusin: 'focusIn',\n focusout: 'focusOut',\n mouseenter: 'mouseEnter',\n mouseleave: 'mouseLeave',\n submit: 'submit',\n input: 'input',\n change: 'change',\n dragstart: 'dragStart',\n drag: 'drag',\n dragenter: 'dragEnter',\n dragleave: 'dragLeave',\n dragover: 'dragOver',\n drop: 'drop',\n dragend: 'dragEnd'\n };\n\n var TestComponent = _helpers.Component.extend({\n tagName: 'input'\n });\n\n this.registerComponent('test-component', {\n ComponentClass: TestComponent\n });\n var triggeredEvents = [];\n var actions = {};\n Object.keys(events).forEach(function (evt) {\n actions[\"run_\" + evt] = function () {\n triggeredEvents.push(evt);\n };\n });\n var typeAttr = type ? \"type=\\\"\" + type + \"\\\" \" : '';\n var actionAttrs = Object.keys(events).map(function (evt) {\n return events[evt] + \"=(action 'run_\" + evt + \"')\";\n }).join(' ');\n var template = \"{{test-component \" + typeAttr + actionAttrs + \"}}{{input \" + typeAttr + actionAttrs + \"}}\";\n this.render(template, {\n actions: actions\n });\n Object.keys(events).forEach(function (evt) {\n return _this2.triggerEvent(evt, null, 'input:first-of-type');\n });\n var normallyTriggeredEvents = [].concat(triggeredEvents);\n triggeredEvents.length = 0;\n this.assert.ok(normallyTriggeredEvents.length > 10, 'sanity check that most events are triggered');\n normallyTriggeredEvents.forEach(function (evt) {\n return _this2.triggerEvent(evt, null, 'input:last-of-type');\n });\n this.assert.deepEqual(triggeredEvents, normallyTriggeredEvents, 'called for all events');\n };\n\n return InputRenderingTest;\n }(_internalTestHelpers.RenderingTestCase);\n\n (0, _internalTestHelpers.moduleFor)('Components test: {{input}}',\n /*#__PURE__*/\n function (_InputRenderingTest) {\n (0, _emberBabel.inheritsLoose)(_class, _InputRenderingTest);\n\n function _class() {\n return _InputRenderingTest.apply(this, arguments) || this;\n }\n\n var _proto2 = _class.prototype;\n\n _proto2['@test a single text field is inserted into the DOM'] = function testASingleTextFieldIsInsertedIntoTheDOM() {\n var _this3 = this;\n\n this.render(\"{{input type=\\\"text\\\" value=value}}\", {\n value: 'hello'\n });\n var id = this.inputID();\n this.assertValue('hello');\n this.assertSingleInput();\n (0, _internalTestHelpers.runTask)(function () {\n return _this3.rerender();\n });\n this.assertValue('hello');\n this.assertSingleInput();\n this.assertInputId(id);\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this3.context, 'value', 'goodbye');\n });\n this.assertValue('goodbye');\n this.assertSingleInput();\n this.assertInputId(id);\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this3.context, 'value', 'hello');\n });\n this.assertValue('hello');\n this.assertSingleInput();\n this.assertInputId(id);\n };\n\n _proto2['@test default type'] = function testDefaultType() {\n var _this4 = this;\n\n this.render(\"{{input}}\");\n this.assertAttr('type', 'text');\n (0, _internalTestHelpers.runTask)(function () {\n return _this4.rerender();\n });\n this.assertAttr('type', 'text');\n };\n\n _proto2['@test dynamic attributes'] = function testDynamicAttributes() {\n var _this5 = this;\n\n this.render(\"\\n {{input type=\\\"text\\\"\\n disabled=disabled\\n value=value\\n placeholder=placeholder\\n name=name\\n maxlength=maxlength\\n minlength=minlength\\n size=size\\n tabindex=tabindex\\n }}\", {\n disabled: false,\n value: 'Original value',\n placeholder: 'Original placeholder',\n name: 'original-name',\n maxlength: 10,\n minlength: 5,\n size: 20,\n tabindex: 30\n });\n this.assertNotDisabled();\n this.assertValue('Original value');\n this.assertAttr('placeholder', 'Original placeholder');\n this.assertAttr('name', 'original-name');\n this.assertAttr('maxlength', '10');\n this.assertAttr('minlength', '5'); // this.assertAttr('size', '20'); //NOTE: failing in IE (TEST_SUITE=sauce)\n // this.assertAttr('tabindex', '30'); //NOTE: failing in IE (TEST_SUITE=sauce)\n\n (0, _internalTestHelpers.runTask)(function () {\n return _this5.rerender();\n });\n this.assertNotDisabled();\n this.assertValue('Original value');\n this.assertAttr('placeholder', 'Original placeholder');\n this.assertAttr('name', 'original-name');\n this.assertAttr('maxlength', '10');\n this.assertAttr('minlength', '5'); // this.assertAttr('size', '20'); //NOTE: failing in IE (TEST_SUITE=sauce)\n // this.assertAttr('tabindex', '30'); //NOTE: failing in IE (TEST_SUITE=sauce)\n\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this5.context, 'value', 'Updated value');\n (0, _metal.set)(_this5.context, 'disabled', true);\n (0, _metal.set)(_this5.context, 'placeholder', 'Updated placeholder');\n (0, _metal.set)(_this5.context, 'name', 'updated-name');\n (0, _metal.set)(_this5.context, 'maxlength', 11);\n (0, _metal.set)(_this5.context, 'minlength', 6); // set(this.context, 'size', 21); //NOTE: failing in IE (TEST_SUITE=sauce)\n // set(this.context, 'tabindex', 31); //NOTE: failing in IE (TEST_SUITE=sauce)\n });\n this.assertDisabled();\n this.assertValue('Updated value');\n this.assertAttr('placeholder', 'Updated placeholder');\n this.assertAttr('name', 'updated-name');\n this.assertAttr('maxlength', '11');\n this.assertAttr('minlength', '6'); // this.assertAttr('size', '21'); //NOTE: failing in IE (TEST_SUITE=sauce)\n // this.assertAttr('tabindex', '31'); //NOTE: failing in IE (TEST_SUITE=sauce)\n\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this5.context, 'value', 'Original value');\n (0, _metal.set)(_this5.context, 'disabled', false);\n (0, _metal.set)(_this5.context, 'placeholder', 'Original placeholder');\n (0, _metal.set)(_this5.context, 'name', 'original-name');\n (0, _metal.set)(_this5.context, 'maxlength', 10);\n (0, _metal.set)(_this5.context, 'minlength', 5); // set(this.context, 'size', 20); //NOTE: failing in IE (TEST_SUITE=sauce)\n // set(this.context, 'tabindex', 30); //NOTE: failing in IE (TEST_SUITE=sauce)\n });\n this.assertNotDisabled();\n this.assertValue('Original value');\n this.assertAttr('placeholder', 'Original placeholder');\n this.assertAttr('name', 'original-name');\n this.assertAttr('maxlength', '10');\n this.assertAttr('minlength', '5'); // this.assertAttr('size', '20'); //NOTE: failing in IE (TEST_SUITE=sauce)\n // this.assertAttr('tabindex', '30'); //NOTE: failing in IE (TEST_SUITE=sauce)\n };\n\n _proto2['@test static attributes'] = function testStaticAttributes() {\n var _this6 = this;\n\n this.render(\"\\n {{input type=\\\"text\\\"\\n disabled=true\\n value=\\\"Original value\\\"\\n placeholder=\\\"Original placeholder\\\"\\n name=\\\"original-name\\\"\\n maxlength=10\\n minlength=5\\n size=20\\n tabindex=30\\n }}\");\n this.assertDisabled();\n this.assertValue('Original value');\n this.assertAttr('placeholder', 'Original placeholder');\n this.assertAttr('name', 'original-name');\n this.assertAttr('maxlength', '10');\n this.assertAttr('minlength', '5'); // this.assertAttr('size', '20'); //NOTE: failing in IE (TEST_SUITE=sauce)\n // this.assertAttr('tabindex', '30'); //NOTE: failing in IE (TEST_SUITE=sauce)\n\n (0, _internalTestHelpers.runTask)(function () {\n return _this6.rerender();\n });\n this.assertDisabled();\n this.assertValue('Original value');\n this.assertAttr('placeholder', 'Original placeholder');\n this.assertAttr('name', 'original-name');\n this.assertAttr('maxlength', '10');\n this.assertAttr('minlength', '5'); // this.assertAttr('size', '20'); //NOTE: failing in IE (TEST_SUITE=sauce)\n // this.assertAttr('tabindex', '30'); //NOTE: failing in IE (TEST_SUITE=sauce)\n };\n\n _proto2['@test cursor selection range'] = function testCursorSelectionRange() {\n var _this7 = this; // Modifying input.selectionStart, which is utilized in the cursor tests,\n // causes an event in Safari.\n\n\n (0, _internalTestHelpers.runDestroy)(this.owner.lookup('event_dispatcher:main'));\n this.render(\"{{input type=\\\"text\\\" value=value}}\", {\n value: 'original'\n });\n var input = this.$input()[0]; // See https://ember-twiddle.com/33e506329f8176ae874422644d4cc08c?openFiles=components.input-component.js%2Ctemplates.components.input-component.hbs\n // this.assertSelectionRange(8, 8); //NOTE: this is (0, 0) on Firefox (TEST_SUITE=sauce)\n\n (0, _internalTestHelpers.runTask)(function () {\n return _this7.rerender();\n }); // this.assertSelectionRange(8, 8); //NOTE: this is (0, 0) on Firefox (TEST_SUITE=sauce)\n\n (0, _internalTestHelpers.runTask)(function () {\n input.selectionStart = 2;\n input.selectionEnd = 4;\n });\n this.assertSelectionRange(2, 4);\n (0, _internalTestHelpers.runTask)(function () {\n return _this7.rerender();\n });\n this.assertSelectionRange(2, 4); // runTask(() => set(this.context, 'value', 'updated'));\n //\n // this.assertSelectionRange(7, 7); //NOTE: this fails in IE, the range is 0 -> 0 (TEST_SUITE=sauce)\n //\n // runTask(() => set(this.context, 'value', 'original'));\n //\n // this.assertSelectionRange(8, 8); //NOTE: this fails in IE, the range is 0 -> 0 (TEST_SUITE=sauce)\n };\n\n _proto2['@test [DEPRECATED] sends an action with `{{input enter=\"foo\"}}` when is pressed'] = function testDEPRECATEDSendsAnActionWithInputEnterFooWhenEnterIsPressed(assert) {\n var _this8 = this;\n\n assert.expect(4);\n expectDeprecation(function () {\n _this8.render(\"{{input enter='foo'}}\", {\n actions: {\n foo: function (value, event) {\n assert.ok(true, 'action was triggered');\n\n if (_views.jQueryDisabled) {\n assert.notOk(event.originalEvent, 'event is not a jQuery.Event');\n } else {\n assert.ok(event instanceof _views.jQuery.Event, 'jQuery event was passed');\n }\n }\n }\n });\n }, 'Passing actions to components as strings (like `{{input enter=\"foo\"}}`) is deprecated. Please use closure actions instead (`{{input enter=(action \"foo\")}}`). (\\'-top-level\\' @ L1:C0) ');\n\n if (true\n /* EMBER_GLIMMER_ANGLE_BRACKET_BUILT_INS */\n ) {\n expectDeprecation(function () {\n _this8.triggerEvent('keyup', {\n keyCode: 13\n });\n }, 'Passing actions to components as strings (like ``) is deprecated. Please use closure actions instead (``).');\n } else {\n expectDeprecation(function () {\n _this8.triggerEvent('keyup', {\n keyCode: 13\n });\n }, 'Passing actions to components as strings (like `{{input enter=\"foo\"}}`) is deprecated. Please use closure actions instead (`{{input enter=(action \"foo\")}}`).');\n }\n };\n\n _proto2['@test sends an action with `{{input enter=(action \"foo\")}}` when is pressed'] = function testSendsAnActionWithInputEnterActionFooWhenEnterIsPressed(assert) {\n assert.expect(2);\n this.render(\"{{input enter=(action 'foo')}}\", {\n actions: {\n foo: function (value, event) {\n assert.ok(true, 'action was triggered');\n\n if (_views.jQueryDisabled) {\n assert.notOk(event.originalEvent, 'event is not a jQuery.Event');\n } else {\n assert.ok(event instanceof _views.jQuery.Event, 'jQuery event was passed');\n }\n }\n }\n });\n this.triggerEvent('keyup', {\n keyCode: 13\n });\n };\n\n _proto2['@test [DEPRECATED] sends an action with `{{input key-press=\"foo\"}}` is pressed'] = function testDEPRECATEDSendsAnActionWithInputKeyPressFooIsPressed(assert) {\n var _this9 = this;\n\n assert.expect(4);\n expectDeprecation(function () {\n _this9.render(\"{{input value=value key-press='foo'}}\", {\n value: 'initial',\n actions: {\n foo: function (value, event) {\n assert.ok(true, 'action was triggered');\n\n if (_views.jQueryDisabled) {\n assert.notOk(event.originalEvent, 'event is not a jQuery.Event');\n } else {\n assert.ok(event instanceof _views.jQuery.Event, 'jQuery event was passed');\n }\n }\n }\n });\n }, 'Passing actions to components as strings (like `{{input key-press=\"foo\"}}`) is deprecated. Please use closure actions instead (`{{input key-press=(action \"foo\")}}`). (\\'-top-level\\' @ L1:C0) ');\n\n if (true\n /* EMBER_GLIMMER_ANGLE_BRACKET_BUILT_INS */\n ) {\n expectDeprecation(function () {\n _this9.triggerEvent('keypress', {\n keyCode: 65\n });\n }, 'Passing actions to components as strings (like ``) is deprecated. Please use closure actions instead (``).');\n } else {\n expectDeprecation(function () {\n _this9.triggerEvent('keypress', {\n keyCode: 65\n });\n }, 'Passing actions to components as strings (like `{{input key-press=\"foo\"}}`) is deprecated. Please use closure actions instead (`{{input key-press=(action \"foo\")}}`).');\n }\n };\n\n _proto2['@test sends an action with `{{input key-press=(action \"foo\")}}` is pressed'] = function testSendsAnActionWithInputKeyPressActionFooIsPressed(assert) {\n assert.expect(2);\n this.render(\"{{input value=value key-press=(action 'foo')}}\", {\n value: 'initial',\n actions: {\n foo: function (value, event) {\n assert.ok(true, 'action was triggered');\n\n if (_views.jQueryDisabled) {\n assert.notOk(event.originalEvent, 'event is not a jQuery.Event');\n } else {\n assert.ok(event instanceof _views.jQuery.Event, 'jQuery event was passed');\n }\n }\n }\n });\n this.triggerEvent('keypress', {\n keyCode: 65\n });\n };\n\n _proto2['@test sends an action to the parent level when `bubbles=true` is provided'] = function testSendsAnActionToTheParentLevelWhenBubblesTrueIsProvided(assert) {\n assert.expect(1);\n\n var ParentComponent = _helpers.Component.extend({\n change: function () {\n assert.ok(true, 'bubbled upwards');\n }\n });\n\n this.registerComponent('x-parent', {\n ComponentClass: ParentComponent,\n template: \"{{input bubbles=true}}\"\n });\n this.render(\"{{x-parent}}\");\n this.triggerEvent('change');\n };\n\n _proto2['@test triggers `focus-in` when focused'] = function testTriggersFocusInWhenFocused(assert) {\n var _this10 = this;\n\n var wasFocused = false;\n this.render(\"{{input focus-in=(action 'foo')}}\", {\n actions: {\n foo: function () {\n wasFocused = true;\n }\n }\n });\n (0, _internalTestHelpers.runTask)(function () {\n _this10.$input().focus();\n });\n assert.ok(wasFocused, 'action was triggered');\n };\n\n _proto2['@test sends `insert-newline` when is pressed'] = function testSendsInsertNewlineWhenEnterIsPressed(assert) {\n assert.expect(2);\n this.render(\"{{input insert-newline=(action 'foo')}}\", {\n actions: {\n foo: function (value, event) {\n assert.ok(true, 'action was triggered');\n\n if (_views.jQueryDisabled) {\n assert.notOk(event.originalEvent, 'event is not a jQuery.Event');\n } else {\n assert.ok(event instanceof _views.jQuery.Event, 'jQuery event was passed');\n }\n }\n }\n });\n this.triggerEvent('keyup', {\n keyCode: 13\n });\n };\n\n _proto2['@test [DEPRECATED] sends an action with `{{input escape-press=\"foo\"}}` when is pressed'] = function testDEPRECATEDSendsAnActionWithInputEscapePressFooWhenEscapeIsPressed(assert) {\n var _this11 = this;\n\n assert.expect(4);\n expectDeprecation(function () {\n _this11.render(\"{{input escape-press='foo'}}\", {\n actions: {\n foo: function (value, event) {\n assert.ok(true, 'action was triggered');\n\n if (_views.jQueryDisabled) {\n assert.notOk(event.originalEvent, 'event is not a jQuery.Event');\n } else {\n assert.ok(event instanceof _views.jQuery.Event, 'jQuery event was passed');\n }\n }\n }\n });\n }, 'Passing actions to components as strings (like `{{input escape-press=\"foo\"}}`) is deprecated. Please use closure actions instead (`{{input escape-press=(action \"foo\")}}`). (\\'-top-level\\' @ L1:C0) ');\n\n if (true\n /* EMBER_GLIMMER_ANGLE_BRACKET_BUILT_INS */\n ) {\n expectDeprecation(function () {\n _this11.triggerEvent('keyup', {\n keyCode: 27\n });\n }, 'Passing actions to components as strings (like ``) is deprecated. Please use closure actions instead (``).');\n } else {\n expectDeprecation(function () {\n _this11.triggerEvent('keyup', {\n keyCode: 27\n });\n }, 'Passing actions to components as strings (like `{{input escape-press=\"foo\"}}`) is deprecated. Please use closure actions instead (`{{input escape-press=(action \"foo\")}}`).');\n }\n };\n\n _proto2['@test sends an action with `{{input escape-press=(action \"foo\")}}` when is pressed'] = function testSendsAnActionWithInputEscapePressActionFooWhenEscapeIsPressed(assert) {\n assert.expect(2);\n this.render(\"{{input escape-press=(action 'foo')}}\", {\n actions: {\n foo: function (value, event) {\n assert.ok(true, 'action was triggered');\n\n if (_views.jQueryDisabled) {\n assert.notOk(event.originalEvent, 'event is not a jQuery.Event');\n } else {\n assert.ok(event instanceof _views.jQuery.Event, 'jQuery event was passed');\n }\n }\n }\n });\n this.triggerEvent('keyup', {\n keyCode: 27\n });\n };\n\n _proto2['@test [DEPRECATED] sends an action with `{{input key-down=\"foo\"}}` when a key is pressed'] = function testDEPRECATEDSendsAnActionWithInputKeyDownFooWhenAKeyIsPressed(assert) {\n var _this12 = this;\n\n assert.expect(4);\n expectDeprecation(function () {\n _this12.render(\"{{input key-down='foo'}}\", {\n actions: {\n foo: function (value, event) {\n assert.ok(true, 'action was triggered');\n\n if (_views.jQueryDisabled) {\n assert.notOk(event.originalEvent, 'event is not a jQuery.Event');\n } else {\n assert.ok(event instanceof _views.jQuery.Event, 'jQuery event was passed');\n }\n }\n }\n });\n }, 'Passing actions to components as strings (like `{{input key-down=\"foo\"}}`) is deprecated. Please use closure actions instead (`{{input key-down=(action \"foo\")}}`). (\\'-top-level\\' @ L1:C0) ');\n\n if (true\n /* EMBER_GLIMMER_ANGLE_BRACKET_BUILT_INS */\n ) {\n expectDeprecation(function () {\n _this12.triggerEvent('keydown', {\n keyCode: 65\n });\n }, 'Passing actions to components as strings (like ``) is deprecated. Please use closure actions instead (``).');\n } else {\n expectDeprecation(function () {\n _this12.triggerEvent('keydown', {\n keyCode: 65\n });\n }, 'Passing actions to components as strings (like `{{input key-down=\"foo\"}}`) is deprecated. Please use closure actions instead (`{{input key-down=(action \"foo\")}}`).');\n }\n };\n\n _proto2['@test sends an action with `{{input key-down=(action \"foo\")}}` when a key is pressed'] = function testSendsAnActionWithInputKeyDownActionFooWhenAKeyIsPressed(assert) {\n assert.expect(2);\n this.render(\"{{input key-down=(action 'foo')}}\", {\n actions: {\n foo: function (value, event) {\n assert.ok(true, 'action was triggered');\n\n if (_views.jQueryDisabled) {\n assert.notOk(event.originalEvent, 'event is not a jQuery.Event');\n } else {\n assert.ok(event instanceof _views.jQuery.Event, 'jQuery event was passed');\n }\n }\n }\n });\n this.triggerEvent('keydown', {\n keyCode: 65\n });\n };\n\n _proto2['@test [DEPRECATED] sends an action with `{{input key-up=\"foo\"}}` when a key is pressed'] = function testDEPRECATEDSendsAnActionWithInputKeyUpFooWhenAKeyIsPressed(assert) {\n var _this13 = this;\n\n assert.expect(4);\n expectDeprecation(function () {\n _this13.render(\"{{input key-up='foo'}}\", {\n actions: {\n foo: function (value, event) {\n assert.ok(true, 'action was triggered');\n\n if (_views.jQueryDisabled) {\n assert.notOk(event.originalEvent, 'event is not a jQuery.Event');\n } else {\n assert.ok(event instanceof _views.jQuery.Event, 'jQuery event was passed');\n }\n }\n }\n });\n }, 'Passing actions to components as strings (like `{{input key-up=\"foo\"}}`) is deprecated. Please use closure actions instead (`{{input key-up=(action \"foo\")}}`). (\\'-top-level\\' @ L1:C0) ');\n\n if (true\n /* EMBER_GLIMMER_ANGLE_BRACKET_BUILT_INS */\n ) {\n expectDeprecation(function () {\n _this13.triggerEvent('keyup', {\n keyCode: 65\n });\n }, 'Passing actions to components as strings (like ``) is deprecated. Please use closure actions instead (``).');\n } else {\n expectDeprecation(function () {\n _this13.triggerEvent('keyup', {\n keyCode: 65\n });\n }, 'Passing actions to components as strings (like `{{input key-up=\"foo\"}}`) is deprecated. Please use closure actions instead (`{{input key-up=(action \"foo\")}}`).');\n }\n };\n\n _proto2['@test sends an action with `{{input key-up=(action \"foo\")}}` when a key is pressed'] = function testSendsAnActionWithInputKeyUpActionFooWhenAKeyIsPressed(assert) {\n assert.expect(2);\n this.render(\"{{input key-up=(action 'foo')}}\", {\n actions: {\n foo: function (value, event) {\n assert.ok(true, 'action was triggered');\n\n if (_views.jQueryDisabled) {\n assert.notOk(event.originalEvent, 'event is not a jQuery.Event');\n } else {\n assert.ok(event instanceof _views.jQuery.Event, 'jQuery event was passed');\n }\n }\n }\n });\n this.triggerEvent('keyup', {\n keyCode: 65\n });\n };\n\n _proto2['@test GH#14727 can render a file input after having had render an input of other type'] = function testGH14727CanRenderAFileInputAfterHavingHadRenderAnInputOfOtherType() {\n this.render(\"{{input type=\\\"text\\\"}}{{input type=\\\"file\\\"}}\");\n this.assert.equal(this.$input()[0].type, 'text');\n this.assert.equal(this.$input()[1].type, 'file');\n };\n\n _proto2['@test sends an action with `{{input EVENT=(action \"foo\")}}` for native DOM events'] = function testSendsAnActionWithInputEVENTActionFooForNativeDOMEvents() {\n this.assertTriggersNativeDOMEvents();\n };\n\n return _class;\n }(InputRenderingTest));\n (0, _internalTestHelpers.moduleFor)('Components test: {{input}} with dynamic type',\n /*#__PURE__*/\n function (_InputRenderingTest2) {\n (0, _emberBabel.inheritsLoose)(_class2, _InputRenderingTest2);\n\n function _class2() {\n return _InputRenderingTest2.apply(this, arguments) || this;\n }\n\n var _proto3 = _class2.prototype;\n\n _proto3['@test a bound property can be used to determine type'] = function testABoundPropertyCanBeUsedToDetermineType() {\n var _this14 = this;\n\n this.render(\"{{input type=type}}\", {\n type: 'password'\n });\n this.assertAttr('type', 'password');\n (0, _internalTestHelpers.runTask)(function () {\n return _this14.rerender();\n });\n this.assertAttr('type', 'password');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this14.context, 'type', 'text');\n });\n this.assertAttr('type', 'text');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this14.context, 'type', 'password');\n });\n this.assertAttr('type', 'password');\n };\n\n _proto3['@test a subexpression can be used to determine type'] = function testASubexpressionCanBeUsedToDetermineType() {\n var _this15 = this;\n\n this.render(\"{{input type=(if isTruthy trueType falseType)}}\", {\n isTruthy: true,\n trueType: 'text',\n falseType: 'password'\n });\n this.assertAttr('type', 'text');\n (0, _internalTestHelpers.runTask)(function () {\n return _this15.rerender();\n });\n this.assertAttr('type', 'text');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this15.context, 'isTruthy', false);\n });\n this.assertAttr('type', 'password');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this15.context, 'isTruthy', true);\n });\n this.assertAttr('type', 'text');\n };\n\n _proto3['@test GH16256 input macro does not modify params in place'] = function testGH16256InputMacroDoesNotModifyParamsInPlace() {\n this.registerComponent('my-input', {\n template: \"{{input type=inputType}}\"\n });\n this.render(\"{{my-input inputType=firstType}}{{my-input inputType=secondType}}\", {\n firstType: 'password',\n secondType: 'email'\n });\n var inputs = this.element.querySelectorAll('input');\n this.assert.equal(inputs.length, 2, 'there are two inputs');\n this.assert.equal(inputs[0].getAttribute('type'), 'password');\n this.assert.equal(inputs[1].getAttribute('type'), 'email');\n };\n\n return _class2;\n }(InputRenderingTest));\n (0, _internalTestHelpers.moduleFor)(\"Components test: {{input type='checkbox'}}\",\n /*#__PURE__*/\n function (_InputRenderingTest3) {\n (0, _emberBabel.inheritsLoose)(_class3, _InputRenderingTest3);\n\n function _class3() {\n return _InputRenderingTest3.apply(this, arguments) || this;\n }\n\n var _proto4 = _class3.prototype;\n\n _proto4['@test dynamic attributes'] = function testDynamicAttributes() {\n var _this16 = this;\n\n this.render(\"{{input\\n type='checkbox'\\n disabled=disabled\\n name=name\\n checked=checked\\n tabindex=tabindex\\n }}\", {\n disabled: false,\n name: 'original-name',\n checked: false,\n tabindex: 10\n });\n this.assertSingleCheckbox();\n this.assertNotDisabled();\n this.assertAttr('name', 'original-name');\n this.assertAttr('tabindex', '10');\n (0, _internalTestHelpers.runTask)(function () {\n return _this16.rerender();\n });\n this.assertSingleCheckbox();\n this.assertNotDisabled();\n this.assertAttr('name', 'original-name');\n this.assertAttr('tabindex', '10');\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this16.context, 'disabled', true);\n (0, _metal.set)(_this16.context, 'name', 'updated-name');\n (0, _metal.set)(_this16.context, 'tabindex', 11);\n });\n this.assertSingleCheckbox();\n this.assertDisabled();\n this.assertAttr('name', 'updated-name');\n this.assertAttr('tabindex', '11');\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this16.context, 'disabled', false);\n (0, _metal.set)(_this16.context, 'name', 'original-name');\n (0, _metal.set)(_this16.context, 'tabindex', 10);\n });\n this.assertSingleCheckbox();\n this.assertNotDisabled();\n this.assertAttr('name', 'original-name');\n this.assertAttr('tabindex', '10');\n };\n\n _proto4['@test `value` property assertion'] = function testValuePropertyAssertion() {\n var _this17 = this;\n\n expectAssertion(function () {\n _this17.render(\"{{input type=\\\"checkbox\\\" value=value}}\", {\n value: 'value'\n });\n }, /checkbox.+value.+not supported.+use.+checked.+instead/);\n };\n\n _proto4['@test with a bound type'] = function testWithABoundType() {\n var _this18 = this;\n\n this.render(\"{{input type=inputType checked=isChecked}}\", {\n inputType: 'checkbox',\n isChecked: true\n });\n this.assertSingleCheckbox();\n this.assertCheckboxIsChecked();\n (0, _internalTestHelpers.runTask)(function () {\n return _this18.rerender();\n });\n this.assertCheckboxIsChecked();\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this18.context, 'isChecked', false);\n });\n this.assertCheckboxIsNotChecked();\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this18.context, 'isChecked', true);\n });\n this.assertCheckboxIsChecked();\n };\n\n _proto4['@test native click changes check property'] = function testNativeClickChangesCheckProperty() {\n this.render(\"{{input type=\\\"checkbox\\\"}}\");\n this.assertSingleCheckbox();\n this.assertCheckboxIsNotChecked();\n this.$input()[0].click();\n this.assertCheckboxIsChecked();\n this.$input()[0].click();\n this.assertCheckboxIsNotChecked();\n };\n\n _proto4['@test with static values'] = function testWithStaticValues() {\n var _this19 = this;\n\n this.render(\"{{input type=\\\"checkbox\\\" disabled=false tabindex=10 name=\\\"original-name\\\" checked=false}}\");\n this.assertSingleCheckbox();\n this.assertCheckboxIsNotChecked();\n this.assertNotDisabled();\n this.assertAttr('tabindex', '10');\n this.assertAttr('name', 'original-name');\n (0, _internalTestHelpers.runTask)(function () {\n return _this19.rerender();\n });\n this.assertSingleCheckbox();\n this.assertCheckboxIsNotChecked();\n this.assertNotDisabled();\n this.assertAttr('tabindex', '10');\n this.assertAttr('name', 'original-name');\n };\n\n _proto4['@test sends an action with `{{input EVENT=(action \"foo\")}}` for native DOM events'] = function testSendsAnActionWithInputEVENTActionFooForNativeDOMEvents() {\n this.assertTriggersNativeDOMEvents('checkbox');\n };\n\n return _class3;\n }(InputRenderingTest));\n (0, _internalTestHelpers.moduleFor)(\"Components test: {{input type='text'}}\",\n /*#__PURE__*/\n function (_InputRenderingTest4) {\n (0, _emberBabel.inheritsLoose)(_class4, _InputRenderingTest4);\n\n function _class4() {\n return _InputRenderingTest4.apply(this, arguments) || this;\n }\n\n var _proto5 = _class4.prototype;\n\n _proto5['@test null values'] = function testNullValues() {\n var _this20 = this;\n\n var attributes = ['disabled', 'placeholder', 'name', 'maxlength', 'size', 'tabindex'];\n this.render(\"\\n {{input type=\\\"text\\\"\\n disabled=disabled\\n value=value\\n placeholder=placeholder\\n name=name\\n maxlength=maxlength\\n size=size\\n tabindex=tabindex\\n }}\", {\n disabled: null,\n value: null,\n placeholder: null,\n name: null,\n maxlength: null,\n size: null,\n tabindex: null\n });\n this.assertValue('');\n this.assertAllAttrs(attributes, undefined);\n (0, _internalTestHelpers.runTask)(function () {\n return _this20.rerender();\n });\n this.assertValue('');\n this.assertAllAttrs(attributes, undefined);\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this20.context, 'disabled', true);\n (0, _metal.set)(_this20.context, 'value', 'Updated value');\n (0, _metal.set)(_this20.context, 'placeholder', 'Updated placeholder');\n (0, _metal.set)(_this20.context, 'name', 'updated-name');\n (0, _metal.set)(_this20.context, 'maxlength', 11);\n (0, _metal.set)(_this20.context, 'size', 21);\n (0, _metal.set)(_this20.context, 'tabindex', 31);\n });\n this.assertDisabled();\n this.assertValue('Updated value');\n this.assertAttr('placeholder', 'Updated placeholder');\n this.assertAttr('name', 'updated-name');\n this.assertAttr('maxlength', '11');\n this.assertAttr('size', '21');\n this.assertAttr('tabindex', '31');\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this20.context, 'disabled', null);\n (0, _metal.set)(_this20.context, 'value', null);\n (0, _metal.set)(_this20.context, 'placeholder', null);\n (0, _metal.set)(_this20.context, 'name', null);\n (0, _metal.set)(_this20.context, 'maxlength', null); // set(this.context, 'size', null); //NOTE: this fails with `Error: Failed to set the 'size' property on 'HTMLInputElement': The value provided is 0, which is an invalid size.` (TEST_SUITE=sauce)\n\n (0, _metal.set)(_this20.context, 'tabindex', null);\n });\n this.assertAttr('disabled', undefined);\n this.assertValue(''); // this.assertAttr('placeholder', undefined); //NOTE: this fails with a value of \"null\" (TEST_SUITE=sauce)\n // this.assertAttr('name', undefined); //NOTE: this fails with a value of \"null\" (TEST_SUITE=sauce)\n\n this.assertAttr('maxlength', undefined); // this.assertAttr('size', undefined); //NOTE: re-enable once `size` bug above has been addressed\n\n this.assertAttr('tabindex', undefined);\n };\n\n return _class4;\n }(InputRenderingTest)); // These are the permutations of the set:\n // ['type=\"range\"', 'min=\"-5\" max=\"50\"', 'value=\"%x\"']\n\n ['type=\"range\" min=\"-5\" max=\"50\" value=\"%x\"', 'type=\"range\" value=\"%x\" min=\"-5\" max=\"50\"', 'min=\"-5\" max=\"50\" type=\"range\" value=\"%x\"', 'min=\"-5\" max=\"50\" value=\"%x\" type=\"range\"', 'value=\"%x\" min=\"-5\" max=\"50\" type=\"range\"', 'value=\"%x\" type=\"range\" min=\"-5\" max=\"50\"'].forEach(function (attrs) {\n (0, _internalTestHelpers.moduleFor)(\"[GH#15675] Components test: {{input \" + attrs + \"}}\",\n /*#__PURE__*/\n function (_InputRenderingTest5) {\n (0, _emberBabel.inheritsLoose)(_class5, _InputRenderingTest5);\n\n function _class5() {\n return _InputRenderingTest5.apply(this, arguments) || this;\n }\n\n var _proto6 = _class5.prototype;\n\n _proto6.renderInput = function renderInput() {\n var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 25;\n this.render(\"{{input \" + attrs.replace('%x', value) + \"}}\");\n };\n\n _proto6['@test value over default max but below set max is kept'] = function testValueOverDefaultMaxButBelowSetMaxIsKept() {\n this.renderInput('25');\n this.assertValue('25');\n };\n\n _proto6['@test value below default min but above set min is kept'] = function testValueBelowDefaultMinButAboveSetMinIsKept() {\n this.renderInput('-2');\n this.assertValue('-2');\n };\n\n _proto6['@test in the valid default range is kept'] = function testInTheValidDefaultRangeIsKept() {\n this.renderInput('5');\n this.assertValue('5');\n };\n\n _proto6['@test value above max is reset to max'] = function testValueAboveMaxIsResetToMax() {\n this.renderInput('55');\n this.assertValue('50');\n };\n\n _proto6['@test value below min is reset to min'] = function testValueBelowMinIsResetToMin() {\n this.renderInput('-10');\n this.assertValue('-5');\n };\n\n return _class5;\n }(InputRenderingTest));\n });\n});","enifed(\"@ember/-internals/glimmer/tests/integration/components/instrumentation-compile-test\", [\"ember-babel\", \"internal-test-helpers\", \"@ember/instrumentation\", \"@ember/-internals/glimmer/tests/utils/helpers\"], function (_emberBabel, _internalTestHelpers, _instrumentation, _helpers) {\n \"use strict\";\n\n (0, _internalTestHelpers.moduleFor)('Components compile instrumentation',\n /*#__PURE__*/\n function (_RenderingTestCase) {\n (0, _emberBabel.inheritsLoose)(_class, _RenderingTestCase);\n\n function _class() {\n var _this;\n\n _this = _RenderingTestCase.apply(this, arguments) || this;\n\n _this.resetEvents();\n\n (0, _instrumentation.subscribe)('render.getComponentDefinition', {\n before: function (name, timestamp, payload) {\n if (payload.view !== _this.component) {\n _this.actual.before.push(payload);\n }\n },\n after: function (name, timestamp, payload) {\n if (payload.view !== _this.component) {\n _this.actual.after.push(payload);\n }\n }\n });\n return _this;\n }\n\n var _proto = _class.prototype;\n\n _proto.resetEvents = function resetEvents() {\n this.expected = {\n before: [],\n after: []\n };\n this.actual = {\n before: [],\n after: []\n };\n };\n\n _proto.teardown = function teardown() {\n this.assert.deepEqual(this.actual.before, [], 'No unexpected events (before)');\n this.assert.deepEqual(this.actual.after, [], 'No unexpected events (after)');\n\n _RenderingTestCase.prototype.teardown.call(this);\n\n (0, _instrumentation.reset)();\n };\n\n _proto['@test it should only receive an instrumentation event for initial render'] = function testItShouldOnlyReceiveAnInstrumentationEventForInitialRender() {\n var _this2 = this;\n\n var testCase = this;\n\n var BaseClass = _helpers.Component.extend({\n tagName: '',\n willRender: function () {\n testCase.expected.before.push(this);\n testCase.expected.after.unshift(this);\n }\n });\n\n this.registerComponent('x-bar', {\n template: '[x-bar: {{bar}}]',\n ComponentClass: BaseClass.extend()\n });\n this.render(\"[-top-level: {{foo}}] {{x-bar bar=bar}}\", {\n foo: 'foo',\n bar: 'bar'\n });\n this.assertText('[-top-level: foo] [x-bar: bar]');\n this.assertEvents('after initial render');\n (0, _internalTestHelpers.runTask)(function () {\n return _this2.rerender();\n });\n this.assertEvents('after no-op rerender');\n };\n\n _proto.assertEvents = function assertEvents(label) {\n var actual = this.actual,\n expected = this.expected;\n this.assert.strictEqual(actual.before.length, actual.after.length, label + \": before and after callbacks should be balanced\");\n\n this._assertEvents(label + \" (before):\", actual.before, expected.before);\n\n this._assertEvents(label + \" (after):\", actual.before, expected.before);\n\n this.resetEvents();\n };\n\n _proto._assertEvents = function _assertEvents(label, actual, expected) {\n var _this3 = this;\n\n this.assert.equal(actual.length, expected.length, label + \": expected \" + expected.length + \" and got \" + actual.length);\n actual.forEach(function (payload, i) {\n return _this3.assertPayload(payload, expected[i]);\n });\n };\n\n _proto.assertPayload = function assertPayload(payload, component) {\n this.assert.equal(payload.object, component._debugContainerKey, 'payload.object');\n };\n\n return _class;\n }(_internalTestHelpers.RenderingTestCase));\n});","enifed(\"@ember/-internals/glimmer/tests/integration/components/instrumentation-test\", [\"ember-babel\", \"internal-test-helpers\", \"@ember/-internals/metal\", \"@ember/instrumentation\", \"@ember/-internals/glimmer/tests/utils/helpers\"], function (_emberBabel, _internalTestHelpers, _metal, _instrumentation, _helpers) {\n \"use strict\";\n\n (0, _internalTestHelpers.moduleFor)('Components instrumentation',\n /*#__PURE__*/\n function (_RenderingTestCase) {\n (0, _emberBabel.inheritsLoose)(_class, _RenderingTestCase);\n\n function _class() {\n var _this;\n\n _this = _RenderingTestCase.apply(this, arguments) || this;\n\n _this.resetEvents();\n\n (0, _instrumentation.subscribe)('render.component', {\n before: function (name, timestamp, payload) {\n if (payload.view !== _this.component) {\n _this.actual.before.push(payload);\n }\n },\n after: function (name, timestamp, payload) {\n if (payload.view !== _this.component) {\n _this.actual.after.push(payload);\n }\n }\n });\n return _this;\n }\n\n var _proto = _class.prototype;\n\n _proto.resetEvents = function resetEvents() {\n this.expected = {\n before: [],\n after: []\n };\n this.actual = {\n before: [],\n after: []\n };\n };\n\n _proto.teardown = function teardown() {\n this.assert.deepEqual(this.actual.before, [], 'No unexpected events (before)');\n this.assert.deepEqual(this.actual.after, [], 'No unexpected events (after)');\n\n _RenderingTestCase.prototype.teardown.call(this);\n\n (0, _instrumentation.reset)();\n };\n\n _proto['@test zomg'] = function testZomg(assert) {\n assert.ok(true);\n };\n\n _proto['@test it should receive an instrumentation event for both initial render and updates'] = function testItShouldReceiveAnInstrumentationEventForBothInitialRenderAndUpdates() {\n var _this2 = this;\n\n var testCase = this;\n\n var BaseClass = _helpers.Component.extend({\n tagName: '',\n willRender: function () {\n testCase.expected.before.push(this);\n testCase.expected.after.unshift(this);\n }\n });\n\n this.registerComponent('x-bar', {\n template: '[x-bar: {{bar}}] {{yield}}',\n ComponentClass: BaseClass.extend()\n });\n this.registerComponent('x-baz', {\n template: '[x-baz: {{baz}}]',\n ComponentClass: BaseClass.extend()\n });\n this.registerComponent('x-bat', {\n template: '[x-bat: {{bat}}]',\n ComponentClass: BaseClass.extend()\n });\n this.render(\"[-top-level: {{foo}}] {{#x-bar bar=bar}}{{x-baz baz=baz}}{{/x-bar}} {{x-bat bat=bat}}\", {\n foo: 'foo',\n bar: 'bar',\n baz: 'baz',\n bat: 'bat'\n });\n this.assertText('[-top-level: foo] [x-bar: bar] [x-baz: baz] [x-bat: bat]');\n this.assertEvents('after initial render', true);\n (0, _internalTestHelpers.runTask)(function () {\n return _this2.rerender();\n });\n this.assertEvents('after no-op rerender');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this2.context, 'foo', 'FOO');\n });\n this.assertEvents('after updating top-level');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this2.context, 'baz', 'BAZ');\n });\n this.assertEvents('after updating inner-most');\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this2.context, 'bar', 'BAR');\n (0, _metal.set)(_this2.context, 'bat', 'BAT');\n });\n this.assertEvents('after updating the rest');\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this2.context, 'foo', 'FOO');\n (0, _metal.set)(_this2.context, 'bar', 'BAR');\n (0, _metal.set)(_this2.context, 'baz', 'BAZ');\n (0, _metal.set)(_this2.context, 'bat', 'BAT');\n });\n this.assertEvents('after reset');\n };\n\n _proto.assertEvents = function assertEvents(label) {\n var initialRender = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var actual = this.actual,\n expected = this.expected;\n this.assert.strictEqual(actual.before.length, actual.after.length, label + \": before and after callbacks should be balanced\");\n\n this._assertEvents(label + \" (before):\", actual.before, expected.before, initialRender);\n\n this._assertEvents(label + \" (after):\", actual.before, expected.before, initialRender);\n\n this.resetEvents();\n };\n\n _proto._assertEvents = function _assertEvents(label, actual, expected, initialRender) {\n var _this3 = this;\n\n this.assert.equal(actual.length, expected.length, label + \": expected \" + expected.length + \" and got \" + actual.length);\n actual.forEach(function (payload, i) {\n return _this3.assertPayload(payload, expected[i], initialRender);\n });\n };\n\n _proto.assertPayload = function assertPayload(payload, component, initialRender) {\n this.assert.equal(payload.object, component.toString(), 'payload.object');\n this.assert.ok(payload.containerKey, 'the container key should be present');\n this.assert.equal(payload.containerKey, component._debugContainerKey, 'payload.containerKey');\n this.assert.equal(payload.view, component, 'payload.view');\n this.assert.strictEqual(payload.initialRender, initialRender, 'payload.initialRender');\n };\n\n return _class;\n }(_internalTestHelpers.RenderingTestCase));\n});","enifed(\"@ember/-internals/glimmer/tests/integration/components/life-cycle-test\", [\"ember-babel\", \"internal-test-helpers\", \"@ember/runloop\", \"@ember/-internals/metal\", \"@ember/-internals/runtime\", \"@ember/-internals/views\", \"@ember/-internals/utils\", \"@ember/-internals/glimmer/tests/utils/helpers\"], function (_emberBabel, _internalTestHelpers, _runloop, _metal, _runtime, _views, _utils, _helpers) {\n \"use strict\";\n\n function _templateObject12() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#each items as |item|}}\\n {{#parent-component itemId=item.id}}{{item.id}}{{/parent-component}}\\n {{/each}}\\n {{#if model.shouldShow}}\\n {{#parent-component itemId=6}}6{{/parent-component}}\\n {{/if}}\\n {{#if model.shouldShow}}\\n {{#parent-component itemId=7}}7{{/parent-component}}\\n {{/if}}\\n \"]);\n\n _templateObject12 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject11() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{yield}}\\n
    \\n {{#nested-component nestedId=(concat itemId '-A')}}A{{/nested-component}}\\n {{#nested-component nestedId=(concat itemId '-B')}}B{{/nested-component}}\\n
\\n \"]);\n\n _templateObject11 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject10() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#each items as |item|}}\\n \", \"\\n {{else}}\\n \", \"\\n {{/each}}\\n \"]);\n\n _templateObject10 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject9() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#nested-item}}Nothing to see here{{/nested-item}}\\n \"]);\n\n _templateObject9 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject8() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#nested-item}}Item: {{count}}{{/nested-item}}\\n \"]);\n\n _templateObject8 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject7() {\n const data = _taggedTemplateLiteralLoose([\"\\n
\\n Bottom: {{\", \"}}\\n
\"]);\n\n _templateObject7 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject6() {\n const data = _taggedTemplateLiteralLoose([\"\\n
\\n Middle: \", \"\\n
\"]);\n\n _templateObject6 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject5() {\n const data = _taggedTemplateLiteralLoose([\"\\n
\\n Top: \", \"\\n
\"]);\n\n _templateObject5 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject4() {\n const data = _taggedTemplateLiteralLoose([\"\\n
\\n \", \"|\\n \", \"|\\n \", \"\\n
\"]);\n\n _templateObject4 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject3() {\n const data = _taggedTemplateLiteralLoose([\"\\n
\\n Website: {{\", \"}}\\n
\"]);\n\n _templateObject3 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject2() {\n const data = _taggedTemplateLiteralLoose([\"\\n
\\n Name: {{\", \"}}|\\n \", \"\\n
\"]);\n\n _templateObject2 = function () {\n return data;\n };\n\n return data;\n }\n\n function _templateObject() {\n const data = _taggedTemplateLiteralLoose([\"\\n
\\n Twitter: {{\", \"}}|\\n \", \"\\n
\"]);\n\n _templateObject = function () {\n return data;\n };\n\n return data;\n }\n\n function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }\n\n var LifeCycleHooksTest =\n /*#__PURE__*/\n function (_RenderingTestCase) {\n (0, _emberBabel.inheritsLoose)(LifeCycleHooksTest, _RenderingTestCase);\n\n function LifeCycleHooksTest() {\n var _this;\n\n _this = _RenderingTestCase.apply(this, arguments) || this;\n _this.hooks = [];\n _this.components = {};\n _this.componentRegistry = [];\n _this.teardownAssertions = [];\n _this.viewRegistry = _this.owner.lookup('-view-registry:main');\n return _this;\n }\n\n var _proto = LifeCycleHooksTest.prototype;\n\n _proto.afterEach = function afterEach() {\n _RenderingTestCase.prototype.afterEach.call(this);\n\n for (var i = 0; i < this.teardownAssertions.length; i++) {\n this.teardownAssertions[i]();\n }\n };\n\n _proto.getBootOptions = function getBootOptions() {\n return {\n isInteractive: this.isInteractive\n };\n }\n /* abstract */\n ;\n /* abstract */\n\n\n _proto.invocationFor = function invocationFor()\n /* name, namedArgs = {} */\n {\n throw new Error('Not implemented: `invocationFor`');\n }\n /* abstract */\n ;\n\n _proto.attrFor = function attrFor()\n /* name */\n {\n throw new Error('Not implemented: `attrFor`');\n };\n\n _proto.assertRegisteredViews = function assertRegisteredViews(label) {\n var viewRegistry = this.viewRegistry;\n var topLevelId = (0, _views.getViewId)(this.component);\n var actual = Object.keys(viewRegistry).sort().filter(function (id) {\n return id !== topLevelId;\n });\n\n if (this.isInteractive) {\n var expected = this.componentRegistry.sort();\n this.assert.deepEqual(actual, expected, 'registered views - ' + label);\n } else {\n this.assert.deepEqual(actual, [], 'no views should be registered for non-interactive mode');\n }\n };\n\n _proto.registerComponent = function registerComponent(name, _ref) {\n var _this2 = this;\n\n var _ref$template = _ref.template,\n template = _ref$template === void 0 ? null : _ref$template;\n\n var pushComponent = function (instance) {\n _this2.components[name] = instance;\n\n _this2.componentRegistry.push((0, _views.getViewId)(instance));\n };\n\n var removeComponent = function (instance) {\n var index = _this2.componentRegistry.indexOf(instance);\n\n _this2.componentRegistry.splice(index, 1);\n\n delete _this2.components[name];\n };\n\n var pushHook = function (hookName, args) {\n _this2.hooks.push(hook(name, hookName, args));\n };\n\n var assertParentView = function (hookName, instance) {\n _this2.assert.ok(instance.parentView, \"parentView should be present in \" + hookName);\n\n if (hookName === 'willDestroyElement') {\n _this2.assert.ok(instance.parentView.childViews.indexOf(instance) !== -1, \"view is still connected to parentView in \" + hookName);\n }\n };\n\n var assertElement = function (hookName, instance) {\n var inDOM = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n if (instance.tagName === '') {\n return;\n }\n\n _this2.assert.ok((0, _views.getViewElement)(instance), \"element should be present on \" + instance + \" during \" + hookName);\n\n if (_this2.isInteractive) {\n _this2.assert.ok(instance.element, \"this.element should be present on \" + instance + \" during \" + hookName);\n\n _this2.assert.equal(document.body.contains(instance.element), inDOM, \"element for \" + instance + \" \" + (inDOM ? 'should' : 'should not') + \" be in the DOM during \" + hookName);\n } else {\n _this2.assert.throws(function () {\n return instance.element;\n }, /Accessing `this.element` is not allowed in non-interactive environments/);\n }\n };\n\n var assertNoElement = function (hookName, instance) {\n _this2.assert.strictEqual((0, _views.getViewElement)(instance), null, \"element should not be present in \" + hookName);\n\n if (_this2.isInteractive) {\n _this2.assert.strictEqual(instance.element, null, \"this.element should not be present in \" + hookName);\n } else {\n _this2.assert.throws(function () {\n return instance.element;\n }, /Accessing `this.element` is not allowed in non-interactive environments/);\n }\n };\n\n var assertState = function (hookName, expectedState, instance) {\n _this2.assert.equal(instance._state, expectedState, \"within \" + hookName + \" the expected _state is \" + expectedState);\n };\n\n var isInteractive = this.isInteractive;\n var ComponentClass = this.ComponentClass.extend({\n init: function () {\n var _this3 = this;\n\n this._super.apply(this, arguments);\n\n this.isInitialRender = true;\n this.componentName = name;\n pushHook('init');\n pushComponent(this);\n assertParentView('init', this);\n assertNoElement('init', this);\n assertState('init', 'preRender', this);\n this.on('init', function () {\n return pushHook('on(init)');\n });\n (0, _runloop.schedule)('afterRender', function () {\n _this3.isInitialRender = false;\n });\n },\n didReceiveAttrs: function (options) {\n pushHook('didReceiveAttrs', options);\n assertParentView('didReceiveAttrs', this);\n\n if (this.isInitialRender) {\n assertNoElement('didReceiveAttrs', this);\n assertState('didReceiveAttrs', 'preRender', this);\n } else {\n assertElement('didReceiveAttrs', this);\n\n if (isInteractive) {\n assertState('didReceiveAttrs', 'inDOM', this);\n } else {\n assertState('didReceiveAttrs', 'hasElement', this);\n }\n }\n },\n willInsertElement: function () {\n pushHook('willInsertElement');\n assertParentView('willInsertElement', this);\n assertElement('willInsertElement', this, false);\n assertState('willInsertElement', 'hasElement', this);\n },\n willRender: function () {\n pushHook('willRender');\n assertParentView('willRender', this);\n\n if (this.isInitialRender) {\n assertNoElement('willRender', this, false);\n assertState('willRender', 'preRender', this);\n } else {\n assertElement('willRender', this);\n assertState('willRender', 'inDOM', this);\n }\n },\n didInsertElement: function () {\n pushHook('didInsertElement');\n assertParentView('didInsertElement', this);\n assertElement('didInsertElement', this);\n assertState('didInsertElement', 'inDOM', this);\n },\n didRender: function () {\n pushHook('didRender');\n assertParentView('didRender', this);\n assertElement('didRender', this);\n assertState('didRender', 'inDOM', this);\n },\n didUpdateAttrs: function (options) {\n pushHook('didUpdateAttrs', options);\n assertParentView('didUpdateAttrs', this);\n\n if (isInteractive) {\n assertState('didUpdateAttrs', 'inDOM', this);\n } else {\n assertState('didUpdateAttrs', 'hasElement', this);\n }\n },\n willUpdate: function (options) {\n pushHook('willUpdate', options);\n assertParentView('willUpdate', this);\n assertElement('willUpdate', this);\n assertState('willUpdate', 'inDOM', this);\n },\n didUpdate: function (options) {\n pushHook('didUpdate', options);\n assertParentView('didUpdate', this);\n assertElement('didUpdate', this);\n assertState('didUpdate', 'inDOM', this);\n },\n willDestroyElement: function () {\n pushHook('willDestroyElement');\n assertParentView('willDestroyElement', this);\n assertElement('willDestroyElement', this);\n assertState('willDestroyElement', 'inDOM', this);\n },\n willClearRender: function () {\n pushHook('willClearRender');\n assertParentView('willClearRender', this);\n assertElement('willClearRender', this);\n assertState('willClearRender', 'inDOM', this);\n },\n didDestroyElement: function () {\n pushHook('didDestroyElement');\n assertNoElement('didDestroyElement', this);\n assertState('didDestroyElement', 'destroying', this);\n },\n willDestroy: function () {\n pushHook('willDestroy');\n removeComponent(this);\n\n this._super.apply(this, arguments);\n }\n });\n\n _RenderingTestCase.prototype.registerComponent.call(this, name, {\n ComponentClass: ComponentClass,\n template: template\n });\n };\n\n _proto.assertHooks = function assertHooks(_ref2) {\n var label = _ref2.label,\n interactive = _ref2.interactive,\n nonInteractive = _ref2.nonInteractive;\n var rawHooks = this.isInteractive ? interactive : nonInteractive;\n var hooks = rawHooks.map(function (raw) {\n return hook.apply(void 0, raw);\n });\n this.assert.deepEqual(json(this.hooks), json(hooks), label);\n this.hooks = [];\n };\n\n _proto['@test lifecycle hooks are invoked in a predictable order'] = function testLifecycleHooksAreInvokedInAPredictableOrder() {\n var _this4 = this;\n\n var _this$boundHelpers = this.boundHelpers,\n attr = _this$boundHelpers.attr,\n invoke = _this$boundHelpers.invoke;\n this.registerComponent('the-top', {\n template: (0, _internalTestHelpers.strip)(_templateObject(), attr('twitter'), invoke('the-middle', {\n name: string('Tom Dale')\n }))\n });\n this.registerComponent('the-middle', {\n template: (0, _internalTestHelpers.strip)(_templateObject2(), attr('name'), invoke('the-bottom', {\n website: string('tomdale.net')\n }))\n });\n this.registerComponent('the-bottom', {\n template: (0, _internalTestHelpers.strip)(_templateObject3(), attr('website'))\n });\n this.render(invoke('the-top', {\n twitter: expr('twitter')\n }), {\n twitter: '@tomdale'\n });\n this.assertText('Twitter: @tomdale|Name: Tom Dale|Website: tomdale.net');\n this.assertRegisteredViews('intial render');\n this.assertHooks({\n label: 'after initial render',\n interactive: [// Sync hooks\n ['the-top', 'init'], ['the-top', 'on(init)'], ['the-top', 'didReceiveAttrs'], ['the-top', 'willRender'], ['the-top', 'willInsertElement'], ['the-middle', 'init'], ['the-middle', 'on(init)'], ['the-middle', 'didReceiveAttrs'], ['the-middle', 'willRender'], ['the-middle', 'willInsertElement'], ['the-bottom', 'init'], ['the-bottom', 'on(init)'], ['the-bottom', 'didReceiveAttrs'], ['the-bottom', 'willRender'], ['the-bottom', 'willInsertElement'], // Async hooks\n ['the-bottom', 'didInsertElement'], ['the-bottom', 'didRender'], ['the-middle', 'didInsertElement'], ['the-middle', 'didRender'], ['the-top', 'didInsertElement'], ['the-top', 'didRender']],\n nonInteractive: [// Sync hooks\n ['the-top', 'init'], ['the-top', 'on(init)'], ['the-top', 'didReceiveAttrs'], ['the-middle', 'init'], ['the-middle', 'on(init)'], ['the-middle', 'didReceiveAttrs'], ['the-bottom', 'init'], ['the-bottom', 'on(init)'], ['the-bottom', 'didReceiveAttrs']]\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this4.components['the-bottom'].rerender();\n });\n this.assertText('Twitter: @tomdale|Name: Tom Dale|Website: tomdale.net');\n this.assertHooks({\n label: 'after no-op rerender (bottom)',\n interactive: [// Sync hooks\n ['the-top', 'willUpdate'], ['the-top', 'willRender'], ['the-middle', 'willUpdate'], ['the-middle', 'willRender'], ['the-bottom', 'willUpdate'], ['the-bottom', 'willRender'], // Async hooks\n ['the-bottom', 'didUpdate'], ['the-bottom', 'didRender'], ['the-middle', 'didUpdate'], ['the-middle', 'didRender'], ['the-top', 'didUpdate'], ['the-top', 'didRender']],\n nonInteractive: []\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this4.components['the-middle'].rerender();\n });\n this.assertText('Twitter: @tomdale|Name: Tom Dale|Website: tomdale.net');\n this.assertHooks({\n label: 'after no-op rerender (middle)',\n interactive: [// Sync hooks\n ['the-top', 'willUpdate'], ['the-top', 'willRender'], ['the-middle', 'willUpdate'], ['the-middle', 'willRender'], // Async hooks\n ['the-middle', 'didUpdate'], ['the-middle', 'didRender'], ['the-top', 'didUpdate'], ['the-top', 'didRender']],\n nonInteractive: []\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this4.components['the-top'].rerender();\n });\n this.assertText('Twitter: @tomdale|Name: Tom Dale|Website: tomdale.net');\n this.assertHooks({\n label: 'after no-op rerender (top)',\n interactive: [// Sync hooks\n ['the-top', 'willUpdate'], ['the-top', 'willRender'], // Async hooks\n ['the-top', 'didUpdate'], ['the-top', 'didRender']],\n nonInteractive: []\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this4.context, 'twitter', '@horsetomdale');\n });\n this.assertText('Twitter: @horsetomdale|Name: Tom Dale|Website: tomdale.net'); // Because the `twitter` attr is only used by the topmost component,\n // and not passed down, we do not expect to see lifecycle hooks\n // called for child components. If the `didReceiveAttrs` hook used\n // the new attribute to rerender itself imperatively, that would result\n // in lifecycle hooks being invoked for the child.\n\n this.assertHooks({\n label: 'after update',\n interactive: [// Sync hooks\n ['the-top', 'didUpdateAttrs'], ['the-top', 'didReceiveAttrs'], ['the-top', 'willUpdate'], ['the-top', 'willRender'], // Async hooks\n ['the-top', 'didUpdate'], ['the-top', 'didRender']],\n nonInteractive: [// Sync hooks\n ['the-top', 'didUpdateAttrs'], ['the-top', 'didReceiveAttrs']]\n });\n this.teardownAssertions.push(function () {\n _this4.assertHooks({\n label: 'destroy',\n interactive: [['the-top', 'willDestroyElement'], ['the-top', 'willClearRender'], ['the-middle', 'willDestroyElement'], ['the-middle', 'willClearRender'], ['the-bottom', 'willDestroyElement'], ['the-bottom', 'willClearRender'], ['the-top', 'didDestroyElement'], ['the-middle', 'didDestroyElement'], ['the-bottom', 'didDestroyElement'], ['the-top', 'willDestroy'], ['the-middle', 'willDestroy'], ['the-bottom', 'willDestroy']],\n nonInteractive: [['the-top', 'willDestroy'], ['the-middle', 'willDestroy'], ['the-bottom', 'willDestroy']]\n });\n\n _this4.assertRegisteredViews('after destroy');\n });\n };\n\n _proto['@test lifecycle hooks are invoked in a correct sibling order'] = function testLifecycleHooksAreInvokedInACorrectSiblingOrder() {\n var _this5 = this;\n\n var _this$boundHelpers2 = this.boundHelpers,\n attr = _this$boundHelpers2.attr,\n invoke = _this$boundHelpers2.invoke;\n this.registerComponent('the-parent', {\n template: (0, _internalTestHelpers.strip)(_templateObject4(), invoke('the-first-child', {\n twitter: expr(attr('twitter'))\n }), invoke('the-second-child', {\n name: expr(attr('name'))\n }), invoke('the-last-child', {\n website: expr(attr('website'))\n }))\n });\n this.registerComponent('the-first-child', {\n template: \"Twitter: {{\" + attr('twitter') + \"}}\"\n });\n this.registerComponent('the-second-child', {\n template: \"Name: {{\" + attr('name') + \"}}\"\n });\n this.registerComponent('the-last-child', {\n template: \"Website: {{\" + attr('website') + \"}}\"\n });\n this.render(invoke('the-parent', {\n twitter: expr('twitter'),\n name: expr('name'),\n website: expr('website')\n }), {\n twitter: '@tomdale',\n name: 'Tom Dale',\n website: 'tomdale.net'\n });\n this.assertText('Twitter: @tomdale|Name: Tom Dale|Website: tomdale.net');\n this.assertRegisteredViews('intial render');\n this.assertHooks({\n label: 'after initial render',\n interactive: [// Sync hooks\n ['the-parent', 'init'], ['the-parent', 'on(init)'], ['the-parent', 'didReceiveAttrs'], ['the-parent', 'willRender'], ['the-parent', 'willInsertElement'], ['the-first-child', 'init'], ['the-first-child', 'on(init)'], ['the-first-child', 'didReceiveAttrs'], ['the-first-child', 'willRender'], ['the-first-child', 'willInsertElement'], ['the-second-child', 'init'], ['the-second-child', 'on(init)'], ['the-second-child', 'didReceiveAttrs'], ['the-second-child', 'willRender'], ['the-second-child', 'willInsertElement'], ['the-last-child', 'init'], ['the-last-child', 'on(init)'], ['the-last-child', 'didReceiveAttrs'], ['the-last-child', 'willRender'], ['the-last-child', 'willInsertElement'], // Async hooks\n ['the-first-child', 'didInsertElement'], ['the-first-child', 'didRender'], ['the-second-child', 'didInsertElement'], ['the-second-child', 'didRender'], ['the-last-child', 'didInsertElement'], ['the-last-child', 'didRender'], ['the-parent', 'didInsertElement'], ['the-parent', 'didRender']],\n nonInteractive: [// Sync hooks\n ['the-parent', 'init'], ['the-parent', 'on(init)'], ['the-parent', 'didReceiveAttrs'], ['the-first-child', 'init'], ['the-first-child', 'on(init)'], ['the-first-child', 'didReceiveAttrs'], ['the-second-child', 'init'], ['the-second-child', 'on(init)'], ['the-second-child', 'didReceiveAttrs'], ['the-last-child', 'init'], ['the-last-child', 'on(init)'], ['the-last-child', 'didReceiveAttrs']]\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this5.components['the-first-child'].rerender();\n });\n this.assertText('Twitter: @tomdale|Name: Tom Dale|Website: tomdale.net');\n this.assertHooks({\n label: 'after no-op rerender (first child)',\n interactive: [// Sync hooks\n ['the-parent', 'willUpdate'], ['the-parent', 'willRender'], ['the-first-child', 'willUpdate'], ['the-first-child', 'willRender'], // Async hooks\n ['the-first-child', 'didUpdate'], ['the-first-child', 'didRender'], ['the-parent', 'didUpdate'], ['the-parent', 'didRender']],\n nonInteractive: []\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this5.components['the-second-child'].rerender();\n });\n this.assertText('Twitter: @tomdale|Name: Tom Dale|Website: tomdale.net');\n this.assertHooks({\n label: 'after no-op rerender (second child)',\n interactive: [// Sync hooks\n ['the-parent', 'willUpdate'], ['the-parent', 'willRender'], ['the-second-child', 'willUpdate'], ['the-second-child', 'willRender'], // Async hooks\n ['the-second-child', 'didUpdate'], ['the-second-child', 'didRender'], ['the-parent', 'didUpdate'], ['the-parent', 'didRender']],\n nonInteractive: []\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this5.components['the-last-child'].rerender();\n });\n this.assertText('Twitter: @tomdale|Name: Tom Dale|Website: tomdale.net');\n this.assertHooks({\n label: 'after no-op rerender (last child)',\n interactive: [// Sync hooks\n ['the-parent', 'willUpdate'], ['the-parent', 'willRender'], ['the-last-child', 'willUpdate'], ['the-last-child', 'willRender'], // Async hooks\n ['the-last-child', 'didUpdate'], ['the-last-child', 'didRender'], ['the-parent', 'didUpdate'], ['the-parent', 'didRender']],\n nonInteractive: []\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this5.components['the-parent'].rerender();\n });\n this.assertText('Twitter: @tomdale|Name: Tom Dale|Website: tomdale.net');\n this.assertHooks({\n label: 'after no-op rerender (parent)',\n interactive: [// Sync hooks\n ['the-parent', 'willUpdate'], ['the-parent', 'willRender'], // Async hooks\n ['the-parent', 'didUpdate'], ['the-parent', 'didRender']],\n nonInteractive: []\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.setProperties)(_this5.context, {\n twitter: '@horsetomdale',\n name: 'Horse Tom Dale',\n website: 'horsetomdale.net'\n });\n });\n this.assertText('Twitter: @horsetomdale|Name: Horse Tom Dale|Website: horsetomdale.net');\n this.assertHooks({\n label: 'after update',\n interactive: [// Sync hooks\n ['the-parent', 'didUpdateAttrs'], ['the-parent', 'didReceiveAttrs'], ['the-parent', 'willUpdate'], ['the-parent', 'willRender'], ['the-first-child', 'didUpdateAttrs'], ['the-first-child', 'didReceiveAttrs'], ['the-first-child', 'willUpdate'], ['the-first-child', 'willRender'], ['the-second-child', 'didUpdateAttrs'], ['the-second-child', 'didReceiveAttrs'], ['the-second-child', 'willUpdate'], ['the-second-child', 'willRender'], ['the-last-child', 'didUpdateAttrs'], ['the-last-child', 'didReceiveAttrs'], ['the-last-child', 'willUpdate'], ['the-last-child', 'willRender'], // Async hooks\n ['the-first-child', 'didUpdate'], ['the-first-child', 'didRender'], ['the-second-child', 'didUpdate'], ['the-second-child', 'didRender'], ['the-last-child', 'didUpdate'], ['the-last-child', 'didRender'], ['the-parent', 'didUpdate'], ['the-parent', 'didRender']],\n nonInteractive: [// Sync hooks\n ['the-parent', 'didUpdateAttrs'], ['the-parent', 'didReceiveAttrs'], ['the-first-child', 'didUpdateAttrs'], ['the-first-child', 'didReceiveAttrs'], ['the-second-child', 'didUpdateAttrs'], ['the-second-child', 'didReceiveAttrs'], ['the-last-child', 'didUpdateAttrs'], ['the-last-child', 'didReceiveAttrs']]\n });\n this.teardownAssertions.push(function () {\n _this5.assertHooks({\n label: 'destroy',\n interactive: [['the-parent', 'willDestroyElement'], ['the-parent', 'willClearRender'], ['the-first-child', 'willDestroyElement'], ['the-first-child', 'willClearRender'], ['the-second-child', 'willDestroyElement'], ['the-second-child', 'willClearRender'], ['the-last-child', 'willDestroyElement'], ['the-last-child', 'willClearRender'], ['the-parent', 'didDestroyElement'], ['the-first-child', 'didDestroyElement'], ['the-second-child', 'didDestroyElement'], ['the-last-child', 'didDestroyElement'], ['the-parent', 'willDestroy'], ['the-first-child', 'willDestroy'], ['the-second-child', 'willDestroy'], ['the-last-child', 'willDestroy']],\n nonInteractive: [['the-parent', 'willDestroy'], ['the-first-child', 'willDestroy'], ['the-second-child', 'willDestroy'], ['the-last-child', 'willDestroy']]\n });\n\n _this5.assertRegisteredViews('after destroy');\n });\n };\n\n _proto['@test passing values through attrs causes lifecycle hooks to fire if the attribute values have changed'] = function testPassingValuesThroughAttrsCausesLifecycleHooksToFireIfTheAttributeValuesHaveChanged() {\n var _this6 = this;\n\n var _this$boundHelpers3 = this.boundHelpers,\n attr = _this$boundHelpers3.attr,\n invoke = _this$boundHelpers3.invoke;\n this.registerComponent('the-top', {\n template: (0, _internalTestHelpers.strip)(_templateObject5(), invoke('the-middle', {\n twitterTop: expr(attr('twitter'))\n }))\n });\n this.registerComponent('the-middle', {\n template: (0, _internalTestHelpers.strip)(_templateObject6(), invoke('the-bottom', {\n twitterMiddle: expr(attr('twitterTop'))\n }))\n });\n this.registerComponent('the-bottom', {\n template: (0, _internalTestHelpers.strip)(_templateObject7(), attr('twitterMiddle'))\n });\n this.render(invoke('the-top', {\n twitter: expr('twitter')\n }), {\n twitter: '@tomdale'\n });\n this.assertText('Top: Middle: Bottom: @tomdale');\n this.assertRegisteredViews('intial render');\n this.assertHooks({\n label: 'after initial render',\n interactive: [// Sync hooks\n ['the-top', 'init'], ['the-top', 'on(init)'], ['the-top', 'didReceiveAttrs'], ['the-top', 'willRender'], ['the-top', 'willInsertElement'], ['the-middle', 'init'], ['the-middle', 'on(init)'], ['the-middle', 'didReceiveAttrs'], ['the-middle', 'willRender'], ['the-middle', 'willInsertElement'], ['the-bottom', 'init'], ['the-bottom', 'on(init)'], ['the-bottom', 'didReceiveAttrs'], ['the-bottom', 'willRender'], ['the-bottom', 'willInsertElement'], // Async hooks\n ['the-bottom', 'didInsertElement'], ['the-bottom', 'didRender'], ['the-middle', 'didInsertElement'], ['the-middle', 'didRender'], ['the-top', 'didInsertElement'], ['the-top', 'didRender']],\n nonInteractive: [// Sync hooks\n ['the-top', 'init'], ['the-top', 'on(init)'], ['the-top', 'didReceiveAttrs'], ['the-middle', 'init'], ['the-middle', 'on(init)'], ['the-middle', 'didReceiveAttrs'], ['the-bottom', 'init'], ['the-bottom', 'on(init)'], ['the-bottom', 'didReceiveAttrs']]\n });\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this6.context, 'twitter', '@horsetomdale');\n });\n this.assertText('Top: Middle: Bottom: @horsetomdale'); // Because the `twitter` attr is used by the all of the components,\n // the lifecycle hooks are invoked for all components.\n\n this.assertHooks({\n label: 'after updating (root)',\n interactive: [// Sync hooks\n ['the-top', 'didUpdateAttrs'], ['the-top', 'didReceiveAttrs'], ['the-top', 'willUpdate'], ['the-top', 'willRender'], ['the-middle', 'didUpdateAttrs'], ['the-middle', 'didReceiveAttrs'], ['the-middle', 'willUpdate'], ['the-middle', 'willRender'], ['the-bottom', 'didUpdateAttrs'], ['the-bottom', 'didReceiveAttrs'], ['the-bottom', 'willUpdate'], ['the-bottom', 'willRender'], // Async hooks\n ['the-bottom', 'didUpdate'], ['the-bottom', 'didRender'], ['the-middle', 'didUpdate'], ['the-middle', 'didRender'], ['the-top', 'didUpdate'], ['the-top', 'didRender']],\n nonInteractive: [// Sync hooks\n ['the-top', 'didUpdateAttrs'], ['the-top', 'didReceiveAttrs'], ['the-middle', 'didUpdateAttrs'], ['the-middle', 'didReceiveAttrs'], ['the-bottom', 'didUpdateAttrs'], ['the-bottom', 'didReceiveAttrs']]\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this6.rerender();\n });\n this.assertText('Top: Middle: Bottom: @horsetomdale'); // In this case, because the attrs are passed down, all child components are invoked.\n\n this.assertHooks({\n label: 'after no-op rernder (root)',\n interactive: [],\n nonInteractive: []\n });\n this.teardownAssertions.push(function () {\n _this6.assertHooks({\n label: 'destroy',\n interactive: [['the-top', 'willDestroyElement'], ['the-top', 'willClearRender'], ['the-middle', 'willDestroyElement'], ['the-middle', 'willClearRender'], ['the-bottom', 'willDestroyElement'], ['the-bottom', 'willClearRender'], ['the-top', 'didDestroyElement'], ['the-middle', 'didDestroyElement'], ['the-bottom', 'didDestroyElement'], ['the-top', 'willDestroy'], ['the-middle', 'willDestroy'], ['the-bottom', 'willDestroy']],\n nonInteractive: [['the-top', 'willDestroy'], ['the-middle', 'willDestroy'], ['the-bottom', 'willDestroy']]\n });\n\n _this6.assertRegisteredViews('after destroy');\n });\n };\n\n _proto['@test components rendered from `{{each}}` have correct life-cycle hooks to be called'] = function testComponentsRenderedFromEachHaveCorrectLifeCycleHooksToBeCalled() {\n var _this7 = this;\n\n var invoke = this.boundHelpers.invoke;\n this.registerComponent('nested-item', {\n template: \"{{yield}}\"\n });\n this.registerComponent('an-item', {\n template: (0, _internalTestHelpers.strip)(_templateObject8())\n });\n this.registerComponent('no-items', {\n template: (0, _internalTestHelpers.strip)(_templateObject9())\n });\n this.render((0, _internalTestHelpers.strip)(_templateObject10(), invoke('an-item', {\n count: expr('item')\n }), invoke('no-items')), {\n items: [1, 2, 3, 4, 5]\n });\n this.assertText('Item: 1Item: 2Item: 3Item: 4Item: 5');\n this.assertRegisteredViews('intial render');\n\n var initialHooks = function () {\n var ret = [['an-item', 'init'], ['an-item', 'on(init)'], ['an-item', 'didReceiveAttrs']];\n\n if (_this7.isInteractive) {\n ret.push(['an-item', 'willRender'], ['an-item', 'willInsertElement']);\n }\n\n ret.push(['nested-item', 'init'], ['nested-item', 'on(init)'], ['nested-item', 'didReceiveAttrs']);\n\n if (_this7.isInteractive) {\n ret.push(['nested-item', 'willRender'], ['nested-item', 'willInsertElement']);\n }\n\n return ret;\n };\n\n var initialAfterRenderHooks = function () {\n if (_this7.isInteractive) {\n return [['nested-item', 'didInsertElement'], ['nested-item', 'didRender'], ['an-item', 'didInsertElement'], ['an-item', 'didRender']];\n } else {\n return [];\n }\n };\n\n this.assertHooks({\n label: 'after initial render',\n interactive: [].concat(initialHooks(1), initialHooks(2), initialHooks(3), initialHooks(4), initialHooks(5), initialAfterRenderHooks(5), initialAfterRenderHooks(4), initialAfterRenderHooks(3), initialAfterRenderHooks(2), initialAfterRenderHooks(1)),\n nonInteractive: [].concat(initialHooks(1), initialHooks(2), initialHooks(3), initialHooks(4), initialHooks(5), initialAfterRenderHooks(5), initialAfterRenderHooks(4), initialAfterRenderHooks(3), initialAfterRenderHooks(2), initialAfterRenderHooks(1))\n }); // TODO: Is this correct? Should childViews be populated in non-interactive mode?\n\n if (this.isInteractive) {\n this.assert.equal(this.component.childViews.length, 5, 'childViews precond');\n }\n\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(_this7.context, 'items', []);\n }); // TODO: Is this correct? Should childViews be populated in non-interactive mode?\n\n if (this.isInteractive) {\n this.assert.equal(this.component.childViews.length, 1, 'childViews updated');\n }\n\n this.assertText('Nothing to see here');\n this.assertHooks({\n label: 'reset to empty array',\n interactive: [['an-item', 'willDestroyElement'], ['an-item', 'willClearRender'], ['nested-item', 'willDestroyElement'], ['nested-item', 'willClearRender'], ['an-item', 'willDestroyElement'], ['an-item', 'willClearRender'], ['nested-item', 'willDestroyElement'], ['nested-item', 'willClearRender'], ['an-item', 'willDestroyElement'], ['an-item', 'willClearRender'], ['nested-item', 'willDestroyElement'], ['nested-item', 'willClearRender'], ['an-item', 'willDestroyElement'], ['an-item', 'willClearRender'], ['nested-item', 'willDestroyElement'], ['nested-item', 'willClearRender'], ['an-item', 'willDestroyElement'], ['an-item', 'willClearRender'], ['nested-item', 'willDestroyElement'], ['nested-item', 'willClearRender'], ['no-items', 'init'], ['no-items', 'on(init)'], ['no-items', 'didReceiveAttrs'], ['no-items', 'willRender'], ['no-items', 'willInsertElement'], ['nested-item', 'init'], ['nested-item', 'on(init)'], ['nested-item', 'didReceiveAttrs'], ['nested-item', 'willRender'], ['nested-item', 'willInsertElement'], ['an-item', 'didDestroyElement'], ['nested-item', 'didDestroyElement'], ['an-item', 'didDestroyElement'], ['nested-item', 'didDestroyElement'], ['an-item', 'didDestroyElement'], ['nested-item', 'didDestroyElement'], ['an-item', 'didDestroyElement'], ['nested-item', 'didDestroyElement'], ['an-item', 'didDestroyElement'], ['nested-item', 'didDestroyElement'], ['nested-item', 'didInsertElement'], ['nested-item', 'didRender'], ['no-items', 'didInsertElement'], ['no-items', 'didRender'], ['an-item', 'willDestroy'], ['nested-item', 'willDestroy'], ['an-item', 'willDestroy'], ['nested-item', 'willDestroy'], ['an-item', 'willDestroy'], ['nested-item', 'willDestroy'], ['an-item', 'willDestroy'], ['nested-item', 'willDestroy'], ['an-item', 'willDestroy'], ['nested-item', 'willDestroy']],\n nonInteractive: [['no-items', 'init'], ['no-items', 'on(init)'], ['no-items', 'didReceiveAttrs'], ['nested-item', 'init'], ['nested-item', 'on(init)'], ['nested-item', 'didReceiveAttrs'], ['an-item', 'willDestroy'], ['nested-item', 'willDestroy'], ['an-item', 'willDestroy'], ['nested-item', 'willDestroy'], ['an-item', 'willDestroy'], ['nested-item', 'willDestroy'], ['an-item', 'willDestroy'], ['nested-item', 'willDestroy'], ['an-item', 'willDestroy'], ['nested-item', 'willDestroy']]\n });\n this.teardownAssertions.push(function () {\n _this7.assertHooks({\n label: 'destroy',\n interactive: [['no-items', 'willDestroyElement'], ['no-items', 'willClearRender'], ['nested-item', 'willDestroyElement'], ['nested-item', 'willClearRender'], ['no-items', 'didDestroyElement'], ['nested-item', 'didDestroyElement'], ['no-items', 'willDestroy'], ['nested-item', 'willDestroy']],\n nonInteractive: [['no-items', 'willDestroy'], ['nested-item', 'willDestroy']]\n });\n\n _this7.assertRegisteredViews('after destroy');\n });\n };\n\n (0, _emberBabel.createClass)(LifeCycleHooksTest, [{\n key: \"isInteractive\",\n get: function () {\n return true;\n }\n }, {\n key: \"ComponentClass\",\n get: function () {\n throw new Error('Not implemented: `ComponentClass`');\n }\n }, {\n key: \"boundHelpers\",\n get: function () {\n return {\n invoke: bind(this.invocationFor, this),\n attr: bind(this.attrFor, this)\n };\n }\n }]);\n return LifeCycleHooksTest;\n }(_internalTestHelpers.RenderingTestCase);\n\n var CurlyComponentsTest =\n /*#__PURE__*/\n function (_LifeCycleHooksTest) {\n (0, _emberBabel.inheritsLoose)(CurlyComponentsTest, _LifeCycleHooksTest);\n\n function CurlyComponentsTest() {\n return _LifeCycleHooksTest.apply(this, arguments) || this;\n }\n\n var _proto2 = CurlyComponentsTest.prototype;\n\n _proto2.invocationFor = function invocationFor(name) {\n var _this8 = this;\n\n var namedArgs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var attrs = Object.keys(namedArgs).map(function (k) {\n return k + \"=\" + _this8.val(namedArgs[k]);\n }).join(' ');\n return \"{{\" + name + \" \" + attrs + \"}}\";\n };\n\n _proto2.attrFor = function attrFor(name) {\n return \"\" + name;\n }\n /* private */\n ;\n\n _proto2.val = function val(value) {\n if (value.isString) {\n return JSON.stringify(value.value);\n } else if (value.isExpr) {\n return \"(readonly \" + value.value + \")\";\n } else {\n throw new Error(\"Unknown value: \" + value);\n }\n };\n\n (0, _emberBabel.createClass)(CurlyComponentsTest, [{\n key: \"ComponentClass\",\n get: function () {\n return _helpers.Component;\n }\n }]);\n return CurlyComponentsTest;\n }(LifeCycleHooksTest);\n\n (0, _internalTestHelpers.moduleFor)('Components test: interactive lifecycle hooks (curly components)',\n /*#__PURE__*/\n function (_CurlyComponentsTest) {\n (0, _emberBabel.inheritsLoose)(_class, _CurlyComponentsTest);\n\n function _class() {\n return _CurlyComponentsTest.apply(this, arguments) || this;\n }\n\n (0, _emberBabel.createClass)(_class, [{\n key: \"isInteractive\",\n get: function () {\n return true;\n }\n }]);\n return _class;\n }(CurlyComponentsTest));\n (0, _internalTestHelpers.moduleFor)('Components test: non-interactive lifecycle hooks (curly components)',\n /*#__PURE__*/\n function (_CurlyComponentsTest2) {\n (0, _emberBabel.inheritsLoose)(_class2, _CurlyComponentsTest2);\n\n function _class2() {\n return _CurlyComponentsTest2.apply(this, arguments) || this;\n }\n\n (0, _emberBabel.createClass)(_class2, [{\n key: \"isInteractive\",\n get: function () {\n return false;\n }\n }]);\n return _class2;\n }(CurlyComponentsTest));\n (0, _internalTestHelpers.moduleFor)('Components test: interactive lifecycle hooks (tagless curly components)',\n /*#__PURE__*/\n function (_CurlyComponentsTest3) {\n (0, _emberBabel.inheritsLoose)(_class3, _CurlyComponentsTest3);\n\n function _class3() {\n return _CurlyComponentsTest3.apply(this, arguments) || this;\n }\n\n (0, _emberBabel.createClass)(_class3, [{\n key: \"ComponentClass\",\n get: function () {\n return _helpers.Component.extend({\n tagName: ''\n });\n }\n }, {\n key: \"isInteractive\",\n get: function () {\n return true;\n }\n }]);\n return _class3;\n }(CurlyComponentsTest));\n (0, _internalTestHelpers.moduleFor)('Components test: non-interactive lifecycle hooks (tagless curly components)',\n /*#__PURE__*/\n function (_CurlyComponentsTest4) {\n (0, _emberBabel.inheritsLoose)(_class4, _CurlyComponentsTest4);\n\n function _class4() {\n return _CurlyComponentsTest4.apply(this, arguments) || this;\n }\n\n (0, _emberBabel.createClass)(_class4, [{\n key: \"ComponentClass\",\n get: function () {\n return _helpers.Component.extend({\n tagName: ''\n });\n }\n }, {\n key: \"isInteractive\",\n get: function () {\n return false;\n }\n }]);\n return _class4;\n }(CurlyComponentsTest));\n (0, _internalTestHelpers.moduleFor)('Run loop and lifecycle hooks',\n /*#__PURE__*/\n function (_RenderingTestCase2) {\n (0, _emberBabel.inheritsLoose)(_class5, _RenderingTestCase2);\n\n function _class5() {\n return _RenderingTestCase2.apply(this, arguments) || this;\n }\n\n var _proto3 = _class5.prototype;\n\n _proto3['@test afterRender set'] = function testAfterRenderSet() {\n var _this10 = this;\n\n var ComponentClass = _helpers.Component.extend({\n width: '5',\n didInsertElement: function () {\n var _this9 = this;\n\n (0, _runloop.schedule)('afterRender', function () {\n _this9.set('width', '10');\n });\n }\n });\n\n var template = \"{{width}}\";\n this.registerComponent('foo-bar', {\n ComponentClass: ComponentClass,\n template: template\n });\n this.render('{{foo-bar}}');\n this.assertText('10');\n (0, _internalTestHelpers.runTask)(function () {\n return _this10.rerender();\n });\n this.assertText('10');\n };\n\n _proto3['@test afterRender set on parent'] = function testAfterRenderSetOnParent() {\n var _this12 = this;\n\n var ComponentClass = _helpers.Component.extend({\n didInsertElement: function () {\n var _this11 = this;\n\n (0, _runloop.schedule)('afterRender', function () {\n var parent = _this11.get('parent');\n\n parent.set('foo', 'wat');\n });\n }\n });\n\n var template = \"{{foo}}\";\n this.registerComponent('foo-bar', {\n ComponentClass: ComponentClass,\n template: template\n });\n this.render('{{foo-bar parent=this foo=foo}}');\n this.assertText('wat');\n (0, _internalTestHelpers.runTask)(function () {\n return _this12.rerender();\n });\n this.assertText('wat');\n };\n\n _proto3['@test `willRender` can set before render (GH#14458)'] = function testWillRenderCanSetBeforeRenderGH14458() {\n var ComponentClass = _helpers.Component.extend({\n tagName: 'a',\n customHref: 'http://google.com',\n attributeBindings: ['customHref:href'],\n willRender: function () {\n this.set('customHref', 'http://willRender.com');\n }\n });\n\n var template = \"Hello World\";\n this.registerComponent('foo-bar', {\n ComponentClass: ComponentClass,\n template: template\n });\n this.render(\"{{foo-bar id=\\\"foo\\\"}}\");\n this.assertElement(this.firstChild, {\n tagName: 'a',\n attrs: {\n id: 'foo',\n href: 'http://willRender.com',\n class: (0, _internalTestHelpers.classes)('ember-view')\n }\n });\n };\n\n _proto3['@test that thing about destroying'] = function testThatThingAboutDestroying(assert) {\n var _this13 = this;\n\n var ParentDestroyedElements = [];\n var ChildDestroyedElements = [];\n\n var ParentComponent = _helpers.Component.extend({\n willDestroyElement: function () {\n ParentDestroyedElements.push({\n id: this.itemId,\n name: 'parent-component',\n hasParent: Boolean(this.element.parentNode),\n nextSibling: Boolean(this.element.nextSibling),\n previousSibling: Boolean(this.element.previousSibling)\n });\n }\n });\n\n var PartentTemplate = (0, _internalTestHelpers.strip)(_templateObject11());\n\n var NestedComponent = _helpers.Component.extend({\n willDestroyElement: function () {\n ChildDestroyedElements.push({\n id: this.nestedId,\n name: 'nested-component',\n hasParent: Boolean(this.element.parentNode),\n nextSibling: Boolean(this.element.nextSibling),\n previousSibling: Boolean(this.element.previousSibling)\n });\n }\n });\n\n var NestedTemplate = \"{{yield}}\";\n this.registerComponent('parent-component', {\n ComponentClass: ParentComponent,\n template: PartentTemplate\n });\n this.registerComponent('nested-component', {\n ComponentClass: NestedComponent,\n template: NestedTemplate\n });\n var array = (0, _runtime.A)([{\n id: 1\n }, {\n id: 2\n }, {\n id: 3\n }, {\n id: 4\n }, {\n id: 5\n }]);\n this.render((0, _internalTestHelpers.strip)(_templateObject12()), {\n items: array,\n model: {\n shouldShow: true\n }\n });\n this.assertText('1AB2AB3AB4AB5AB6AB7AB');\n (0, _internalTestHelpers.runTask)(function () {\n array.removeAt(2);\n array.removeAt(2);\n (0, _metal.set)(_this13.context, 'model.shouldShow', false);\n });\n this.assertText('1AB2AB5AB');\n assertDestroyHooks(assert, [].concat(ParentDestroyedElements), [{\n id: 3,\n hasParent: true,\n nextSibling: true,\n previousSibling: true\n }, {\n id: 4,\n hasParent: true,\n nextSibling: true,\n previousSibling: true\n }, {\n id: 6,\n hasParent: true,\n nextSibling: true,\n previousSibling: true\n }, {\n id: 7,\n hasParent: true,\n nextSibling: false,\n previousSibling: true\n }]);\n assertDestroyHooks(assert, [].concat(ChildDestroyedElements), [{\n id: '3-A',\n hasParent: true,\n nextSibling: true,\n previousSibling: false\n }, {\n id: '3-B',\n hasParent: true,\n nextSibling: false,\n previousSibling: true\n }, {\n id: '4-A',\n hasParent: true,\n nextSibling: true,\n previousSibling: false\n }, {\n id: '4-B',\n hasParent: true,\n nextSibling: false,\n previousSibling: true\n }, {\n id: '6-A',\n hasParent: true,\n nextSibling: true,\n previousSibling: false\n }, {\n id: '6-B',\n hasParent: true,\n nextSibling: false,\n previousSibling: true\n }, {\n id: '7-A',\n hasParent: true,\n nextSibling: true,\n previousSibling: false\n }, {\n id: '7-B',\n hasParent: true,\n nextSibling: false,\n previousSibling: true\n }]);\n };\n\n _proto3['@test lifecycle hooks exist on the base class'] = function testLifecycleHooksExistOnTheBaseClass(assert) {\n // Make sure we get the finalized component prototype\n var prototype = _helpers.Component.proto();\n\n assert.equal(typeof prototype.didDestroyElement, 'function', 'didDestroyElement exists');\n assert.equal(typeof prototype.didInsertElement, 'function', 'didInsertElement exists');\n assert.equal(typeof prototype.didReceiveAttrs, 'function', 'didReceiveAttrs exists');\n assert.equal(typeof prototype.didRender, 'function', 'didRender exists');\n assert.equal(typeof prototype.didUpdate, 'function', 'didUpdate exists');\n assert.equal(typeof prototype.didUpdateAttrs, 'function', 'didUpdateAttrs exists');\n assert.equal(typeof prototype.willClearRender, 'function', 'willClearRender exists');\n assert.equal(typeof prototype.willDestroy, 'function', 'willDestroy exists');\n assert.equal(typeof prototype.willDestroyElement, 'function', 'willDestroyElement exists');\n assert.equal(typeof prototype.willInsertElement, 'function', 'willInsertElement exists');\n assert.equal(typeof prototype.willRender, 'function', 'willRender exists');\n assert.equal(typeof prototype.willUpdate, 'function', 'willUpdate exists');\n };\n\n return _class5;\n }(_internalTestHelpers.RenderingTestCase));\n\n if (!_views.jQueryDisabled) {\n (0, _internalTestHelpers.moduleFor)('Run loop and lifecycle hooks - jQuery only',\n /*#__PURE__*/\n function (_RenderingTestCase3) {\n (0, _emberBabel.inheritsLoose)(_class6, _RenderingTestCase3);\n\n function _class6() {\n return _RenderingTestCase3.apply(this, arguments) || this;\n }\n\n var _proto4 = _class6.prototype;\n\n _proto4['@test lifecycle hooks have proper access to this.$()'] = function testLifecycleHooksHaveProperAccessToThis$(assert) {\n assert.expect(7);\n var component;\n\n var FooBarComponent = _helpers.Component.extend({\n tagName: 'div',\n init: function () {\n assert.notOk(this.$(), 'no access to element via this.$() on init() enter');\n\n this._super.apply(this, arguments);\n\n assert.notOk(this.$(), 'no access to element via this.$() after init() finished');\n },\n willInsertElement: function () {\n component = this;\n assert.ok(this.$(), 'willInsertElement has access to element via this.$()');\n },\n didInsertElement: function () {\n assert.ok(this.$(), 'didInsertElement has access to element via this.$()');\n },\n willDestroyElement: function () {\n assert.ok(this.$(), 'willDestroyElement has access to element via this.$()');\n },\n didDestroyElement: function () {\n assert.notOk(this.$(), 'didDestroyElement does not have access to element via this.$()');\n }\n });\n\n this.registerComponent('foo-bar', {\n ComponentClass: FooBarComponent,\n template: 'hello'\n });\n var owner = this.owner;\n expectDeprecation(function () {\n var comp = owner.lookup('component:foo-bar');\n (0, _internalTestHelpers.runAppend)(comp);\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _utils.tryInvoke)(component, 'destroy');\n });\n }, 'Using this.$() in a component has been deprecated, consider using this.element');\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _utils.tryInvoke)(component, 'destroy');\n });\n };\n\n return _class6;\n }(_internalTestHelpers.RenderingTestCase));\n }\n\n function assertDestroyHooks(assert, _actual, _expected) {\n _expected.forEach(function (expected, i) {\n var name = expected.name;\n assert.equal(expected.id, _actual[i].id, name + \" id is the same\");\n assert.equal(expected.hasParent, _actual[i].hasParent, name + \" has parent node\");\n assert.equal(expected.nextSibling, _actual[i].nextSibling, name + \" has next sibling node\");\n assert.equal(expected.previousSibling, _actual[i].previousSibling, name + \" has previous sibling node\");\n });\n }\n\n function bind(func, thisArg) {\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return func.apply(thisArg, args);\n };\n }\n\n function string(value) {\n return {\n isString: true,\n value: value\n };\n }\n\n function expr(value) {\n return {\n isExpr: true,\n value: value\n };\n }\n\n function hook(name, hook) {\n var _ref3 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n attrs = _ref3.attrs,\n oldAttrs = _ref3.oldAttrs,\n newAttrs = _ref3.newAttrs;\n\n return {\n name: name,\n hook: hook,\n args: {\n attrs: attrs,\n oldAttrs: oldAttrs,\n newAttrs: newAttrs\n }\n };\n }\n\n function json(serializable) {\n return JSON.parse(JSON.stringify(serializable));\n }\n});","enifed(\"@ember/-internals/glimmer/tests/integration/components/link-to/query-params-angle-test\", [\"ember-babel\", \"@ember/controller\", \"@ember/-internals/runtime\", \"@ember/-internals/routing\", \"internal-test-helpers\"], function (_emberBabel, _controller, _runtime, _routing, _internalTestHelpers) {\n \"use strict\";\n\n if (true\n /* EMBER_GLIMMER_ANGLE_BRACKET_BUILT_INS */\n ) {\n (0, _internalTestHelpers.moduleFor)(' component with query-params (rendering)',\n /*#__PURE__*/\n function (_ApplicationTestCase) {\n (0, _emberBabel.inheritsLoose)(_class, _ApplicationTestCase);\n\n function _class() {\n var _this;\n\n _this = _ApplicationTestCase.apply(this, arguments) || this;\n\n _this.add('controller:index', _controller.default.extend({\n queryParams: ['foo'],\n foo: '123',\n bar: 'yes'\n }));\n\n return _this;\n }\n\n var _proto = _class.prototype;\n\n _proto['@test populates href with fully supplied query param values'] = function testPopulatesHrefWithFullySuppliedQueryParamValues() {\n var _this2 = this;\n\n this.addTemplate('index', \"Index\");\n return this.visit('/').then(function () {\n _this2.assertComponentElement(_this2.firstChild, {\n tagName: 'a',\n attrs: {\n href: '/?bar=NAW&foo=456'\n },\n content: 'Index'\n });\n });\n };\n\n _proto['@test populates href with partially supplied query param values, but omits if value is default value'] = function testPopulatesHrefWithPartiallySuppliedQueryParamValuesButOmitsIfValueIsDefaultValue() {\n var _this3 = this;\n\n this.addTemplate('index', \"Index\");\n return this.visit('/').then(function () {\n _this3.assertComponentElement(_this3.firstChild, {\n tagName: 'a',\n attrs: {\n href: '/',\n class: (0, _internalTestHelpers.classes)('ember-view active')\n },\n content: 'Index'\n });\n });\n };\n\n return _class;\n }(_internalTestHelpers.ApplicationTestCase));\n (0, _internalTestHelpers.moduleFor)(' component with query params (routing)',\n /*#__PURE__*/\n function (_ApplicationTestCase2) {\n (0, _emberBabel.inheritsLoose)(_class2, _ApplicationTestCase2);\n\n function _class2() {\n var _this4;\n\n _this4 = _ApplicationTestCase2.call(this) || this;\n var indexProperties = {\n foo: '123',\n bar: 'abc'\n };\n\n _this4.add('controller:index', _controller.default.extend({\n queryParams: ['foo', 'bar', 'abool'],\n foo: indexProperties.foo,\n bar: indexProperties.bar,\n boundThing: 'OMG',\n abool: true\n }));\n\n _this4.add('controller:about', _controller.default.extend({\n queryParams: ['baz', 'bat'],\n baz: 'alex',\n bat: 'borf'\n }));\n\n _this4.indexProperties = indexProperties;\n return _this4;\n }\n\n var _proto2 = _class2.prototype;\n\n _proto2.shouldNotBeActive = function shouldNotBeActive(assert, selector) {\n this.checkActive(assert, selector, false);\n };\n\n _proto2.shouldBeActive = function shouldBeActive(assert, selector) {\n this.checkActive(assert, selector, true);\n };\n\n _proto2.getController = function getController(name) {\n return this.applicationInstance.lookup(\"controller:\" + name);\n };\n\n _proto2.checkActive = function checkActive(assert, selector, active) {\n var classList = this.$(selector)[0].className;\n assert.equal(classList.indexOf('active') > -1, active, selector + ' active should be ' + active.toString());\n };\n\n _proto2[\"@test doesn't update controller QP properties on current route when invoked\"] = function (assert) {\n var _this5 = this;\n\n this.addTemplate('index', \"Index\");\n return this.visit('/').then(function () {\n _this5.click('#the-link');\n\n var indexController = _this5.getController('index');\n\n assert.deepEqual(indexController.getProperties('foo', 'bar'), _this5.indexProperties, 'controller QP properties do not update');\n });\n };\n\n _proto2[\"@test doesn't update controller QP properties on current route when invoked (empty query-params obj)\"] = function (assert) {\n var _this6 = this;\n\n this.addTemplate('index', \"Index\");\n return this.visit('/').then(function () {\n _this6.click('#the-link');\n\n var indexController = _this6.getController('index');\n\n assert.deepEqual(indexController.getProperties('foo', 'bar'), _this6.indexProperties, 'controller QP properties do not update');\n });\n };\n\n _proto2[\"@test doesn't update controller QP properties on current route when invoked (empty query-params obj, inferred route)\"] = function (assert) {\n var _this7 = this;\n\n this.addTemplate('index', \"Index\");\n return this.visit('/').then(function () {\n _this7.click('#the-link');\n\n var indexController = _this7.getController('index');\n\n assert.deepEqual(indexController.getProperties('foo', 'bar'), _this7.indexProperties, 'controller QP properties do not update');\n });\n };\n\n _proto2['@test updates controller QP properties on current route when invoked'] = function testUpdatesControllerQPPropertiesOnCurrentRouteWhenInvoked(assert) {\n var _this8 = this;\n\n this.addTemplate('index', \"\\n \\n Index\\n \\n \");\n return this.visit('/').then(function () {\n _this8.click('#the-link');\n\n var indexController = _this8.getController('index');\n\n assert.deepEqual(indexController.getProperties('foo', 'bar'), {\n foo: '456',\n bar: 'abc'\n }, 'controller QP properties updated');\n });\n };\n\n _proto2['@test updates controller QP properties on current route when invoked (inferred route)'] = function testUpdatesControllerQPPropertiesOnCurrentRouteWhenInvokedInferredRoute(assert) {\n var _this9 = this;\n\n this.addTemplate('index', \"\\n \\n Index\\n \\n \");\n return this.visit('/').then(function () {\n _this9.click('#the-link');\n\n var indexController = _this9.getController('index');\n\n assert.deepEqual(indexController.getProperties('foo', 'bar'), {\n foo: '456',\n bar: 'abc'\n }, 'controller QP properties updated');\n });\n };\n\n _proto2['@test updates controller QP properties on other route after transitioning to that route'] = function testUpdatesControllerQPPropertiesOnOtherRouteAfterTransitioningToThatRoute(assert) {\n var _this10 = this;\n\n this.router.map(function () {\n this.route('about');\n });\n this.addTemplate('index', \"\\n \\n About\\n \\n \");\n return this.visit('/').then(function () {\n var theLink = _this10.$('#the-link');\n\n assert.equal(theLink.attr('href'), '/about?baz=lol');\n (0, _internalTestHelpers.runTask)(function () {\n return _this10.click('#the-link');\n });\n\n var aboutController = _this10.getController('about');\n\n assert.deepEqual(aboutController.getProperties('baz', 'bat'), {\n baz: 'lol',\n bat: 'borf'\n }, 'about controller QP properties updated');\n });\n };\n\n _proto2['@test generates proper href for `LinkTo` with no @route after transitioning to an error route GH#17963'] = function testGeneratesProperHrefForLinkToWithNoRouteAfterTransitioningToAnErrorRouteGH17963(assert) {\n var _this11 = this;\n\n this.router.map(function () {\n this.route('bad');\n });\n this.add('controller:application', _controller.default.extend({\n queryParams: ['baz']\n }));\n this.add('route:bad', _routing.Route.extend({\n model: function () {\n throw new Error('bad!');\n }\n }));\n this.addTemplate('error', \"Error: {{model.message}}\");\n this.addTemplate('application', \"\\n \\n Bad\\n \\n\\n \\n Good\\n \\n\\n {{outlet}}\\n \");\n return this.visit('/').then(function () {\n assert.equal(_this11.$('#good-link').length, 1, 'good-link should be in the DOM');\n assert.equal(_this11.$('#bad-link').length, 1, 'bad-link should be in the DOM');\n\n var goodLink = _this11.$('#good-link');\n\n assert.equal(goodLink.attr('href'), '/?baz=lol');\n return _this11.visit('/bad');\n }).then(function () {\n assert.equal(_this11.$('#good-link').length, 1, 'good-link should be in the DOM');\n assert.equal(_this11.$('#bad-link').length, 1, 'bad-link should be in the DOM');\n\n var goodLink = _this11.$('#good-link'); // should still be / because we never entered /bad (it errored before being fully entered)\n // and error states do not get represented in the URL, so we are _effectively_ still\n // on /\n\n\n assert.equal(goodLink.attr('href'), '/?baz=lol');\n (0, _internalTestHelpers.runTask)(function () {\n return _this11.click('#good-link');\n });\n\n var applicationController = _this11.getController('application');\n\n assert.deepEqual(applicationController.getProperties('baz'), {\n baz: 'lol'\n }, 'index controller QP properties updated');\n });\n };\n\n _proto2['@test supplied QP properties can be bound'] = function testSuppliedQPPropertiesCanBeBound(assert) {\n var _this12 = this;\n\n this.addTemplate('index', \"\\n \\n Index\\n \\n \");\n return this.visit('/').then(function () {\n var indexController = _this12.getController('index');\n\n var theLink = _this12.$('#the-link');\n\n assert.equal(theLink.attr('href'), '/?foo=OMG');\n (0, _internalTestHelpers.runTask)(function () {\n return indexController.set('boundThing', 'ASL');\n });\n assert.equal(theLink.attr('href'), '/?foo=ASL');\n });\n };\n\n _proto2['@test supplied QP properties can be bound (booleans)'] = function testSuppliedQPPropertiesCanBeBoundBooleans(assert) {\n var _this13 = this;\n\n this.addTemplate('index', \"\\n \\n Index\\n \\n \");\n return this.visit('/').then(function () {\n var indexController = _this13.getController('index');\n\n var theLink = _this13.$('#the-link');\n\n assert.equal(theLink.attr('href'), '/?abool=OMG');\n (0, _internalTestHelpers.runTask)(function () {\n return indexController.set('boundThing', false);\n });\n assert.equal(theLink.attr('href'), '/?abool=false');\n\n _this13.click('#the-link');\n\n assert.deepEqual(indexController.getProperties('foo', 'bar', 'abool'), {\n foo: '123',\n bar: 'abc',\n abool: false\n }, 'bound bool QP properties update');\n });\n };\n\n _proto2['@test href updates when unsupplied controller QP props change'] = function testHrefUpdatesWhenUnsuppliedControllerQPPropsChange(assert) {\n var _this14 = this;\n\n this.addTemplate('index', \"\\n \\n Index\\n \\n \");\n return this.visit('/').then(function () {\n var indexController = _this14.getController('index');\n\n var theLink = _this14.$('#the-link');\n\n assert.equal(theLink.attr('href'), '/?foo=lol');\n (0, _internalTestHelpers.runTask)(function () {\n return indexController.set('bar', 'BORF');\n });\n assert.equal(theLink.attr('href'), '/?bar=BORF&foo=lol');\n (0, _internalTestHelpers.runTask)(function () {\n return indexController.set('foo', 'YEAH');\n });\n assert.equal(theLink.attr('href'), '/?bar=BORF&foo=lol');\n });\n };\n\n _proto2['@test The component with only query params always transitions to the current route with the query params applied'] = function testTheLinkToComponentWithOnlyQueryParamsAlwaysTransitionsToTheCurrentRouteWithTheQueryParamsApplied(assert) {\n var _this15 = this; // Test harness for bug #12033\n\n\n this.addTemplate('cars', \"\\n Create new car\\n Page 2\\n {{outlet}}\\n \");\n this.addTemplate('cars.create', \"Close create form\");\n this.router.map(function () {\n this.route('cars', function () {\n this.route('create');\n });\n });\n this.add('controller:cars', _controller.default.extend({\n queryParams: ['page'],\n page: 1\n }));\n return this.visit('/cars/create').then(function () {\n var router = _this15.appRouter;\n\n var carsController = _this15.getController('cars');\n\n assert.equal(router.currentRouteName, 'cars.create');\n (0, _internalTestHelpers.runTask)(function () {\n return _this15.click('#close-link');\n });\n assert.equal(router.currentRouteName, 'cars.index');\n assert.equal(router.get('url'), '/cars');\n assert.equal(carsController.get('page'), 1, 'The page query-param is 1');\n (0, _internalTestHelpers.runTask)(function () {\n return _this15.click('#page2-link');\n });\n assert.equal(router.currentRouteName, 'cars.index', 'The active route is still cars');\n assert.equal(router.get('url'), '/cars?page=2', 'The url has been updated');\n assert.equal(carsController.get('page'), 2, 'The query params have been updated');\n });\n };\n\n _proto2['@test the component applies activeClass when query params are not changed'] = function testTheLinkToComponentAppliesActiveClassWhenQueryParamsAreNotChanged(assert) {\n var _this16 = this;\n\n this.addTemplate('index', \"\\n Index\\n Index\\n Index\\n \");\n this.addTemplate('search', \"\\n Index\\n Index\\n Index\\n Index\\n Index\\n Index\\n Index\\n {{outlet}}\\n \");\n this.addTemplate('search.results', \"\\n Index\\n Index\\n Index\\n Index\\n Index\\n Index\\n Index\\n \");\n this.router.map(function () {\n this.route('search', function () {\n this.route('results');\n });\n });\n this.add('controller:search', _controller.default.extend({\n queryParams: ['search', 'archive'],\n search: '',\n archive: false\n }));\n this.add('controller:search.results', _controller.default.extend({\n queryParams: ['sort', 'showDetails'],\n sort: 'title',\n showDetails: true\n }));\n return this.visit('/').then(function () {\n _this16.shouldNotBeActive(assert, '#cat-link');\n\n _this16.shouldNotBeActive(assert, '#dog-link');\n\n return _this16.visit('/?foo=cat');\n }).then(function () {\n _this16.shouldBeActive(assert, '#cat-link');\n\n _this16.shouldNotBeActive(assert, '#dog-link');\n\n return _this16.visit('/?foo=dog');\n }).then(function () {\n _this16.shouldBeActive(assert, '#dog-link');\n\n _this16.shouldNotBeActive(assert, '#cat-link');\n\n _this16.shouldBeActive(assert, '#change-nothing');\n\n return _this16.visit('/search?search=same');\n }).then(function () {\n _this16.shouldBeActive(assert, '#same-search');\n\n _this16.shouldNotBeActive(assert, '#change-search');\n\n _this16.shouldNotBeActive(assert, '#same-search-add-archive');\n\n _this16.shouldNotBeActive(assert, '#only-add-archive');\n\n _this16.shouldNotBeActive(assert, '#remove-one');\n\n return _this16.visit('/search?search=same&archive=true');\n }).then(function () {\n _this16.shouldBeActive(assert, '#both-same');\n\n _this16.shouldNotBeActive(assert, '#change-one');\n\n return _this16.visit('/search/results?search=same&sort=title&showDetails=true');\n }).then(function () {\n _this16.shouldBeActive(assert, '#same-sort-child-only');\n\n _this16.shouldBeActive(assert, '#same-search-parent-only');\n\n _this16.shouldNotBeActive(assert, '#change-search-parent-only');\n\n _this16.shouldBeActive(assert, '#same-search-same-sort-child-and-parent');\n\n _this16.shouldNotBeActive(assert, '#same-search-different-sort-child-and-parent');\n\n _this16.shouldNotBeActive(assert, '#change-search-same-sort-child-and-parent');\n });\n };\n\n _proto2['@test the component applies active class when query-param is a number'] = function testTheLinkToComponentAppliesActiveClassWhenQueryParamIsANumber(assert) {\n var _this17 = this;\n\n this.addTemplate('index', \"\\n \\n Index\\n \\n \");\n this.add('controller:index', _controller.default.extend({\n queryParams: ['page'],\n page: 1,\n pageNumber: 5\n }));\n return this.visit('/').then(function () {\n _this17.shouldNotBeActive(assert, '#page-link');\n\n return _this17.visit('/?page=5');\n }).then(function () {\n _this17.shouldBeActive(assert, '#page-link');\n });\n };\n\n _proto2['@test the component applies active class when query-param is an array'] = function testTheLinkToComponentAppliesActiveClassWhenQueryParamIsAnArray(assert) {\n var _this18 = this;\n\n this.addTemplate('index', \"\\n Index\\n Index\\n Index\\n \");\n this.add('controller:index', _controller.default.extend({\n queryParams: ['pages'],\n pages: [],\n pagesArray: [1, 2],\n biggerArray: [1, 2, 3],\n emptyArray: []\n }));\n return this.visit('/').then(function () {\n _this18.shouldNotBeActive(assert, '#array-link');\n\n return _this18.visit('/?pages=%5B1%2C2%5D');\n }).then(function () {\n _this18.shouldBeActive(assert, '#array-link');\n\n _this18.shouldNotBeActive(assert, '#bigger-link');\n\n _this18.shouldNotBeActive(assert, '#empty-link');\n\n return _this18.visit('/?pages=%5B2%2C1%5D');\n }).then(function () {\n _this18.shouldNotBeActive(assert, '#array-link');\n\n _this18.shouldNotBeActive(assert, '#bigger-link');\n\n _this18.shouldNotBeActive(assert, '#empty-link');\n\n return _this18.visit('/?pages=%5B1%2C2%2C3%5D');\n }).then(function () {\n _this18.shouldBeActive(assert, '#bigger-link');\n\n _this18.shouldNotBeActive(assert, '#array-link');\n\n _this18.shouldNotBeActive(assert, '#empty-link');\n });\n };\n\n _proto2['@test the component applies active class to the parent route'] = function testTheLinkToComponentAppliesActiveClassToTheParentRoute(assert) {\n var _this19 = this;\n\n this.router.map(function () {\n this.route('parent', function () {\n this.route('child');\n });\n });\n this.addTemplate('application', \"\\n Parent\\n Child\\n Parent\\n {{outlet}}\\n \");\n this.add('controller:parent.child', _controller.default.extend({\n queryParams: ['foo'],\n foo: 'bar'\n }));\n return this.visit('/').then(function () {\n _this19.shouldNotBeActive(assert, '#parent-link');\n\n _this19.shouldNotBeActive(assert, '#parent-child-link');\n\n _this19.shouldNotBeActive(assert, '#parent-link-qp');\n\n return _this19.visit('/parent/child?foo=dog');\n }).then(function () {\n _this19.shouldBeActive(assert, '#parent-link');\n\n _this19.shouldNotBeActive(assert, '#parent-link-qp');\n });\n };\n\n _proto2['@test The component disregards query-params in activeness computation when current-when is specified'] = function testTheLinkToComponentDisregardsQueryParamsInActivenessComputationWhenCurrentWhenIsSpecified(assert) {\n var _this20 = this;\n\n var appLink;\n this.router.map(function () {\n this.route('parent');\n });\n this.addTemplate('application', \"\\n \\n Parent\\n \\n {{outlet}}\\n \");\n this.addTemplate('parent', \"\\n \\n Parent\\n \\n {{outlet}}\\n \");\n this.add('controller:parent', _controller.default.extend({\n queryParams: ['page'],\n page: 1\n }));\n return this.visit('/').then(function () {\n appLink = _this20.$('#app-link');\n assert.equal(appLink.attr('href'), '/parent');\n\n _this20.shouldNotBeActive(assert, '#app-link');\n\n return _this20.visit('/parent?page=2');\n }).then(function () {\n appLink = _this20.$('#app-link');\n var router = _this20.appRouter;\n assert.equal(appLink.attr('href'), '/parent');\n\n _this20.shouldBeActive(assert, '#app-link');\n\n assert.equal(_this20.$('#parent-link').attr('href'), '/parent');\n\n _this20.shouldBeActive(assert, '#parent-link');\n\n var parentController = _this20.getController('parent');\n\n assert.equal(parentController.get('page'), 2);\n (0, _internalTestHelpers.runTask)(function () {\n return parentController.set('page', 3);\n });\n assert.equal(router.get('location.path'), '/parent?page=3');\n\n _this20.shouldBeActive(assert, '#app-link');\n\n _this20.shouldBeActive(assert, '#parent-link');\n\n (0, _internalTestHelpers.runTask)(function () {\n return _this20.click('#app-link');\n });\n assert.equal(router.get('location.path'), '/parent');\n });\n };\n\n _proto2['@test the component default query params while in active transition regression test'] = function testTheLinkToComponentDefaultQueryParamsWhileInActiveTransitionRegressionTest(assert) {\n var _this21 = this;\n\n this.router.map(function () {\n this.route('foos');\n this.route('bars');\n });\n\n var foos = _runtime.RSVP.defer();\n\n var bars = _runtime.RSVP.defer();\n\n this.addTemplate('application', \"\\n Foos\\n Baz Foos\\n Quux Bars\\n \");\n this.add('controller:foos', _controller.default.extend({\n queryParams: ['status'],\n baz: false\n }));\n this.add('route:foos', _routing.Route.extend({\n model: function () {\n return foos.promise;\n }\n }));\n this.add('controller:bars', _controller.default.extend({\n queryParams: ['status'],\n quux: false\n }));\n this.add('route:bars', _routing.Route.extend({\n model: function () {\n return bars.promise;\n }\n }));\n return this.visit('/').then(function () {\n var router = _this21.appRouter;\n\n var foosLink = _this21.$('#foos-link');\n\n var barsLink = _this21.$('#bars-link');\n\n var bazLink = _this21.$('#baz-foos-link');\n\n assert.equal(foosLink.attr('href'), '/foos');\n assert.equal(bazLink.attr('href'), '/foos?baz=true');\n assert.equal(barsLink.attr('href'), '/bars?quux=true');\n assert.equal(router.get('location.path'), '/');\n\n _this21.shouldNotBeActive(assert, '#foos-link');\n\n _this21.shouldNotBeActive(assert, '#baz-foos-link');\n\n _this21.shouldNotBeActive(assert, '#bars-link');\n\n (0, _internalTestHelpers.runTask)(function () {\n return barsLink.click();\n });\n\n _this21.shouldNotBeActive(assert, '#bars-link');\n\n (0, _internalTestHelpers.runTask)(function () {\n return foosLink.click();\n });\n\n _this21.shouldNotBeActive(assert, '#foos-link');\n\n (0, _internalTestHelpers.runTask)(function () {\n return foos.resolve();\n });\n assert.equal(router.get('location.path'), '/foos');\n\n _this21.shouldBeActive(assert, '#foos-link');\n });\n };\n\n return _class2;\n }(_internalTestHelpers.ApplicationTestCase));\n }\n});","enifed(\"@ember/-internals/glimmer/tests/integration/components/link-to/query-params-curly-test\", [\"ember-babel\", \"@ember/controller\", \"@ember/-internals/runtime\", \"@ember/-internals/routing\", \"internal-test-helpers\"], function (_emberBabel, _controller, _runtime, _routing, _internalTestHelpers) {\n \"use strict\";\n\n (0, _internalTestHelpers.moduleFor)('{{link-to}} component with query-params (rendering)',\n /*#__PURE__*/\n function (_ApplicationTestCase) {\n (0, _emberBabel.inheritsLoose)(_class, _ApplicationTestCase);\n\n function _class() {\n var _this;\n\n _this = _ApplicationTestCase.apply(this, arguments) || this;\n\n _this.add('controller:index', _controller.default.extend({\n queryParams: ['foo'],\n foo: '123',\n bar: 'yes'\n }));\n\n return _this;\n }\n\n var _proto = _class.prototype;\n\n _proto['@test populates href with fully supplied query param values'] = function testPopulatesHrefWithFullySuppliedQueryParamValues() {\n var _this2 = this;\n\n this.addTemplate('index', \"{{#link-to 'index' (query-params foo='456' bar='NAW')}}Index{{/link-to}}\");\n return this.visit('/').then(function () {\n _this2.assertComponentElement(_this2.firstChild, {\n tagName: 'a',\n attrs: {\n href: '/?bar=NAW&foo=456'\n },\n content: 'Index'\n });\n });\n };\n\n _proto['@test populates href with partially supplied query param values, but omits if value is default value'] = function testPopulatesHrefWithPartiallySuppliedQueryParamValuesButOmitsIfValueIsDefaultValue() {\n var _this3 = this;\n\n this.addTemplate('index', \"{{#link-to 'index' (query-params foo='123')}}Index{{/link-to}}\");\n return this.visit('/').then(function () {\n _this3.assertComponentElement(_this3.firstChild, {\n tagName: 'a',\n attrs: {\n href: '/',\n class: (0, _internalTestHelpers.classes)('ember-view active')\n },\n content: 'Index'\n });\n });\n };\n\n _proto['@feature(ember-glimmer-angle-bracket-built-ins) `(query-params)` must be used in conjunction with `{{link-to}}'] = function featureEmberGlimmerAngleBracketBuiltInsQueryParamsMustBeUsedInConjunctionWithLinkTo() {\n var _this4 = this;\n\n this.addTemplate('index', \"{{#let (query-params foo='456' bar='NAW') as |qp|}}{{link-to 'Index' 'index' qp}}{{/let}}\");\n return expectAssertion(function () {\n return _this4.visit('/');\n }, /The `\\(query-params\\)` helper can only be used when invoking the `{{link-to}}` component\\./);\n };\n\n return _class;\n }(_internalTestHelpers.ApplicationTestCase));\n (0, _internalTestHelpers.moduleFor)('{{link-to}} component with query params (routing)',\n /*#__PURE__*/\n function (_ApplicationTestCase2) {\n (0, _emberBabel.inheritsLoose)(_class2, _ApplicationTestCase2);\n\n function _class2() {\n var _this5;\n\n _this5 = _ApplicationTestCase2.apply(this, arguments) || this;\n var indexProperties = {\n foo: '123',\n bar: 'abc'\n };\n\n _this5.add('controller:index', _controller.default.extend({\n queryParams: ['foo', 'bar', 'abool'],\n foo: indexProperties.foo,\n bar: indexProperties.bar,\n boundThing: 'OMG',\n abool: true\n }));\n\n _this5.add('controller:about', _controller.default.extend({\n queryParams: ['baz', 'bat'],\n baz: 'alex',\n bat: 'borf'\n }));\n\n _this5.indexProperties = indexProperties;\n return _this5;\n }\n\n var _proto2 = _class2.prototype;\n\n _proto2.shouldNotBeActive = function shouldNotBeActive(assert, selector) {\n this.checkActive(assert, selector, false);\n };\n\n _proto2.shouldBeActive = function shouldBeActive(assert, selector) {\n this.checkActive(assert, selector, true);\n };\n\n _proto2.getController = function getController(name) {\n return this.applicationInstance.lookup(\"controller:\" + name);\n };\n\n _proto2.checkActive = function checkActive(assert, selector, active) {\n var classList = this.$(selector)[0].className;\n assert.equal(classList.indexOf('active') > -1, active, selector + ' active should be ' + active.toString());\n };\n\n _proto2[\"@test doesn't update controller QP properties on current route when invoked\"] = function (assert) {\n var _this6 = this;\n\n this.addTemplate('index', \"{{#link-to 'index' id='the-link'}}Index{{/link-to}}\");\n return this.visit('/').then(function () {\n _this6.click('#the-link');\n\n var indexController = _this6.getController('index');\n\n assert.deepEqual(indexController.getProperties('foo', 'bar'), _this6.indexProperties, 'controller QP properties do not update');\n });\n };\n\n _proto2[\"@test doesn't update controller QP properties on current route when invoked (empty query-params obj)\"] = function (assert) {\n var _this7 = this;\n\n this.addTemplate('index', \"{{#link-to 'index' (query-params) id='the-link'}}Index{{/link-to}}\");\n return this.visit('/').then(function () {\n _this7.click('#the-link');\n\n var indexController = _this7.getController('index');\n\n assert.deepEqual(indexController.getProperties('foo', 'bar'), _this7.indexProperties, 'controller QP properties do not update');\n });\n };\n\n _proto2[\"@test doesn't update controller QP properties on current route when invoked (empty query-params obj, inferred route)\"] = function (assert) {\n var _this8 = this;\n\n this.addTemplate('index', \"{{#link-to (query-params) id='the-link'}}Index{{/link-to}}\");\n return this.visit('/').then(function () {\n _this8.click('#the-link');\n\n var indexController = _this8.getController('index');\n\n assert.deepEqual(indexController.getProperties('foo', 'bar'), _this8.indexProperties, 'controller QP properties do not update');\n });\n };\n\n _proto2['@test updates controller QP properties on current route when invoked'] = function testUpdatesControllerQPPropertiesOnCurrentRouteWhenInvoked(assert) {\n var _this9 = this;\n\n this.addTemplate('index', \"\\n {{#link-to 'index' (query-params foo='456') id=\\\"the-link\\\"}}\\n Index\\n {{/link-to}}\\n \");\n return this.visit('/').then(function () {\n _this9.click('#the-link');\n\n var indexController = _this9.getController('index');\n\n assert.deepEqual(indexController.getProperties('foo', 'bar'), {\n foo: '456',\n bar: 'abc'\n }, 'controller QP properties updated');\n });\n };\n\n _proto2['@test updates controller QP properties on current route when invoked (inferred route)'] = function testUpdatesControllerQPPropertiesOnCurrentRouteWhenInvokedInferredRoute(assert) {\n var _this10 = this;\n\n this.addTemplate('index', \"\\n {{#link-to (query-params foo='456') id=\\\"the-link\\\"}}\\n Index\\n {{/link-to}}\\n \");\n return this.visit('/').then(function () {\n _this10.click('#the-link');\n\n var indexController = _this10.getController('index');\n\n assert.deepEqual(indexController.getProperties('foo', 'bar'), {\n foo: '456',\n bar: 'abc'\n }, 'controller QP properties updated');\n });\n };\n\n _proto2['@test updates controller QP properties on other route after transitioning to that route'] = function testUpdatesControllerQPPropertiesOnOtherRouteAfterTransitioningToThatRoute(assert) {\n var _this11 = this;\n\n this.router.map(function () {\n this.route('about');\n });\n this.addTemplate('index', \"\\n {{#link-to 'about' (query-params baz='lol') id='the-link'}}\\n About\\n {{/link-to}}\\n \");\n return this.visit('/').then(function () {\n var theLink = _this11.$('#the-link');\n\n assert.equal(theLink.attr('href'), '/about?baz=lol');\n (0, _internalTestHelpers.runTask)(function () {\n return _this11.click('#the-link');\n });\n\n var aboutController = _this11.getController('about');\n\n assert.deepEqual(aboutController.getProperties('baz', 'bat'), {\n baz: 'lol',\n bat: 'borf'\n }, 'about controller QP properties updated');\n });\n };\n\n _proto2['@test supplied QP properties can be bound'] = function testSuppliedQPPropertiesCanBeBound(assert) {\n var _this12 = this;\n\n this.addTemplate('index', \"{{#link-to (query-params foo=boundThing) id='the-link'}}Index{{/link-to}}\");\n return this.visit('/').then(function () {\n var indexController = _this12.getController('index');\n\n var theLink = _this12.$('#the-link');\n\n assert.equal(theLink.attr('href'), '/?foo=OMG');\n (0, _internalTestHelpers.runTask)(function () {\n return indexController.set('boundThing', 'ASL');\n });\n assert.equal(theLink.attr('href'), '/?foo=ASL');\n });\n };\n\n _proto2['@test supplied QP properties can be bound (booleans)'] = function testSuppliedQPPropertiesCanBeBoundBooleans(assert) {\n var _this13 = this;\n\n this.addTemplate('index', \"\\n {{#link-to (query-params abool=boundThing) id='the-link'}}\\n Index\\n {{/link-to}}\\n \");\n return this.visit('/').then(function () {\n var indexController = _this13.getController('index');\n\n var theLink = _this13.$('#the-link');\n\n assert.equal(theLink.attr('href'), '/?abool=OMG');\n (0, _internalTestHelpers.runTask)(function () {\n return indexController.set('boundThing', false);\n });\n assert.equal(theLink.attr('href'), '/?abool=false');\n\n _this13.click('#the-link');\n\n assert.deepEqual(indexController.getProperties('foo', 'bar', 'abool'), {\n foo: '123',\n bar: 'abc',\n abool: false\n }, 'bound bool QP properties update');\n });\n };\n\n _proto2['@test href updates when unsupplied controller QP props change'] = function testHrefUpdatesWhenUnsuppliedControllerQPPropsChange(assert) {\n var _this14 = this;\n\n this.addTemplate('index', \"{{#link-to (query-params foo='lol') id='the-link'}}Index{{/link-to}}\");\n return this.visit('/').then(function () {\n var indexController = _this14.getController('index');\n\n var theLink = _this14.$('#the-link');\n\n assert.equal(theLink.attr('href'), '/?foo=lol');\n (0, _internalTestHelpers.runTask)(function () {\n return indexController.set('bar', 'BORF');\n });\n assert.equal(theLink.attr('href'), '/?bar=BORF&foo=lol');\n (0, _internalTestHelpers.runTask)(function () {\n return indexController.set('foo', 'YEAH');\n });\n assert.equal(theLink.attr('href'), '/?bar=BORF&foo=lol');\n });\n };\n\n _proto2['@test The {{link-to}} with only query params always transitions to the current route with the query params applied'] = function testTheLinkToWithOnlyQueryParamsAlwaysTransitionsToTheCurrentRouteWithTheQueryParamsApplied(assert) {\n var _this15 = this; // Test harness for bug #12033\n\n\n this.addTemplate('cars', \"\\n {{#link-to 'cars.create' id='create-link'}}Create new car{{/link-to}}\\n {{#link-to (query-params page='2') id='page2-link'}}Page 2{{/link-to}}\\n {{outlet}}\\n \");\n this.addTemplate('cars.create', \"{{#link-to 'cars' id='close-link'}}Close create form{{/link-to}}\");\n this.router.map(function () {\n this.route('cars', function () {\n this.route('create');\n });\n });\n this.add('controller:cars', _controller.default.extend({\n queryParams: ['page'],\n page: 1\n }));\n return this.visit('/cars/create').then(function () {\n var router = _this15.appRouter;\n\n var carsController = _this15.getController('cars');\n\n assert.equal(router.currentRouteName, 'cars.create');\n (0, _internalTestHelpers.runTask)(function () {\n return _this15.click('#close-link');\n });\n assert.equal(router.currentRouteName, 'cars.index');\n assert.equal(router.get('url'), '/cars');\n assert.equal(carsController.get('page'), 1, 'The page query-param is 1');\n (0, _internalTestHelpers.runTask)(function () {\n return _this15.click('#page2-link');\n });\n assert.equal(router.currentRouteName, 'cars.index', 'The active route is still cars');\n assert.equal(router.get('url'), '/cars?page=2', 'The url has been updated');\n assert.equal(carsController.get('page'), 2, 'The query params have been updated');\n });\n };\n\n _proto2['@test the {{link-to}} applies activeClass when query params are not changed'] = function testTheLinkToAppliesActiveClassWhenQueryParamsAreNotChanged(assert) {\n var _this16 = this;\n\n this.addTemplate('index', \"\\n {{#link-to (query-params foo='cat') id='cat-link'}}Index{{/link-to}}\\n {{#link-to (query-params foo='dog') id='dog-link'}}Index{{/link-to}}\\n {{#link-to 'index' id='change-nothing'}}Index{{/link-to}}\\n \");\n this.addTemplate('search', \"\\n {{#link-to (query-params search='same') id='same-search'}}Index{{/link-to}}\\n {{#link-to (query-params search='change') id='change-search'}}Index{{/link-to}}\\n {{#link-to (query-params search='same' archive=true) id='same-search-add-archive'}}Index{{/link-to}}\\n {{#link-to (query-params archive=true) id='only-add-archive'}}Index{{/link-to}}\\n {{#link-to (query-params search='same' archive=true) id='both-same'}}Index{{/link-to}}\\n {{#link-to (query-params search='different' archive=true) id='change-one'}}Index{{/link-to}}\\n {{#link-to (query-params search='different' archive=false) id='remove-one'}}Index{{/link-to}}\\n {{outlet}}\\n \");\n this.addTemplate('search.results', \"\\n {{#link-to (query-params sort='title') id='same-sort-child-only'}}Index{{/link-to}}\\n {{#link-to (query-params search='same') id='same-search-parent-only'}}Index{{/link-to}}\\n {{#link-to (query-params search='change') id='change-search-parent-only'}}Index{{/link-to}}\\n {{#link-to (query-params search='same' sort='title') id='same-search-same-sort-child-and-parent'}}Index{{/link-to}}\\n {{#link-to (query-params search='same' sort='author') id='same-search-different-sort-child-and-parent'}}Index{{/link-to}}\\n {{#link-to (query-params search='change' sort='title') id='change-search-same-sort-child-and-parent'}}Index{{/link-to}}\\n {{#link-to (query-params foo='dog') id='dog-link'}}Index{{/link-to}}\\n \");\n this.router.map(function () {\n this.route('search', function () {\n this.route('results');\n });\n });\n this.add('controller:search', _controller.default.extend({\n queryParams: ['search', 'archive'],\n search: '',\n archive: false\n }));\n this.add('controller:search.results', _controller.default.extend({\n queryParams: ['sort', 'showDetails'],\n sort: 'title',\n showDetails: true\n }));\n return this.visit('/').then(function () {\n _this16.shouldNotBeActive(assert, '#cat-link');\n\n _this16.shouldNotBeActive(assert, '#dog-link');\n\n return _this16.visit('/?foo=cat');\n }).then(function () {\n _this16.shouldBeActive(assert, '#cat-link');\n\n _this16.shouldNotBeActive(assert, '#dog-link');\n\n return _this16.visit('/?foo=dog');\n }).then(function () {\n _this16.shouldBeActive(assert, '#dog-link');\n\n _this16.shouldNotBeActive(assert, '#cat-link');\n\n _this16.shouldBeActive(assert, '#change-nothing');\n\n return _this16.visit('/search?search=same');\n }).then(function () {\n _this16.shouldBeActive(assert, '#same-search');\n\n _this16.shouldNotBeActive(assert, '#change-search');\n\n _this16.shouldNotBeActive(assert, '#same-search-add-archive');\n\n _this16.shouldNotBeActive(assert, '#only-add-archive');\n\n _this16.shouldNotBeActive(assert, '#remove-one');\n\n return _this16.visit('/search?search=same&archive=true');\n }).then(function () {\n _this16.shouldBeActive(assert, '#both-same');\n\n _this16.shouldNotBeActive(assert, '#change-one');\n\n return _this16.visit('/search/results?search=same&sort=title&showDetails=true');\n }).then(function () {\n _this16.shouldBeActive(assert, '#same-sort-child-only');\n\n _this16.shouldBeActive(assert, '#same-search-parent-only');\n\n _this16.shouldNotBeActive(assert, '#change-search-parent-only');\n\n _this16.shouldBeActive(assert, '#same-search-same-sort-child-and-parent');\n\n _this16.shouldNotBeActive(assert, '#same-search-different-sort-child-and-parent');\n\n _this16.shouldNotBeActive(assert, '#change-search-same-sort-child-and-parent');\n });\n };\n\n _proto2['@test the {{link-to}} applies active class when query-param is a number'] = function testTheLinkToAppliesActiveClassWhenQueryParamIsANumber(assert) {\n var _this17 = this;\n\n this.addTemplate('index', \"\\n {{#link-to (query-params page=pageNumber) id='page-link'}}\\n Index\\n {{/link-to}}\\n \");\n this.add('controller:index', _controller.default.extend({\n queryParams: ['page'],\n page: 1,\n pageNumber: 5\n }));\n return this.visit('/').then(function () {\n _this17.shouldNotBeActive(assert, '#page-link');\n\n return _this17.visit('/?page=5');\n }).then(function () {\n _this17.shouldBeActive(assert, '#page-link');\n });\n };\n\n _proto2['@test the {{link-to}} applies active class when query-param is an array'] = function testTheLinkToAppliesActiveClassWhenQueryParamIsAnArray(assert) {\n var _this18 = this;\n\n this.addTemplate('index', \"\\n {{#link-to (query-params pages=pagesArray) id='array-link'}}Index{{/link-to}}\\n {{#link-to (query-params pages=biggerArray) id='bigger-link'}}Index{{/link-to}}\\n {{#link-to (query-params pages=emptyArray) id='empty-link'}}Index{{/link-to}}\\n \");\n this.add('controller:index', _controller.default.extend({\n queryParams: ['pages'],\n pages: [],\n pagesArray: [1, 2],\n biggerArray: [1, 2, 3],\n emptyArray: []\n }));\n return this.visit('/').then(function () {\n _this18.shouldNotBeActive(assert, '#array-link');\n\n return _this18.visit('/?pages=%5B1%2C2%5D');\n }).then(function () {\n _this18.shouldBeActive(assert, '#array-link');\n\n _this18.shouldNotBeActive(assert, '#bigger-link');\n\n _this18.shouldNotBeActive(assert, '#empty-link');\n\n return _this18.visit('/?pages=%5B2%2C1%5D');\n }).then(function () {\n _this18.shouldNotBeActive(assert, '#array-link');\n\n _this18.shouldNotBeActive(assert, '#bigger-link');\n\n _this18.shouldNotBeActive(assert, '#empty-link');\n\n return _this18.visit('/?pages=%5B1%2C2%2C3%5D');\n }).then(function () {\n _this18.shouldBeActive(assert, '#bigger-link');\n\n _this18.shouldNotBeActive(assert, '#array-link');\n\n _this18.shouldNotBeActive(assert, '#empty-link');\n });\n };\n\n _proto2['@test the {{link-to}} component applies active class to the parent route'] = function testTheLinkToComponentAppliesActiveClassToTheParentRoute(assert) {\n var _this19 = this;\n\n this.router.map(function () {\n this.route('parent', function () {\n this.route('child');\n });\n });\n this.addTemplate('application', \"\\n {{#link-to 'parent' id='parent-link'}}Parent{{/link-to}}\\n {{#link-to 'parent.child' id='parent-child-link'}}Child{{/link-to}}\\n {{#link-to 'parent' (query-params foo=cat) id='parent-link-qp'}}Parent{{/link-to}}\\n {{outlet}}\\n \");\n this.add('controller:parent.child', _controller.default.extend({\n queryParams: ['foo'],\n foo: 'bar'\n }));\n return this.visit('/').then(function () {\n _this19.shouldNotBeActive(assert, '#parent-link');\n\n _this19.shouldNotBeActive(assert, '#parent-child-link');\n\n _this19.shouldNotBeActive(assert, '#parent-link-qp');\n\n return _this19.visit('/parent/child?foo=dog');\n }).then(function () {\n _this19.shouldBeActive(assert, '#parent-link');\n\n _this19.shouldNotBeActive(assert, '#parent-link-qp');\n });\n };\n\n _proto2['@test The {{link-to}} component disregards query-params in activeness computation when current-when is specified'] = function testTheLinkToComponentDisregardsQueryParamsInActivenessComputationWhenCurrentWhenIsSpecified(assert) {\n var _this20 = this;\n\n var appLink;\n this.router.map(function () {\n this.route('parent');\n });\n this.addTemplate('application', \"\\n {{#link-to 'parent' (query-params page=1) current-when='parent' id='app-link'}}\\n Parent\\n {{/link-to}}\\n {{outlet}}\\n \");\n this.addTemplate('parent', \"\\n {{#link-to 'parent' (query-params page=1) current-when='parent' id='parent-link'}}\\n Parent\\n {{/link-to}}\\n {{outlet}}\\n \");\n this.add('controller:parent', _controller.default.extend({\n queryParams: ['page'],\n page: 1\n }));\n return this.visit('/').then(function () {\n appLink = _this20.$('#app-link');\n assert.equal(appLink.attr('href'), '/parent');\n\n _this20.shouldNotBeActive(assert, '#app-link');\n\n return _this20.visit('/parent?page=2');\n }).then(function () {\n appLink = _this20.$('#app-link');\n var router = _this20.appRouter;\n assert.equal(appLink.attr('href'), '/parent');\n\n _this20.shouldBeActive(assert, '#app-link');\n\n assert.equal(_this20.$('#parent-link').attr('href'), '/parent');\n\n _this20.shouldBeActive(assert, '#parent-link');\n\n var parentController = _this20.getController('parent');\n\n assert.equal(parentController.get('page'), 2);\n (0, _internalTestHelpers.runTask)(function () {\n return parentController.set('page', 3);\n });\n assert.equal(router.get('location.path'), '/parent?page=3');\n\n _this20.shouldBeActive(assert, '#app-link');\n\n _this20.shouldBeActive(assert, '#parent-link');\n\n (0, _internalTestHelpers.runTask)(function () {\n return _this20.click('#app-link');\n });\n assert.equal(router.get('location.path'), '/parent');\n });\n };\n\n _proto2['@test {{link-to}} default query params while in active transition regression test'] = function testLinkToDefaultQueryParamsWhileInActiveTransitionRegressionTest(assert) {\n var _this21 = this;\n\n this.router.map(function () {\n this.route('foos');\n this.route('bars');\n });\n\n var foos = _runtime.RSVP.defer();\n\n var bars = _runtime.RSVP.defer();\n\n this.addTemplate('application', \"\\n {{link-to 'Foos' 'foos' id='foos-link'}}\\n {{link-to 'Baz Foos' 'foos' (query-params baz=true) id='baz-foos-link'}}\\n {{link-to 'Quux Bars' 'bars' (query-params quux=true) id='bars-link'}}\\n \");\n this.add('controller:foos', _controller.default.extend({\n queryParams: ['status'],\n baz: false\n }));\n this.add('route:foos', _routing.Route.extend({\n model: function () {\n return foos.promise;\n }\n }));\n this.add('controller:bars', _controller.default.extend({\n queryParams: ['status'],\n quux: false\n }));\n this.add('route:bars', _routing.Route.extend({\n model: function () {\n return bars.promise;\n }\n }));\n return this.visit('/').then(function () {\n var router = _this21.appRouter;\n\n var foosLink = _this21.$('#foos-link');\n\n var barsLink = _this21.$('#bars-link');\n\n var bazLink = _this21.$('#baz-foos-link');\n\n assert.equal(foosLink.attr('href'), '/foos');\n assert.equal(bazLink.attr('href'), '/foos?baz=true');\n assert.equal(barsLink.attr('href'), '/bars?quux=true');\n assert.equal(router.get('location.path'), '/');\n\n _this21.shouldNotBeActive(assert, '#foos-link');\n\n _this21.shouldNotBeActive(assert, '#baz-foos-link');\n\n _this21.shouldNotBeActive(assert, '#bars-link');\n\n (0, _internalTestHelpers.runTask)(function () {\n return barsLink.click();\n });\n\n _this21.shouldNotBeActive(assert, '#bars-link');\n\n (0, _internalTestHelpers.runTask)(function () {\n return foosLink.click();\n });\n\n _this21.shouldNotBeActive(assert, '#foos-link');\n\n (0, _internalTestHelpers.runTask)(function () {\n return foos.resolve();\n });\n assert.equal(router.get('location.path'), '/foos');\n\n _this21.shouldBeActive(assert, '#foos-link');\n });\n };\n\n _proto2['@test [GH#17869] it does not cause shadowing assertion with `hash` local variable'] = function testGH17869ItDoesNotCauseShadowingAssertionWithHashLocalVariable() {\n var _this22 = this;\n\n this.router.map(function () {\n this.route('post', {\n path: '/post/:id'\n });\n });\n this.add('controller:post', _controller.default.extend({\n queryParams: ['showComments'],\n showComments: true\n }));\n this.addTemplate('index', \"\\n {{#let (hash id=\\\"1\\\" title=\\\"Hello World!\\\" body=\\\"Lorem ipsum dolor sit amet...\\\") as |hash|}}\\n {{#link-to \\\"post\\\" hash (query-params showComments=false)}}View Post{{/link-to}}\\n {{/let}}\\n \");\n return this.visit('/').then(function () {\n _this22.assertComponentElement(_this22.element.firstElementChild, {\n tagName: 'a',\n attrs: {\n href: '/post/1?showComments=false',\n class: (0, _internalTestHelpers.classes)('ember-view')\n },\n content: 'View Post'\n });\n });\n };\n\n return _class2;\n }(_internalTestHelpers.ApplicationTestCase));\n});","enifed(\"@ember/-internals/glimmer/tests/integration/components/link-to/rendering-angle-test\", [\"ember-babel\", \"internal-test-helpers\", \"@ember/controller\", \"@ember/-internals/metal\", \"@ember/-internals/glimmer\"], function (_emberBabel, _internalTestHelpers, _controller, _metal, _glimmer) {\n \"use strict\";\n\n if (true\n /* EMBER_GLIMMER_ANGLE_BRACKET_BUILT_INS */\n ) {\n (0, _internalTestHelpers.moduleFor)(' component (rendering tests)',\n /*#__PURE__*/\n function (_ApplicationTestCase) {\n (0, _emberBabel.inheritsLoose)(_class, _ApplicationTestCase);\n\n function _class() {\n return _ApplicationTestCase.apply(this, arguments) || this;\n }\n\n var _proto = _class.prototype;\n\n _proto[\"@test throws a useful error if you invoke it wrong\"] = function (assert) {\n var _this = this;\n\n assert.expect(1);\n this.addTemplate('application', \"Index\");\n expectAssertion(function () {\n _this.visit('/');\n }, /You must provide at least one of the `@route`, `@model`, `@models` or `@query` argument to ``/);\n };\n\n _proto['@test should be able to be inserted in DOM when the router is not present'] = function testShouldBeAbleToBeInsertedInDOMWhenTheRouterIsNotPresent() {\n var _this2 = this;\n\n this.addTemplate('application', \"Go to Index\");\n return this.visit('/').then(function () {\n _this2.assertText('Go to Index');\n });\n };\n\n _proto['@test re-renders when title changes'] = function testReRendersWhenTitleChanges() {\n var _this3 = this;\n\n var controller;\n this.addTemplate('application', \"{{title}}\");\n this.add('controller:application', _controller.default.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n controller = this;\n },\n title: 'foo'\n }));\n return this.visit('/').then(function () {\n _this3.assertText('foo');\n\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(controller, 'title', 'bar');\n });\n\n _this3.assertText('bar');\n });\n };\n\n _proto['@test re-computes active class when params change'] = function testReComputesActiveClassWhenParamsChange(assert) {\n var _this4 = this;\n\n var controller;\n this.addTemplate('application', 'foo');\n this.add('controller:application', _controller.default.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n controller = this;\n },\n routeName: 'index'\n }));\n this.router.map(function () {\n this.route('bar', {\n path: '/bar'\n });\n });\n return this.visit('/bar').then(function () {\n assert.equal(_this4.firstChild.classList.contains('active'), false);\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(controller, 'routeName', 'bar');\n });\n assert.equal(_this4.firstChild.classList.contains('active'), true);\n });\n };\n\n _proto['@test able to safely extend the built-in component and use the normal path'] = function testAbleToSafelyExtendTheBuiltInComponentAndUseTheNormalPath() {\n var _this5 = this;\n\n this.addComponent('custom-link-to', {\n ComponentClass: _glimmer.LinkComponent.extend()\n });\n this.addTemplate('application', \"{{title}}\");\n this.add('controller:application', _controller.default.extend({\n title: 'Hello'\n }));\n return this.visit('/').then(function () {\n _this5.assertText('Hello');\n });\n };\n\n return _class;\n }(_internalTestHelpers.ApplicationTestCase));\n (0, _internalTestHelpers.moduleFor)(' component (rendering tests, without router)',\n /*#__PURE__*/\n function (_RenderingTestCase) {\n (0, _emberBabel.inheritsLoose)(_class2, _RenderingTestCase);\n\n function _class2() {\n return _RenderingTestCase.apply(this, arguments) || this;\n }\n\n var _proto2 = _class2.prototype;\n\n _proto2['@test should be able to be inserted in DOM when the router is not present - block'] = function testShouldBeAbleToBeInsertedInDOMWhenTheRouterIsNotPresentBlock() {\n this.render(\"Go to Index\");\n this.assertText('Go to Index');\n };\n\n return _class2;\n }(_internalTestHelpers.RenderingTestCase));\n }\n});","enifed(\"@ember/-internals/glimmer/tests/integration/components/link-to/rendering-curly-test\", [\"ember-babel\", \"internal-test-helpers\", \"@ember/controller\", \"@ember/-internals/metal\", \"@ember/-internals/glimmer\"], function (_emberBabel, _internalTestHelpers, _controller, _metal, _glimmer) {\n \"use strict\";\n\n (0, _internalTestHelpers.moduleFor)('{{link-to}} component (rendering tests)',\n /*#__PURE__*/\n function (_ApplicationTestCase) {\n (0, _emberBabel.inheritsLoose)(_class, _ApplicationTestCase);\n\n function _class() {\n return _ApplicationTestCase.apply(this, arguments) || this;\n }\n\n var _proto = _class.prototype;\n\n _proto[\"@feature(ember-glimmer-angle-bracket-built-ins) throws a useful error if you invoke it wrong\"] = function (assert) {\n var _this = this;\n\n assert.expect(1);\n expectAssertion(function () {\n _this.addTemplate('application', \"{{#link-to id='the-link'}}Index{{/link-to}}\");\n }, /You must provide one or more parameters to the `{{link-to}}` component\\. \\('my-app\\/templates\\/application\\.hbs' @ L1:C0\\)/);\n };\n\n _proto[\"@feature(!ember-glimmer-angle-bracket-built-ins) throws a useful error if you invoke it wrong\"] = function (assert) {\n var _this2 = this;\n\n assert.expect(1);\n this.addTemplate('application', \"{{#link-to id='the-link'}}Index{{/link-to}}\");\n expectAssertion(function () {\n _this2.visit('/');\n }, /You must provide one or more parameters to the link-to component/);\n };\n\n _proto['@test should be able to be inserted in DOM when the router is not present'] = function testShouldBeAbleToBeInsertedInDOMWhenTheRouterIsNotPresent() {\n var _this3 = this;\n\n this.addTemplate('application', \"{{#link-to 'index'}}Go to Index{{/link-to}}\");\n return this.visit('/').then(function () {\n _this3.assertText('Go to Index');\n });\n };\n\n _proto['@test re-renders when title changes'] = function testReRendersWhenTitleChanges() {\n var _this4 = this;\n\n var controller;\n this.addTemplate('application', \"{{link-to title 'index'}}\");\n this.add('controller:application', _controller.default.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n controller = this;\n },\n title: 'foo'\n }));\n return this.visit('/').then(function () {\n _this4.assertText('foo');\n\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(controller, 'title', 'bar');\n });\n\n _this4.assertText('bar');\n });\n };\n\n _proto['@test re-computes active class when params change'] = function testReComputesActiveClassWhenParamsChange(assert) {\n var _this5 = this;\n\n var controller;\n this.addTemplate('application', '{{link-to \"foo\" routeName}}');\n this.add('controller:application', _controller.default.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n controller = this;\n },\n routeName: 'index'\n }));\n this.router.map(function () {\n this.route('bar', {\n path: '/bar'\n });\n });\n return this.visit('/bar').then(function () {\n assert.equal(_this5.firstChild.classList.contains('active'), false);\n (0, _internalTestHelpers.runTask)(function () {\n return (0, _metal.set)(controller, 'routeName', 'bar');\n });\n assert.equal(_this5.firstChild.classList.contains('active'), true);\n });\n };\n\n _proto['@test escaped inline form (double curlies) escapes link title'] = function testEscapedInlineFormDoubleCurliesEscapesLinkTitle() {\n var _this6 = this;\n\n this.addTemplate('application', \"{{link-to title 'index'}}\");\n this.add('controller:application', _controller.default.extend({\n title: 'blah'\n }));\n return this.visit('/').then(function () {\n _this6.assertText('blah');\n });\n };\n\n _proto['@test unescaped inline form (triple curlies) does not escape link title'] = function testUnescapedInlineFormTripleCurliesDoesNotEscapeLinkTitle(assert) {\n var _this7 = this;\n\n this.addTemplate('application', \"{{{link-to title 'index'}}}\");\n this.add('controller:application', _controller.default.extend({\n title: 'blah'\n }));\n return this.visit('/').then(function () {\n _this7.assertText('blah');\n\n assert.equal(_this7.$('b').length, 1);\n });\n };\n\n _proto['@test able to safely extend the built-in component and use the normal path'] = function testAbleToSafelyExtendTheBuiltInComponentAndUseTheNormalPath() {\n var _this8 = this;\n\n this.addComponent('custom-link-to', {\n ComponentClass: _glimmer.LinkComponent.extend()\n });\n this.addTemplate('application', \"{{#custom-link-to 'index'}}{{title}}{{/custom-link-to}}\");\n this.add('controller:application', _controller.default.extend({\n title: 'Hello'\n }));\n return this.visit('/').then(function () {\n _this8.assertText('Hello');\n });\n };\n\n _proto['@test [GH#13432] able to safely extend the built-in component and invoke it inline'] = function testGH13432AbleToSafelyExtendTheBuiltInComponentAndInvokeItInline() {\n var _this9 = this;\n\n this.addComponent('custom-link-to', {\n ComponentClass: _glimmer.LinkComponent.extend()\n });\n this.addTemplate('application', \"{{custom-link-to title 'index'}}\");\n this.add('controller:application', _controller.default.extend({\n title: 'Hello'\n }));\n return this.visit('/').then(function () {\n _this9.assertText('Hello');\n });\n };\n\n return _class;\n }(_internalTestHelpers.ApplicationTestCase));\n (0, _internalTestHelpers.moduleFor)('{{link-to}} component (rendering tests, without router)',\n /*#__PURE__*/\n function (_RenderingTestCase) {\n (0, _emberBabel.inheritsLoose)(_class2, _RenderingTestCase);\n\n function _class2() {\n return _RenderingTestCase.apply(this, arguments) || this;\n }\n\n var _proto2 = _class2.prototype;\n\n _proto2['@test should be able to be inserted in DOM when the router is not present - block'] = function testShouldBeAbleToBeInsertedInDOMWhenTheRouterIsNotPresentBlock() {\n this.render(\"{{#link-to 'index'}}Go to Index{{/link-to}}\");\n this.assertText('Go to Index');\n };\n\n _proto2['@test should be able to be inserted in DOM when the router is not present - inline'] = function testShouldBeAbleToBeInsertedInDOMWhenTheRouterIsNotPresentInline() {\n this.render(\"{{link-to 'Go to Index' 'index'}}\");\n this.assertText('Go to Index');\n };\n\n return _class2;\n }(_internalTestHelpers.RenderingTestCase));\n});","enifed(\"@ember/-internals/glimmer/tests/integration/components/link-to/routing-angle-test\", [\"ember-babel\", \"internal-test-helpers\", \"@ember/controller\", \"@ember/-internals/runtime\", \"@ember/-internals/metal\", \"@ember/instrumentation\", \"@ember/-internals/routing\"], function (_emberBabel, _internalTestHelpers, _controller, _runtime, _metal, _instrumentation, _routing) {\n \"use strict\";\n\n /* eslint-disable no-inner-declarations */\n // ^^^ remove after unflagging EMBER_GLIMMER_ANGLE_BRACKET_BUILT_INS\n if (true\n /* EMBER_GLIMMER_ANGLE_BRACKET_BUILT_INS */\n ) {\n // IE includes the host name\n function normalizeUrl(url) {\n return url.replace(/https?:\\/\\/[^\\/]+/, '');\n }\n\n function shouldNotBeActive(assert, element) {\n checkActive(assert, element, false);\n }\n\n function shouldBeActive(assert, element) {\n checkActive(assert, element, true);\n }\n\n function checkActive(assert, element, active) {\n var classList = element.attr('class');\n assert.equal(classList.indexOf('active') > -1, active, element + \" active should be \" + active);\n }\n\n (0, _internalTestHelpers.moduleFor)(' component (routing tests)',\n /*#__PURE__*/\n function (_ApplicationTestCase) {\n (0, _emberBabel.inheritsLoose)(_class, _ApplicationTestCase);\n\n function _class() {\n var _this;\n\n _this = _ApplicationTestCase.call(this) || this;\n\n _this.router.map(function () {\n this.route('about');\n });\n\n _this.addTemplate('index', \"\\n

Home

\\n About\\n Self\\n \");\n\n _this.addTemplate('about', \"\\n

About

\\n Home\\n Self\\n \");\n\n return _this;\n }\n\n var _proto = _class.prototype;\n\n _proto['@test The component navigates into the named route'] = function testTheLinkToComponentNavigatesIntoTheNamedRoute(assert) {\n var _this2 = this;\n\n return this.visit('/').then(function () {\n assert.equal(_this2.$('h3.home').length, 1, 'The home template was rendered');\n assert.equal(_this2.$('#self-link.active').length, 1, 'The self-link was rendered with active class');\n assert.equal(_this2.$('#about-link:not(.active)').length, 1, 'The other link was rendered without active class');\n return _this2.click('#about-link');\n }).then(function () {\n assert.equal(_this2.$('h3.about').length, 1, 'The about template was rendered');\n assert.equal(_this2.$('#self-link.active').length, 1, 'The self-link was rendered with active class');\n assert.equal(_this2.$('#home-link:not(.active)').length, 1, 'The other link was rendered without active class');\n });\n };\n\n _proto[\"@test the component doesn't add an href when the tagName isn't 'a'\"] = function (assert) {\n var _this3 = this;\n\n this.addTemplate('index', \"About\");\n return this.visit('/').then(function () {\n assert.equal(_this3.$('#about-link').attr('href'), undefined, 'there is no href attribute');\n });\n };\n\n _proto[\"@test the component applies a 'disabled' class when disabled\"] = function (assert) {\n var _this4 = this;\n\n this.addTemplate('index', \"\\n About\\n About\\n \");\n this.add('controller:index', _controller.default.extend({\n shouldDisable: true,\n dynamicDisabledWhen: 'shouldDisable'\n }));\n return this.visit('/').then(function () {\n assert.equal(_this4.$('#about-link-static.disabled').length, 1, 'The static link is disabled when its disabledWhen is true');\n assert.equal(_this4.$('#about-link-dynamic.disabled').length, 1, 'The dynamic link is disabled when its disabledWhen is true');\n\n var controller = _this4.applicationInstance.lookup('controller:index');\n\n (0, _internalTestHelpers.runTask)(function () {\n return controller.set('dynamicDisabledWhen', false);\n });\n assert.equal(_this4.$('#about-link-dynamic.disabled').length, 0, 'The dynamic link is re-enabled when its disabledWhen becomes false');\n });\n };\n\n _proto[\"@test the component doesn't apply a 'disabled' class if disabledWhen is not provided\"] = function (assert) {\n var _this5 = this;\n\n this.addTemplate('index', \"About\");\n return this.visit('/').then(function () {\n assert.ok(!_this5.$('#about-link').hasClass('disabled'), 'The link is not disabled if disabledWhen not provided');\n });\n };\n\n _proto[\"@test the component supports a custom disabledClass\"] = function (assert) {\n var _this6 = this;\n\n this.addTemplate('index', \"About\");\n return this.visit('/').then(function () {\n assert.equal(_this6.$('#about-link.do-not-want').length, 1, 'The link can apply a custom disabled class');\n });\n };\n\n _proto[\"@test the component supports a custom disabledClass set via bound param\"] = function (assert) {\n var _this7 = this;\n\n this.addTemplate('index', \"About\");\n this.add('controller:index', _controller.default.extend({\n disabledClass: 'do-not-want'\n }));\n return this.visit('/').then(function () {\n assert.equal(_this7.$('#about-link.do-not-want').length, 1, 'The link can apply a custom disabled class via bound param');\n });\n };\n\n _proto[\"@test the component does not respond to clicks when disabledWhen\"] = function (assert) {\n var _this8 = this;\n\n this.addTemplate('index', \"About\");\n return this.visit('/').then(function () {\n return _this8.click('#about-link');\n }).then(function () {\n assert.equal(_this8.$('h3.about').length, 0, 'Transitioning did not occur');\n });\n };\n\n _proto[\"@test the component does not respond to clicks when disabled\"] = function (assert) {\n var _this9 = this;\n\n this.addTemplate('index', \"About\");\n return this.visit('/').then(function () {\n return _this9.click('#about-link');\n }).then(function () {\n assert.equal(_this9.$('h3.about').length, 0, 'Transitioning did not occur');\n });\n };\n\n _proto[\"@test the component responds to clicks according to its disabledWhen bound param\"] = function (assert) {\n var _this10 = this;\n\n this.addTemplate('index', \"About\");\n this.add('controller:index', _controller.default.extend({\n disabledWhen: true\n }));\n return this.visit('/').then(function () {\n return _this10.click('#about-link');\n }).then(function () {\n assert.equal(_this10.$('h3.about').length, 0, 'Transitioning did not occur');\n\n var controller = _this10.applicationInstance.lookup('controller:index');\n\n controller.set('disabledWhen', false);\n return (0, _internalTestHelpers.runLoopSettled)();\n }).then(function () {\n return _this10.click('#about-link');\n }).then(function () {\n assert.equal(_this10.$('h3.about').length, 1, 'Transitioning did occur when disabledWhen became false');\n });\n };\n\n _proto[\"@test The component supports a custom activeClass\"] = function (assert) {\n var _this11 = this;\n\n this.addTemplate('index', \"\\n

Home

\\n About\\n Self\\n \");\n return this.visit('/').then(function () {\n assert.equal(_this11.$('h3.home').length, 1, 'The home template was rendered');\n assert.equal(_this11.$('#self-link.zomg-active').length, 1, 'The self-link was rendered with active class');\n assert.equal(_this11.$('#about-link:not(.active)').length, 1, 'The other link was rendered without active class');\n });\n };\n\n _proto[\"@test The component supports a custom activeClass from a bound param\"] = function (assert) {\n var _this12 = this;\n\n this.addTemplate('index', \"\\n

Home

\\n About\\n Self\\n \");\n this.add('controller:index', _controller.default.extend({\n activeClass: 'zomg-active'\n }));\n return this.visit('/').then(function () {\n assert.equal(_this12.$('h3.home').length, 1, 'The home template was rendered');\n assert.equal(_this12.$('#self-link.zomg-active').length, 1, 'The self-link was rendered with active class');\n assert.equal(_this12.$('#about-link:not(.active)').length, 1, 'The other link was rendered without active class');\n });\n } // See https://github.com/emberjs/ember.js/issues/17771\n ;\n\n _proto[\"@skip The component supports 'classNameBindings' with custom values [GH #11699]\"] = function (assert) {\n var _this13 = this;\n\n this.addTemplate('index', \"\\n

Home

\\n About\\n \");\n this.add('controller:index', _controller.default.extend({\n foo: false\n }));\n return this.visit('/').then(function () {\n assert.equal(_this13.$('#about-link.foo-is-false').length, 1, 'The about-link was rendered with the falsy class');\n\n var controller = _this13.applicationInstance.lookup('controller:index');\n\n (0, _internalTestHelpers.runTask)(function () {\n return controller.set('foo', true);\n });\n assert.equal(_this13.$('#about-link.foo-is-true').length, 1, 'The about-link was rendered with the truthy class after toggling the property');\n });\n };\n\n return _class;\n }(_internalTestHelpers.ApplicationTestCase));\n (0, _internalTestHelpers.moduleFor)(' component (routing tests - location hooks)',\n /*#__PURE__*/\n function (_ApplicationTestCase2) {\n (0, _emberBabel.inheritsLoose)(_class2, _ApplicationTestCase2);\n\n function _class2() {\n var _this14;\n\n _this14 = _ApplicationTestCase2.call(this) || this;\n _this14.updateCount = 0;\n _this14.replaceCount = 0;\n var testContext = (0, _emberBabel.assertThisInitialized)(_this14);\n\n _this14.add('location:none', _routing.NoneLocation.extend({\n setURL: function () {\n testContext.updateCount++;\n return this._super.apply(this, arguments);\n },\n replaceURL: function () {\n testContext.replaceCount++;\n return this._super.apply(this, arguments);\n }\n }));\n\n _this14.router.map(function () {\n this.route('about');\n });\n\n _this14.addTemplate('index', \"\\n

Home

\\n About\\n Self\\n \");\n\n _this14.addTemplate('about', \"\\n

About

\\n Home\\n Self\\n \");\n\n return _this14;\n }\n\n var _proto2 = _class2.prototype;\n\n _proto2.visit = function visit() {\n var _this15 = this;\n\n return _ApplicationTestCase2.prototype.visit.apply(this, arguments).then(function () {\n _this15.updateCountAfterVisit = _this15.updateCount;\n _this15.replaceCountAfterVisit = _this15.replaceCount;\n });\n };\n\n _proto2['@test The component supports URL replacement'] = function testTheLinkToComponentSupportsURLReplacement(assert) {\n var _this16 = this;\n\n this.addTemplate('index', \"\\n

Home

\\n About\\n \");\n return this.visit('/').then(function () {\n return _this16.click('#about-link');\n }).then(function () {\n assert.equal(_this16.updateCount, _this16.updateCountAfterVisit, 'setURL should not be called');\n assert.equal(_this16.replaceCount, _this16.replaceCountAfterVisit + 1, 'replaceURL should be called once');\n });\n };\n\n _proto2['@test The component supports URL replacement via replace=boundTruthyThing'] = function testTheLinkToComponentSupportsURLReplacementViaReplaceBoundTruthyThing(assert) {\n var _this17 = this;\n\n this.addTemplate('index', \"\\n

Home

\\n About\\n \");\n this.add('controller:index', _controller.default.extend({\n boundTruthyThing: true\n }));\n return this.visit('/').then(function () {\n return _this17.click('#about-link');\n }).then(function () {\n assert.equal(_this17.updateCount, _this17.updateCountAfterVisit, 'setURL should not be called');\n assert.equal(_this17.replaceCount, _this17.replaceCountAfterVisit + 1, 'replaceURL should be called once');\n });\n };\n\n _proto2['@test The component supports setting replace=boundFalseyThing'] = function testTheLinkToComponentSupportsSettingReplaceBoundFalseyThing(assert) {\n var _this18 = this;\n\n this.addTemplate('index', \"\\n

Home

\\n About\\n \");\n this.add('controller:index', _controller.default.extend({\n boundFalseyThing: false\n }));\n return this.visit('/').then(function () {\n return _this18.click('#about-link');\n }).then(function () {\n assert.equal(_this18.updateCount, _this18.updateCountAfterVisit + 1, 'setURL should be called');\n assert.equal(_this18.replaceCount, _this18.replaceCountAfterVisit, 'replaceURL should not be called');\n });\n };\n\n return _class2;\n }(_internalTestHelpers.ApplicationTestCase));\n\n if (false\n /* EMBER_IMPROVED_INSTRUMENTATION */\n ) {\n (0, _internalTestHelpers.moduleFor)('The component with EMBER_IMPROVED_INSTRUMENTATION',\n /*#__PURE__*/\n function (_ApplicationTestCase3) {\n (0, _emberBabel.inheritsLoose)(_class3, _ApplicationTestCase3);\n\n function _class3() {\n var _this19;\n\n _this19 = _ApplicationTestCase3.call(this) || this;\n\n _this19.router.map(function () {\n this.route('about');\n });\n\n _this19.addTemplate('index', \"\\n

Home

\\n About\\n Self\\n \");\n\n _this19.addTemplate('about', \"\\n

About

\\n Home\\n Self\\n \");\n\n return _this19;\n }\n\n var _proto3 = _class3.prototype;\n\n _proto3.beforeEach = function beforeEach() {\n return this.visit('/');\n };\n\n _proto3.afterEach = function afterEach() {\n (0, _instrumentation.reset)();\n return _ApplicationTestCase3.prototype.afterEach.call(this);\n };\n\n _proto3['@test The component fires an interaction event'] = function testTheLinkToComponentFiresAnInteractionEvent(assert) {\n assert.expect(2);\n (0, _instrumentation.subscribe)('interaction.link-to', {\n before: function () {\n assert.ok(true, 'instrumentation subscriber was called');\n },\n after: function () {\n assert.ok(true, 'instrumentation subscriber was called');\n }\n });\n return this.click('#about-link');\n };\n\n _proto3['@test The component interaction event includes the route name'] = function testTheLinkToComponentInteractionEventIncludesTheRouteName(assert) {\n assert.expect(2);\n (0, _instrumentation.subscribe)('interaction.link-to', {\n before: function (name, timestamp, _ref) {\n var routeName = _ref.routeName;\n assert.equal(routeName, 'about', 'instrumentation subscriber was passed route name');\n },\n after: function (name, timestamp, _ref2) {\n var routeName = _ref2.routeName;\n assert.equal(routeName, 'about', 'instrumentation subscriber was passed route name');\n }\n });\n return this.click('#about-link');\n };\n\n _proto3['@test The component interaction event includes the transition in the after hook'] = function testTheLinkToComponentInteractionEventIncludesTheTransitionInTheAfterHook(assert) {\n assert.expect(1);\n (0, _instrumentation.subscribe)('interaction.link-to', {\n before: function () {},\n after: function (name, timestamp, _ref3) {\n var transition = _ref3.transition;\n assert.equal(transition.targetName, 'about', 'instrumentation subscriber was passed route name');\n }\n });\n return this.click('#about-link');\n };\n\n return _class3;\n }(_internalTestHelpers.ApplicationTestCase));\n }\n\n (0, _internalTestHelpers.moduleFor)('The component - nested routes and link-to arguments',\n /*#__PURE__*/\n function (_ApplicationTestCase4) {\n (0, _emberBabel.inheritsLoose)(_class4, _ApplicationTestCase4);\n\n function _class4() {\n return _ApplicationTestCase4.apply(this, arguments) || this;\n }\n\n var _proto4 = _class4.prototype;\n\n _proto4['@test The component supports leaving off .index for nested routes'] = function testTheLinkToComponentSupportsLeavingOffIndexForNestedRoutes(assert) {\n var _this20 = this;\n\n this.router.map(function () {\n this.route('about', function () {\n this.route('item');\n });\n });\n this.addTemplate('about', \"

About

{{outlet}}\");\n this.addTemplate('about.index', \"
Index
\");\n this.addTemplate('about.item', \"
About
\");\n return this.visit('/about/item').then(function () {\n assert.equal(normalizeUrl(_this20.$('#item a').attr('href')), '/about');\n });\n };\n\n _proto4[\"@test The component supports custom, nested, current-when\"] = function (assert) {\n var _this21 = this;\n\n this.router.map(function () {\n this.route('index', {\n path: '/'\n }, function () {\n this.route('about');\n });\n this.route('item');\n });\n this.addTemplate('index', \"

Home

{{outlet}}\");\n this.addTemplate('index.about', \"ITEM\");\n return this.visit('/about').then(function () {\n assert.equal(_this21.$('#other-link.active').length, 1, 'The link is active since current-when is a parent route');\n });\n };\n\n _proto4[\"@test The component does not disregard current-when when it is given explicitly for a route\"] = function (assert) {\n var _this22 = this;\n\n this.router.map(function () {\n this.route('index', {\n path: '/'\n }, function () {\n this.route('about');\n });\n this.route('items', function () {\n this.route('item');\n });\n });\n this.addTemplate('index', \"

Home

{{outlet}}\");\n this.addTemplate('index.about', \"ITEM\");\n return this.visit('/about').then(function () {\n assert.equal(_this22.$('#other-link.active').length, 1, 'The link is active when current-when is given for explicitly for a route');\n });\n };\n\n _proto4['@test The component does not disregard current-when when it is set via a bound param'] = function testTheLinkToComponentDoesNotDisregardCurrentWhenWhenItIsSetViaABoundParam(assert) {\n var _this23 = this;\n\n this.router.map(function () {\n this.route('index', {\n path: '/'\n }, function () {\n this.route('about');\n });\n this.route('items', function () {\n this.route('item');\n });\n });\n this.add('controller:index.about', _controller.default.extend({\n currentWhen: 'index'\n }));\n this.addTemplate('index', \"

Home

{{outlet}}\");\n this.addTemplate('index.about', \"ITEM\");\n return this.visit('/about').then(function () {\n assert.equal(_this23.$('#other-link.active').length, 1, 'The link is active when current-when is given for explicitly for a route');\n });\n };\n\n _proto4['@test The component supports multiple current-when routes'] = function testTheLinkToComponentSupportsMultipleCurrentWhenRoutes(assert) {\n var _this24 = this;\n\n this.router.map(function () {\n this.route('index', {\n path: '/'\n }, function () {\n this.route('about');\n });\n this.route('item');\n this.route('foo');\n });\n this.addTemplate('index', \"

Home

{{outlet}}\");\n this.addTemplate('index.about', \"ITEM\");\n this.addTemplate('item', \"ITEM\");\n this.addTemplate('foo', \"ITEM\");\n return this.visit('/about').then(function () {\n assert.equal(_this24.$('#link1.active').length, 1, 'The link is active since current-when contains the parent route');\n return _this24.visit('/item');\n }).then(function () {\n assert.equal(_this24.$('#link2.active').length, 1, 'The link is active since you are on the active route');\n return _this24.visit('/foo');\n }).then(function () {\n assert.equal(_this24.$('#link3.active').length, 0, 'The link is not active since current-when does not contain the active route');\n });\n };\n\n _proto4['@test The component supports boolean values for current-when'] = function testTheLinkToComponentSupportsBooleanValuesForCurrentWhen(assert) {\n var _this25 = this;\n\n this.router.map(function () {\n this.route('index', {\n path: '/'\n }, function () {\n this.route('about');\n });\n this.route('item');\n });\n this.addTemplate('index.about', \"\\n ITEM\\n ITEM\\n \");\n this.add('controller:index.about', _controller.default.extend({\n isCurrent: false\n }));\n return this.visit('/about').then(function () {\n assert.ok(_this25.$('#about-link').hasClass('active'), 'The link is active since current-when is true');\n assert.notOk(_this25.$('#index-link').hasClass('active'), 'The link is not active since current-when is false');\n\n var controller = _this25.applicationInstance.lookup('controller:index.about');\n\n (0, _internalTestHelpers.runTask)(function () {\n return controller.set('isCurrent', true);\n });\n assert.ok(_this25.$('#index-link').hasClass('active'), 'The link is active since current-when is true');\n });\n };\n\n _proto4['@test The component defaults to bubbling'] = function testTheLinkToComponentDefaultsToBubbling(assert) {\n var _this26 = this;\n\n this.addTemplate('about', \"\\n
\\n About\\n
\\n {{outlet}}\\n \");\n this.addTemplate('about.contact', \"

Contact

\");\n this.router.map(function () {\n this.route('about', function () {\n this.route('contact');\n });\n });\n var hidden = 0;\n this.add('route:about', _routing.Route.extend({\n actions: {\n hide: function () {\n hidden++;\n }\n }\n }));\n return this.visit('/about').then(function () {\n return _this26.click('#about-contact');\n }).then(function () {\n assert.equal(_this26.$('#contact').text(), 'Contact', 'precond - the link worked');\n assert.equal(hidden, 1, 'The link bubbles');\n });\n };\n\n _proto4[\"@test The component supports bubbles=false\"] = function (assert) {\n var _this27 = this;\n\n this.addTemplate('about', \"\\n
\\n \\n About\\n \\n
\\n {{outlet}}\\n \");\n this.addTemplate('about.contact', \"

Contact

\");\n this.router.map(function () {\n this.route('about', function () {\n this.route('contact');\n });\n });\n var hidden = 0;\n this.add('route:about', _routing.Route.extend({\n actions: {\n hide: function () {\n hidden++;\n }\n }\n }));\n return this.visit('/about').then(function () {\n return _this27.click('#about-contact');\n }).then(function () {\n assert.equal(_this27.$('#contact').text(), 'Contact', 'precond - the link worked');\n assert.equal(hidden, 0, \"The link didn't bubble\");\n });\n };\n\n _proto4[\"@test The component supports bubbles=boundFalseyThing\"] = function (assert) {\n var _this28 = this;\n\n this.addTemplate('about', \"\\n
\\n \\n About\\n \\n
\\n {{outlet}}\\n \");\n this.addTemplate('about.contact', \"

Contact

\");\n this.add('controller:about', _controller.default.extend({\n boundFalseyThing: false\n }));\n this.router.map(function () {\n this.route('about', function () {\n this.route('contact');\n });\n });\n var hidden = 0;\n this.add('route:about', _routing.Route.extend({\n actions: {\n hide: function () {\n hidden++;\n }\n }\n }));\n return this.visit('/about').then(function () {\n return _this28.click('#about-contact');\n }).then(function () {\n assert.equal(_this28.$('#contact').text(), 'Contact', 'precond - the link worked');\n assert.equal(hidden, 0, \"The link didn't bubble\");\n });\n };\n\n _proto4[\"@test The component moves into the named route with context\"] = function (assert) {\n var _this29 = this;\n\n this.router.map(function () {\n this.route('about');\n this.route('item', {\n path: '/item/:id'\n });\n });\n this.addTemplate('about', \"\\n

List

\\n
    \\n {{#each model as |person|}}\\n
  • \\n \\n {{person.name}}\\n \\n
  • \\n {{/each}}\\n
\\n Home\\n \");\n this.addTemplate('item', \"\\n

Item

\\n

{{model.name}}

\\n Home\\n \");\n this.addTemplate('index', \"\\n

Home

\\n About\\n \");\n this.add('route:about', _routing.Route.extend({\n model: function () {\n return [{\n id: 'yehuda',\n name: 'Yehuda Katz'\n }, {\n id: 'tom',\n name: 'Tom Dale'\n }, {\n id: 'erik',\n name: 'Erik Brynroflsson'\n }];\n }\n }));\n return this.visit('/about').then(function () {\n assert.equal(_this29.$('h3.list').length, 1, 'The home template was rendered');\n assert.equal(normalizeUrl(_this29.$('#home-link').attr('href')), '/', 'The home link points back at /');\n return _this29.click('#yehuda');\n }).then(function () {\n assert.equal(_this29.$('h3.item').length, 1, 'The item template was rendered');\n assert.equal(_this29.$('p').text(), 'Yehuda Katz', 'The name is correct');\n return _this29.click('#home-link');\n }).then(function () {\n return _this29.click('#about-link');\n }).then(function () {\n assert.equal(normalizeUrl(_this29.$('li a#yehuda').attr('href')), '/item/yehuda');\n assert.equal(normalizeUrl(_this29.$('li a#tom').attr('href')), '/item/tom');\n assert.equal(normalizeUrl(_this29.$('li a#erik').attr('href')), '/item/erik');\n return _this29.click('#erik');\n }).then(function () {\n assert.equal(_this29.$('h3.item').length, 1, 'The item template was rendered');\n assert.equal(_this29.$('p').text(), 'Erik Brynroflsson', 'The name is correct');\n });\n };\n\n _proto4[\"@test The component binds some anchor html tag common attributes\"] = function (assert) {\n var _this30 = this;\n\n this.addTemplate('index', \"\\n

Home

\\n \\n Self\\n \\n \");\n return this.visit('/').then(function () {\n var link = _this30.$('#self-link');\n\n assert.equal(link.attr('title'), 'title-attr', 'The self-link contains title attribute');\n assert.equal(link.attr('rel'), 'rel-attr', 'The self-link contains rel attribute');\n assert.equal(link.attr('tabindex'), '-1', 'The self-link contains tabindex attribute');\n });\n };\n\n _proto4[\"@test The component supports 'target' attribute\"] = function (assert) {\n var _this31 = this;\n\n this.addTemplate('index', \"\\n

Home

\\n Self\\n \");\n return this.visit('/').then(function () {\n var link = _this31.$('#self-link');\n\n assert.equal(link.attr('target'), '_blank', 'The self-link contains `target` attribute');\n });\n };\n\n _proto4[\"@test The component supports 'target' attribute specified as a bound param\"] = function (assert) {\n var _this32 = this;\n\n this.addTemplate('index', \"\\n

Home

\\n Self\\n \");\n this.add('controller:index', _controller.default.extend({\n boundLinkTarget: '_blank'\n }));\n return this.visit('/').then(function () {\n var link = _this32.$('#self-link');\n\n assert.equal(link.attr('target'), '_blank', 'The self-link contains `target` attribute');\n });\n };\n\n _proto4[\"@test the component calls preventDefault\"] = function (assert) {\n var _this33 = this;\n\n this.router.map(function () {\n this.route('about');\n });\n this.addTemplate('index', \"About\");\n return this.visit('/').then(function () {\n assertNav({\n prevented: true\n }, function () {\n return _this33.$('#about-link').click();\n }, assert);\n });\n };\n\n _proto4[\"@test the component does not call preventDefault if '@preventDefault={{false}}' is passed as an option\"] = function (assert) {\n var _this34 = this;\n\n this.router.map(function () {\n this.route('about');\n });\n this.addTemplate('index', \"About\");\n return this.visit('/').then(function () {\n assertNav({\n prevented: false\n }, function () {\n return _this34.$('#about-link').trigger('click');\n }, assert);\n });\n };\n\n _proto4[\"@test the component does not call preventDefault if '@preventDefault={{boundFalseyThing}}' is passed as an option\"] = function (assert) {\n var _this35 = this;\n\n this.router.map(function () {\n this.route('about');\n });\n this.addTemplate('index', \"About\");\n this.add('controller:index', _controller.default.extend({\n boundFalseyThing: false\n }));\n return this.visit('/').then(function () {\n assertNav({\n prevented: false\n }, function () {\n return _this35.$('#about-link').trigger('click');\n }, assert);\n });\n };\n\n _proto4[\"@test The component does not call preventDefault if 'target' attribute is provided\"] = function (assert) {\n var _this36 = this;\n\n this.addTemplate('index', \"\\n

Home

\\n Self\\n \");\n return this.visit('/').then(function () {\n assertNav({\n prevented: false\n }, function () {\n return _this36.$('#self-link').click();\n }, assert);\n });\n };\n\n _proto4[\"@test The component should preventDefault when 'target = _self'\"] = function (assert) {\n var _this37 = this;\n\n this.addTemplate('index', \"\\n

Home

\\n Self\\n \");\n return this.visit('/').then(function () {\n assertNav({\n prevented: true\n }, function () {\n return _this37.$('#self-link').click();\n }, assert);\n });\n };\n\n _proto4[\"@test The component should not transition if target is not equal to _self or empty\"] = function (assert) {\n var _this38 = this;\n\n this.addTemplate('index', \"\\n \\n About\\n \\n \");\n this.router.map(function () {\n this.route('about');\n });\n return this.visit('/').then(function () {\n return _this38.click('#about-link');\n }).then(function () {\n expectDeprecation(function () {\n var currentRouteName = _this38.applicationInstance.lookup('controller:application').get('currentRouteName');\n\n assert.notEqual(currentRouteName, 'about', 'link-to should not transition if target is not equal to _self or empty');\n }, 'Accessing `currentRouteName` on `controller:application` is deprecated, use the `currentRouteName` property on `service:router` instead.');\n });\n };\n\n _proto4[\"@test The component accepts string/numeric arguments\"] = function (assert) {\n var _this39 = this;\n\n this.router.map(function () {\n this.route('filter', {\n path: '/filters/:filter'\n });\n this.route('post', {\n path: '/post/:post_id'\n });\n this.route('repo', {\n path: '/repo/:owner/:name'\n });\n });\n this.add('controller:filter', _controller.default.extend({\n filter: 'unpopular',\n repo: {\n owner: 'ember',\n name: 'ember.js'\n },\n post_id: 123\n }));\n this.addTemplate('filter', \"\\n

{{filter}}

\\n Unpopular\\n Unpopular\\n Post\\n Post\\n Repo\\n \");\n return this.visit('/filters/popular').then(function () {\n assert.equal(normalizeUrl(_this39.$('#link').attr('href')), '/filters/unpopular');\n assert.equal(normalizeUrl(_this39.$('#path-link').attr('href')), '/filters/unpopular');\n assert.equal(normalizeUrl(_this39.$('#post-path-link').attr('href')), '/post/123');\n assert.equal(normalizeUrl(_this39.$('#post-number-link').attr('href')), '/post/123');\n assert.equal(normalizeUrl(_this39.$('#repo-object-link').attr('href')), '/repo/ember/ember.js');\n });\n };\n\n _proto4[\"@test Issue 4201 - Shorthand for route.index shouldn't throw errors about context arguments\"] = function (assert) {\n var _this40 = this;\n\n assert.expect(2);\n this.router.map(function () {\n this.route('lobby', function () {\n this.route('index', {\n path: ':lobby_id'\n });\n this.route('list');\n });\n });\n this.add('route:lobby.index', _routing.Route.extend({\n model: function (params) {\n assert.equal(params.lobby_id, 'foobar');\n return params.lobby_id;\n }\n }));\n this.addTemplate('lobby.index', \"Lobby\");\n this.addTemplate('lobby.list', \"Lobby\");\n return this.visit('/lobby/list').then(function () {\n return _this40.click('#lobby-link');\n }).then(function () {\n return shouldBeActive(assert, _this40.$('#lobby-link'));\n });\n };\n\n _proto4[\"@test Quoteless route param performs property lookup\"] = function (assert) {\n var _this41 = this;\n\n this.router.map(function () {\n this.route('about');\n });\n this.addTemplate('index', \"\\n string\\n path\\n \");\n this.add('controller:index', _controller.default.extend({\n foo: 'index'\n }));\n\n var assertEquality = function (href) {\n assert.equal(normalizeUrl(_this41.$('#string-link').attr('href')), '/');\n assert.equal(normalizeUrl(_this41.$('#path-link').attr('href')), href);\n };\n\n return this.visit('/').then(function () {\n assertEquality('/');\n\n var controller = _this41.applicationInstance.lookup('controller:index');\n\n (0, _internalTestHelpers.runTask)(function () {\n return controller.set('foo', 'about');\n });\n assertEquality('/about');\n });\n };\n\n _proto4[\"@test The component refreshes href element when one of params changes\"] = function (assert) {\n var _this42 = this;\n\n this.router.map(function () {\n this.route('post', {\n path: '/posts/:post_id'\n });\n });\n var post = {\n id: '1'\n };\n var secondPost = {\n id: '2'\n };\n this.addTemplate('index', \"post\");\n this.add('controller:index', _controller.default.extend());\n return this.visit('/').then(function () {\n var indexController = _this42.applicationInstance.lookup('controller:index');\n\n (0, _internalTestHelpers.runTask)(function () {\n return indexController.set('post', post);\n });\n assert.equal(normalizeUrl(_this42.$('#post').attr('href')), '/posts/1', 'precond - Link has rendered href attr properly');\n (0, _internalTestHelpers.runTask)(function () {\n return indexController.set('post', secondPost);\n });\n assert.equal(_this42.$('#post').attr('href'), '/posts/2', 'href attr was updated after one of the params had been changed');\n (0, _internalTestHelpers.runTask)(function () {\n return indexController.set('post', null);\n });\n assert.equal(_this42.$('#post').attr('href'), '#', 'href attr becomes # when one of the arguments in nullified');\n });\n };\n\n _proto4[\"@test The component is active when a route is active\"] = function (assert) {\n var _this43 = this;\n\n this.router.map(function () {\n this.route('about', function () {\n this.route('item');\n });\n });\n this.addTemplate('about', \"\\n
\\n About\\n Item\\n {{outlet}}\\n
\\n \");\n return this.visit('/about').then(function () {\n assert.equal(_this43.$('#about-link.active').length, 1, 'The about route link is active');\n assert.equal(_this43.$('#item-link.active').length, 0, 'The item route link is inactive');\n return _this43.visit('/about/item');\n }).then(function () {\n assert.equal(_this43.$('#about-link.active').length, 1, 'The about route link is active');\n assert.equal(_this43.$('#item-link.active').length, 1, 'The item route link is active');\n });\n };\n\n _proto4[\"@test The component works in an #each'd array of string route names\"] = function (assert) {\n var _this44 = this;\n\n this.router.map(function () {\n this.route('foo');\n this.route('bar');\n this.route('rar');\n });\n this.add('controller:index', _controller.default.extend({\n routeNames: (0, _runtime.A)(['foo', 'bar', 'rar']),\n route1: 'bar',\n route2: 'foo'\n }));\n this.addTemplate('index', \"\\n {{#each routeNames as |routeName|}}\\n {{routeName}}\\n {{/each}}\\n {{#each routeNames as |r|}}\\n {{r}}\\n {{/each}}\\n a\\n b\\n \");\n\n var linksEqual = function (links, expected) {\n assert.equal(links.length, expected.length, 'Has correct number of links');\n var idx;\n\n for (idx = 0; idx < links.length; idx++) {\n var href = _this44.$(links[idx]).attr('href'); // Old IE includes the whole hostname as well\n\n\n assert.equal(href.slice(-expected[idx].length), expected[idx], \"Expected link to be '\" + expected[idx] + \"', but was '\" + href + \"'\");\n }\n };\n\n return this.visit('/').then(function () {\n linksEqual(_this44.$('a'), ['/foo', '/bar', '/rar', '/foo', '/bar', '/rar', '/bar', '/foo']);\n\n var indexController = _this44.applicationInstance.lookup('controller:index');\n\n (0, _internalTestHelpers.runTask)(function () {\n return indexController.set('route1', 'rar');\n });\n linksEqual(_this44.$('a'), ['/foo', '/bar', '/rar', '/foo', '/bar', '/rar', '/rar', '/foo']);\n (0, _internalTestHelpers.runTask)(function () {\n return indexController.routeNames.shiftObject();\n });\n linksEqual(_this44.$('a'), ['/bar', '/rar', '/bar', '/rar', '/rar', '/foo']);\n });\n };\n\n _proto4[\"@test the component throws a useful error if you invoke it wrong\"] = function (assert) {\n var _this45 = this;\n\n assert.expect(1);\n this.router.map(function () {\n this.route('post', {\n path: 'post/:post_id'\n });\n });\n this.addTemplate('application', \"Post\");\n assert.throws(function () {\n _this45.visit('/');\n }, /(You attempted to generate a link for the \"post\" route, but did not pass the models required for generating its dynamic segments.|You must provide param `post_id` to `generate`)/);\n return (0, _internalTestHelpers.runLoopSettled)();\n };\n\n _proto4[\"@test the component does not throw an error if its route has exited\"] = function (assert) {\n var _this46 = this;\n\n assert.expect(0);\n this.router.map(function () {\n this.route('post', {\n path: 'post/:post_id'\n });\n });\n this.addTemplate('application', \"\\n Home\\n Default Post\\n {{#if currentPost}}\\n Current Post\\n {{/if}}\\n \");\n this.add('controller:application', _controller.default.extend({\n defaultPost: {\n id: 1\n },\n postController: (0, _controller.inject)('post'),\n currentPost: (0, _metal.alias)('postController.model')\n }));\n this.add('controller:post', _controller.default.extend());\n this.add('route:post', _routing.Route.extend({\n model: function () {\n return {\n id: 2\n };\n },\n serialize: function (model) {\n return {\n post_id: model.id\n };\n }\n }));\n return this.visit('/').then(function () {\n return _this46.click('#default-post-link');\n }).then(function () {\n return _this46.click('#home-link');\n }).then(function () {\n return _this46.click('#current-post-link');\n }).then(function () {\n return _this46.click('#home-link');\n });\n };\n\n _proto4[\"@test the component's active property respects changing parent route context\"] = function (assert) {\n var _this47 = this;\n\n this.router.map(function () {\n this.route('things', {\n path: '/things/:name'\n }, function () {\n this.route('other');\n });\n });\n this.addTemplate('application', \"\\n OMG\\n LOL\\n \");\n return this.visit('/things/omg').then(function () {\n shouldBeActive(assert, _this47.$('#omg-link'));\n shouldNotBeActive(assert, _this47.$('#lol-link'));\n return _this47.visit('/things/omg/other');\n }).then(function () {\n shouldBeActive(assert, _this47.$('#omg-link'));\n shouldNotBeActive(assert, _this47.$('#lol-link'));\n });\n };\n\n _proto4[\"@test the component populates href with default query param values even without query-params object\"] = function (assert) {\n var _this48 = this;\n\n this.add('controller:index', _controller.default.extend({\n queryParams: ['foo'],\n foo: '123'\n }));\n this.addTemplate('index', \"Index\");\n return this.visit('/').then(function () {\n assert.equal(_this48.$('#the-link').attr('href'), '/', 'link has right href');\n });\n };\n\n _proto4[\"@test the component populates href with default query param values with empty query-params object\"] = function (assert) {\n var _this49 = this;\n\n this.add('controller:index', _controller.default.extend({\n queryParams: ['foo'],\n foo: '123'\n }));\n this.addTemplate('index', \"Index\");\n return this.visit('/').then(function () {\n assert.equal(_this49.$('#the-link').attr('href'), '/', 'link has right href');\n });\n };\n\n _proto4[\"@test the component with only query-params and a block updates when route changes\"] = function (assert) {\n var _this50 = this;\n\n this.router.map(function () {\n this.route('about');\n });\n this.add('controller:application', _controller.default.extend({\n queryParams: ['foo', 'bar'],\n foo: '123',\n bar: 'yes'\n }));\n this.addTemplate('application', \"Index\");\n return this.visit('/').then(function () {\n assert.equal(_this50.$('#the-link').attr('href'), '/?bar=NAW&foo=456', 'link has right href');\n return _this50.visit('/about');\n }).then(function () {\n assert.equal(_this50.$('#the-link').attr('href'), '/about?bar=NAW&foo=456', 'link has right href');\n });\n };\n\n _proto4['@test [GH#17018] passing model to with `hash` helper works'] = function testGH17018PassingModelToLinkToWithHashHelperWorks() {\n var _this51 = this;\n\n this.router.map(function () {\n this.route('post', {\n path: '/posts/:post_id'\n });\n });\n this.add('route:index', _routing.Route.extend({\n model: function () {\n return _runtime.RSVP.hash({\n user: {\n name: 'Papa Smurf'\n }\n });\n }\n }));\n this.addTemplate('index', \"Post\");\n this.addTemplate('post', 'Post: {{this.model.user.name}}');\n return this.visit('/').then(function () {\n _this51.assertComponentElement(_this51.firstChild, {\n tagName: 'a',\n attrs: {\n href: '/posts/someId'\n },\n content: 'Post'\n });\n\n return _this51.click('a');\n }).then(function () {\n _this51.assertText('Post: Papa Smurf');\n });\n };\n\n _proto4[\"@test The component can use dynamic params\"] = function (assert) {\n var _this52 = this;\n\n this.router.map(function () {\n this.route('foo', {\n path: 'foo/:some/:thing'\n });\n this.route('bar', {\n path: 'bar/:some/:thing/:else'\n });\n });\n this.add('controller:index', _controller.default.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n this.dynamicLinkParams = ['foo', 'one', 'two'];\n }\n }));\n this.addTemplate('index', \"\\n

Home

\\n Dynamic\\n \");\n return this.visit('/').then(function () {\n var link = _this52.$('#dynamic-link');\n\n assert.equal(link.attr('href'), '/foo/one/two');\n\n var controller = _this52.applicationInstance.lookup('controller:index');\n\n (0, _internalTestHelpers.runTask)(function () {\n controller.set('dynamicLinkParams', ['bar', 'one', 'two', 'three']);\n });\n assert.equal(link.attr('href'), '/bar/one/two/three');\n });\n };\n\n _proto4[\"@test GJ: to a parent root model hook which performs a 'transitionTo' has correct active class #13256\"] = function (assert) {\n var _this53 = this;\n\n assert.expect(1);\n this.router.map(function () {\n this.route('parent', function () {\n this.route('child');\n });\n });\n this.add('route:parent', _routing.Route.extend({\n afterModel: function () {\n this.transitionTo('parent.child');\n }\n }));\n this.addTemplate('application', \"Parent\");\n return this.visit('/').then(function () {\n return _this53.click('#parent-link');\n }).then(function () {\n shouldBeActive(assert, _this53.$('#parent-link'));\n });\n };\n\n return _class4;\n }(_internalTestHelpers.ApplicationTestCase));\n (0, _internalTestHelpers.moduleFor)('The component - loading states and warnings',\n /*#__PURE__*/\n function (_ApplicationTestCase5) {\n (0, _emberBabel.inheritsLoose)(_class5, _ApplicationTestCase5);\n\n function _class5() {\n return _ApplicationTestCase5.apply(this, arguments) || this;\n }\n\n var _proto5 = _class5.prototype;\n\n _proto5[\"@test with null/undefined dynamic parameters are put in a loading state\"] = function (assert) {\n var _this54 = this;\n\n assert.expect(19);\n var warningMessage = 'This link is in an inactive loading state because at least one of its models currently has a null/undefined value, or the provided route name is invalid.';\n this.router.map(function () {\n this.route('thing', {\n path: '/thing/:thing_id'\n });\n this.route('about');\n });\n this.addTemplate('index', \"\\n \\n string\\n \\n \\n string\\n \\n \");\n this.add('controller:index', _controller.default.extend({\n destinationRoute: null,\n routeContext: null,\n loadingClass: 'i-am-loading'\n }));\n this.add('route:about', _routing.Route.extend({\n activate: function () {\n assert.ok(true, 'About was entered');\n }\n }));\n\n function assertLinkStatus(link, url) {\n if (url) {\n assert.equal(normalizeUrl(link.attr('href')), url, 'loaded link-to has expected href');\n assert.ok(!link.hasClass('i-am-loading'), 'loaded linkComponent has no loadingClass');\n } else {\n assert.equal(normalizeUrl(link.attr('href')), '#', \"unloaded link-to has href='#'\");\n assert.ok(link.hasClass('i-am-loading'), 'loading linkComponent has loadingClass');\n }\n }\n\n var contextLink, staticLink, controller;\n return this.visit('/').then(function () {\n contextLink = _this54.$('#context-link');\n staticLink = _this54.$('#static-link');\n controller = _this54.applicationInstance.lookup('controller:index');\n assertLinkStatus(contextLink);\n assertLinkStatus(staticLink);\n return expectWarning(function () {\n return _this54.click(contextLink[0]);\n }, warningMessage);\n }).then(function () {\n // Set the destinationRoute (context is still null).\n (0, _internalTestHelpers.runTask)(function () {\n return controller.set('destinationRoute', 'thing');\n });\n assertLinkStatus(contextLink); // Set the routeContext to an id\n\n (0, _internalTestHelpers.runTask)(function () {\n return controller.set('routeContext', '456');\n });\n assertLinkStatus(contextLink, '/thing/456'); // Test that 0 isn't interpreted as falsy.\n\n (0, _internalTestHelpers.runTask)(function () {\n return controller.set('routeContext', 0);\n });\n assertLinkStatus(contextLink, '/thing/0'); // Set the routeContext to an object\n\n (0, _internalTestHelpers.runTask)(function () {\n controller.set('routeContext', {\n id: 123\n });\n });\n assertLinkStatus(contextLink, '/thing/123'); // Set the destinationRoute back to null.\n\n (0, _internalTestHelpers.runTask)(function () {\n return controller.set('destinationRoute', null);\n });\n assertLinkStatus(contextLink);\n return expectWarning(function () {\n return _this54.click(staticLink[0]);\n }, warningMessage);\n }).then(function () {\n (0, _internalTestHelpers.runTask)(function () {\n return controller.set('secondRoute', 'about');\n });\n assertLinkStatus(staticLink, '/about'); // Click the now-active link\n\n return _this54.click(staticLink[0]);\n });\n };\n\n return _class5;\n }(_internalTestHelpers.ApplicationTestCase));\n\n function assertNav(options, callback, assert) {\n var nav = false;\n\n function check(event) {\n assert.equal(event.defaultPrevented, options.prevented, \"expected defaultPrevented=\" + options.prevented);\n nav = true;\n event.preventDefault();\n }\n\n try {\n document.addEventListener('click', check);\n callback();\n } finally {\n document.removeEventListener('click', check);\n assert.ok(nav, 'Expected a link to be clicked');\n }\n }\n }\n});","enifed(\"@ember/-internals/glimmer/tests/integration/components/link-to/routing-curly-test\", [\"ember-babel\", \"internal-test-helpers\", \"@ember/controller\", \"@ember/-internals/runtime\", \"@ember/-internals/metal\", \"@ember/instrumentation\", \"@ember/-internals/routing\"], function (_emberBabel, _internalTestHelpers, _controller, _runtime, _metal, _instrumentation, _routing) {\n \"use strict\";\n\n // IE includes the host name\n function normalizeUrl(url) {\n return url.replace(/https?:\\/\\/[^\\/]+/, '');\n }\n\n function shouldNotBeActive(assert, element) {\n checkActive(assert, element, false);\n }\n\n function shouldBeActive(assert, element) {\n checkActive(assert, element, true);\n }\n\n function checkActive(assert, element, active) {\n var classList = element.attr('class');\n assert.equal(classList.indexOf('active') > -1, active, element + \" active should be \" + active);\n }\n\n (0, _internalTestHelpers.moduleFor)('{{link-to}} component (routing tests)',\n /*#__PURE__*/\n function (_ApplicationTestCase) {\n (0, _emberBabel.inheritsLoose)(_class, _ApplicationTestCase);\n\n function _class() {\n var _this;\n\n _this = _ApplicationTestCase.call(this) || this;\n\n _this.router.map(function () {\n this.route('about');\n });\n\n _this.addTemplate('index', \"\\n

Home

\\n {{#link-to 'about' id='about-link'}}About{{/link-to}}\\n {{#link-to 'index' id='self-link'}}Self{{/link-to}}\\n \");\n\n _this.addTemplate('about', \"\\n

About

\\n {{#link-to 'index' id='home-link'}}Home{{/link-to}}\\n {{#link-to 'about' id='self-link'}}Self{{/link-to}}\\n \");\n\n return _this;\n }\n\n var _proto = _class.prototype;\n\n _proto['@test The {{link-to}} component navigates into the named route'] = function testTheLinkToComponentNavigatesIntoTheNamedRoute(assert) {\n var _this2 = this;\n\n return this.visit('/').then(function () {\n assert.equal(_this2.$('h3.home').length, 1, 'The home template was rendered');\n assert.equal(_this2.$('#self-link.active').length, 1, 'The self-link was rendered with active class');\n assert.equal(_this2.$('#about-link:not(.active)').length, 1, 'The other link was rendered without active class');\n return _this2.click('#about-link');\n }).then(function () {\n assert.equal(_this2.$('h3.about').length, 1, 'The about template was rendered');\n assert.equal(_this2.$('#self-link.active').length, 1, 'The self-link was rendered with active class');\n assert.equal(_this2.$('#home-link:not(.active)').length, 1, 'The other link was rendered without active class');\n });\n };\n\n _proto[\"@test the {{link-to}} component doesn't add an href when the tagName isn't 'a'\"] = function (assert) {\n var _this3 = this;\n\n this.addTemplate('index', \"{{#link-to 'about' id='about-link' tagName='div'}}About{{/link-to}}\");\n return this.visit('/').then(function () {\n assert.equal(_this3.$('#about-link').attr('href'), undefined, 'there is no href attribute');\n });\n };\n\n _proto[\"@test the {{link-to}} component applies a 'disabled' class when disabled\"] = function (assert) {\n var _this4 = this;\n\n this.addTemplate('index', \"\\n {{#link-to \\\"about\\\" id=\\\"about-link-static\\\" disabledWhen=\\\"shouldDisable\\\"}}About{{/link-to}}\\n {{#link-to \\\"about\\\" id=\\\"about-link-dynamic\\\" disabledWhen=dynamicDisabledWhen}}About{{/link-to}}\\n \");\n this.add('controller:index', _controller.default.extend({\n shouldDisable: true,\n dynamicDisabledWhen: 'shouldDisable'\n }));\n return this.visit('/').then(function () {\n assert.equal(_this4.$('#about-link-static.disabled').length, 1, 'The static link is disabled when its disabledWhen is true');\n assert.equal(_this4.$('#about-link-dynamic.disabled').length, 1, 'The dynamic link is disabled when its disabledWhen is true');\n\n var controller = _this4.applicationInstance.lookup('controller:index');\n\n (0, _internalTestHelpers.runTask)(function () {\n return controller.set('dynamicDisabledWhen', false);\n });\n assert.equal(_this4.$('#about-link-dynamic.disabled').length, 0, 'The dynamic link is re-enabled when its disabledWhen becomes false');\n });\n };\n\n _proto[\"@test the {{link-to}} component doesn't apply a 'disabled' class if disabledWhen is not provided\"] = function (assert) {\n var _this5 = this;\n\n this.addTemplate('index', \"{{#link-to \\\"about\\\" id=\\\"about-link\\\"}}About{{/link-to}}\");\n return this.visit('/').then(function () {\n assert.ok(!_this5.$('#about-link').hasClass('disabled'), 'The link is not disabled if disabledWhen not provided');\n });\n };\n\n _proto[\"@test the {{link-to}} component supports a custom disabledClass\"] = function (assert) {\n var _this6 = this;\n\n this.addTemplate('index', \"{{#link-to \\\"about\\\" id=\\\"about-link\\\" disabledWhen=true disabledClass=\\\"do-not-want\\\"}}About{{/link-to}}\");\n return this.visit('/').then(function () {\n assert.equal(_this6.$('#about-link.do-not-want').length, 1, 'The link can apply a custom disabled class');\n });\n };\n\n _proto[\"@test the {{link-to}} component supports a custom disabledClass set via bound param\"] = function (assert) {\n var _this7 = this;\n\n this.addTemplate('index', \"{{#link-to \\\"about\\\" id=\\\"about-link\\\" disabledWhen=true disabledClass=disabledClass}}About{{/link-to}}\");\n this.add('controller:index', _controller.default.extend({\n disabledClass: 'do-not-want'\n }));\n return this.visit('/').then(function () {\n assert.equal(_this7.$('#about-link.do-not-want').length, 1, 'The link can apply a custom disabled class via bound param');\n });\n };\n\n _proto[\"@test the {{link-to}} component does not respond to clicks when disabledWhen\"] = function (assert) {\n var _this8 = this;\n\n this.addTemplate('index', \"{{#link-to \\\"about\\\" id=\\\"about-link\\\" disabledWhen=true}}About{{/link-to}}\");\n return this.visit('/').then(function () {\n return _this8.click('#about-link');\n }).then(function () {\n assert.equal(_this8.$('h3.about').length, 0, 'Transitioning did not occur');\n });\n };\n\n _proto[\"@test the {{link-to}} component does not respond to clicks when disabled\"] = function (assert) {\n var _this9 = this;\n\n this.addTemplate('index', \"{{#link-to \\\"about\\\" id=\\\"about-link\\\" disabled=true}}About{{/link-to}}\");\n return this.visit('/').then(function () {\n return _this9.click('#about-link');\n }).then(function () {\n assert.equal(_this9.$('h3.about').length, 0, 'Transitioning did not occur');\n });\n };\n\n _proto[\"@test the {{link-to}} component responds to clicks according to its disabledWhen bound param\"] = function (assert) {\n var _this10 = this;\n\n this.addTemplate('index', \"{{#link-to \\\"about\\\" id=\\\"about-link\\\" disabledWhen=disabledWhen}}About{{/link-to}}\");\n this.add('controller:index', _controller.default.extend({\n disabledWhen: true\n }));\n return this.visit('/').then(function () {\n return _this10.click('#about-link');\n }).then(function () {\n assert.equal(_this10.$('h3.about').length, 0, 'Transitioning did not occur');\n\n var controller = _this10.applicationInstance.lookup('controller:index');\n\n controller.set('disabledWhen', false);\n return (0, _internalTestHelpers.runLoopSettled)();\n }).then(function () {\n return _this10.click('#about-link');\n }).then(function () {\n assert.equal(_this10.$('h3.about').length, 1, 'Transitioning did occur when disabledWhen became false');\n });\n };\n\n _proto[\"@test The {{link-to}} component supports a custom activeClass\"] = function (assert) {\n var _this11 = this;\n\n this.addTemplate('index', \"\\n

Home

\\n {{#link-to 'about' id='about-link'}}About{{/link-to}}\\n {{#link-to 'index' id='self-link' activeClass='zomg-active'}}Self{{/link-to}}\\n \");\n return this.visit('/').then(function () {\n assert.equal(_this11.$('h3.home').length, 1, 'The home template was rendered');\n assert.equal(_this11.$('#self-link.zomg-active').length, 1, 'The self-link was rendered with active class');\n assert.equal(_this11.$('#about-link:not(.active)').length, 1, 'The other link was rendered without active class');\n });\n };\n\n _proto[\"@test The {{link-to}} component supports a custom activeClass from a bound param\"] = function (assert) {\n var _this12 = this;\n\n this.addTemplate('index', \"\\n

Home

\\n {{#link-to 'about' id='about-link'}}About{{/link-to}}\\n {{#link-to 'index' id='self-link' activeClass=activeClass}}Self{{/link-to}}\\n \");\n this.add('controller:index', _controller.default.extend({\n activeClass: 'zomg-active'\n }));\n return this.visit('/').then(function () {\n assert.equal(_this12.$('h3.home').length, 1, 'The home template was rendered');\n assert.equal(_this12.$('#self-link.zomg-active').length, 1, 'The self-link was rendered with active class');\n assert.equal(_this12.$('#about-link:not(.active)').length, 1, 'The other link was rendered without active class');\n });\n };\n\n _proto[\"@test The {{link-to}} component supports 'classNameBindings' with custom values [GH #11699]\"] = function (assert) {\n var _this13 = this;\n\n this.addTemplate('index', \"\\n

Home

\\n {{#link-to 'about' id='about-link' classNameBindings='foo:foo-is-true:foo-is-false'}}About{{/link-to}}\\n \");\n this.add('controller:index', _controller.default.extend({\n foo: false\n }));\n return this.visit('/').then(function () {\n assert.equal(_this13.$('#about-link.foo-is-false').length, 1, 'The about-link was rendered with the falsy class');\n\n var controller = _this13.applicationInstance.lookup('controller:index');\n\n (0, _internalTestHelpers.runTask)(function () {\n return controller.set('foo', true);\n });\n assert.equal(_this13.$('#about-link.foo-is-true').length, 1, 'The about-link was rendered with the truthy class after toggling the property');\n });\n };\n\n return _class;\n }(_internalTestHelpers.ApplicationTestCase));\n (0, _internalTestHelpers.moduleFor)('{{link-to}} component (routing tests - location hooks)',\n /*#__PURE__*/\n function (_ApplicationTestCase2) {\n (0, _emberBabel.inheritsLoose)(_class2, _ApplicationTestCase2);\n\n function _class2() {\n var _this14;\n\n _this14 = _ApplicationTestCase2.call(this) || this;\n _this14.updateCount = 0;\n _this14.replaceCount = 0;\n var testContext = (0, _emberBabel.assertThisInitialized)(_this14);\n\n _this14.add('location:none', _routing.NoneLocation.extend({\n setURL: function () {\n testContext.updateCount++;\n return this._super.apply(this, arguments);\n },\n replaceURL: function () {\n testContext.replaceCount++;\n return this._super.apply(this, arguments);\n }\n }));\n\n _this14.router.map(function () {\n this.route('about');\n });\n\n _this14.addTemplate('index', \"\\n

Home

\\n {{#link-to 'about' id='about-link'}}About{{/link-to}}\\n {{#link-to 'index' id='self-link'}}Self{{/link-to}}\\n \");\n\n _this14.addTemplate('about', \"\\n

About

\\n {{#link-to 'index' id='home-link'}}Home{{/link-to}}\\n {{#link-to 'about' id='self-link'}}Self{{/link-to}}\\n \");\n\n return _this14;\n }\n\n var _proto2 = _class2.prototype;\n\n _proto2.visit = function visit() {\n var _this15 = this;\n\n return _ApplicationTestCase2.prototype.visit.apply(this, arguments).then(function () {\n _this15.updateCountAfterVisit = _this15.updateCount;\n _this15.replaceCountAfterVisit = _this15.replaceCount;\n });\n };\n\n _proto2['@test The {{link-to}} component supports URL replacement'] = function testTheLinkToComponentSupportsURLReplacement(assert) {\n var _this16 = this;\n\n this.addTemplate('index', \"\\n

Home

\\n {{#link-to 'about' id='about-link' replace=true}}About{{/link-to}}\\n \");\n return this.visit('/').then(function () {\n return _this16.click('#about-link');\n }).then(function () {\n assert.equal(_this16.updateCount, _this16.updateCountAfterVisit, 'setURL should not be called');\n assert.equal(_this16.replaceCount, _this16.replaceCountAfterVisit + 1, 'replaceURL should be called once');\n });\n };\n\n _proto2['@test The {{link-to}} component supports URL replacement via replace=boundTruthyThing'] = function testTheLinkToComponentSupportsURLReplacementViaReplaceBoundTruthyThing(assert) {\n var _this17 = this;\n\n this.addTemplate('index', \"\\n

Home

\\n {{#link-to 'about' id='about-link' replace=boundTruthyThing}}About{{/link-to}}\\n \");\n this.add('controller:index', _controller.default.extend({\n boundTruthyThing: true\n }));\n return this.visit('/').then(function () {\n return _this17.click('#about-link');\n }).then(function () {\n assert.equal(_this17.updateCount, _this17.updateCountAfterVisit, 'setURL should not be called');\n assert.equal(_this17.replaceCount, _this17.replaceCountAfterVisit + 1, 'replaceURL should be called once');\n });\n };\n\n _proto2['@test The {{link-to}} component supports setting replace=boundFalseyThing'] = function testTheLinkToComponentSupportsSettingReplaceBoundFalseyThing(assert) {\n var _this18 = this;\n\n this.addTemplate('index', \"\\n

Home

\\n {{#link-to 'about' id='about-link' replace=boundFalseyThing}}About{{/link-to}}\\n \");\n this.add('controller:index', _controller.default.extend({\n boundFalseyThing: false\n }));\n return this.visit('/').then(function () {\n return _this18.click('#about-link');\n }).then(function () {\n assert.equal(_this18.updateCount, _this18.updateCountAfterVisit + 1, 'setURL should be called');\n assert.equal(_this18.replaceCount, _this18.replaceCountAfterVisit, 'replaceURL should not be called');\n });\n };\n\n return _class2;\n }(_internalTestHelpers.ApplicationTestCase));\n\n if (false\n /* EMBER_IMPROVED_INSTRUMENTATION */\n ) {\n (0, _internalTestHelpers.moduleFor)('The {{link-to}} component with EMBER_IMPROVED_INSTRUMENTATION',\n /*#__PURE__*/\n function (_ApplicationTestCase3) {\n (0, _emberBabel.inheritsLoose)(_class3, _ApplicationTestCase3);\n\n function _class3() {\n var _this19;\n\n _this19 = _ApplicationTestCase3.call(this) || this;\n\n _this19.router.map(function () {\n this.route('about');\n });\n\n _this19.addTemplate('index', \"\\n

Home

\\n {{#link-to 'about' id='about-link'}}About{{/link-to}}\\n {{#link-to 'index' id='self-link'}}Self{{/link-to}}\\n \");\n\n _this19.addTemplate('about', \"\\n

About

\\n {{#link-to 'index' id='home-link'}}Home{{/link-to}}\\n {{#link-to 'about' id='self-link'}}Self{{/link-to}}\\n \");\n\n return _this19;\n }\n\n var _proto3 = _class3.prototype;\n\n _proto3.beforeEach = function beforeEach() {\n return this.visit('/');\n };\n\n _proto3.afterEach = function afterEach() {\n (0, _instrumentation.reset)();\n return _ApplicationTestCase3.prototype.afterEach.call(this);\n };\n\n _proto3['@test The {{link-to}} component fires an interaction event'] = function testTheLinkToComponentFiresAnInteractionEvent(assert) {\n assert.expect(2);\n (0, _instrumentation.subscribe)('interaction.link-to', {\n before: function () {\n assert.ok(true, 'instrumentation subscriber was called');\n },\n after: function () {\n assert.ok(true, 'instrumentation subscriber was called');\n }\n });\n return this.click('#about-link');\n };\n\n _proto3['@test The {{link-to}} component interaction event includes the route name'] = function testTheLinkToComponentInteractionEventIncludesTheRouteName(assert) {\n assert.expect(2);\n (0, _instrumentation.subscribe)('interaction.link-to', {\n before: function (name, timestamp, _ref) {\n var routeName = _ref.routeName;\n assert.equal(routeName, 'about', 'instrumentation subscriber was passed route name');\n },\n after: function (name, timestamp, _ref2) {\n var routeName = _ref2.routeName;\n assert.equal(routeName, 'about', 'instrumentation subscriber was passed route name');\n }\n });\n return this.click('#about-link');\n };\n\n _proto3['@test The {{link-to}} component interaction event includes the transition in the after hook'] = function testTheLinkToComponentInteractionEventIncludesTheTransitionInTheAfterHook(assert) {\n assert.expect(1);\n (0, _instrumentation.subscribe)('interaction.link-to', {\n before: function () {},\n after: function (name, timestamp, _ref3) {\n var transition = _ref3.transition;\n assert.equal(transition.targetName, 'about', 'instrumentation subscriber was passed route name');\n }\n });\n return this.click('#about-link');\n };\n\n return _class3;\n }(_internalTestHelpers.ApplicationTestCase));\n }\n\n (0, _internalTestHelpers.moduleFor)('The {{link-to}} component - nested routes and link-to arguments',\n /*#__PURE__*/\n function (_ApplicationTestCase4) {\n (0, _emberBabel.inheritsLoose)(_class4, _ApplicationTestCase4);\n\n function _class4() {\n return _ApplicationTestCase4.apply(this, arguments) || this;\n }\n\n var _proto4 = _class4.prototype;\n\n _proto4['@test The {{link-to}} component supports leaving off .index for nested routes'] = function testTheLinkToComponentSupportsLeavingOffIndexForNestedRoutes(assert) {\n var _this20 = this;\n\n this.router.map(function () {\n this.route('about', function () {\n this.route('item');\n });\n });\n this.addTemplate('about', \"

About

{{outlet}}\");\n this.addTemplate('about.index', \"
Index
\");\n this.addTemplate('about.item', \"
{{#link-to 'about'}}About{{/link-to}}
\");\n return this.visit('/about/item').then(function () {\n assert.equal(normalizeUrl(_this20.$('#item a').attr('href')), '/about');\n });\n };\n\n _proto4[\"@test The {{link-to}} component supports custom, nested, current-when\"] = function (assert) {\n var _this21 = this;\n\n this.router.map(function () {\n this.route('index', {\n path: '/'\n }, function () {\n this.route('about');\n });\n this.route('item');\n });\n this.addTemplate('index', \"

Home

{{outlet}}\");\n this.addTemplate('index.about', \"{{#link-to 'item' id='other-link' current-when='index'}}ITEM{{/link-to}}\");\n return this.visit('/about').then(function () {\n assert.equal(_this21.$('#other-link.active').length, 1, 'The link is active since current-when is a parent route');\n });\n };\n\n _proto4[\"@test The {{link-to}} component does not disregard current-when when it is given explicitly for a route\"] = function (assert) {\n var _this22 = this;\n\n this.router.map(function () {\n this.route('index', {\n path: '/'\n }, function () {\n this.route('about');\n });\n this.route('items', function () {\n this.route('item');\n });\n });\n this.addTemplate('index', \"

Home

{{outlet}}\");\n this.addTemplate('index.about', \"{{#link-to 'items' id='other-link' current-when='index'}}ITEM{{/link-to}}\");\n return this.visit('/about').then(function () {\n assert.equal(_this22.$('#other-link.active').length, 1, 'The link is active when current-when is given for explicitly for a route');\n });\n };\n\n _proto4['@test The {{link-to}} component does not disregard current-when when it is set via a bound param'] = function testTheLinkToComponentDoesNotDisregardCurrentWhenWhenItIsSetViaABoundParam(assert) {\n var _this23 = this;\n\n this.router.map(function () {\n this.route('index', {\n path: '/'\n }, function () {\n this.route('about');\n });\n this.route('items', function () {\n this.route('item');\n });\n });\n this.add('controller:index.about', _controller.default.extend({\n currentWhen: 'index'\n }));\n this.addTemplate('index', \"

Home

{{outlet}}\");\n this.addTemplate('index.about', \"{{#link-to 'items' id='other-link' current-when=currentWhen}}ITEM{{/link-to}}\");\n return this.visit('/about').then(function () {\n assert.equal(_this23.$('#other-link.active').length, 1, 'The link is active when current-when is given for explicitly for a route');\n });\n };\n\n _proto4['@test The {{link-to}} component supports multiple current-when routes'] = function testTheLinkToComponentSupportsMultipleCurrentWhenRoutes(assert) {\n var _this24 = this;\n\n this.router.map(function () {\n this.route('index', {\n path: '/'\n }, function () {\n this.route('about');\n });\n this.route('item');\n this.route('foo');\n });\n this.addTemplate('index', \"

Home

{{outlet}}\");\n this.addTemplate('index.about', \"{{#link-to 'item' id='link1' current-when='item index'}}ITEM{{/link-to}}\");\n this.addTemplate('item', \"{{#link-to 'item' id='link2' current-when='item index'}}ITEM{{/link-to}}\");\n this.addTemplate('foo', \"{{#link-to 'item' id='link3' current-when='item index'}}ITEM{{/link-to}}\");\n return this.visit('/about').then(function () {\n assert.equal(_this24.$('#link1.active').length, 1, 'The link is active since current-when contains the parent route');\n return _this24.visit('/item');\n }).then(function () {\n assert.equal(_this24.$('#link2.active').length, 1, 'The link is active since you are on the active route');\n return _this24.visit('/foo');\n }).then(function () {\n assert.equal(_this24.$('#link3.active').length, 0, 'The link is not active since current-when does not contain the active route');\n });\n };\n\n _proto4['@test The {{link-to}} component supports boolean values for current-when'] = function testTheLinkToComponentSupportsBooleanValuesForCurrentWhen(assert) {\n var _this25 = this;\n\n this.router.map(function () {\n this.route('index', {\n path: '/'\n }, function () {\n this.route('about');\n });\n this.route('item');\n });\n this.addTemplate('index.about', \"\\n {{#link-to 'index' id='index-link' current-when=isCurrent}}index{{/link-to}}\\n {{#link-to 'item' id='about-link' current-when=true}}ITEM{{/link-to}}\\n \");\n this.add('controller:index.about', _controller.default.extend({\n isCurrent: false\n }));\n return this.visit('/about').then(function () {\n assert.ok(_this25.$('#about-link').hasClass('active'), 'The link is active since current-when is true');\n assert.notOk(_this25.$('#index-link').hasClass('active'), 'The link is not active since current-when is false');\n\n var controller = _this25.applicationInstance.lookup('controller:index.about');\n\n (0, _internalTestHelpers.runTask)(function () {\n return controller.set('isCurrent', true);\n });\n assert.ok(_this25.$('#index-link').hasClass('active'), 'The link is active since current-when is true');\n });\n };\n\n _proto4['@test The {{link-to}} component defaults to bubbling'] = function testTheLinkToComponentDefaultsToBubbling(assert) {\n var _this26 = this;\n\n this.addTemplate('about', \"\\n
\\n {{#link-to 'about.contact' id='about-contact'}}About{{/link-to}}\\n
\\n {{outlet}}\\n \");\n this.addTemplate('about.contact', \"

Contact

\");\n this.router.map(function () {\n this.route('about', function () {\n this.route('contact');\n });\n });\n var hidden = 0;\n this.add('route:about', _routing.Route.extend({\n actions: {\n hide: function () {\n hidden++;\n }\n }\n }));\n return this.visit('/about').then(function () {\n return _this26.click('#about-contact');\n }).then(function () {\n assert.equal(_this26.$('#contact').text(), 'Contact', 'precond - the link worked');\n assert.equal(hidden, 1, 'The link bubbles');\n });\n };\n\n _proto4[\"@test The {{link-to}} component supports bubbles=false\"] = function (assert) {\n var _this27 = this;\n\n this.addTemplate('about', \"\\n
\\n {{#link-to 'about.contact' id='about-contact' bubbles=false}}\\n About\\n {{/link-to}}\\n
\\n {{outlet}}\\n \");\n this.addTemplate('about.contact', \"

Contact

\");\n this.router.map(function () {\n this.route('about', function () {\n this.route('contact');\n });\n });\n var hidden = 0;\n this.add('route:about', _routing.Route.extend({\n actions: {\n hide: function () {\n hidden++;\n }\n }\n }));\n return this.visit('/about').then(function () {\n return _this27.click('#about-contact');\n }).then(function () {\n assert.equal(_this27.$('#contact').text(), 'Contact', 'precond - the link worked');\n assert.equal(hidden, 0, \"The link didn't bubble\");\n });\n };\n\n _proto4[\"@test The {{link-to}} component supports bubbles=boundFalseyThing\"] = function (assert) {\n var _this28 = this;\n\n this.addTemplate('about', \"\\n
\\n {{#link-to 'about.contact' id='about-contact' bubbles=boundFalseyThing}}\\n About\\n {{/link-to}}\\n
\\n {{outlet}}\\n \");\n this.addTemplate('about.contact', \"

Contact

\");\n this.add('controller:about', _controller.default.extend({\n boundFalseyThing: false\n }));\n this.router.map(function () {\n this.route('about', function () {\n this.route('contact');\n });\n });\n var hidden = 0;\n this.add('route:about', _routing.Route.extend({\n actions: {\n hide: function () {\n hidden++;\n }\n }\n }));\n return this.visit('/about').then(function () {\n return _this28.click('#about-contact');\n }).then(function () {\n assert.equal(_this28.$('#contact').text(), 'Contact', 'precond - the link worked');\n assert.equal(hidden, 0, \"The link didn't bubble\");\n });\n };\n\n _proto4[\"@test The {{link-to}} component moves into the named route with context\"] = function (assert) {\n var _this29 = this;\n\n this.router.map(function () {\n this.route('about');\n this.route('item', {\n path: '/item/:id'\n });\n });\n this.addTemplate('about', \"\\n

List

\\n
    \\n {{#each model as |person|}}\\n
  • \\n {{#link-to 'item' person id=person.id}}\\n {{person.name}}\\n {{/link-to}}\\n
  • \\n {{/each}}\\n
\\n {{#link-to 'index' id='home-link'}}Home{{/link-to}}\\n \");\n this.addTemplate('item', \"\\n

Item

\\n

{{model.name}}

\\n {{#link-to 'index' id='home-link'}}Home{{/link-to}}\\n \");\n this.addTemplate('index', \"\\n

Home

\\n {{#link-to 'about' id='about-link'}}About{{/link-to}}\\n \");\n this.add('route:about', _routing.Route.extend({\n model: function () {\n return [{\n id: 'yehuda',\n name: 'Yehuda Katz'\n }, {\n id: 'tom',\n name: 'Tom Dale'\n }, {\n id: 'erik',\n name: 'Erik Brynroflsson'\n }];\n }\n }));\n return this.visit('/about').then(function () {\n assert.equal(_this29.$('h3.list').length, 1, 'The home template was rendered');\n assert.equal(normalizeUrl(_this29.$('#home-link').attr('href')), '/', 'The home link points back at /');\n return _this29.click('#yehuda');\n }).then(function () {\n assert.equal(_this29.$('h3.item').length, 1, 'The item template was rendered');\n assert.equal(_this29.$('p').text(), 'Yehuda Katz', 'The name is correct');\n return _this29.click('#home-link');\n }).then(function () {\n return _this29.click('#about-link');\n }).then(function () {\n assert.equal(normalizeUrl(_this29.$('li a#yehuda').attr('href')), '/item/yehuda');\n assert.equal(normalizeUrl(_this29.$('li a#tom').attr('href')), '/item/tom');\n assert.equal(normalizeUrl(_this29.$('li a#erik').attr('href')), '/item/erik');\n return _this29.click('#erik');\n }).then(function () {\n assert.equal(_this29.$('h3.item').length, 1, 'The item template was rendered');\n assert.equal(_this29.$('p').text(), 'Erik Brynroflsson', 'The name is correct');\n });\n };\n\n _proto4[\"@test The {{link-to}} component binds some anchor html tag common attributes\"] = function (assert) {\n var _this30 = this;\n\n this.addTemplate('index', \"\\n

Home

\\n {{#link-to 'index' id='self-link' title='title-attr' rel='rel-attr' tabindex='-1'}}\\n Self\\n {{/link-to}}\\n \");\n return this.visit('/').then(function () {\n var link = _this30.$('#self-link');\n\n assert.equal(link.attr('title'), 'title-attr', 'The self-link contains title attribute');\n assert.equal(link.attr('rel'), 'rel-attr', 'The self-link contains rel attribute');\n assert.equal(link.attr('tabindex'), '-1', 'The self-link contains tabindex attribute');\n });\n };\n\n _proto4[\"@test The {{link-to}} component supports 'target' attribute\"] = function (assert) {\n var _this31 = this;\n\n this.addTemplate('index', \"\\n

Home

\\n {{#link-to 'index' id='self-link' target='_blank'}}Self{{/link-to}}\\n \");\n return this.visit('/').then(function () {\n var link = _this31.$('#self-link');\n\n assert.equal(link.attr('target'), '_blank', 'The self-link contains `target` attribute');\n });\n };\n\n _proto4[\"@test The {{link-to}} component supports 'target' attribute specified as a bound param\"] = function (assert) {\n var _this32 = this;\n\n this.addTemplate('index', \"

Home

{{#link-to 'index' id='self-link' target=boundLinkTarget}}Self{{/link-to}}\");\n this.add('controller:index', _controller.default.extend({\n boundLinkTarget: '_blank'\n }));\n return this.visit('/').then(function () {\n var link = _this32.$('#self-link');\n\n assert.equal(link.attr('target'), '_blank', 'The self-link contains `target` attribute');\n });\n };\n\n _proto4[\"@test the {{link-to}} component calls preventDefault\"] = function (assert) {\n var _this33 = this;\n\n this.router.map(function () {\n this.route('about');\n });\n this.addTemplate('index', \"{{#link-to 'about' id='about-link'}}About{{/link-to}}\");\n return this.visit('/').then(function () {\n assertNav({\n prevented: true\n }, function () {\n return _this33.$('#about-link').click();\n }, assert);\n });\n };\n\n _proto4[\"@test the {{link-to}} component does not call preventDefault if 'preventDefault=false' is passed as an option\"] = function (assert) {\n var _this34 = this;\n\n this.router.map(function () {\n this.route('about');\n });\n this.addTemplate('index', \"{{#link-to 'about' id='about-link' preventDefault=false}}About{{/link-to}}\");\n return this.visit('/').then(function () {\n assertNav({\n prevented: false\n }, function () {\n return _this34.$('#about-link').trigger('click');\n }, assert);\n });\n };\n\n _proto4[\"@test the {{link-to}} component does not call preventDefault if 'preventDefault=boundFalseyThing' is passed as an option\"] = function (assert) {\n var _this35 = this;\n\n this.router.map(function () {\n this.route('about');\n });\n this.addTemplate('index', \"{{#link-to 'about' id='about-link' preventDefault=boundFalseyThing}}About{{/link-to}}\");\n this.add('controller:index', _controller.default.extend({\n boundFalseyThing: false\n }));\n return this.visit('/').then(function () {\n assertNav({\n prevented: false\n }, function () {\n return _this35.$('#about-link').trigger('click');\n }, assert);\n });\n };\n\n _proto4[\"@test The {{link-to}} component does not call preventDefault if 'target' attribute is provided\"] = function (assert) {\n var _this36 = this;\n\n this.addTemplate('index', \"\\n

Home

\\n {{#link-to 'index' id='self-link' target='_blank'}}Self{{/link-to}}\\n \");\n return this.visit('/').then(function () {\n assertNav({\n prevented: false\n }, function () {\n return _this36.$('#self-link').click();\n }, assert);\n });\n };\n\n _proto4[\"@test The {{link-to}} component should preventDefault when 'target = _self'\"] = function (assert) {\n var _this37 = this;\n\n this.addTemplate('index', \"\\n

Home

\\n {{#link-to 'index' id='self-link' target='_self'}}Self{{/link-to}}\\n \");\n return this.visit('/').then(function () {\n assertNav({\n prevented: true\n }, function () {\n return _this37.$('#self-link').click();\n }, assert);\n });\n };\n\n _proto4[\"@test The {{link-to}} component should not transition if target is not equal to _self or empty\"] = function (assert) {\n var _this38 = this;\n\n this.addTemplate('index', \"\\n {{#link-to 'about' id='about-link' replace=true target='_blank'}}\\n About\\n {{/link-to}}\\n \");\n this.router.map(function () {\n this.route('about');\n });\n return this.visit('/').then(function () {\n return _this38.click('#about-link');\n }).then(function () {\n expectDeprecation(function () {\n var currentRouteName = _this38.applicationInstance.lookup('controller:application').get('currentRouteName');\n\n assert.notEqual(currentRouteName, 'about', 'link-to should not transition if target is not equal to _self or empty');\n }, 'Accessing `currentRouteName` on `controller:application` is deprecated, use the `currentRouteName` property on `service:router` instead.');\n });\n };\n\n _proto4[\"@test The {{link-to}} component accepts string/numeric arguments\"] = function (assert) {\n var _this39 = this;\n\n this.router.map(function () {\n this.route('filter', {\n path: '/filters/:filter'\n });\n this.route('post', {\n path: '/post/:post_id'\n });\n this.route('repo', {\n path: '/repo/:owner/:name'\n });\n });\n this.add('controller:filter', _controller.default.extend({\n filter: 'unpopular',\n repo: {\n owner: 'ember',\n name: 'ember.js'\n },\n post_id: 123\n }));\n this.addTemplate('filter', \"\\n

{{filter}}

\\n {{#link-to \\\"filter\\\" \\\"unpopular\\\" id=\\\"link\\\"}}Unpopular{{/link-to}}\\n {{#link-to \\\"filter\\\" filter id=\\\"path-link\\\"}}Unpopular{{/link-to}}\\n {{#link-to \\\"post\\\" post_id id=\\\"post-path-link\\\"}}Post{{/link-to}}\\n {{#link-to \\\"post\\\" 123 id=\\\"post-number-link\\\"}}Post{{/link-to}}\\n {{#link-to \\\"repo\\\" repo id=\\\"repo-object-link\\\"}}Repo{{/link-to}}\\n \");\n return this.visit('/filters/popular').then(function () {\n assert.equal(normalizeUrl(_this39.$('#link').attr('href')), '/filters/unpopular');\n assert.equal(normalizeUrl(_this39.$('#path-link').attr('href')), '/filters/unpopular');\n assert.equal(normalizeUrl(_this39.$('#post-path-link').attr('href')), '/post/123');\n assert.equal(normalizeUrl(_this39.$('#post-number-link').attr('href')), '/post/123');\n assert.equal(normalizeUrl(_this39.$('#repo-object-link').attr('href')), '/repo/ember/ember.js');\n });\n };\n\n _proto4[\"@test Issue 4201 - Shorthand for route.index shouldn't throw errors about context arguments\"] = function (assert) {\n var _this40 = this;\n\n assert.expect(2);\n this.router.map(function () {\n this.route('lobby', function () {\n this.route('index', {\n path: ':lobby_id'\n });\n this.route('list');\n });\n });\n this.add('route:lobby.index', _routing.Route.extend({\n model: function (params) {\n assert.equal(params.lobby_id, 'foobar');\n return params.lobby_id;\n }\n }));\n this.addTemplate('lobby.index', \"{{#link-to 'lobby' 'foobar' id='lobby-link'}}Lobby{{/link-to}}\");\n this.addTemplate('lobby.list', \"{{#link-to 'lobby' 'foobar' id='lobby-link'}}Lobby{{/link-to}}\");\n return this.visit('/lobby/list').then(function () {\n return _this40.click('#lobby-link');\n }).then(function () {\n return shouldBeActive(assert, _this40.$('#lobby-link'));\n });\n };\n\n _proto4[\"@test Quoteless route param performs property lookup\"] = function (assert) {\n var _this41 = this;\n\n this.router.map(function () {\n this.route('about');\n });\n this.addTemplate('index', \"\\n {{#link-to 'index' id='string-link'}}string{{/link-to}}\\n {{#link-to foo id='path-link'}}path{{/link-to}}\\n \");\n this.add('controller:index', _controller.default.extend({\n foo: 'index'\n }));\n\n var assertEquality = function (href) {\n assert.equal(normalizeUrl(_this41.$('#string-link').attr('href')), '/');\n assert.equal(normalizeUrl(_this41.$('#path-link').attr('href')), href);\n };\n\n return this.visit('/').then(function () {\n assertEquality('/');\n\n var controller = _this41.applicationInstance.lookup('controller:index');\n\n (0, _internalTestHelpers.runTask)(function () {\n return controller.set('foo', 'about');\n });\n assertEquality('/about');\n });\n };\n\n _proto4[\"@test The {{link-to}} component refreshes href element when one of params changes\"] = function (assert) {\n var _this42 = this;\n\n this.router.map(function () {\n this.route('post', {\n path: '/posts/:post_id'\n });\n });\n var post = {\n id: '1'\n };\n var secondPost = {\n id: '2'\n };\n this.addTemplate('index', \"{{#link-to \\\"post\\\" post id=\\\"post\\\"}}post{{/link-to}}\");\n this.add('controller:index', _controller.default.extend());\n return this.visit('/').then(function () {\n var indexController = _this42.applicationInstance.lookup('controller:index');\n\n (0, _internalTestHelpers.runTask)(function () {\n return indexController.set('post', post);\n });\n assert.equal(normalizeUrl(_this42.$('#post').attr('href')), '/posts/1', 'precond - Link has rendered href attr properly');\n (0, _internalTestHelpers.runTask)(function () {\n return indexController.set('post', secondPost);\n });\n assert.equal(_this42.$('#post').attr('href'), '/posts/2', 'href attr was updated after one of the params had been changed');\n (0, _internalTestHelpers.runTask)(function () {\n return indexController.set('post', null);\n });\n assert.equal(_this42.$('#post').attr('href'), '#', 'href attr becomes # when one of the arguments in nullified');\n });\n };\n\n _proto4[\"@test The {{link-to}} component is active when a route is active\"] = function (assert) {\n var _this43 = this;\n\n this.router.map(function () {\n this.route('about', function () {\n this.route('item');\n });\n });\n this.addTemplate('about', \"\\n
\\n {{#link-to 'about' id='about-link'}}About{{/link-to}}\\n {{#link-to 'about.item' id='item-link'}}Item{{/link-to}}\\n {{outlet}}\\n
\\n \");\n return this.visit('/about').then(function () {\n assert.equal(_this43.$('#about-link.active').length, 1, 'The about route link is active');\n assert.equal(_this43.$('#item-link.active').length, 0, 'The item route link is inactive');\n return _this43.visit('/about/item');\n }).then(function () {\n assert.equal(_this43.$('#about-link.active').length, 1, 'The about route link is active');\n assert.equal(_this43.$('#item-link.active').length, 1, 'The item route link is active');\n });\n };\n\n _proto4[\"@test The {{link-to}} component works in an #each'd array of string route names\"] = function (assert) {\n var _this44 = this;\n\n this.router.map(function () {\n this.route('foo');\n this.route('bar');\n this.route('rar');\n });\n this.add('controller:index', _controller.default.extend({\n routeNames: (0, _runtime.A)(['foo', 'bar', 'rar']),\n route1: 'bar',\n route2: 'foo'\n }));\n this.addTemplate('index', \"\\n {{#each routeNames as |routeName|}}\\n {{#link-to routeName}}{{routeName}}{{/link-to}}\\n {{/each}}\\n {{#each routeNames as |r|}}\\n {{#link-to r}}{{r}}{{/link-to}}\\n {{/each}}\\n {{#link-to route1}}a{{/link-to}}\\n {{#link-to route2}}b{{/link-to}}\\n \");\n\n var linksEqual = function (links, expected) {\n assert.equal(links.length, expected.length, 'Has correct number of links');\n var idx;\n\n for (idx = 0; idx < links.length; idx++) {\n var href = _this44.$(links[idx]).attr('href'); // Old IE includes the whole hostname as well\n\n\n assert.equal(href.slice(-expected[idx].length), expected[idx], \"Expected link to be '\" + expected[idx] + \"', but was '\" + href + \"'\");\n }\n };\n\n return this.visit('/').then(function () {\n linksEqual(_this44.$('a'), ['/foo', '/bar', '/rar', '/foo', '/bar', '/rar', '/bar', '/foo']);\n\n var indexController = _this44.applicationInstance.lookup('controller:index');\n\n (0, _internalTestHelpers.runTask)(function () {\n return indexController.set('route1', 'rar');\n });\n linksEqual(_this44.$('a'), ['/foo', '/bar', '/rar', '/foo', '/bar', '/rar', '/rar', '/foo']);\n (0, _internalTestHelpers.runTask)(function () {\n return indexController.routeNames.shiftObject();\n });\n linksEqual(_this44.$('a'), ['/bar', '/rar', '/bar', '/rar', '/rar', '/foo']);\n });\n };\n\n _proto4[\"@test The non-block form {{link-to}} component moves into the named route\"] = function (assert) {\n var _this45 = this;\n\n assert.expect(3);\n this.router.map(function () {\n this.route('contact');\n });\n this.addTemplate('index', \"\\n

Home

\\n {{link-to 'Contact us' 'contact' id='contact-link'}}\\n {{#link-to 'index' id='self-link'}}Self{{/link-to}}\\n \");\n this.addTemplate('contact', \"\\n

Contact

\\n {{link-to 'Home' 'index' id='home-link'}}\\n {{link-to 'Self' 'contact' id='self-link'}}\\n \");\n return this.visit('/').then(function () {\n return _this45.click('#contact-link');\n }).then(function () {\n assert.equal(_this45.$('h3.contact').length, 1, 'The contact template was rendered');\n assert.equal(_this45.$('#self-link.active').length, 1, 'The self-link was rendered with active class');\n assert.equal(_this45.$('#home-link:not(.active)').length, 1, 'The other link was rendered without active class');\n });\n };\n\n _proto4[\"@test The non-block form {{link-to}} component updates the link text when it is a binding\"] = function (assert) {\n var _this46 = this;\n\n assert.expect(8);\n this.router.map(function () {\n this.route('contact');\n });\n this.add('controller:index', _controller.default.extend({\n contactName: 'Jane'\n }));\n this.addTemplate('index', \"\\n

Home

\\n {{link-to contactName 'contact' id='contact-link'}}\\n {{#link-to 'index' id='self-link'}}Self{{/link-to}}\\n \");\n this.addTemplate('contact', \"\\n

Contact

\\n {{link-to 'Home' 'index' id='home-link'}}\\n {{link-to 'Self' 'contact' id='self-link'}}\\n \");\n return this.visit('/').then(function () {\n assert.equal(_this46.$('#contact-link').text(), 'Jane', 'The link title is correctly resolved');\n\n var controller = _this46.applicationInstance.lookup('controller:index');\n\n (0, _internalTestHelpers.runTask)(function () {\n return controller.set('contactName', 'Joe');\n });\n assert.equal(_this46.$('#contact-link').text(), 'Joe', 'The link title is correctly updated when the bound property changes');\n (0, _internalTestHelpers.runTask)(function () {\n return controller.set('contactName', 'Robert');\n });\n assert.equal(_this46.$('#contact-link').text(), 'Robert', 'The link title is correctly updated when the bound property changes a second time');\n return _this46.click('#contact-link');\n }).then(function () {\n assert.equal(_this46.$('h3.contact').length, 1, 'The contact template was rendered');\n assert.equal(_this46.$('#self-link.active').length, 1, 'The self-link was rendered with active class');\n assert.equal(_this46.$('#home-link:not(.active)').length, 1, 'The other link was rendered without active class');\n return _this46.click('#home-link');\n }).then(function () {\n assert.equal(_this46.$('h3.home').length, 1, 'The index template was rendered');\n assert.equal(_this46.$('#contact-link').text(), 'Robert', 'The link title is correctly updated when the route changes');\n });\n };\n\n _proto4[\"@test The non-block form {{link-to}} component moves into the named route with context\"] = function (assert) {\n var _this47 = this;\n\n assert.expect(5);\n this.router.map(function () {\n this.route('item', {\n path: '/item/:id'\n });\n });\n this.add('route:index', _routing.Route.extend({\n model: function () {\n return [{\n id: 'yehuda',\n name: 'Yehuda Katz'\n }, {\n id: 'tom',\n name: 'Tom Dale'\n }, {\n id: 'erik',\n name: 'Erik Brynroflsson'\n }];\n }\n }));\n this.addTemplate('index', \"\\n

Home

\\n
    \\n {{#each model as |person|}}\\n
  • \\n {{link-to person.name 'item' person id=person.id}}\\n
  • \\n {{/each}}\\n
\\n \");\n this.addTemplate('item', \"\\n

Item

\\n

{{model.name}}

\\n {{#link-to 'index' id='home-link'}}Home{{/link-to}}\\n \");\n return this.visit('/').then(function () {\n return _this47.click('#yehuda');\n }).then(function () {\n assert.equal(_this47.$('h3.item').length, 1, 'The item template was rendered');\n assert.equal(_this47.$('p').text(), 'Yehuda Katz', 'The name is correct');\n return _this47.click('#home-link');\n }).then(function () {\n assert.equal(normalizeUrl(_this47.$('li a#yehuda').attr('href')), '/item/yehuda');\n assert.equal(normalizeUrl(_this47.$('li a#tom').attr('href')), '/item/tom');\n assert.equal(normalizeUrl(_this47.$('li a#erik').attr('href')), '/item/erik');\n });\n };\n\n _proto4[\"@test The non-block form {{link-to}} performs property lookup\"] = function (assert) {\n var _this48 = this;\n\n this.router.map(function () {\n this.route('about');\n });\n this.addTemplate('index', \"\\n {{link-to 'string' 'index' id='string-link'}}\\n {{link-to path foo id='path-link'}}\\n \");\n this.add('controller:index', _controller.default.extend({\n foo: 'index'\n }));\n return this.visit('/').then(function () {\n var assertEquality = function (href) {\n assert.equal(normalizeUrl(_this48.$('#string-link').attr('href')), '/');\n assert.equal(normalizeUrl(_this48.$('#path-link').attr('href')), href);\n };\n\n assertEquality('/');\n\n var controller = _this48.applicationInstance.lookup('controller:index');\n\n (0, _internalTestHelpers.runTask)(function () {\n return controller.set('foo', 'about');\n });\n assertEquality('/about');\n });\n };\n\n _proto4[\"@test The non-block form {{link-to}} protects against XSS\"] = function (assert) {\n var _this49 = this;\n\n this.addTemplate('application', \"{{link-to display 'index' id='link'}}\");\n this.add('controller:application', _controller.default.extend({\n display: 'blahzorz'\n }));\n return this.visit('/').then(function () {\n assert.equal(_this49.$('#link').text(), 'blahzorz');\n\n var controller = _this49.applicationInstance.lookup('controller:application');\n\n (0, _internalTestHelpers.runTask)(function () {\n return controller.set('display', 'BLAMMO');\n });\n assert.equal(_this49.$('#link').text(), 'BLAMMO');\n assert.equal(_this49.$('b').length, 0);\n });\n };\n\n _proto4[\"@test the {{link-to}} component throws a useful error if you invoke it wrong\"] = function (assert) {\n var _this50 = this;\n\n assert.expect(1);\n this.router.map(function () {\n this.route('post', {\n path: 'post/:post_id'\n });\n });\n this.addTemplate('application', \"{{#link-to 'post'}}Post{{/link-to}}\");\n assert.throws(function () {\n _this50.visit('/');\n }, /(You attempted to define a `\\{\\{link-to \"post\"\\}\\}` but did not pass the parameters required for generating its dynamic segments.|You must provide param `post_id` to `generate`)/);\n return (0, _internalTestHelpers.runLoopSettled)();\n };\n\n _proto4[\"@test the {{link-to}} component does not throw an error if its route has exited\"] = function (assert) {\n var _this51 = this;\n\n assert.expect(0);\n this.router.map(function () {\n this.route('post', {\n path: 'post/:post_id'\n });\n });\n this.addTemplate('application', \"\\n {{#link-to 'index' id='home-link'}}Home{{/link-to}}\\n {{#link-to 'post' defaultPost id='default-post-link'}}Default Post{{/link-to}}\\n {{#if currentPost}}\\n {{#link-to 'post' currentPost id='current-post-link'}}Current Post{{/link-to}}\\n {{/if}}\\n \");\n this.add('controller:application', _controller.default.extend({\n defaultPost: {\n id: 1\n },\n postController: (0, _controller.inject)('post'),\n currentPost: (0, _metal.alias)('postController.model')\n }));\n this.add('controller:post', _controller.default.extend());\n this.add('route:post', _routing.Route.extend({\n model: function () {\n return {\n id: 2\n };\n },\n serialize: function (model) {\n return {\n post_id: model.id\n };\n }\n }));\n return this.visit('/').then(function () {\n return _this51.click('#default-post-link');\n }).then(function () {\n return _this51.click('#home-link');\n }).then(function () {\n return _this51.click('#current-post-link');\n }).then(function () {\n return _this51.click('#home-link');\n });\n };\n\n _proto4[\"@test {{link-to}} active property respects changing parent route context\"] = function (assert) {\n var _this52 = this;\n\n this.router.map(function () {\n this.route('things', {\n path: '/things/:name'\n }, function () {\n this.route('other');\n });\n });\n this.addTemplate('application', \"\\n {{link-to 'OMG' 'things' 'omg' id='omg-link'}}\\n {{link-to 'LOL' 'things' 'lol' id='lol-link'}}\\n \");\n return this.visit('/things/omg').then(function () {\n shouldBeActive(assert, _this52.$('#omg-link'));\n shouldNotBeActive(assert, _this52.$('#lol-link'));\n return _this52.visit('/things/omg/other');\n }).then(function () {\n shouldBeActive(assert, _this52.$('#omg-link'));\n shouldNotBeActive(assert, _this52.$('#lol-link'));\n });\n };\n\n _proto4[\"@test {{link-to}} populates href with default query param values even without query-params object\"] = function (assert) {\n var _this53 = this;\n\n this.add('controller:index', _controller.default.extend({\n queryParams: ['foo'],\n foo: '123'\n }));\n this.addTemplate('index', \"{{#link-to 'index' id='the-link'}}Index{{/link-to}}\");\n return this.visit('/').then(function () {\n assert.equal(_this53.$('#the-link').attr('href'), '/', 'link has right href');\n });\n };\n\n _proto4[\"@test {{link-to}} populates href with default query param values with empty query-params object\"] = function (assert) {\n var _this54 = this;\n\n this.add('controller:index', _controller.default.extend({\n queryParams: ['foo'],\n foo: '123'\n }));\n this.addTemplate('index', \"{{#link-to 'index' (query-params) id='the-link'}}Index{{/link-to}}\");\n return this.visit('/').then(function () {\n assert.equal(_this54.$('#the-link').attr('href'), '/', 'link has right href');\n });\n };\n\n _proto4[\"@test {{link-to}} with only query-params and a block updates when route changes\"] = function (assert) {\n var _this55 = this;\n\n this.router.map(function () {\n this.route('about');\n });\n this.add('controller:application', _controller.default.extend({\n queryParams: ['foo', 'bar'],\n foo: '123',\n bar: 'yes'\n }));\n this.addTemplate('application', \"{{#link-to (query-params foo='456' bar='NAW') id='the-link'}}Index{{/link-to}}\");\n return this.visit('/').then(function () {\n assert.equal(_this55.$('#the-link').attr('href'), '/?bar=NAW&foo=456', 'link has right href');\n return _this55.visit('/about');\n }).then(function () {\n assert.equal(_this55.$('#the-link').attr('href'), '/about?bar=NAW&foo=456', 'link has right href');\n });\n };\n\n _proto4[\"@test Block-less {{link-to}} with only query-params updates when route changes\"] = function (assert) {\n var _this56 = this;\n\n this.router.map(function () {\n this.route('about');\n });\n this.add('controller:application', _controller.default.extend({\n queryParams: ['foo', 'bar'],\n foo: '123',\n bar: 'yes'\n }));\n this.addTemplate('application', \"{{link-to \\\"Index\\\" (query-params foo='456' bar='NAW') id='the-link'}}\");\n return this.visit('/').then(function () {\n assert.equal(_this56.$('#the-link').attr('href'), '/?bar=NAW&foo=456', 'link has right href');\n return _this56.visit('/about');\n }).then(function () {\n assert.equal(_this56.$('#the-link').attr('href'), '/about?bar=NAW&foo=456', 'link has right href');\n });\n };\n\n _proto4['@test [GH#17018] passing model to link-to with `hash` helper works'] = function testGH17018PassingModelToLinkToWithHashHelperWorks() {\n var _this57 = this;\n\n this.router.map(function () {\n this.route('post', {\n path: '/posts/:post_id'\n });\n });\n this.add('route:index', _routing.Route.extend({\n model: function () {\n return _runtime.RSVP.hash({\n user: {\n name: 'Papa Smurf'\n }\n });\n }\n }));\n this.addTemplate('index', \"{{link-to 'Post' 'post' (hash id=\\\"someId\\\" user=this.model.user)}}\");\n this.addTemplate('post', 'Post: {{this.model.user.name}}');\n return this.visit('/').then(function () {\n _this57.assertComponentElement(_this57.firstChild, {\n tagName: 'a',\n attrs: {\n href: '/posts/someId'\n },\n content: 'Post'\n });\n\n return _this57.click('a');\n }).then(function () {\n _this57.assertText('Post: Papa Smurf');\n });\n };\n\n _proto4[\"@test The {{link-to}} component can use dynamic params\"] = function (assert) {\n var _this58 = this;\n\n this.router.map(function () {\n this.route('foo', {\n path: 'foo/:some/:thing'\n });\n this.route('bar', {\n path: 'bar/:some/:thing/:else'\n });\n });\n this.add('controller:index', _controller.default.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n this.dynamicLinkParams = ['foo', 'one', 'two'];\n }\n }));\n this.addTemplate('index', \"\\n

Home

\\n {{#link-to params=dynamicLinkParams id=\\\"dynamic-link\\\"}}Dynamic{{/link-to}}\\n \");\n return this.visit('/').then(function () {\n var link = _this58.$('#dynamic-link');\n\n assert.equal(link.attr('href'), '/foo/one/two');\n\n var controller = _this58.applicationInstance.lookup('controller:index');\n\n (0, _internalTestHelpers.runTask)(function () {\n controller.set('dynamicLinkParams', ['bar', 'one', 'two', 'three']);\n });\n assert.equal(link.attr('href'), '/bar/one/two/three');\n });\n };\n\n _proto4[\"@test GJ: {{link-to}} to a parent root model hook which performs a 'transitionTo' has correct active class #13256\"] = function (assert) {\n var _this59 = this;\n\n assert.expect(1);\n this.router.map(function () {\n this.route('parent', function () {\n this.route('child');\n });\n });\n this.add('route:parent', _routing.Route.extend({\n afterModel: function () {\n this.transitionTo('parent.child');\n }\n }));\n this.addTemplate('application', \"{{link-to 'Parent' 'parent' id='parent-link'}}\");\n return this.visit('/').then(function () {\n return _this59.click('#parent-link');\n }).then(function () {\n shouldBeActive(assert, _this59.$('#parent-link'));\n });\n };\n\n return _class4;\n }(_internalTestHelpers.ApplicationTestCase));\n (0, _internalTestHelpers.moduleFor)('The {{link-to}} component - loading states and warnings',\n /*#__PURE__*/\n function (_ApplicationTestCase5) {\n (0, _emberBabel.inheritsLoose)(_class5, _ApplicationTestCase5);\n\n function _class5() {\n return _ApplicationTestCase5.apply(this, arguments) || this;\n }\n\n var _proto5 = _class5.prototype;\n\n _proto5[\"@test {{link-to}} with null/undefined dynamic parameters are put in a loading state\"] = function (assert) {\n var _this60 = this;\n\n assert.expect(19);\n var warningMessage;\n\n if (true\n /* EMBER_GLIMMER_ANGLE_BRACKET_BUILT_INS */\n ) {\n warningMessage = 'This link is in an inactive loading state because at least one of its models currently has a null/undefined value, or the provided route name is invalid.';\n } else {\n warningMessage = 'This link-to is in an inactive loading state because at least one of its parameters presently has a null/undefined value, or the provided route name is invalid.';\n }\n\n this.router.map(function () {\n this.route('thing', {\n path: '/thing/:thing_id'\n });\n this.route('about');\n });\n this.addTemplate('index', \"\\n {{#link-to destinationRoute routeContext loadingClass='i-am-loading' id='context-link'}}\\n string\\n {{/link-to}}\\n {{#link-to secondRoute loadingClass=loadingClass id='static-link'}}\\n string\\n {{/link-to}}\\n \");\n this.add('controller:index', _controller.default.extend({\n destinationRoute: null,\n routeContext: null,\n loadingClass: 'i-am-loading'\n }));\n this.add('route:about', _routing.Route.extend({\n activate: function () {\n assert.ok(true, 'About was entered');\n }\n }));\n\n function assertLinkStatus(link, url) {\n if (url) {\n assert.equal(normalizeUrl(link.attr('href')), url, 'loaded link-to has expected href');\n assert.ok(!link.hasClass('i-am-loading'), 'loaded linkComponent has no loadingClass');\n } else {\n assert.equal(normalizeUrl(link.attr('href')), '#', \"unloaded link-to has href='#'\");\n assert.ok(link.hasClass('i-am-loading'), 'loading linkComponent has loadingClass');\n }\n }\n\n var contextLink, staticLink, controller;\n return this.visit('/').then(function () {\n contextLink = _this60.$('#context-link');\n staticLink = _this60.$('#static-link');\n controller = _this60.applicationInstance.lookup('controller:index');\n assertLinkStatus(contextLink);\n assertLinkStatus(staticLink);\n return expectWarning(function () {\n return _this60.click(contextLink[0]);\n }, warningMessage);\n }).then(function () {\n // Set the destinationRoute (context is still null).\n (0, _internalTestHelpers.runTask)(function () {\n return controller.set('destinationRoute', 'thing');\n });\n assertLinkStatus(contextLink); // Set the routeContext to an id\n\n (0, _internalTestHelpers.runTask)(function () {\n return controller.set('routeContext', '456');\n });\n assertLinkStatus(contextLink, '/thing/456'); // Test that 0 isn't interpreted as falsy.\n\n (0, _internalTestHelpers.runTask)(function () {\n return controller.set('routeContext', 0);\n });\n assertLinkStatus(contextLink, '/thing/0'); // Set the routeContext to an object\n\n (0, _internalTestHelpers.runTask)(function () {\n controller.set('routeContext', {\n id: 123\n });\n });\n assertLinkStatus(contextLink, '/thing/123'); // Set the destinationRoute back to null.\n\n (0, _internalTestHelpers.runTask)(function () {\n return controller.set('destinationRoute', null);\n });\n assertLinkStatus(contextLink);\n return expectWarning(function () {\n return _this60.click(staticLink[0]);\n }, warningMessage);\n }).then(function () {\n (0, _internalTestHelpers.runTask)(function () {\n return controller.set('secondRoute', 'about');\n });\n assertLinkStatus(staticLink, '/about'); // Click the now-active link\n\n return _this60.click(staticLink[0]);\n });\n };\n\n return _class5;\n }(_internalTestHelpers.ApplicationTestCase));\n\n function assertNav(options, callback, assert) {\n var nav = false;\n\n function check(event) {\n assert.equal(event.defaultPrevented, options.prevented, \"expected defaultPrevented=\" + options.prevented);\n nav = true;\n event.preventDefault();\n }\n\n try {\n document.addEventListener('click', check);\n callback();\n } finally {\n document.removeEventListener('click', check);\n assert.ok(nav, 'Expected a link to be clicked');\n }\n }\n});","enifed(\"@ember/-internals/glimmer/tests/integration/components/link-to/transitioning-classes-angle-test\", [\"ember-babel\", \"@ember/-internals/runtime\", \"@ember/-internals/routing\", \"internal-test-helpers\"], function (_emberBabel, _runtime, _routing, _internalTestHelpers) {\n \"use strict\";\n\n /* eslint-disable no-inner-declarations */\n // ^^^ remove after unflagging EMBER_GLIMMER_ANGLE_BRACKET_BUILT_INS\n if (true\n /* EMBER_GLIMMER_ANGLE_BRACKET_BUILT_INS */\n ) {\n function assertHasClass(assert, selector, label) {\n var testLabel = selector.attr('id') + \" should have class \" + label;\n assert.equal(selector.hasClass(label), true, testLabel);\n }\n\n function assertHasNoClass(assert, selector, label) {\n var testLabel = selector.attr('id') + \" should not have class \" + label;\n assert.equal(selector.hasClass(label), false, testLabel);\n }\n\n (0, _internalTestHelpers.moduleFor)(' component: .transitioning-in .transitioning-out CSS classes',\n /*#__PURE__*/\n function (_ApplicationTestCase) {\n (0, _emberBabel.inheritsLoose)(_class, _ApplicationTestCase);\n\n function _class() {\n var _this2;\n\n _this2 = _ApplicationTestCase.call(this) || this;\n _this2.aboutDefer = _runtime.RSVP.defer();\n _this2.otherDefer = _runtime.RSVP.defer();\n _this2.newsDefer = _runtime.RSVP.defer();\n\n var _this = (0, _emberBabel.assertThisInitialized)(_this2);\n\n _this2.router.map(function () {\n this.route('about');\n this.route('other');\n this.route('news');\n });\n\n _this2.add('route:about', _routing.Route.extend({\n model: function () {\n return _this.aboutDefer.promise;\n }\n }));\n\n _this2.add('route:other', _routing.Route.extend({\n model: function () {\n return _this.otherDefer.promise;\n }\n }));\n\n _this2.add('route:news', _routing.Route.extend({\n model: function () {\n return _this.newsDefer.promise;\n }\n }));\n\n _this2.addTemplate('application', \"\\n {{outlet}}\\n Index\\n About\\n Other\\n News\\n \");\n\n return _this2;\n }\n\n var _proto = _class.prototype;\n\n _proto.beforeEach = function beforeEach() {\n return this.visit('/');\n };\n\n _proto.afterEach = function afterEach() {\n _ApplicationTestCase.prototype.afterEach.call(this);\n\n this.aboutDefer = null;\n this.otherDefer = null;\n this.newsDefer = null;\n };\n\n _proto['@test while a transition is underway'] = function testWhileATransitionIsUnderway(assert) {\n var _this3 = this;\n\n var $index = this.$('#index-link');\n var $about = this.$('#about-link');\n var $other = this.$('#other-link');\n $about.click();\n assertHasClass(assert, $index, 'active');\n assertHasNoClass(assert, $about, 'active');\n assertHasNoClass(assert, $other, 'active');\n assertHasNoClass(assert, $index, 'ember-transitioning-in');\n assertHasClass(assert, $about, 'ember-transitioning-in');\n assertHasNoClass(assert, $other, 'ember-transitioning-in');\n assertHasClass(assert, $index, 'ember-transitioning-out');\n assertHasNoClass(assert, $about, 'ember-transitioning-out');\n assertHasNoClass(assert, $other, 'ember-transitioning-out');\n (0, _internalTestHelpers.runTask)(function () {\n return _this3.aboutDefer.resolve();\n });\n assertHasNoClass(assert, $index, 'active');\n assertHasClass(assert, $about, 'active');\n assertHasNoClass(assert, $other, 'active');\n assertHasNoClass(assert, $index, 'ember-transitioning-in');\n assertHasNoClass(assert, $about, 'ember-transitioning-in');\n assertHasNoClass(assert, $other, 'ember-transitioning-in');\n assertHasNoClass(assert, $index, 'ember-transitioning-out');\n assertHasNoClass(assert, $about, 'ember-transitioning-out');\n assertHasNoClass(assert, $other, 'ember-transitioning-out');\n };\n\n _proto['@test while a transition is underway with activeClass is false'] = function testWhileATransitionIsUnderwayWithActiveClassIsFalse(assert) {\n var _this4 = this;\n\n var $index = this.$('#index-link');\n var $news = this.$('#news-link');\n var $other = this.$('#other-link');\n $news.click();\n assertHasClass(assert, $index, 'active');\n assertHasNoClass(assert, $news, 'active');\n assertHasNoClass(assert, $other, 'active');\n assertHasNoClass(assert, $index, 'ember-transitioning-in');\n assertHasClass(assert, $news, 'ember-transitioning-in');\n assertHasNoClass(assert, $other, 'ember-transitioning-in');\n assertHasClass(assert, $index, 'ember-transitioning-out');\n assertHasNoClass(assert, $news, 'ember-transitioning-out');\n assertHasNoClass(assert, $other, 'ember-transitioning-out');\n (0, _internalTestHelpers.runTask)(function () {\n return _this4.newsDefer.resolve();\n });\n assertHasNoClass(assert, $index, 'active');\n assertHasNoClass(assert, $news, 'active');\n assertHasNoClass(assert, $other, 'active');\n assertHasNoClass(assert, $index, 'ember-transitioning-in');\n assertHasNoClass(assert, $news, 'ember-transitioning-in');\n assertHasNoClass(assert, $other, 'ember-transitioning-in');\n assertHasNoClass(assert, $index, 'ember-transitioning-out');\n assertHasNoClass(assert, $news, 'ember-transitioning-out');\n assertHasNoClass(assert, $other, 'ember-transitioning-out');\n };\n\n return _class;\n }(_internalTestHelpers.ApplicationTestCase));\n (0, _internalTestHelpers.moduleFor)(\" component: .transitioning-in .transitioning-out CSS classes - nested link-to's\",\n /*#__PURE__*/\n function (_ApplicationTestCase2) {\n (0, _emberBabel.inheritsLoose)(_class2, _ApplicationTestCase2);\n\n function _class2() {\n var _this5;\n\n _this5 = _ApplicationTestCase2.call(this) || this;\n _this5.aboutDefer = _runtime.RSVP.defer();\n _this5.otherDefer = _runtime.RSVP.defer();\n\n var _this = (0, _emberBabel.assertThisInitialized)(_this5);\n\n _this5.router.map(function () {\n this.route('parent-route', function () {\n this.route('about');\n this.route('other');\n });\n });\n\n _this5.add('route:parent-route.about', _routing.Route.extend({\n model: function () {\n return _this.aboutDefer.promise;\n }\n }));\n\n _this5.add('route:parent-route.other', _routing.Route.extend({\n model: function () {\n return _this.otherDefer.promise;\n }\n }));\n\n _this5.addTemplate('application', \"\\n {{outlet}}\\n \\n Index\\n \\n \\n About\\n \\n \\n Other\\n \\n \");\n\n return _this5;\n }\n\n var _proto2 = _class2.prototype;\n\n _proto2.beforeEach = function beforeEach() {\n return this.visit('/');\n };\n\n _proto2.resolveAbout = function resolveAbout() {\n var _this6 = this;\n\n return (0, _internalTestHelpers.runTask)(function () {\n _this6.aboutDefer.resolve();\n\n _this6.aboutDefer = _runtime.RSVP.defer();\n });\n };\n\n _proto2.resolveOther = function resolveOther() {\n var _this7 = this;\n\n return (0, _internalTestHelpers.runTask)(function () {\n _this7.otherDefer.resolve();\n\n _this7.otherDefer = _runtime.RSVP.defer();\n });\n };\n\n _proto2.teardown = function teardown() {\n _ApplicationTestCase2.prototype.teardown.call(this);\n\n this.aboutDefer = null;\n this.otherDefer = null;\n };\n\n _proto2[\"@test while a transition is underway with nested link-to's\"] = function (assert) {\n // TODO undo changes to this test but currently this test navigates away if navigation\n // outlet is not stable and the second $about.click() is triggered.\n var $about = this.$('#about-link');\n $about.click();\n var $index = this.$('#index-link');\n $about = this.$('#about-link');\n var $other = this.$('#other-link');\n assertHasClass(assert, $index, 'active');\n assertHasNoClass(assert, $about, 'active');\n assertHasNoClass(assert, $about, 'active');\n assertHasNoClass(assert, $index, 'ember-transitioning-in');\n assertHasClass(assert, $about, 'ember-transitioning-in');\n assertHasNoClass(assert, $other, 'ember-transitioning-in');\n assertHasClass(assert, $index, 'ember-transitioning-out');\n assertHasNoClass(assert, $about, 'ember-transitioning-out');\n assertHasNoClass(assert, $other, 'ember-transitioning-out');\n this.resolveAbout();\n $index = this.$('#index-link');\n $about = this.$('#about-link');\n $other = this.$('#other-link');\n assertHasNoClass(assert, $index, 'active');\n assertHasClass(assert, $about, 'active');\n assertHasNoClass(assert, $other, 'active');\n assertHasNoClass(assert, $index, 'ember-transitioning-in');\n assertHasNoClass(assert, $about, 'ember-transitioning-in');\n assertHasNoClass(assert, $other, 'ember-transitioning-in');\n assertHasNoClass(assert, $index, 'ember-transitioning-out');\n assertHasNoClass(assert, $about, 'ember-transitioning-out');\n assertHasNoClass(assert, $other, 'ember-transitioning-out');\n $other.click();\n $index = this.$('#index-link');\n $about = this.$('#about-link');\n $other = this.$('#other-link');\n assertHasNoClass(assert, $index, 'active');\n assertHasClass(assert, $about, 'active');\n assertHasNoClass(assert, $other, 'active');\n assertHasNoClass(assert, $index, 'ember-transitioning-in');\n assertHasNoClass(assert, $about, 'ember-transitioning-in');\n assertHasClass(assert, $other, 'ember-transitioning-in');\n assertHasNoClass(assert, $index, 'ember-transitioning-out');\n assertHasClass(assert, $about, 'ember-transitioning-out');\n assertHasNoClass(assert, $other, 'ember-transitioning-out');\n this.resolveOther();\n $index = this.$('#index-link');\n $about = this.$('#about-link');\n $other = this.$('#other-link');\n assertHasNoClass(assert, $index, 'active');\n assertHasNoClass(assert, $about, 'active');\n assertHasClass(assert, $other, 'active');\n assertHasNoClass(assert, $index, 'ember-transitioning-in');\n assertHasNoClass(assert, $about, 'ember-transitioning-in');\n assertHasNoClass(assert, $other, 'ember-transitioning-in');\n assertHasNoClass(assert, $index, 'ember-transitioning-out');\n assertHasNoClass(assert, $about, 'ember-transitioning-out');\n assertHasNoClass(assert, $other, 'ember-transitioning-out');\n $about.click();\n $index = this.$('#index-link');\n $about = this.$('#about-link');\n $other = this.$('#other-link');\n assertHasNoClass(assert, $index, 'active');\n assertHasNoClass(assert, $about, 'active');\n assertHasClass(assert, $other, 'active');\n assertHasNoClass(assert, $index, 'ember-transitioning-in');\n assertHasClass(assert, $about, 'ember-transitioning-in');\n assertHasNoClass(assert, $other, 'ember-transitioning-in');\n assertHasNoClass(assert, $index, 'ember-transitioning-out');\n assertHasNoClass(assert, $about, 'ember-transitioning-out');\n assertHasClass(assert, $other, 'ember-transitioning-out');\n this.resolveAbout();\n $index = this.$('#index-link');\n $about = this.$('#about-link');\n $other = this.$('#other-link');\n assertHasNoClass(assert, $index, 'active');\n assertHasClass(assert, $about, 'active');\n assertHasNoClass(assert, $other, 'active');\n assertHasNoClass(assert, $index, 'ember-transitioning-in');\n assertHasNoClass(assert, $about, 'ember-transitioning-in');\n assertHasNoClass(assert, $other, 'ember-transitioning-in');\n assertHasNoClass(assert, $index, 'ember-transitioning-out');\n assertHasNoClass(assert, $about, 'ember-transitioning-out');\n assertHasNoClass(assert, $other, 'ember-transitioning-out');\n };\n\n return _class2;\n }(_internalTestHelpers.ApplicationTestCase));\n }\n});","enifed(\"@ember/-internals/glimmer/tests/integration/components/link-to/transitioning-classes-curly-test\", [\"ember-babel\", \"@ember/-internals/runtime\", \"@ember/-internals/routing\", \"internal-test-helpers\"], function (_emberBabel, _runtime, _routing, _internalTestHelpers) {\n \"use strict\";\n\n function assertHasClass(assert, selector, label) {\n var testLabel = selector.attr('id') + \" should have class \" + label;\n assert.equal(selector.hasClass(label), true, testLabel);\n }\n\n function assertHasNoClass(assert, selector, label) {\n var testLabel = selector.attr('id') + \" should not have class \" + label;\n assert.equal(selector.hasClass(label), false, testLabel);\n }\n\n (0, _internalTestHelpers.moduleFor)('{{link-to}} component: .transitioning-in .transitioning-out CSS classes',\n /*#__PURE__*/\n function (_ApplicationTestCase) {\n (0, _emberBabel.inheritsLoose)(_class, _ApplicationTestCase);\n\n function _class() {\n var _this2;\n\n _this2 = _ApplicationTestCase.call(this) || this;\n _this2.aboutDefer = _runtime.RSVP.defer();\n _this2.otherDefer = _runtime.RSVP.defer();\n _this2.newsDefer = _runtime.RSVP.defer();\n\n var _this = (0, _emberBabel.assertThisInitialized)(_this2);\n\n _this2.router.map(function () {\n this.route('about');\n this.route('other');\n this.route('news');\n });\n\n _this2.add('route:about', _routing.Route.extend({\n model: function () {\n return _this.aboutDefer.promise;\n }\n }));\n\n _this2.add('route:other', _routing.Route.extend({\n model: function () {\n return _this.otherDefer.promise;\n }\n }));\n\n _this2.add('route:news', _routing.Route.extend({\n model: function () {\n return _this.newsDefer.promise;\n }\n }));\n\n _this2.addTemplate('application', \"\\n {{outlet}}\\n {{link-to 'Index' 'index' id='index-link'}}\\n {{link-to 'About' 'about' id='about-link'}}\\n {{link-to 'Other' 'other' id='other-link'}}\\n {{link-to 'News' 'news' activeClass=false id='news-link'}}\\n \");\n\n return _this2;\n }\n\n var _proto = _class.prototype;\n\n _proto.beforeEach = function beforeEach() {\n return this.visit('/');\n };\n\n _proto.afterEach = function afterEach() {\n _ApplicationTestCase.prototype.afterEach.call(this);\n\n this.aboutDefer = null;\n this.otherDefer = null;\n this.newsDefer = null;\n };\n\n _proto['@test while a transition is underway'] = function testWhileATransitionIsUnderway(assert) {\n var _this3 = this;\n\n var $index = this.$('#index-link');\n var $about = this.$('#about-link');\n var $other = this.$('#other-link');\n $about.click();\n assertHasClass(assert, $index, 'active');\n assertHasNoClass(assert, $about, 'active');\n assertHasNoClass(assert, $other, 'active');\n assertHasNoClass(assert, $index, 'ember-transitioning-in');\n assertHasClass(assert, $about, 'ember-transitioning-in');\n assertHasNoClass(assert, $other, 'ember-transitioning-in');\n assertHasClass(assert, $index, 'ember-transitioning-out');\n assertHasNoClass(assert, $about, 'ember-transitioning-out');\n assertHasNoClass(assert, $other, 'ember-transitioning-out');\n (0, _internalTestHelpers.runTask)(function () {\n return _this3.aboutDefer.resolve();\n });\n assertHasNoClass(assert, $index, 'active');\n assertHasClass(assert, $about, 'active');\n assertHasNoClass(assert, $other, 'active');\n assertHasNoClass(assert, $index, 'ember-transitioning-in');\n assertHasNoClass(assert, $about, 'ember-transitioning-in');\n assertHasNoClass(assert, $other, 'ember-transitioning-in');\n assertHasNoClass(assert, $index, 'ember-transitioning-out');\n assertHasNoClass(assert, $about, 'ember-transitioning-out');\n assertHasNoClass(assert, $other, 'ember-transitioning-out');\n };\n\n _proto['@test while a transition is underway with activeClass is false'] = function testWhileATransitionIsUnderwayWithActiveClassIsFalse(assert) {\n var _this4 = this;\n\n var $index = this.$('#index-link');\n var $news = this.$('#news-link');\n var $other = this.$('#other-link');\n $news.click();\n assertHasClass(assert, $index, 'active');\n assertHasNoClass(assert, $news, 'active');\n assertHasNoClass(assert, $other, 'active');\n assertHasNoClass(assert, $index, 'ember-transitioning-in');\n assertHasClass(assert, $news, 'ember-transitioning-in');\n assertHasNoClass(assert, $other, 'ember-transitioning-in');\n assertHasClass(assert, $index, 'ember-transitioning-out');\n assertHasNoClass(assert, $news, 'ember-transitioning-out');\n assertHasNoClass(assert, $other, 'ember-transitioning-out');\n (0, _internalTestHelpers.runTask)(function () {\n return _this4.newsDefer.resolve();\n });\n assertHasNoClass(assert, $index, 'active');\n assertHasNoClass(assert, $news, 'active');\n assertHasNoClass(assert, $other, 'active');\n assertHasNoClass(assert, $index, 'ember-transitioning-in');\n assertHasNoClass(assert, $news, 'ember-transitioning-in');\n assertHasNoClass(assert, $other, 'ember-transitioning-in');\n assertHasNoClass(assert, $index, 'ember-transitioning-out');\n assertHasNoClass(assert, $news, 'ember-transitioning-out');\n assertHasNoClass(assert, $other, 'ember-transitioning-out');\n };\n\n return _class;\n }(_internalTestHelpers.ApplicationTestCase));\n (0, _internalTestHelpers.moduleFor)(\"{{link-to}} component: .transitioning-in .transitioning-out CSS classes - nested link-to's\",\n /*#__PURE__*/\n function (_ApplicationTestCase2) {\n (0, _emberBabel.inheritsLoose)(_class2, _ApplicationTestCase2);\n\n function _class2() {\n var _this5;\n\n _this5 = _ApplicationTestCase2.call(this) || this;\n _this5.aboutDefer = _runtime.RSVP.defer();\n _this5.otherDefer = _runtime.RSVP.defer();\n\n var _this = (0, _emberBabel.assertThisInitialized)(_this5);\n\n _this5.router.map(function () {\n this.route('parent-route', function () {\n this.route('about');\n this.route('other');\n });\n });\n\n _this5.add('route:parent-route.about', _routing.Route.extend({\n model: function () {\n return _this.aboutDefer.promise;\n }\n }));\n\n _this5.add('route:parent-route.other', _routing.Route.extend({\n model: function () {\n return _this.otherDefer.promise;\n }\n }));\n\n _this5.addTemplate('application', \"\\n {{outlet}}\\n {{#link-to 'index' tagName='li'}}\\n {{link-to 'Index' 'index' id='index-link'}}\\n {{/link-to}}\\n {{#link-to 'parent-route.about' tagName='li'}}\\n {{link-to 'About' 'parent-route.about' id='about-link'}}\\n {{/link-to}}\\n {{#link-to 'parent-route.other' tagName='li'}}\\n {{link-to 'Other' 'parent-route.other' id='other-link'}}\\n {{/link-to}}\\n \");\n\n return _this5;\n }\n\n var _proto2 = _class2.prototype;\n\n _proto2.beforeEach = function beforeEach() {\n return this.visit('/');\n };\n\n _proto2.resolveAbout = function resolveAbout() {\n var _this6 = this;\n\n return (0, _internalTestHelpers.runTask)(function () {\n _this6.aboutDefer.resolve();\n\n _this6.aboutDefer = _runtime.RSVP.defer();\n });\n };\n\n _proto2.resolveOther = function resolveOther() {\n var _this7 = this;\n\n return (0, _internalTestHelpers.runTask)(function () {\n _this7.otherDefer.resolve();\n\n _this7.otherDefer = _runtime.RSVP.defer();\n });\n };\n\n _proto2.teardown = function teardown() {\n _ApplicationTestCase2.prototype.teardown.call(this);\n\n this.aboutDefer = null;\n this.otherDefer = null;\n };\n\n _proto2[\"@test while a transition is underway with nested link-to's\"] = function (assert) {\n // TODO undo changes to this test but currently this test navigates away if navigation\n // outlet is not stable and the second $about.click() is triggered.\n var $about = this.$('#about-link');\n $about.click();\n var $index = this.$('#index-link');\n $about = this.$('#about-link');\n var $other = this.$('#other-link');\n assertHasClass(assert, $index, 'active');\n assertHasNoClass(assert, $about, 'active');\n assertHasNoClass(assert, $about, 'active');\n assertHasNoClass(assert, $index, 'ember-transitioning-in');\n assertHasClass(assert, $about, 'ember-transitioning-in');\n assertHasNoClass(assert, $other, 'ember-transitioning-in');\n assertHasClass(assert, $index, 'ember-transitioning-out');\n assertHasNoClass(assert, $about, 'ember-transitioning-out');\n assertHasNoClass(assert, $other, 'ember-transitioning-out');\n this.resolveAbout();\n $index = this.$('#index-link');\n $about = this.$('#about-link');\n $other = this.$('#other-link');\n assertHasNoClass(assert, $index, 'active');\n assertHasClass(assert, $about, 'active');\n assertHasNoClass(assert, $other, 'active');\n assertHasNoClass(assert, $index, 'ember-transitioning-in');\n assertHasNoClass(assert, $about, 'ember-transitioning-in');\n assertHasNoClass(assert, $other, 'ember-transitioning-in');\n assertHasNoClass(assert, $index, 'ember-transitioning-out');\n assertHasNoClass(assert, $about, 'ember-transitioning-out');\n assertHasNoClass(assert, $other, 'ember-transitioning-out');\n $other.click();\n $index = this.$('#index-link');\n $about = this.$('#about-link');\n $other = this.$('#other-link');\n assertHasNoClass(assert, $index, 'active');\n assertHasClass(assert, $about, 'active');\n assertHasNoClass(assert, $other, 'active');\n assertHasNoClass(assert, $index, 'ember-transitioning-in');\n assertHasNoClass(assert, $about, 'ember-transitioning-in');\n assertHasClass(assert, $other, 'ember-transitioning-in');\n assertHasNoClass(assert, $index, 'ember-transitioning-out');\n assertHasClass(assert, $about, 'ember-transitioning-out');\n assertHasNoClass(assert, $other, 'ember-transitioning-out');\n this.resolveOther();\n $index = this.$('#index-link');\n $about = this.$('#about-link');\n $other = this.$('#other-link');\n assertHasNoClass(assert, $index, 'active');\n assertHasNoClass(assert, $about, 'active');\n assertHasClass(assert, $other, 'active');\n assertHasNoClass(assert, $index, 'ember-transitioning-in');\n assertHasNoClass(assert, $about, 'ember-transitioning-in');\n assertHasNoClass(assert, $other, 'ember-transitioning-in');\n assertHasNoClass(assert, $index, 'ember-transitioning-out');\n assertHasNoClass(assert, $about, 'ember-transitioning-out');\n assertHasNoClass(assert, $other, 'ember-transitioning-out');\n $about.click();\n $index = this.$('#index-link');\n $about = this.$('#about-link');\n $other = this.$('#other-link');\n assertHasNoClass(assert, $index, 'active');\n assertHasNoClass(assert, $about, 'active');\n assertHasClass(assert, $other, 'active');\n assertHasNoClass(assert, $index, 'ember-transitioning-in');\n assertHasClass(assert, $about, 'ember-transitioning-in');\n assertHasNoClass(assert, $other, 'ember-transitioning-in');\n assertHasNoClass(assert, $index, 'ember-transitioning-out');\n assertHasNoClass(assert, $about, 'ember-transitioning-out');\n assertHasClass(assert, $other, 'ember-transitioning-out');\n this.resolveAbout();\n $index = this.$('#index-link');\n $about = this.$('#about-link');\n $other = this.$('#other-link');\n assertHasNoClass(assert, $index, 'active');\n assertHasClass(assert, $about, 'active');\n assertHasNoClass(assert, $other, 'active');\n assertHasNoClass(assert, $index, 'ember-transitioning-in');\n assertHasNoClass(assert, $about, 'ember-transitioning-in');\n assertHasNoClass(assert, $other, 'ember-transitioning-in');\n assertHasNoClass(assert, $index, 'ember-transitioning-out');\n assertHasNoClass(assert, $about, 'ember-transitioning-out');\n assertHasNoClass(assert, $other, 'ember-transitioning-out');\n };\n\n return _class2;\n }(_internalTestHelpers.ApplicationTestCase));\n});","enifed(\"@ember/-internals/glimmer/tests/integration/components/local-lookup-test\", [\"ember-babel\", \"internal-test-helpers\", \"ember-template-compiler\", \"@ember/-internals/glimmer\", \"@ember/-internals/glimmer/tests/utils/helpers\"], function (_emberBabel, _internalTestHelpers, _emberTemplateCompiler, _glimmer, _helpers) {\n \"use strict\";\n\n var LocalLookupTest =\n /*#__PURE__*/\n function (_RenderingTestCase) {\n (0, _emberBabel.inheritsLoose)(LocalLookupTest, _RenderingTestCase);\n\n function LocalLookupTest() {\n return _RenderingTestCase.apply(this, arguments) || this;\n }\n\n var _proto = LocalLookupTest.prototype;\n\n _proto['@test it can lookup a local template'] = function testItCanLookupALocalTemplate() {\n var _this = this;\n\n this.registerComponent('x-outer/x-inner', {\n template: 'Nested template says: {{yield}}'\n });\n this.registerComponent('x-outer', {\n template: '{{#x-inner}}Hi!{{/x-inner}}'\n });\n this.render('{{x-outer}}');\n this.assertText('Nested template says: Hi!', 'Initial render works');\n (0, _internalTestHelpers.runTask)(function () {\n return _this.rerender();\n });\n this.assertText('Nested template says: Hi!', 'Re-render works');\n };\n\n _proto['@test tagless blockless component can lookup local template'] = function testTaglessBlocklessComponentCanLookupLocalTemplate() {\n var _this2 = this;\n\n this.registerComponent('x-outer/x-inner', {\n template: 'Nested template says: {{yield}}'\n });\n this.registerTemplate('components/x-outer', '{{#x-inner}}Hi!{{/x-inner}}');\n this.registerComponent('x-outer', {\n ComponentClass: _helpers.Component.extend({\n tagName: ''\n })\n });\n this.render('{{x-outer}}');\n this.assertText('Nested template says: Hi!', 'Re-render works');\n (0, _internalTestHelpers.runTask)(function () {\n return _this2.rerender();\n });\n this.assertText('Nested template says: Hi!', 'Re-render works');\n };\n\n _proto['@test it can lookup a local component template'] = function testItCanLookupALocalComponentTemplate() {\n var _this3 = this;\n\n this.registerTemplate('components/x-outer/x-inner', 'Nested template says: {{yield}}');\n this.registerTemplate('components/x-outer', '{{#x-inner}}Hi!{{/x-inner}}');\n this.render('{{x-outer}}');\n this.assertText('Nested template says: Hi!', 'Initial render works');\n (0, _internalTestHelpers.runTask)(function () {\n return _this3.rerender();\n });\n this.assertText('Nested template says: Hi!', 'Re-render works');\n };\n\n _proto['@test it can local lookup a dynamic component'] = function testItCanLocalLookupADynamicComponent() {\n var _this4 = this;\n\n this.registerComponent('foo-bar', {\n template: 'yall finished {{component child}}'\n });\n this.registerComponent('foo-bar/biz-baz', {\n template: 'or yall done?'\n });\n this.render('{{foo-bar child=child}}', {\n child: 'biz-baz'\n });\n this.assertText('yall finished or yall done?');\n (0, _internalTestHelpers.runTask)(function () {\n return _this4.rerender();\n });\n this.assertText('yall finished or yall done?');\n };\n\n _proto['@test it can local lookup a dynamic component from a dynamic component'] = function testItCanLocalLookupADynamicComponentFromADynamicComponent() {\n var _this5 = this;\n\n this.registerComponent('foo-bar', {\n template: 'yall finished {{component child}}'\n });\n this.registerComponent('foo-bar/biz-baz', {\n template: 'or yall done?'\n });\n this.render('{{component componentName child=child}}', {\n componentName: 'foo-bar',\n child: 'biz-baz'\n });\n this.assertText('yall finished or yall done?');\n (0, _internalTestHelpers.runTask)(function () {\n return _this5.rerender();\n });\n this.assertText('yall finished or yall done?');\n };\n\n _proto['@test it can local lookup a dynamic component from a passed named argument'] = function testItCanLocalLookupADynamicComponentFromAPassedNamedArgument() {\n var _this6 = this;\n\n this.registerComponent('parent-foo', {\n template: \"yall finished {{global-biz baz=(component 'local-bar')}}\"\n });\n this.registerComponent('global-biz', {\n template: 'or {{component baz}}'\n });\n this.registerComponent('parent-foo/local-bar', {\n template: 'yall done?'\n });\n this.render('{{parent-foo}}');\n this.assertText('yall finished or yall done?');\n (0, _internalTestHelpers.runTask)(function () {\n return _this6.rerender();\n });\n this.assertText('yall finished or yall done?');\n };\n\n _proto['@test it can local lookup a re-wrapped dynamic component from a passed named argument'] = function testItCanLocalLookupAReWrappedDynamicComponentFromAPassedNamedArgument() {\n var _this7 = this;\n\n this.registerComponent('parent-foo', {\n template: \"yall finished {{global-x comp=(component 'local-bar')}}\"\n });\n this.registerComponent('global-x', {\n template: \"or {{global-y comp=(component comp phrase='done')}}\"\n });\n this.registerComponent('global-y', {\n template: \"{{component comp}}?\"\n });\n this.registerComponent('parent-foo/local-bar', {\n template: 'yall {{phrase}}'\n });\n this.render('{{parent-foo}}');\n this.assertText('yall finished or yall done?');\n (0, _internalTestHelpers.runTask)(function () {\n return _this7.rerender();\n });\n this.assertText('yall finished or yall done?');\n };\n\n _proto['@test it can nest local lookups of dynamic components from a passed named argument'] = function testItCanNestLocalLookupsOfDynamicComponentsFromAPassedNamedArgument() {\n var _this8 = this;\n\n this.registerComponent('parent-foo', {\n template: \"yall finished {{global-x comp=(component 'local-bar')}}\"\n });\n this.registerComponent('global-x', {\n template: \"or {{global-y comp=(component comp phrase='done')}}\"\n });\n this.registerComponent('global-y', {\n template: \"{{component comp}}{{component 'local-bar'}}\"\n });\n this.registerComponent('parent-foo/local-bar', {\n template: 'yall {{phrase}}'\n });\n this.registerComponent('global-y/local-bar', {\n template: \"?\"\n });\n this.render('{{parent-foo}}');\n this.assertText('yall finished or yall done?');\n (0, _internalTestHelpers.runTask)(function () {\n return _this8.rerender();\n });\n this.assertText('yall finished or yall done?');\n };\n\n _proto['@test it can switch from local to global lookups of dynamic components from a passed named argument'] = function testItCanSwitchFromLocalToGlobalLookupsOfDynamicComponentsFromAPassedNamedArgument() {\n var _this9 = this;\n\n this.registerComponent('parent-foo', {\n template: \"yall finished {{global-x comp=(component bar)}}\"\n });\n this.registerComponent('global-x', {\n template: \"or yall {{component comp}}\"\n });\n this.registerComponent('parent-foo/local-bar', {\n template: 'done?'\n });\n this.registerComponent('global-bar', {\n template: \"ready?\"\n });\n this.render('{{parent-foo bar=bar}}', {\n bar: 'local-bar'\n });\n this.assertText('yall finished or yall done?');\n (0, _internalTestHelpers.runTask)(function () {\n return _this9.context.set('bar', 'global-bar');\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this9.rerender();\n });\n this.assertText('yall finished or yall ready?');\n };\n\n _proto['@test it can lookup a local helper'] = function testItCanLookupALocalHelper() {\n var _this10 = this;\n\n this.registerHelper('x-outer/x-helper', function () {\n return 'Who dis?';\n });\n this.registerComponent('x-outer', {\n template: 'Who dat? {{x-helper}}'\n });\n this.render('{{x-outer}}');\n this.assertText('Who dat? Who dis?', 'Initial render works');\n (0, _internalTestHelpers.runTask)(function () {\n return _this10.rerender();\n });\n this.assertText('Who dat? Who dis?', 'Re-render works');\n };\n\n _proto['@test it overrides global helper lookup'] = function testItOverridesGlobalHelperLookup() {\n var _this11 = this;\n\n this.registerHelper('x-outer/x-helper', function () {\n return 'Who dis?';\n });\n this.registerHelper('x-helper', function () {\n return 'I dunno';\n });\n this.registerComponent('x-outer', {\n template: 'Who dat? {{x-helper}}'\n });\n this.render('{{x-outer}} {{x-helper}}');\n this.assertText('Who dat? Who dis? I dunno', 'Initial render works');\n (0, _internalTestHelpers.runTask)(function () {\n return _this11.rerender();\n });\n this.assertText('Who dat? Who dis? I dunno', 'Re-render works');\n };\n\n _proto['@test lookup without match issues standard assertion (with local helper name)'] = function testLookupWithoutMatchIssuesStandardAssertionWithLocalHelperName() {\n var _this12 = this;\n\n this.registerComponent('x-outer', {\n template: '{{#x-inner}}Hi!{{/x-inner}}'\n });\n expectAssertion(function () {\n _this12.render('{{x-outer}}');\n }, /A component or helper named \"x-inner\" could not be found/);\n };\n\n _proto['@test overrides global lookup'] = function testOverridesGlobalLookup() {\n var _this13 = this;\n\n this.registerComponent('x-outer', {\n template: '{{#x-inner}}Hi!{{/x-inner}}'\n });\n this.registerComponent('x-outer/x-inner', {\n template: 'Nested template says (from local): {{yield}}'\n });\n this.registerComponent('x-inner', {\n template: 'Nested template says (from global): {{yield}}'\n });\n this.render('{{#x-inner}}Hi!{{/x-inner}} {{x-outer}} {{#x-outer/x-inner}}Hi!{{/x-outer/x-inner}}');\n this.assertText('Nested template says (from global): Hi! Nested template says (from local): Hi! Nested template says (from local): Hi!');\n (0, _internalTestHelpers.runTask)(function () {\n return _this13.rerender();\n });\n this.assertText('Nested template says (from global): Hi! Nested template says (from local): Hi! Nested template says (from local): Hi!');\n };\n\n return LocalLookupTest;\n }(_internalTestHelpers.RenderingTestCase); // first run these tests with expandLocalLookup\n\n\n function buildResolver() {\n var resolver = {\n resolve: function () {},\n expandLocalLookup: function (fullName, sourceFullName) {\n if (!sourceFullName) {\n return null;\n }\n\n var _sourceFullName$split = sourceFullName.split(':'),\n sourceType = _sourceFullName$split[0],\n sourceName = _sourceFullName$split[1];\n\n var _fullName$split = fullName.split(':'),\n type = _fullName$split[0],\n name = _fullName$split[1];\n\n sourceName = sourceName.replace('my-app/', '');\n\n if (sourceType === 'template' && sourceName.slice(0, 21) === 'templates/components/') {\n sourceName = sourceName.slice(21);\n }\n\n name = name.replace('my-app/', '');\n\n if (type === 'template' && name.slice(0, 11) === 'components/') {\n name = name.slice(11);\n sourceName = \"components/\" + sourceName;\n }\n\n sourceName = sourceName.replace('.hbs', '');\n var result = type + \":\" + sourceName + \"/\" + name;\n return result;\n }\n };\n return resolver;\n }\n\n (0, _internalTestHelpers.moduleFor)('Components test: local lookup with expandLocalLookup feature',\n /*#__PURE__*/\n function (_LocalLookupTest) {\n (0, _emberBabel.inheritsLoose)(_class, _LocalLookupTest);\n\n function _class() {\n return _LocalLookupTest.apply(this, arguments) || this;\n }\n\n var _proto2 = _class.prototype;\n\n _proto2.getResolver = function getResolver() {\n return buildResolver();\n };\n\n return _class;\n }(LocalLookupTest));\n\n if (false\n /* EMBER_MODULE_UNIFICATION */\n ) {\n var LocalLookupTestResolver =\n /*#__PURE__*/\n function (_ModuleBasedTestResol) {\n (0, _emberBabel.inheritsLoose)(LocalLookupTestResolver, _ModuleBasedTestResol);\n\n function LocalLookupTestResolver() {\n return _ModuleBasedTestResol.apply(this, arguments) || this;\n }\n\n var _proto3 = LocalLookupTestResolver.prototype;\n\n _proto3.expandLocalLookup = function expandLocalLookup(specifier, source) {\n if (source && source.indexOf('components/') !== -1) {\n var namespace = source.split('components/')[1];\n\n var _specifier$split = specifier.split(':'),\n type = _specifier$split[0],\n name = _specifier$split[1];\n\n name = name.replace('components/', '');\n namespace = namespace.replace('.hbs', '');\n return type + \":\" + (type === 'template' ? 'components/' : '') + namespace + \"/\" + name;\n }\n\n return _ModuleBasedTestResol.prototype.expandLocalLookup.call(this, specifier, source);\n };\n\n return LocalLookupTestResolver;\n }(_internalTestHelpers.ModuleBasedTestResolver);\n /*\n * This sub-classing changes `registerXXX` methods to use the resolver.\n * Required for testing the module unification-friendly `resolve` call\n * with a `referrer` argument.\n *\n * In theory all these tests can be ported to use the resolver instead of\n * the registry.\n */\n\n\n (0, _internalTestHelpers.moduleFor)('Components test: local lookup with resolution referrer',\n /*#__PURE__*/\n function (_LocalLookupTest2) {\n (0, _emberBabel.inheritsLoose)(_class2, _LocalLookupTest2);\n\n function _class2() {\n return _LocalLookupTest2.apply(this, arguments) || this;\n }\n\n var _proto4 = _class2.prototype;\n\n _proto4.getResolver = function getResolver() {\n return new LocalLookupTestResolver();\n };\n\n _proto4.registerComponent = function registerComponent(name, _ref) {\n var _ref$ComponentClass = _ref.ComponentClass,\n ComponentClass = _ref$ComponentClass === void 0 ? _helpers.Component : _ref$ComponentClass,\n _ref$template = _ref.template,\n template = _ref$template === void 0 ? null : _ref$template;\n var resolver = this.resolver;\n\n if (ComponentClass) {\n resolver.add(\"component:\" + name, ComponentClass);\n }\n\n if (typeof template === 'string') {\n resolver.add(\"template:components/\" + name, this.compile(template, {\n moduleName: \"my-name/templates/components/\" + name + \".hbs\"\n }));\n }\n };\n\n _proto4.registerTemplate = function registerTemplate(name, template) {\n var resolver = this.resolver;\n\n if (typeof template === 'string') {\n resolver.add(\"template:\" + name, this.compile(template, {\n moduleName: \"my-name/templates/\" + name + \".hbs\"\n }));\n } else {\n throw new Error(\"Registered template \\\"\" + name + \"\\\" must be a string\");\n }\n };\n\n _proto4.registerHelper = function registerHelper(name, funcOrClassBody) {\n var resolver = this.resolver;\n var type = typeof funcOrClassBody;\n\n if (type === 'function') {\n resolver.add(\"helper:\" + name, (0, _glimmer.helper)(funcOrClassBody));\n } else if (type === 'object' && type !== null) {\n resolver.add(\"helper:\" + name, _glimmer.Helper.extend(funcOrClassBody));\n } else {\n throw new Error(\"Cannot register \" + funcOrClassBody + \" as a helper\");\n }\n };\n\n (0, _emberBabel.createClass)(_class2, [{\n key: \"resolver\",\n get: function () {\n return this.owner.__registry__.fallback.resolver;\n }\n }]);\n return _class2;\n }(LocalLookupTest));\n }\n\n if (false\n /* EMBER_MODULE_UNIFICATION */\n ) {\n (0, _internalTestHelpers.moduleFor)('Components test: local lookup with resolution referrer (MU)',\n /*#__PURE__*/\n function (_ApplicationTestCase) {\n (0, _emberBabel.inheritsLoose)(_class3, _ApplicationTestCase);\n\n function _class3() {\n return _ApplicationTestCase.apply(this, arguments) || this;\n }\n\n var _proto5 = _class3.prototype;\n\n _proto5['@test Ensure that the same specifier with two sources does not share a cache key'] = function testEnsureThatTheSameSpecifierWithTwoSourcesDoesNotShareACacheKey(assert) {\n var _this14 = this;\n\n this.add({\n specifier: 'template:components/x-not-shared',\n source: 'template:my-app/templates/components/x-top.hbs'\n }, (0, _emberTemplateCompiler.compile)('child-x-not-shared'));\n this.add({\n specifier: 'template:components/x-top',\n source: 'template:my-app/templates/application.hbs'\n }, (0, _emberTemplateCompiler.compile)('top-level-x-top ({{x-not-shared}})', {\n moduleName: 'my-app/templates/components/x-top.hbs'\n }));\n this.add({\n specifier: 'template:components/x-not-shared',\n source: 'template:my-app/templates/application.hbs'\n }, (0, _emberTemplateCompiler.compile)('top-level-x-not-shared'));\n this.addTemplate('application', '{{x-not-shared}} {{x-top}} {{x-not-shared}} {{x-top}}');\n return this.visit('/').then(function () {\n assert.equal(_this14.element.textContent, 'top-level-x-not-shared top-level-x-top (child-x-not-shared) top-level-x-not-shared top-level-x-top (child-x-not-shared)');\n });\n };\n\n return _class3;\n }(_internalTestHelpers.ApplicationTestCase));\n }\n});","enifed(\"@ember/-internals/glimmer/tests/integration/components/namespaced-lookup-test\", [\"ember-babel\", \"internal-test-helpers\", \"@ember/-internals/glimmer\"], function (_emberBabel, _internalTestHelpers, _glimmer) {\n \"use strict\";\n\n if (false\n /* EMBER_MODULE_UNIFICATION */\n ) {\n (0, _internalTestHelpers.moduleFor)('Namespaced lookup',\n /*#__PURE__*/\n function (_RenderingTestCase) {\n (0, _emberBabel.inheritsLoose)(_class, _RenderingTestCase);\n\n function _class() {\n return _RenderingTestCase.apply(this, arguments) || this;\n }\n\n var _proto = _class.prototype;\n\n _proto['@test it can render a namespaced component'] = function testItCanRenderANamespacedComponent() {\n var _this = this;\n\n this.addTemplate({\n specifier: 'template:components/my-component',\n namespace: 'my-addon'\n }, 'namespaced template {{myProp}}');\n this.add({\n specifier: 'component:my-component',\n namespace: 'my-addon'\n }, _glimmer.Component.extend({\n myProp: 'My property'\n }));\n this.addComponent('x-outer', {\n template: '{{my-addon::my-component}}'\n });\n this.render('{{x-outer}}');\n this.assertText('namespaced template My property');\n (0, _internalTestHelpers.runTask)(function () {\n return _this.rerender();\n });\n this.assertText('namespaced template My property');\n };\n\n _proto['@test it can render a nested namespaced component'] = function testItCanRenderANestedNamespacedComponent() {\n var _this2 = this;\n\n this.addTemplate({\n specifier: 'template:components/my-component',\n namespace: 'second-addon'\n }, 'second namespaced template');\n this.addTemplate({\n specifier: 'template:components/my-component',\n namespace: 'first-addon'\n }, 'first namespaced template - {{second-addon::my-component}}');\n this.addComponent('x-outer', {\n template: '{{first-addon::my-component}}'\n });\n this.render('{{x-outer}}');\n this.assertText('first namespaced template - second namespaced template');\n (0, _internalTestHelpers.runTask)(function () {\n return _this2.rerender();\n });\n this.assertText('first namespaced template - second namespaced template');\n };\n\n _proto['@test it can render a nested un-namespaced component'] = function testItCanRenderANestedUnNamespacedComponent() {\n var _this3 = this;\n\n this.addTemplate({\n specifier: 'template:components/addon-component',\n source: 'template:first-addon/src/ui/components/my-component.hbs'\n }, 'un-namespaced addon template');\n this.addTemplate({\n specifier: 'template:components/my-component',\n moduleName: 'first-addon/src/ui/components/my-component.hbs',\n namespace: 'first-addon'\n }, '{{addon-component}}');\n this.addComponent('x-outer', {\n template: '{{first-addon::my-component}}'\n });\n this.render('{{x-outer}}');\n this.assertText('un-namespaced addon template');\n (0, _internalTestHelpers.runTask)(function () {\n return _this3.rerender();\n });\n this.assertText('un-namespaced addon template');\n };\n\n _proto['@test it can render a namespaced main component'] = function testItCanRenderANamespacedMainComponent() {\n var _this4 = this;\n\n this.addTemplate({\n specifier: 'template:components/addon-component',\n soruce: 'template:first-addon/src/ui/components/main.hbs'\n }, 'Nested namespaced component');\n this.addTemplate({\n specifier: 'template:components/first-addon',\n moduleName: 'first-addon/src/ui/components/main.hbs'\n }, '{{addon-component}}');\n this.addComponent('x-outer', {\n template: '{{first-addon}}'\n });\n this.render('{{x-outer}}');\n this.assertText('Nested namespaced component');\n (0, _internalTestHelpers.runTask)(function () {\n return _this4.rerender();\n });\n this.assertText('Nested namespaced component');\n };\n\n _proto['@test it does not render a main component when using a namespace'] = function testItDoesNotRenderAMainComponentWhenUsingANamespace() {\n var _this5 = this;\n\n this.addTemplate({\n specifier: 'template:components/main',\n namespace: 'my-addon'\n }, 'namespaced template {{myProp}}');\n this.add({\n specifier: 'component:main',\n namespace: 'my-addon'\n }, _glimmer.Component.extend({\n myProp: 'My property'\n }));\n this.add({\n specifier: 'helper:my-addon',\n namespace: 'empty-namespace'\n }, (0, _glimmer.helper)(function () {\n return 'my helper';\n }));\n this.render('{{empty-namespace::my-addon}}');\n this.assertText('my helper'); // component should be not found\n\n (0, _internalTestHelpers.runTask)(function () {\n return _this5.rerender();\n });\n this.assertText('my helper');\n };\n\n _proto['@test it renders a namespaced helper'] = function testItRendersANamespacedHelper() {\n var _this6 = this;\n\n this.add({\n specifier: 'helper:my-helper',\n namespace: 'my-namespace'\n }, (0, _glimmer.helper)(function () {\n return 'my helper';\n }));\n this.render('{{my-namespace::my-helper}}');\n this.assertText('my helper');\n (0, _internalTestHelpers.runTask)(function () {\n return _this6.rerender();\n });\n this.assertText('my helper');\n };\n\n return _class;\n }(_internalTestHelpers.RenderingTestCase));\n }\n});","enifed(\"@ember/-internals/glimmer/tests/integration/components/render-to-element-test\", [], function () {\n \"use strict\";\n});","enifed(\"@ember/-internals/glimmer/tests/integration/components/target-action-test\", [\"ember-babel\", \"internal-test-helpers\", \"@ember/polyfills\", \"@ember/-internals/metal\", \"@ember/controller\", \"@ember/-internals/runtime\", \"@ember/-internals/routing\", \"@ember/-internals/glimmer/tests/utils/helpers\"], function (_emberBabel, _internalTestHelpers, _polyfills, _metal, _controller, _runtime, _routing, _helpers) {\n \"use strict\";\n\n function _templateObject() {\n const data = _taggedTemplateLiteralLoose([\"\\n {{#component-a}}\\n {{component-b bar=\\\"derp\\\"}}\\n {{/component-a}}\\n \"]);\n\n _templateObject = function () {\n return data;\n };\n\n return data;\n }\n\n function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }\n\n function expectSendActionDeprecation(fn) {\n expectDeprecation(fn, /You called (.*).sendAction\\((.*)\\) but Component#sendAction is deprecated. Please use closure actions instead./);\n }\n\n (0, _internalTestHelpers.moduleFor)('Components test: sendAction',\n /*#__PURE__*/\n function (_RenderingTestCase) {\n (0, _emberBabel.inheritsLoose)(_class, _RenderingTestCase);\n\n function _class() {\n var _this;\n\n _this = _RenderingTestCase.apply(this, arguments) || this;\n _this.actionCounts = {};\n _this.sendCount = 0;\n _this.actionArguments = null;\n var self = (0, _emberBabel.assertThisInitialized)(_this);\n\n _this.registerComponent('action-delegate', {\n ComponentClass: _helpers.Component.extend({\n init: function () {\n this._super();\n\n self.delegate = this;\n this.name = 'action-delegate';\n }\n })\n });\n\n return _this;\n }\n\n var _proto = _class.prototype;\n\n _proto.renderDelegate = function renderDelegate() {\n var template = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '{{action-delegate}}';\n var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var root = this;\n context = (0, _polyfills.assign)(context, {\n send: function (actionName) {\n root.sendCount++;\n root.actionCounts[actionName] = root.actionCounts[actionName] || 0;\n root.actionCounts[actionName]++;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n root.actionArguments = args;\n }\n });\n this.render(template, context);\n };\n\n _proto.assertSendCount = function assertSendCount(count) {\n this.assert.equal(this.sendCount, count, \"Send was called \" + count + \" time(s)\");\n };\n\n _proto.assertNamedSendCount = function assertNamedSendCount(actionName, count) {\n this.assert.equal(this.actionCounts[actionName], count, \"An action named '\" + actionName + \"' was sent \" + count + \" times\");\n };\n\n _proto.assertSentWithArgs = function assertSentWithArgs(expected) {\n var message = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'arguments were sent with the action';\n this.assert.deepEqual(this.actionArguments, expected, message);\n };\n\n _proto['@test Calling sendAction on a component without an action defined does nothing'] = function testCallingSendActionOnAComponentWithoutAnActionDefinedDoesNothing() {\n var _this2 = this;\n\n this.renderDelegate();\n expectSendActionDeprecation(function () {\n (0, _internalTestHelpers.runTask)(function () {\n return _this2.delegate.sendAction();\n });\n });\n this.assertSendCount(0);\n };\n\n _proto['@test Calling sendAction on a component with an action defined calls send on the controller'] = function testCallingSendActionOnAComponentWithAnActionDefinedCallsSendOnTheController() {\n var _this3 = this;\n\n this.renderDelegate();\n expectSendActionDeprecation(function () {\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this3.delegate, 'action', 'addItem');\n\n _this3.delegate.sendAction();\n });\n });\n this.assertSendCount(1);\n this.assertNamedSendCount('addItem', 1);\n };\n\n _proto['@test Calling sendAction on a component with a function calls the function'] = function testCallingSendActionOnAComponentWithAFunctionCallsTheFunction() {\n var _this4 = this;\n\n this.assert.expect(2);\n this.renderDelegate();\n expectSendActionDeprecation(function () {\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this4.delegate, 'action', function () {\n return _this4.assert.ok(true, 'function is called');\n });\n\n _this4.delegate.sendAction();\n });\n });\n };\n\n _proto['@test Calling sendAction on a component with a function calls the function with arguments'] = function testCallingSendActionOnAComponentWithAFunctionCallsTheFunctionWithArguments() {\n var _this5 = this;\n\n this.assert.expect(2);\n var argument = {};\n this.renderDelegate();\n expectSendActionDeprecation(function () {\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this5.delegate, 'action', function (actualArgument) {\n _this5.assert.deepEqual(argument, actualArgument, 'argument is passed');\n });\n\n _this5.delegate.sendAction('action', argument);\n });\n });\n } // TODO consolidate these next 2 tests\n ;\n\n _proto['@test Calling sendAction on a component with a reference attr calls the function with arguments'] = function testCallingSendActionOnAComponentWithAReferenceAttrCallsTheFunctionWithArguments() {\n var _this6 = this;\n\n this.renderDelegate('{{action-delegate playing=playing}}', {\n playing: null\n });\n expectSendActionDeprecation(function () {\n (0, _internalTestHelpers.runTask)(function () {\n return _this6.delegate.sendAction();\n });\n });\n this.assertSendCount(0);\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this6.context, 'playing', 'didStartPlaying');\n });\n expectSendActionDeprecation(function () {\n (0, _internalTestHelpers.runTask)(function () {\n _this6.delegate.sendAction('playing');\n });\n });\n this.assertSendCount(1);\n this.assertNamedSendCount('didStartPlaying', 1);\n };\n\n _proto['@test Calling sendAction on a component with a {{mut}} attr calls the function with arguments'] = function testCallingSendActionOnAComponentWithAMutAttrCallsTheFunctionWithArguments() {\n var _this7 = this;\n\n this.renderDelegate('{{action-delegate playing=(mut playing)}}', {\n playing: null\n });\n expectSendActionDeprecation(function () {\n (0, _internalTestHelpers.runTask)(function () {\n return _this7.delegate.sendAction('playing');\n });\n });\n this.assertSendCount(0);\n (0, _internalTestHelpers.runTask)(function () {\n return _this7.delegate.attrs.playing.update('didStartPlaying');\n });\n expectSendActionDeprecation(function () {\n (0, _internalTestHelpers.runTask)(function () {\n return _this7.delegate.sendAction('playing');\n });\n });\n this.assertSendCount(1);\n this.assertNamedSendCount('didStartPlaying', 1);\n };\n\n _proto[\"@test Calling sendAction with a named action uses the component's property as the action name\"] = function testCallingSendActionWithANamedActionUsesTheComponentSPropertyAsTheActionName() {\n var _this8 = this;\n\n this.renderDelegate();\n var component = this.delegate;\n expectSendActionDeprecation(function () {\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this8.delegate, 'playing', 'didStartPlaying');\n component.sendAction('playing');\n });\n });\n this.assertSendCount(1);\n this.assertNamedSendCount('didStartPlaying', 1);\n expectSendActionDeprecation(function () {\n (0, _internalTestHelpers.runTask)(function () {\n return component.sendAction('playing');\n });\n });\n this.assertSendCount(2);\n this.assertNamedSendCount('didStartPlaying', 2);\n expectSendActionDeprecation(function () {\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(component, 'action', 'didDoSomeBusiness');\n component.sendAction();\n });\n });\n this.assertSendCount(3);\n this.assertNamedSendCount('didDoSomeBusiness', 1);\n };\n\n _proto['@test Calling sendAction when the action name is not a string raises an exception'] = function testCallingSendActionWhenTheActionNameIsNotAStringRaisesAnException() {\n var _this9 = this;\n\n this.renderDelegate();\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this9.delegate, 'action', {});\n (0, _metal.set)(_this9.delegate, 'playing', {});\n });\n expectSendActionDeprecation(function () {\n expectAssertion(function () {\n return _this9.delegate.sendAction();\n });\n });\n expectSendActionDeprecation(function () {\n expectAssertion(function () {\n return _this9.delegate.sendAction('playing');\n });\n });\n };\n\n _proto['@test Calling sendAction on a component with contexts'] = function testCallingSendActionOnAComponentWithContexts() {\n var _this10 = this;\n\n this.renderDelegate();\n var testContext = {\n song: 'She Broke My Ember'\n };\n var firstContext = {\n song: 'She Broke My Ember'\n };\n var secondContext = {\n song: 'My Achey Breaky Ember'\n };\n expectSendActionDeprecation(function () {\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this10.delegate, 'playing', 'didStartPlaying');\n\n _this10.delegate.sendAction('playing', testContext);\n });\n });\n this.assertSendCount(1);\n this.assertNamedSendCount('didStartPlaying', 1);\n this.assertSentWithArgs([testContext], 'context was sent with the action');\n expectSendActionDeprecation(function () {\n (0, _internalTestHelpers.runTask)(function () {\n _this10.delegate.sendAction('playing', firstContext, secondContext);\n });\n });\n this.assertSendCount(2);\n this.assertNamedSendCount('didStartPlaying', 2);\n this.assertSentWithArgs([firstContext, secondContext], 'multiple contexts were sent to the action');\n };\n\n _proto['@test calling sendAction on a component within a block sends to the outer scope GH#14216'] = function testCallingSendActionOnAComponentWithinABlockSendsToTheOuterScopeGH14216(assert) {\n var testContext = this; // overrides default action-delegate so actions can be added\n\n this.registerComponent('action-delegate', {\n ComponentClass: _helpers.Component.extend({\n init: function () {\n this._super();\n\n testContext.delegate = this;\n this.name = 'action-delegate';\n },\n actions: {\n derp: function (arg1) {\n assert.ok(true, 'action called on action-delgate');\n assert.equal(arg1, 'something special', 'argument passed through properly');\n }\n }\n }),\n template: (0, _internalTestHelpers.strip)(_templateObject())\n });\n this.registerComponent('component-a', {\n ComponentClass: _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n this.name = 'component-a';\n },\n actions: {\n derp: function () {\n assert.ok(false, 'no! bad scoping!');\n }\n }\n })\n });\n var innerChild;\n this.registerComponent('component-b', {\n ComponentClass: _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n innerChild = this;\n this.name = 'component-b';\n }\n })\n });\n this.renderDelegate();\n expectSendActionDeprecation(function () {\n (0, _internalTestHelpers.runTask)(function () {\n return innerChild.sendAction('bar', 'something special');\n });\n });\n };\n\n _proto['@test asserts if called on a destroyed component'] = function testAssertsIfCalledOnADestroyedComponent() {\n var _this11 = this;\n\n var component;\n this.registerComponent('rip-alley', {\n ComponentClass: _helpers.Component.extend({\n init: function () {\n this._super();\n\n component = this;\n },\n toString: function () {\n return 'component:rip-alley';\n }\n })\n });\n this.render('{{#if shouldRender}}{{rip-alley}}{{/if}}', {\n shouldRender: true\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this11.context, 'shouldRender', false);\n });\n expectAssertion(function () {\n component.sendAction('trigger-me-dead');\n }, \"Attempted to call .sendAction() with the action 'trigger-me-dead' on the destroyed object 'component:rip-alley'.\");\n };\n\n return _class;\n }(_internalTestHelpers.RenderingTestCase));\n (0, _internalTestHelpers.moduleFor)('Components test: sendAction to a controller',\n /*#__PURE__*/\n function (_ApplicationTestCase) {\n (0, _emberBabel.inheritsLoose)(_class2, _ApplicationTestCase);\n\n function _class2() {\n return _ApplicationTestCase.apply(this, arguments) || this;\n }\n\n var _proto2 = _class2.prototype;\n\n _proto2[\"@test sendAction should trigger an action on the parent component's controller if it exists\"] = function testSendActionShouldTriggerAnActionOnTheParentComponentSControllerIfItExists(assert) {\n var _this12 = this;\n\n assert.expect(20);\n var component;\n this.router.map(function () {\n this.route('a');\n this.route('b');\n this.route('c', function () {\n this.route('d');\n this.route('e');\n });\n });\n this.addComponent('foo-bar', {\n ComponentClass: _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n component = this;\n }\n }),\n template: \"{{val}}\"\n });\n this.add('controller:a', _controller.default.extend({\n send: function (actionName, actionContext) {\n assert.equal(actionName, 'poke', 'send() method was invoked from a top level controller');\n assert.equal(actionContext, 'top', 'action arguments were passed into the top level controller');\n }\n }));\n this.addTemplate('a', '{{foo-bar val=\"a\" poke=\"poke\"}}');\n this.add('route:b', _routing.Route.extend({\n actions: {\n poke: function (actionContext) {\n assert.ok(true, 'Unhandled action sent to route');\n assert.equal(actionContext, 'top no controller');\n }\n }\n }));\n this.addTemplate('b', '{{foo-bar val=\"b\" poke=\"poke\"}}');\n this.add('route:c', _routing.Route.extend({\n actions: {\n poke: function (actionContext) {\n assert.ok(true, 'Unhandled action sent to route');\n assert.equal(actionContext, 'top with nested no controller');\n }\n }\n }));\n this.addTemplate('c', '{{foo-bar val=\"c\" poke=\"poke\"}}{{outlet}}');\n this.add('route:c.d', _routing.Route.extend({}));\n this.add('controller:c.d', _controller.default.extend({\n send: function (actionName, actionContext) {\n assert.equal(actionName, 'poke', 'send() method was invoked from a nested controller');\n assert.equal(actionContext, 'nested', 'action arguments were passed into the nested controller');\n }\n }));\n this.addTemplate('c.d', '{{foo-bar val=\".d\" poke=\"poke\"}}');\n this.add('route:c.e', _routing.Route.extend({\n actions: {\n poke: function (actionContext) {\n assert.ok(true, 'Unhandled action sent to route');\n assert.equal(actionContext, 'nested no controller');\n }\n }\n }));\n this.addTemplate('c.e', '{{foo-bar val=\".e\" poke=\"poke\"}}');\n return this.visit('/a').then(function () {\n expectSendActionDeprecation(function () {\n return component.sendAction('poke', 'top');\n });\n }).then(function () {\n _this12.assertText('a');\n\n return _this12.visit('/b');\n }).then(function () {\n expectSendActionDeprecation(function () {\n return component.sendAction('poke', 'top no controller');\n });\n }).then(function () {\n _this12.assertText('b');\n\n return _this12.visit('/c');\n }).then(function () {\n expectSendActionDeprecation(function () {\n component.sendAction('poke', 'top with nested no controller');\n });\n }).then(function () {\n _this12.assertText('c');\n\n return _this12.visit('/c/d');\n }).then(function () {\n expectSendActionDeprecation(function () {\n return component.sendAction('poke', 'nested');\n });\n }).then(function () {\n _this12.assertText('c.d');\n\n return _this12.visit('/c/e');\n }).then(function () {\n expectSendActionDeprecation(function () {\n return component.sendAction('poke', 'nested no controller');\n });\n }).then(function () {\n return _this12.assertText('c.e');\n });\n };\n\n _proto2[\"@test sendAction should not trigger an action in an outlet's controller if a parent component handles it\"] = function testSendActionShouldNotTriggerAnActionInAnOutletSControllerIfAParentComponentHandlesIt(assert) {\n assert.expect(2);\n var component;\n this.addComponent('x-parent', {\n ComponentClass: _helpers.Component.extend({\n actions: {\n poke: function () {\n assert.ok(true, 'parent component handled the aciton');\n }\n }\n }),\n template: '{{x-child poke=\"poke\"}}'\n });\n this.addComponent('x-child', {\n ComponentClass: _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n component = this;\n }\n })\n });\n this.addTemplate('application', '{{x-parent}}');\n this.add('controller:application', _controller.default.extend({\n send: function () {\n throw new Error('controller action should not be called');\n }\n }));\n return this.visit('/').then(function () {\n expectSendActionDeprecation(function () {\n return component.sendAction('poke');\n });\n });\n };\n\n return _class2;\n }(_internalTestHelpers.ApplicationTestCase));\n (0, _internalTestHelpers.moduleFor)('Components test: sendAction of a closure action',\n /*#__PURE__*/\n function (_RenderingTestCase2) {\n (0, _emberBabel.inheritsLoose)(_class3, _RenderingTestCase2);\n\n function _class3() {\n return _RenderingTestCase2.apply(this, arguments) || this;\n }\n\n var _proto3 = _class3.prototype;\n\n _proto3['@test action should be called'] = function testActionShouldBeCalled(assert) {\n assert.expect(2);\n var component;\n this.registerComponent('inner-component', {\n ComponentClass: _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n component = this;\n }\n }),\n template: 'inner'\n });\n this.registerComponent('outer-component', {\n ComponentClass: _helpers.Component.extend({\n outerSubmit: function () {\n assert.ok(true, 'outerSubmit called');\n }\n }),\n template: '{{inner-component submitAction=(action outerSubmit)}}'\n });\n this.render('{{outer-component}}');\n expectSendActionDeprecation(function () {\n (0, _internalTestHelpers.runTask)(function () {\n return component.sendAction('submitAction');\n });\n });\n };\n\n _proto3['@test contexts passed to sendAction are appended to the bound arguments on a closure action'] = function testContextsPassedToSendActionAreAppendedToTheBoundArgumentsOnAClosureAction() {\n var first = 'mitch';\n var second = 'martin';\n var third = 'matt';\n var fourth = 'wacky wycats';\n var innerComponent;\n var actualArgs;\n this.registerComponent('inner-component', {\n ComponentClass: _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n innerComponent = this;\n }\n }),\n template: 'inner'\n });\n this.registerComponent('outer-component', {\n ComponentClass: _helpers.Component.extend({\n third: third,\n actions: {\n outerSubmit: function () {\n actualArgs = Array.prototype.slice.call(arguments);\n }\n }\n }),\n template: \"{{inner-component innerSubmit=(action (action \\\"outerSubmit\\\" \\\"\" + first + \"\\\") \\\"\" + second + \"\\\" third)}}\"\n });\n this.render('{{outer-component}}');\n expectSendActionDeprecation(function () {\n (0, _internalTestHelpers.runTask)(function () {\n return innerComponent.sendAction('innerSubmit', fourth);\n });\n });\n this.assert.deepEqual(actualArgs, [first, second, third, fourth], 'action has the correct args');\n };\n\n return _class3;\n }(_internalTestHelpers.RenderingTestCase));\n (0, _internalTestHelpers.moduleFor)('Components test: send',\n /*#__PURE__*/\n function (_RenderingTestCase3) {\n (0, _emberBabel.inheritsLoose)(_class4, _RenderingTestCase3);\n\n function _class4() {\n return _RenderingTestCase3.apply(this, arguments) || this;\n }\n\n var _proto4 = _class4.prototype;\n\n _proto4['@test sending to undefined actions triggers an error'] = function testSendingToUndefinedActionsTriggersAnError(assert) {\n assert.expect(2);\n var component;\n this.registerComponent('foo-bar', {\n ComponentClass: _helpers.Component.extend({\n init: function () {\n this._super();\n\n component = this;\n },\n actions: {\n foo: function (message) {\n assert.equal('bar', message);\n }\n }\n })\n });\n this.render('{{foo-bar}}');\n (0, _internalTestHelpers.runTask)(function () {\n return component.send('foo', 'bar');\n });\n expectAssertion(function () {\n return component.send('baz', 'bar');\n }, /had no action handler for: baz/);\n };\n\n _proto4['@test `send` will call send from a target if it is defined'] = function testSendWillCallSendFromATargetIfItIsDefined() {\n var _this13 = this;\n\n var component;\n var target = {\n send: function (message, payload) {\n _this13.assert.equal('foo', message);\n\n _this13.assert.equal('baz', payload);\n }\n };\n this.registerComponent('foo-bar', {\n ComponentClass: _helpers.Component.extend({\n init: function () {\n this._super();\n\n component = this;\n },\n target: target\n })\n });\n this.render('{{foo-bar}}');\n (0, _internalTestHelpers.runTask)(function () {\n return component.send('foo', 'baz');\n });\n };\n\n _proto4['@test a handled action can be bubbled to the target for continued processing'] = function testAHandledActionCanBeBubbledToTheTargetForContinuedProcessing() {\n var _this14 = this;\n\n this.assert.expect(2);\n var component;\n this.registerComponent('foo-bar', {\n ComponentClass: _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n\n component = this;\n },\n actions: {\n poke: function () {\n _this14.assert.ok(true, 'component action called');\n\n return true;\n }\n },\n target: _controller.default.extend({\n actions: {\n poke: function () {\n _this14.assert.ok(true, 'action bubbled to controller');\n }\n }\n }).create()\n })\n });\n this.render('{{foo-bar poke=\"poke\"}}');\n (0, _internalTestHelpers.runTask)(function () {\n return component.send('poke');\n });\n };\n\n _proto4[\"@test action can be handled by a superclass' actions object\"] = function testActionCanBeHandledByASuperclassActionsObject(assert) {\n this.assert.expect(4);\n var component;\n\n var SuperComponent = _helpers.Component.extend({\n actions: {\n foo: function () {\n assert.ok(true, 'foo');\n },\n bar: function (msg) {\n assert.equal(msg, 'HELLO');\n }\n }\n });\n\n var BarViewMixin = _metal.Mixin.create({\n actions: {\n bar: function (msg) {\n assert.equal(msg, 'HELLO');\n\n this._super(msg);\n }\n }\n });\n\n this.registerComponent('x-index', {\n ComponentClass: SuperComponent.extend(BarViewMixin, {\n init: function () {\n this._super.apply(this, arguments);\n\n component = this;\n },\n actions: {\n baz: function () {\n assert.ok(true, 'baz');\n }\n }\n })\n });\n this.render('{{x-index}}');\n (0, _internalTestHelpers.runTask)(function () {\n component.send('foo');\n component.send('bar', 'HELLO');\n component.send('baz');\n });\n };\n\n _proto4['@test actions cannot be provided at create time'] = function testActionsCannotBeProvidedAtCreateTime(assert) {\n this.registerComponent('foo-bar', _helpers.Component.extend());\n var ComponentFactory = this.owner.factoryFor('component:foo-bar');\n expectAssertion(function () {\n ComponentFactory.create({\n actions: {\n foo: function () {\n assert.ok(true, 'foo');\n }\n }\n });\n }, /`actions` must be provided at extend time, not at create time/); // but should be OK on an object that doesn't mix in Ember.ActionHandler\n\n _runtime.Object.create({\n actions: ['foo']\n });\n };\n\n _proto4['@test asserts if called on a destroyed component'] = function testAssertsIfCalledOnADestroyedComponent() {\n var _this15 = this;\n\n var component;\n this.registerComponent('rip-alley', {\n ComponentClass: _helpers.Component.extend({\n init: function () {\n this._super();\n\n component = this;\n },\n toString: function () {\n return 'component:rip-alley';\n }\n })\n });\n this.render('{{#if shouldRender}}{{rip-alley}}{{/if}}', {\n shouldRender: true\n });\n (0, _internalTestHelpers.runTask)(function () {\n (0, _metal.set)(_this15.context, 'shouldRender', false);\n });\n expectAssertion(function () {\n component.send('trigger-me-dead');\n }, \"Attempted to call .send() with the action 'trigger-me-dead' on the destroyed object 'component:rip-alley'.\");\n };\n\n return _class4;\n }(_internalTestHelpers.RenderingTestCase));\n});","enifed(\"@ember/-internals/glimmer/tests/integration/components/template-only-components-test\", [\"ember-babel\", \"internal-test-helpers\", \"@ember/-internals/environment\"], function (_emberBabel, _internalTestHelpers, _environment) {\n \"use strict\";\n\n var TemplateOnlyComponentsTest =\n /*#__PURE__*/\n function (_RenderingTestCase) {\n (0, _emberBabel.inheritsLoose)(TemplateOnlyComponentsTest, _RenderingTestCase);\n\n function TemplateOnlyComponentsTest() {\n return _RenderingTestCase.apply(this, arguments) || this;\n }\n\n var _proto = TemplateOnlyComponentsTest.prototype;\n\n _proto.registerComponent = function registerComponent(name, template) {\n _RenderingTestCase.prototype.registerComponent.call(this, name, {\n template: template,\n ComponentClass: null\n });\n };\n\n return TemplateOnlyComponentsTest;\n }(_internalTestHelpers.RenderingTestCase);\n\n (0, _internalTestHelpers.moduleFor)('Components test: template-only components (glimmer components)',\n /*#__PURE__*/\n function (_TemplateOnlyComponen) {\n (0, _emberBabel.inheritsLoose)(_class, _TemplateOnlyComponen);\n\n function _class() {\n var _this;\n\n _this = _TemplateOnlyComponen.apply(this, arguments) || this;\n _this._TEMPLATE_ONLY_GLIMMER_COMPONENTS = _environment.ENV._TEMPLATE_ONLY_GLIMMER_COMPONENTS;\n _environment.ENV._TEMPLATE_ONLY_GLIMMER_COMPONENTS = true;\n return _this;\n }\n\n var _proto2 = _class.prototype;\n\n _proto2.teardown = function teardown() {\n _TemplateOnlyComponen.prototype.teardown.call(this);\n\n _environment.ENV._TEMPLATE_ONLY_GLIMMER_COMPONENTS = this._TEMPLATE_ONLY_GLIMMER_COMPONENTS;\n };\n\n _proto2['@test it can render a template-only component'] = function testItCanRenderATemplateOnlyComponent() {\n this.registerComponent('foo-bar', 'hello');\n this.render('{{foo-bar}}');\n this.assertInnerHTML('hello');\n this.assertStableRerender();\n };\n\n _proto2['@test it can render named arguments'] = function testItCanRenderNamedArguments() {\n var _this2 = this;\n\n this.registerComponent('foo-bar', '|{{@foo}}|{{@bar}}|');\n this.render('{{foo-bar foo=foo bar=bar}}', {\n foo: 'foo',\n bar: 'bar'\n });\n this.assertInnerHTML('|foo|bar|');\n this.assertStableRerender();\n (0, _internalTestHelpers.runTask)(function () {\n return _this2.context.set('foo', 'FOO');\n });\n this.assertInnerHTML('|FOO|bar|');\n (0, _internalTestHelpers.runTask)(function () {\n return _this2.context.set('bar', 'BAR');\n });\n this.assertInnerHTML('|FOO|BAR|');\n (0, _internalTestHelpers.runTask)(function () {\n return _this2.context.setProperties({\n foo: 'foo',\n bar: 'bar'\n });\n });\n this.assertInnerHTML('|foo|bar|');\n };\n\n _proto2['@test it does not reflected arguments as properties'] = function testItDoesNotReflectedArgumentsAsProperties() {\n var _this3 = this;\n\n this.registerComponent('foo-bar', '|{{foo}}|{{this.bar}}|');\n this.render('{{foo-bar foo=foo bar=bar}}', {\n foo: 'foo',\n bar: 'bar'\n });\n this.assertInnerHTML('|||');\n this.assertStableRerender();\n (0, _internalTestHelpers.runTask)(function () {\n return _this3.context.set('foo', 'FOO');\n });\n this.assertInnerHTML('|||');\n (0, _internalTestHelpers.runTask)(function () {\n return _this3.context.set('bar', null);\n });\n this.assertInnerHTML('|||');\n (0, _internalTestHelpers.runTask)(function () {\n return _this3.context.setProperties({\n foo: 'foo',\n bar: 'bar'\n });\n });\n this.assertInnerHTML('|||');\n };\n\n _proto2['@test it does not have curly component features'] = function testItDoesNotHaveCurlyComponentFeatures() {\n var _this4 = this;\n\n this.registerComponent('foo-bar', 'hello');\n this.render('{{foo-bar tagName=\"p\" class=class}}', {\n class: 'foo bar'\n });\n this.assertInnerHTML('hello');\n this.assertStableRerender();\n (0, _internalTestHelpers.runTask)(function () {\n return _this4.context.set('class', 'foo');\n });\n this.assertInnerHTML('hello');\n (0, _internalTestHelpers.runTask)(function () {\n return _this4.context.set('class', null);\n });\n this.assertInnerHTML('hello');\n (0, _internalTestHelpers.runTask)(function () {\n return _this4.context.set('class', 'foo bar');\n });\n this.assertInnerHTML('hello');\n };\n\n _proto2['@test it has the correct bounds'] = function testItHasTheCorrectBounds() {\n var _this5 = this;\n\n this.registerComponent('foo-bar', 'hello');\n this.render('outside {{#if this.isShowing}}before {{foo-bar}} after{{/if}} outside', {\n isShowing: true\n });\n this.assertInnerHTML('outside before hello after outside');\n this.assertStableRerender();\n (0, _internalTestHelpers.runTask)(function () {\n return _this5.context.set('isShowing', false);\n });\n this.assertInnerHTML('outside outside');\n (0, _internalTestHelpers.runTask)(function () {\n return _this5.context.set('isShowing', null);\n });\n this.assertInnerHTML('outside outside');\n (0, _internalTestHelpers.runTask)(function () {\n return _this5.context.set('isShowing', true);\n });\n this.assertInnerHTML('outside before hello after outside');\n };\n\n return _class;\n }(TemplateOnlyComponentsTest));\n (0, _internalTestHelpers.moduleFor)('Components test: template-only components (curly components)',\n /*#__PURE__*/\n function (_TemplateOnlyComponen2) {\n (0, _emberBabel.inheritsLoose)(_class2, _TemplateOnlyComponen2);\n\n function _class2() {\n var _this6;\n\n _this6 = _TemplateOnlyComponen2.apply(this, arguments) || this;\n _this6._TEMPLATE_ONLY_GLIMMER_COMPONENTS = _environment.ENV._TEMPLATE_ONLY_GLIMMER_COMPONENTS;\n _environment.ENV._TEMPLATE_ONLY_GLIMMER_COMPONENTS = false;\n return _this6;\n }\n\n var _proto3 = _class2.prototype;\n\n _proto3.teardown = function teardown() {\n _TemplateOnlyComponen2.prototype.teardown.call(this);\n\n _environment.ENV._TEMPLATE_ONLY_GLIMMER_COMPONENTS = this._TEMPLATE_ONLY_GLIMMER_COMPONENTS;\n };\n\n _proto3['@test it can render a template-only component'] = function testItCanRenderATemplateOnlyComponent() {\n this.registerComponent('foo-bar', 'hello');\n this.render('{{foo-bar}}');\n this.assertComponentElement(this.firstChild, {\n content: 'hello'\n });\n this.assertStableRerender();\n };\n\n _proto3['@test it can render named arguments'] = function testItCanRenderNamedArguments() {\n var _this7 = this;\n\n this.registerComponent('foo-bar', '|{{@foo}}|{{@bar}}|');\n this.render('{{foo-bar foo=foo bar=bar}}', {\n foo: 'foo',\n bar: 'bar'\n });\n this.assertComponentElement(this.firstChild, {\n content: '|foo|bar|'\n });\n this.assertStableRerender();\n (0, _internalTestHelpers.runTask)(function () {\n return _this7.context.set('foo', 'FOO');\n });\n this.assertComponentElement(this.firstChild, {\n content: '|FOO|bar|'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this7.context.set('bar', 'BAR');\n });\n this.assertComponentElement(this.firstChild, {\n content: '|FOO|BAR|'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this7.context.setProperties({\n foo: 'foo',\n bar: 'bar'\n });\n });\n this.assertComponentElement(this.firstChild, {\n content: '|foo|bar|'\n });\n };\n\n _proto3['@test it renders named arguments as reflected properties'] = function testItRendersNamedArgumentsAsReflectedProperties() {\n var _this8 = this;\n\n this.registerComponent('foo-bar', '|{{foo}}|{{this.bar}}|');\n this.render('{{foo-bar foo=foo bar=bar}}', {\n foo: 'foo',\n bar: 'bar'\n });\n this.assertComponentElement(this.firstChild, {\n content: '|foo|bar|'\n });\n this.assertStableRerender();\n (0, _internalTestHelpers.runTask)(function () {\n return _this8.context.set('foo', 'FOO');\n });\n this.assertComponentElement(this.firstChild, {\n content: '|FOO|bar|'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this8.context.set('bar', null);\n });\n this.assertComponentElement(this.firstChild, {\n content: '|FOO||'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this8.context.setProperties({\n foo: 'foo',\n bar: 'bar'\n });\n });\n this.assertComponentElement(this.firstChild, {\n content: '|foo|bar|'\n });\n };\n\n _proto3['@test it has curly component features'] = function testItHasCurlyComponentFeatures() {\n var _this9 = this;\n\n this.registerComponent('foo-bar', 'hello');\n this.render('{{foo-bar tagName=\"p\" class=class}}', {\n class: 'foo bar'\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'p',\n attrs: {\n class: (0, _internalTestHelpers.classes)('foo bar ember-view')\n },\n content: 'hello'\n });\n this.assertStableRerender();\n (0, _internalTestHelpers.runTask)(function () {\n return _this9.context.set('class', 'foo');\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'p',\n attrs: {\n class: (0, _internalTestHelpers.classes)('foo ember-view')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this9.context.set('class', null);\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'p',\n attrs: {\n class: (0, _internalTestHelpers.classes)('ember-view')\n },\n content: 'hello'\n });\n (0, _internalTestHelpers.runTask)(function () {\n return _this9.context.set('class', 'foo bar');\n });\n this.assertComponentElement(this.firstChild, {\n tagName: 'p',\n attrs: {\n class: (0, _internalTestHelpers.classes)('foo bar ember-view')\n },\n content: 'hello'\n });\n };\n\n return _class2;\n }(TemplateOnlyComponentsTest));\n});","enifed(\"@ember/-internals/glimmer/tests/integration/components/textarea-angle-test\", [\"ember-babel\", \"internal-test-helpers\", \"@ember/polyfills\", \"@ember/-internals/metal\"], function (_emberBabel, _internalTestHelpers, _polyfills, _metal) {\n \"use strict\";\n\n if (true\n /* EMBER_GLIMMER_ANGLE_BRACKET_BUILT_INS */\n ) {\n var TextAreaRenderingTest =\n /*#__PURE__*/\n function (_RenderingTestCase) {\n (0, _emberBabel.inheritsLoose)(TextAreaRenderingTest, _RenderingTestCase);\n\n function TextAreaRenderingTest() {\n return _RenderingTestCase.apply(this, arguments) || this;\n }\n\n var _proto = TextAreaRenderingTest.prototype;\n\n _proto.assertTextArea = function assertTextArea() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n attrs = _ref.attrs,\n value = _ref.value;\n\n var mergedAttrs = (0, _polyfills.assign)({\n class: (0, _internalTestHelpers.classes)('ember-view ember-text-area')\n }, attrs);\n this.assertComponentElement(this.firstChild, {\n tagName: 'textarea',\n attrs: mergedAttrs\n });\n\n if (value) {\n this.assert.strictEqual(value, this.firstChild.value);\n }\n };\n\n _proto.triggerEvent = function triggerEvent(type) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var event = document.createEvent('Events');\n event.initEvent(type, true, true);\n (0, _polyfills.assign)(event, options);\n this.firstChild.dispatchEvent(event);\n };\n\n return TextAreaRenderingTest;\n }(_internalTestHelpers.RenderingTestCase);\n\n var BoundTextAreaAttributes =\n /*#__PURE__*/\n function () {\n function BoundTextAreaAttributes(cases) {\n this.cases = cases;\n }\n\n var _proto2 = BoundTextAreaAttributes.prototype;\n\n _proto2.generate = function generate(_ref2) {\n var _ref3;\n\n var attribute = _ref2.attribute,\n first = _ref2.first,\n second = _ref2.second;\n return _ref3 = {}, _ref3[\"@test \" + attribute + \" (HTML attribute)\"] = function () {\n var _attrs,\n _this = this,\n _attrs2,\n _attrs3;\n\n this.render(\"