discourse-ember-source 3.5.1.1 → 3.5.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ember/version.rb +1 -1
- metadata +2 -740
- data/.gitignore +0 -9
- data/.travis.yml +0 -5
- data/Gemfile +0 -6
- data/LICENSE.txt +0 -21
- data/README +0 -18
- data/README.md +0 -39
- data/Rakefile +0 -27
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/discourse-ember-source-3.5.1.0.gem +0 -0
- data/dist/ember-all.debug.map +0 -1
- data/dist/ember-template-compiler.map +0 -1
- data/dist/ember-testing.map +0 -1
- data/dist/ember-tests.map +0 -1
- data/dist/ember-tests.prod.map +0 -1
- data/dist/ember.debug.map +0 -1
- data/dist/ember.min.map +0 -1
- data/dist/ember.prod.map +0 -1
- data/dist/es/@ember/application/globals-resolver.js +0 -425
- data/dist/es/@ember/application/index.js +0 -3
- data/dist/es/@ember/application/instance.js +0 -513
- data/dist/es/@ember/application/lib/application.js +0 -1139
- data/dist/es/@ember/application/lib/lazy_load.js +0 -69
- data/dist/es/@ember/application/lib/validate-type.js +0 -24
- data/dist/es/@ember/application/tests/application_instance_test.js +0 -230
- data/dist/es/@ember/application/tests/application_test.js +0 -470
- data/dist/es/@ember/application/tests/bootstrap-test.js +0 -28
- data/dist/es/@ember/application/tests/dependency_injection/custom_resolver_test.js +0 -32
- data/dist/es/@ember/application/tests/dependency_injection/default_resolver_test.js +0 -363
- data/dist/es/@ember/application/tests/dependency_injection/normalization_test.js +0 -70
- data/dist/es/@ember/application/tests/dependency_injection/to_string_test.js +0 -71
- data/dist/es/@ember/application/tests/dependency_injection_test.js +0 -93
- data/dist/es/@ember/application/tests/initializers_test.js +0 -391
- data/dist/es/@ember/application/tests/instance_initializers_test.js +0 -395
- data/dist/es/@ember/application/tests/lazy_load_test.js +0 -79
- data/dist/es/@ember/application/tests/logging_test.js +0 -179
- data/dist/es/@ember/application/tests/readiness_test.js +0 -138
- data/dist/es/@ember/application/tests/reset_test.js +0 -185
- data/dist/es/@ember/application/tests/visit_test.js +0 -783
- data/dist/es/@ember/canary-features/index.js +0 -76
- data/dist/es/@ember/controller/index.js +0 -50
- data/dist/es/@ember/controller/lib/controller_mixin.js +0 -42
- data/dist/es/@ember/controller/tests/controller_test.js +0 -209
- data/dist/es/@ember/debug/index.js +0 -264
- data/dist/es/@ember/debug/lib/deprecate.js +0 -198
- data/dist/es/@ember/debug/lib/handlers.js +0 -22
- data/dist/es/@ember/debug/lib/testing.js +0 -7
- data/dist/es/@ember/debug/lib/warn.js +0 -107
- data/dist/es/@ember/debug/tests/handlers-test.js +0 -144
- data/dist/es/@ember/debug/tests/main_test.js +0 -444
- data/dist/es/@ember/deprecated-features/index.js +0 -21
- data/dist/es/@ember/engine/index.js +0 -532
- data/dist/es/@ember/engine/instance.js +0 -228
- data/dist/es/@ember/engine/lib/engine-parent.js +0 -32
- data/dist/es/@ember/engine/tests/engine_initializers_test.js +0 -366
- data/dist/es/@ember/engine/tests/engine_instance_initializers_test.js +0 -409
- data/dist/es/@ember/engine/tests/engine_instance_test.js +0 -115
- data/dist/es/@ember/engine/tests/engine_parent_test.js +0 -20
- data/dist/es/@ember/engine/tests/engine_test.js +0 -121
- data/dist/es/@ember/error/index.js +0 -36
- data/dist/es/@ember/error/tests/index_test.js +0 -19
- data/dist/es/@ember/instrumentation/index.js +0 -240
- data/dist/es/@ember/instrumentation/tests/index-test.js +0 -214
- data/dist/es/@ember/map/index.js +0 -218
- data/dist/es/@ember/map/lib/ordered-set.js +0 -186
- data/dist/es/@ember/map/lib/utils.js +0 -29
- data/dist/es/@ember/map/tests/map_test.js +0 -578
- data/dist/es/@ember/map/with-default.js +0 -87
- data/dist/es/@ember/object/computed.js +0 -35
- data/dist/es/@ember/object/lib/computed/computed_macros.js +0 -742
- data/dist/es/@ember/object/lib/computed/reduce_computed_macros.js +0 -894
- data/dist/es/@ember/object/tests/computed/computed_macros_test.js +0 -533
- data/dist/es/@ember/object/tests/computed/reduce_computed_macros_test.js +0 -2243
- data/dist/es/@ember/polyfills/index.js +0 -3
- data/dist/es/@ember/polyfills/lib/assign.js +0 -43
- data/dist/es/@ember/polyfills/lib/merge.js +0 -35
- data/dist/es/@ember/polyfills/tests/assign_test.js +0 -64
- data/dist/es/@ember/runloop/index.js +0 -749
- data/dist/es/@ember/runloop/tests/debounce_test.js +0 -87
- data/dist/es/@ember/runloop/tests/later_test.js +0 -264
- data/dist/es/@ember/runloop/tests/next_test.js +0 -56
- data/dist/es/@ember/runloop/tests/once_test.js +0 -62
- data/dist/es/@ember/runloop/tests/onerror_test.js +0 -59
- data/dist/es/@ember/runloop/tests/run_bind_test.js +0 -59
- data/dist/es/@ember/runloop/tests/run_test.js +0 -28
- data/dist/es/@ember/runloop/tests/schedule_test.js +0 -86
- data/dist/es/@ember/runloop/tests/sync_test.js +0 -32
- data/dist/es/@ember/runloop/tests/unwind_test.js +0 -54
- data/dist/es/@ember/service/index.js +0 -57
- data/dist/es/@ember/string/index.js +0 -362
- data/dist/es/@ember/string/lib/string_registry.js +0 -13
- data/dist/es/@ember/string/tests/camelize_test.js +0 -53
- data/dist/es/@ember/string/tests/capitalize_test.js +0 -58
- data/dist/es/@ember/string/tests/classify_test.js +0 -79
- data/dist/es/@ember/string/tests/dasherize_test.js +0 -57
- data/dist/es/@ember/string/tests/decamelize_test.js +0 -51
- data/dist/es/@ember/string/tests/loc_test.js +0 -76
- data/dist/es/@ember/string/tests/underscore_test.js +0 -51
- data/dist/es/@ember/string/tests/w_test.js +0 -39
- data/dist/es/@glimmer/compiler.js +0 -1226
- data/dist/es/@glimmer/encoder.js +0 -39
- data/dist/es/@glimmer/low-level.js +0 -82
- data/dist/es/@glimmer/node.js +0 -112
- data/dist/es/@glimmer/opcode-compiler.js +0 -1999
- data/dist/es/@glimmer/program.js +0 -405
- data/dist/es/@glimmer/reference.js +0 -478
- data/dist/es/@glimmer/runtime.js +0 -4086
- data/dist/es/@glimmer/syntax.js +0 -1424
- data/dist/es/@glimmer/util.js +0 -189
- data/dist/es/@glimmer/vm.js +0 -27
- data/dist/es/@glimmer/wire-format.js +0 -56
- data/dist/es/backburner.js +0 -936
- data/dist/es/container/index.js +0 -8
- data/dist/es/container/lib/container.js +0 -437
- data/dist/es/container/lib/registry.js +0 -646
- data/dist/es/container/tests/container_test.js +0 -872
- data/dist/es/container/tests/owner_test.js +0 -20
- data/dist/es/container/tests/registry_test.js +0 -943
- data/dist/es/dag-map.js +0 -209
- data/dist/es/ember-browser-environment/index.js +0 -8
- data/dist/es/ember-browser-environment/lib/has-dom.js +0 -19
- data/dist/es/ember-console/index.js +0 -177
- data/dist/es/ember-environment/index.js +0 -3
- data/dist/es/ember-environment/lib/context.js +0 -20
- data/dist/es/ember-environment/lib/env.js +0 -185
- data/dist/es/ember-environment/lib/global.js +0 -14
- data/dist/es/ember-error-handling/index.js +0 -22
- data/dist/es/ember-extension-support/index.js +0 -2
- data/dist/es/ember-extension-support/lib/container_debug_adapter.js +0 -99
- data/dist/es/ember-extension-support/lib/data_adapter.js +0 -493
- data/dist/es/ember-extension-support/tests/container_debug_adapter_test.js +0 -73
- data/dist/es/ember-extension-support/tests/data_adapter_test.js +0 -301
- data/dist/es/ember-glimmer/index.js +0 -286
- data/dist/es/ember-glimmer/lib/compile-time-lookup.js +0 -37
- data/dist/es/ember-glimmer/lib/component-managers/abstract.js +0 -49
- data/dist/es/ember-glimmer/lib/component-managers/curly.js +0 -395
- data/dist/es/ember-glimmer/lib/component-managers/custom.js +0 -145
- data/dist/es/ember-glimmer/lib/component-managers/definition-state.js +0 -1
- data/dist/es/ember-glimmer/lib/component-managers/mount.js +0 -103
- data/dist/es/ember-glimmer/lib/component-managers/outlet.js +0 -114
- data/dist/es/ember-glimmer/lib/component-managers/render.js +0 -112
- data/dist/es/ember-glimmer/lib/component-managers/root.js +0 -74
- data/dist/es/ember-glimmer/lib/component-managers/template-only.js +0 -46
- data/dist/es/ember-glimmer/lib/component.js +0 -633
- data/dist/es/ember-glimmer/lib/components/checkbox.js +0 -57
- data/dist/es/ember-glimmer/lib/components/link-to.js +0 -777
- data/dist/es/ember-glimmer/lib/components/text_area.js +0 -236
- data/dist/es/ember-glimmer/lib/components/text_field.js +0 -145
- data/dist/es/ember-glimmer/lib/dom.js +0 -3
- data/dist/es/ember-glimmer/lib/environment.js +0 -102
- data/dist/es/ember-glimmer/lib/helper.js +0 -128
- data/dist/es/ember-glimmer/lib/helpers/-class.js +0 -23
- data/dist/es/ember-glimmer/lib/helpers/-html-safe.js +0 -9
- data/dist/es/ember-glimmer/lib/helpers/-input-type.js +0 -11
- data/dist/es/ember-glimmer/lib/helpers/-normalize-class.js +0 -22
- data/dist/es/ember-glimmer/lib/helpers/action.js +0 -360
- data/dist/es/ember-glimmer/lib/helpers/component.js +0 -135
- data/dist/es/ember-glimmer/lib/helpers/concat.js +0 -38
- data/dist/es/ember-glimmer/lib/helpers/each-in.js +0 -126
- data/dist/es/ember-glimmer/lib/helpers/get.js +0 -100
- data/dist/es/ember-glimmer/lib/helpers/hash.js +0 -44
- data/dist/es/ember-glimmer/lib/helpers/if-unless.js +0 -142
- data/dist/es/ember-glimmer/lib/helpers/loc.js +0 -40
- data/dist/es/ember-glimmer/lib/helpers/log.js +0 -25
- data/dist/es/ember-glimmer/lib/helpers/mut.js +0 -107
- data/dist/es/ember-glimmer/lib/helpers/query-param.js +0 -31
- data/dist/es/ember-glimmer/lib/helpers/readonly.js +0 -104
- data/dist/es/ember-glimmer/lib/helpers/unbound.js +0 -36
- data/dist/es/ember-glimmer/lib/modifiers/action.js +0 -185
- data/dist/es/ember-glimmer/lib/protocol-for-url.js +0 -48
- data/dist/es/ember-glimmer/lib/renderer.js +0 -371
- data/dist/es/ember-glimmer/lib/resolver.js +0 -290
- data/dist/es/ember-glimmer/lib/setup-registry.js +0 -77
- data/dist/es/ember-glimmer/lib/syntax.js +0 -73
- data/dist/es/ember-glimmer/lib/syntax/-text-area.js +0 -8
- data/dist/es/ember-glimmer/lib/syntax/input.js +0 -173
- data/dist/es/ember-glimmer/lib/syntax/let.js +0 -50
- data/dist/es/ember-glimmer/lib/syntax/mount.js +0 -101
- data/dist/es/ember-glimmer/lib/syntax/outlet.js +0 -120
- data/dist/es/ember-glimmer/lib/syntax/render.js +0 -140
- data/dist/es/ember-glimmer/lib/syntax/utils.js +0 -6
- data/dist/es/ember-glimmer/lib/template-compiler.js +0 -7
- data/dist/es/ember-glimmer/lib/template.js +0 -16
- data/dist/es/ember-glimmer/lib/template_registry.js +0 -18
- data/dist/es/ember-glimmer/lib/templates/component.js +0 -2
- data/dist/es/ember-glimmer/lib/templates/empty.js +0 -2
- data/dist/es/ember-glimmer/lib/templates/link-to.js +0 -2
- data/dist/es/ember-glimmer/lib/templates/outlet.js +0 -2
- data/dist/es/ember-glimmer/lib/templates/root.js +0 -2
- data/dist/es/ember-glimmer/lib/utils/bindings.js +0 -180
- data/dist/es/ember-glimmer/lib/utils/curly-component-state-bucket.js +0 -36
- data/dist/es/ember-glimmer/lib/utils/custom-component-manager.js +0 -20
- data/dist/es/ember-glimmer/lib/utils/debug-stack.js +0 -57
- data/dist/es/ember-glimmer/lib/utils/iterable.js +0 -358
- data/dist/es/ember-glimmer/lib/utils/outlet.js +0 -89
- data/dist/es/ember-glimmer/lib/utils/process-args.js +0 -40
- data/dist/es/ember-glimmer/lib/utils/references.js +0 -325
- data/dist/es/ember-glimmer/lib/utils/serialization-first-node-helpers.js +0 -1
- data/dist/es/ember-glimmer/lib/utils/string.js +0 -98
- data/dist/es/ember-glimmer/lib/utils/to-bool.js +0 -9
- data/dist/es/ember-glimmer/lib/views/outlet.js +0 -71
- data/dist/es/ember-glimmer/tests/integration/application/actions-test.js +0 -107
- data/dist/es/ember-glimmer/tests/integration/application/engine-test.js +0 -912
- data/dist/es/ember-glimmer/tests/integration/application/rendering-test.js +0 -530
- data/dist/es/ember-glimmer/tests/integration/components/angle-bracket-invocation-test.js +0 -852
- data/dist/es/ember-glimmer/tests/integration/components/append-test.js +0 -742
- data/dist/es/ember-glimmer/tests/integration/components/attribute-bindings-test.js +0 -999
- data/dist/es/ember-glimmer/tests/integration/components/attrs-lookup-test.js +0 -268
- data/dist/es/ember-glimmer/tests/integration/components/class-bindings-test.js +0 -849
- data/dist/es/ember-glimmer/tests/integration/components/contextual-components-test.js +0 -1493
- data/dist/es/ember-glimmer/tests/integration/components/curly-components-test.js +0 -3705
- data/dist/es/ember-glimmer/tests/integration/components/destroy-test.js +0 -33
- data/dist/es/ember-glimmer/tests/integration/components/dynamic-components-test.js +0 -896
- data/dist/es/ember-glimmer/tests/integration/components/error-handling-test.js +0 -164
- data/dist/es/ember-glimmer/tests/integration/components/fragment-components-test.js +0 -285
- data/dist/es/ember-glimmer/tests/integration/components/instrumentation-compile-test.js +0 -108
- data/dist/es/ember-glimmer/tests/integration/components/instrumentation-test.js +0 -157
- data/dist/es/ember-glimmer/tests/integration/components/life-cycle-test.js +0 -1653
- data/dist/es/ember-glimmer/tests/integration/components/link-to-test.js +0 -218
- data/dist/es/ember-glimmer/tests/integration/components/local-lookup-test.js +0 -414
- data/dist/es/ember-glimmer/tests/integration/components/namespaced-lookup-test.js +0 -185
- data/dist/es/ember-glimmer/tests/integration/components/render-to-element-test.js +0 -0
- data/dist/es/ember-glimmer/tests/integration/components/target-action-test.js +0 -779
- data/dist/es/ember-glimmer/tests/integration/components/template-only-components-test.js +0 -225
- data/dist/es/ember-glimmer/tests/integration/components/to-string-test.js +0 -27
- data/dist/es/ember-glimmer/tests/integration/components/utils-test.js +0 -401
- data/dist/es/ember-glimmer/tests/integration/components/web-component-fallback-test.js +0 -35
- data/dist/es/ember-glimmer/tests/integration/components/will-destroy-element-hook-test.js +0 -40
- data/dist/es/ember-glimmer/tests/integration/content-test.js +0 -1759
- data/dist/es/ember-glimmer/tests/integration/custom-component-manager-test.js +0 -508
- data/dist/es/ember-glimmer/tests/integration/event-dispatcher-test.js +0 -607
- data/dist/es/ember-glimmer/tests/integration/helpers/-class-test.js +0 -76
- data/dist/es/ember-glimmer/tests/integration/helpers/closure-action-test.js +0 -1240
- data/dist/es/ember-glimmer/tests/integration/helpers/concat-test.js +0 -106
- data/dist/es/ember-glimmer/tests/integration/helpers/custom-helper-test.js +0 -672
- data/dist/es/ember-glimmer/tests/integration/helpers/element-action-test.js +0 -1595
- data/dist/es/ember-glimmer/tests/integration/helpers/get-test.js +0 -618
- data/dist/es/ember-glimmer/tests/integration/helpers/hash-test.js +0 -188
- data/dist/es/ember-glimmer/tests/integration/helpers/if-unless-test.js +0 -149
- data/dist/es/ember-glimmer/tests/integration/helpers/input-test.js +0 -827
- data/dist/es/ember-glimmer/tests/integration/helpers/loc-test.js +0 -103
- data/dist/es/ember-glimmer/tests/integration/helpers/log-test.js +0 -61
- data/dist/es/ember-glimmer/tests/integration/helpers/mut-test.js +0 -580
- data/dist/es/ember-glimmer/tests/integration/helpers/partial-test.js +0 -386
- data/dist/es/ember-glimmer/tests/integration/helpers/readonly-test.js +0 -293
- data/dist/es/ember-glimmer/tests/integration/helpers/render-test.js +0 -522
- data/dist/es/ember-glimmer/tests/integration/helpers/text-area-test.js +0 -166
- data/dist/es/ember-glimmer/tests/integration/helpers/unbound-test.js +0 -650
- data/dist/es/ember-glimmer/tests/integration/helpers/yield-test.js +0 -275
- data/dist/es/ember-glimmer/tests/integration/input-test.js +0 -242
- data/dist/es/ember-glimmer/tests/integration/mount-test.js +0 -424
- data/dist/es/ember-glimmer/tests/integration/outlet-test.js +0 -318
- data/dist/es/ember-glimmer/tests/integration/refinements-test.js +0 -74
- data/dist/es/ember-glimmer/tests/integration/render-settled-test.js +0 -72
- data/dist/es/ember-glimmer/tests/integration/svg-test.js +0 -158
- data/dist/es/ember-glimmer/tests/integration/syntax/each-in-test.js +0 -697
- data/dist/es/ember-glimmer/tests/integration/syntax/each-test.js +0 -1251
- data/dist/es/ember-glimmer/tests/integration/syntax/experimental-syntax-test.js +0 -42
- data/dist/es/ember-glimmer/tests/integration/syntax/if-unless-test.js +0 -108
- data/dist/es/ember-glimmer/tests/integration/syntax/in-element-test.js +0 -119
- data/dist/es/ember-glimmer/tests/integration/syntax/let-test.js +0 -390
- data/dist/es/ember-glimmer/tests/integration/syntax/with-dynamic-var-test.js +0 -36
- data/dist/es/ember-glimmer/tests/integration/syntax/with-test.js +0 -422
- data/dist/es/ember-glimmer/tests/unit/outlet-test.js +0 -48
- data/dist/es/ember-glimmer/tests/unit/runtime-resolver-cache-test.js +0 -263
- data/dist/es/ember-glimmer/tests/unit/template-factory-test.js +0 -67
- data/dist/es/ember-glimmer/tests/unit/utils/debug-stack-test.js +0 -38
- data/dist/es/ember-glimmer/tests/utils/abstract-test-case.js +0 -1
- data/dist/es/ember-glimmer/tests/utils/helpers.js +0 -15
- data/dist/es/ember-glimmer/tests/utils/shared-conditional-tests.js +0 -965
- data/dist/es/ember-glimmer/tests/utils/string-test.js +0 -47
- data/dist/es/ember-glimmer/tests/utils/test-case.js +0 -6
- data/dist/es/ember-glimmer/tests/utils/test-helpers.js +0 -1
- data/dist/es/ember-meta/index.js +0 -1
- data/dist/es/ember-meta/lib/meta.js +0 -623
- data/dist/es/ember-meta/tests/meta_test.js +0 -169
- data/dist/es/ember-metal/index.js +0 -33
- data/dist/es/ember-metal/lib/alias.js +0 -80
- data/dist/es/ember-metal/lib/array.js +0 -55
- data/dist/es/ember-metal/lib/array_events.js +0 -65
- data/dist/es/ember-metal/lib/chains.js +0 -315
- data/dist/es/ember-metal/lib/change_event.js +0 -4
- data/dist/es/ember-metal/lib/computed.js +0 -526
- data/dist/es/ember-metal/lib/computed_cache.js +0 -58
- data/dist/es/ember-metal/lib/dependent_keys.js +0 -34
- data/dist/es/ember-metal/lib/deprecate_property.js +0 -34
- data/dist/es/ember-metal/lib/descriptor.js +0 -28
- data/dist/es/ember-metal/lib/each_proxy.js +0 -106
- data/dist/es/ember-metal/lib/each_proxy_events.js +0 -13
- data/dist/es/ember-metal/lib/events.js +0 -174
- data/dist/es/ember-metal/lib/expand_properties.js +0 -64
- data/dist/es/ember-metal/lib/get_properties.js +0 -45
- data/dist/es/ember-metal/lib/injected_property.js +0 -53
- data/dist/es/ember-metal/lib/is_blank.js +0 -34
- data/dist/es/ember-metal/lib/is_empty.js +0 -63
- data/dist/es/ember-metal/lib/is_none.js +0 -27
- data/dist/es/ember-metal/lib/is_present.js +0 -38
- data/dist/es/ember-metal/lib/libraries.js +0 -80
- data/dist/es/ember-metal/lib/mixin.js +0 -646
- data/dist/es/ember-metal/lib/namespace_search.js +0 -166
- data/dist/es/ember-metal/lib/observer.js +0 -34
- data/dist/es/ember-metal/lib/observer_set.js +0 -48
- data/dist/es/ember-metal/lib/path_cache.js +0 -5
- data/dist/es/ember-metal/lib/properties.js +0 -192
- data/dist/es/ember-metal/lib/property_events.js +0 -198
- data/dist/es/ember-metal/lib/property_get.js +0 -160
- data/dist/es/ember-metal/lib/property_set.js +0 -157
- data/dist/es/ember-metal/lib/set_properties.js +0 -43
- data/dist/es/ember-metal/lib/tags.js +0 -81
- data/dist/es/ember-metal/lib/tracked.js +0 -201
- data/dist/es/ember-metal/lib/transaction.js +0 -137
- data/dist/es/ember-metal/lib/watch_key.js +0 -113
- data/dist/es/ember-metal/lib/watch_path.js +0 -24
- data/dist/es/ember-metal/lib/watching.js +0 -54
- data/dist/es/ember-metal/tests/accessors/get_path_test.js +0 -82
- data/dist/es/ember-metal/tests/accessors/get_properties_test.js +0 -36
- data/dist/es/ember-metal/tests/accessors/get_test.js +0 -335
- data/dist/es/ember-metal/tests/accessors/mandatory_setters_test.js +0 -470
- data/dist/es/ember-metal/tests/accessors/set_path_test.js +0 -97
- data/dist/es/ember-metal/tests/accessors/set_test.js +0 -128
- data/dist/es/ember-metal/tests/alias_test.js +0 -167
- data/dist/es/ember-metal/tests/chains_test.js +0 -210
- data/dist/es/ember-metal/tests/computed_test.js +0 -1040
- data/dist/es/ember-metal/tests/descriptor_test.js +0 -368
- data/dist/es/ember-metal/tests/events_test.js +0 -210
- data/dist/es/ember-metal/tests/expand_properties_test.js +0 -119
- data/dist/es/ember-metal/tests/injected_property_test.js +0 -76
- data/dist/es/ember-metal/tests/is_blank_test.js +0 -29
- data/dist/es/ember-metal/tests/is_empty_test.js +0 -55
- data/dist/es/ember-metal/tests/is_none_test.js +0 -23
- data/dist/es/ember-metal/tests/is_present_test.js +0 -30
- data/dist/es/ember-metal/tests/libraries_test.js +0 -99
- data/dist/es/ember-metal/tests/main_test.js +0 -31
- data/dist/es/ember-metal/tests/mixin/alias_method_test.js +0 -91
- data/dist/es/ember-metal/tests/mixin/apply_test.js +0 -40
- data/dist/es/ember-metal/tests/mixin/computed_test.js +0 -166
- data/dist/es/ember-metal/tests/mixin/concatenated_properties_test.js +0 -117
- data/dist/es/ember-metal/tests/mixin/detect_test.js +0 -40
- data/dist/es/ember-metal/tests/mixin/introspection_test.js +0 -75
- data/dist/es/ember-metal/tests/mixin/merged_properties_test.js +0 -200
- data/dist/es/ember-metal/tests/mixin/method_test.js +0 -252
- data/dist/es/ember-metal/tests/mixin/observer_test.js +0 -202
- data/dist/es/ember-metal/tests/mixin/reopen_test.js +0 -53
- data/dist/es/ember-metal/tests/mixin/without_test.js +0 -22
- data/dist/es/ember-metal/tests/namespace_search_test.js +0 -16
- data/dist/es/ember-metal/tests/observer_test.js +0 -961
- data/dist/es/ember-metal/tests/performance_test.js +0 -81
- data/dist/es/ember-metal/tests/properties_test.js +0 -120
- data/dist/es/ember-metal/tests/property_did_change_hook.js +0 -73
- data/dist/es/ember-metal/tests/set_properties_test.js +0 -49
- data/dist/es/ember-metal/tests/tracked/computed_test.js +0 -67
- data/dist/es/ember-metal/tests/tracked/get_test.js +0 -86
- data/dist/es/ember-metal/tests/tracked/set_test.js +0 -44
- data/dist/es/ember-metal/tests/tracked/support.js +0 -37
- data/dist/es/ember-metal/tests/tracked/validation_test.js +0 -233
- data/dist/es/ember-metal/tests/watching/is_watching_test.js +0 -97
- data/dist/es/ember-metal/tests/watching/unwatch_test.js +0 -109
- data/dist/es/ember-metal/tests/watching/watch_test.js +0 -255
- data/dist/es/ember-owner/index.js +0 -66
- data/dist/es/ember-routing/index.js +0 -21
- data/dist/es/ember-routing/lib/ext/controller.js +0 -222
- data/dist/es/ember-routing/lib/location/api.js +0 -118
- data/dist/es/ember-routing/lib/location/auto_location.js +0 -323
- data/dist/es/ember-routing/lib/location/hash_location.js +0 -171
- data/dist/es/ember-routing/lib/location/history_location.js +0 -298
- data/dist/es/ember-routing/lib/location/none_location.js +0 -122
- data/dist/es/ember-routing/lib/location/util.js +0 -114
- data/dist/es/ember-routing/lib/services/router.js +0 -243
- data/dist/es/ember-routing/lib/services/routing.js +0 -101
- data/dist/es/ember-routing/lib/system/cache.js +0 -40
- data/dist/es/ember-routing/lib/system/controller_for.js +0 -14
- data/dist/es/ember-routing/lib/system/dsl.js +0 -208
- data/dist/es/ember-routing/lib/system/generate_controller.js +0 -54
- data/dist/es/ember-routing/lib/system/query_params.js +0 -6
- data/dist/es/ember-routing/lib/system/route.js +0 -2476
- data/dist/es/ember-routing/lib/system/router.js +0 -1607
- data/dist/es/ember-routing/lib/system/router_state.js +0 -26
- data/dist/es/ember-routing/lib/system/transition.js +0 -153
- data/dist/es/ember-routing/lib/utils.js +0 -230
- data/dist/es/ember-routing/tests/ext/controller_test.js +0 -85
- data/dist/es/ember-routing/tests/location/auto_location_test.js +0 -379
- data/dist/es/ember-routing/tests/location/hash_location_test.js +0 -207
- data/dist/es/ember-routing/tests/location/history_location_test.js +0 -322
- data/dist/es/ember-routing/tests/location/none_location_test.js +0 -88
- data/dist/es/ember-routing/tests/location/util_test.js +0 -159
- data/dist/es/ember-routing/tests/system/cache_test.js +0 -54
- data/dist/es/ember-routing/tests/system/controller_for_test.js +0 -75
- data/dist/es/ember-routing/tests/system/dsl_test.js +0 -413
- data/dist/es/ember-routing/tests/system/route_test.js +0 -587
- data/dist/es/ember-routing/tests/system/router_test.js +0 -287
- data/dist/es/ember-routing/tests/utils_test.js +0 -37
- data/dist/es/ember-runtime/.gitignore +0 -1
- data/dist/es/ember-runtime/README +0 -12
- data/dist/es/ember-runtime/index.js +0 -35
- data/dist/es/ember-runtime/lib/compare.js +0 -149
- data/dist/es/ember-runtime/lib/copy.js +0 -106
- data/dist/es/ember-runtime/lib/ext/function.js +0 -154
- data/dist/es/ember-runtime/lib/ext/rsvp.js +0 -59
- data/dist/es/ember-runtime/lib/is-equal.js +0 -60
- data/dist/es/ember-runtime/lib/mixins/-proxy.js +0 -109
- data/dist/es/ember-runtime/lib/mixins/action_handler.js +0 -222
- data/dist/es/ember-runtime/lib/mixins/array.js +0 -1661
- data/dist/es/ember-runtime/lib/mixins/comparable.js +0 -38
- data/dist/es/ember-runtime/lib/mixins/container_proxy.js +0 -154
- data/dist/es/ember-runtime/lib/mixins/copyable.js +0 -34
- data/dist/es/ember-runtime/lib/mixins/enumerable.js +0 -16
- data/dist/es/ember-runtime/lib/mixins/evented.js +0 -149
- data/dist/es/ember-runtime/lib/mixins/mutable_enumerable.js +0 -18
- data/dist/es/ember-runtime/lib/mixins/observable.js +0 -482
- data/dist/es/ember-runtime/lib/mixins/promise_proxy.js +0 -224
- data/dist/es/ember-runtime/lib/mixins/registry_proxy.js +0 -265
- data/dist/es/ember-runtime/lib/mixins/target_action_support.js +0 -172
- data/dist/es/ember-runtime/lib/system/array_proxy.js +0 -298
- data/dist/es/ember-runtime/lib/system/core_object.js +0 -1037
- data/dist/es/ember-runtime/lib/system/namespace.js +0 -69
- data/dist/es/ember-runtime/lib/system/object.js +0 -73
- data/dist/es/ember-runtime/lib/system/object_proxy.js +0 -81
- data/dist/es/ember-runtime/lib/type-of.js +0 -107
- data/dist/es/ember-runtime/tests/array/any-test.js +0 -55
- data/dist/es/ember-runtime/tests/array/compact-test.js +0 -12
- data/dist/es/ember-runtime/tests/array/every-test.js +0 -82
- data/dist/es/ember-runtime/tests/array/filter-test.js +0 -123
- data/dist/es/ember-runtime/tests/array/find-test.js +0 -86
- data/dist/es/ember-runtime/tests/array/firstObject-test.js +0 -27
- data/dist/es/ember-runtime/tests/array/forEach-test.js +0 -68
- data/dist/es/ember-runtime/tests/array/includes-test.js +0 -46
- data/dist/es/ember-runtime/tests/array/indexOf-test.js +0 -27
- data/dist/es/ember-runtime/tests/array/invoke-test.js +0 -60
- data/dist/es/ember-runtime/tests/array/isAny-test.js +0 -53
- data/dist/es/ember-runtime/tests/array/lastIndexOf-test.js +0 -78
- data/dist/es/ember-runtime/tests/array/lastObject-test.js +0 -31
- data/dist/es/ember-runtime/tests/array/map-test.js +0 -68
- data/dist/es/ember-runtime/tests/array/mapBy-test.js +0 -16
- data/dist/es/ember-runtime/tests/array/objectAt-test.js +0 -34
- data/dist/es/ember-runtime/tests/array/reduce-test.js +0 -24
- data/dist/es/ember-runtime/tests/array/reject-test.js +0 -134
- data/dist/es/ember-runtime/tests/array/sortBy-test.js +0 -23
- data/dist/es/ember-runtime/tests/array/toArray-test.js +0 -11
- data/dist/es/ember-runtime/tests/array/uniq-test.js +0 -27
- data/dist/es/ember-runtime/tests/array/uniqBy-test.js +0 -33
- data/dist/es/ember-runtime/tests/array/without-test.js +0 -39
- data/dist/es/ember-runtime/tests/copyable-array/copy-test.js +0 -12
- data/dist/es/ember-runtime/tests/core/compare_test.js +0 -89
- data/dist/es/ember-runtime/tests/core/copy_test.js +0 -47
- data/dist/es/ember-runtime/tests/core/isEqual_test.js +0 -65
- data/dist/es/ember-runtime/tests/core/is_array_test.js +0 -59
- data/dist/es/ember-runtime/tests/core/is_empty_test.js +0 -15
- data/dist/es/ember-runtime/tests/core/type_of_test.js +0 -54
- data/dist/es/ember-runtime/tests/ext/function_test.js +0 -121
- data/dist/es/ember-runtime/tests/ext/rsvp_test.js +0 -269
- data/dist/es/ember-runtime/tests/helpers/array.js +0 -336
- data/dist/es/ember-runtime/tests/inject_test.js +0 -51
- data/dist/es/ember-runtime/tests/legacy_1x/mixins/observable/chained_test.js +0 -63
- data/dist/es/ember-runtime/tests/legacy_1x/mixins/observable/observable_test.js +0 -892
- data/dist/es/ember-runtime/tests/legacy_1x/mixins/observable/propertyChanges_test.js +0 -142
- data/dist/es/ember-runtime/tests/legacy_1x/system/object/base_test.js +0 -98
- data/dist/es/ember-runtime/tests/legacy_1x/system/object/concatenated_test.js +0 -131
- data/dist/es/ember-runtime/tests/mixins/array_test.js +0 -400
- data/dist/es/ember-runtime/tests/mixins/comparable_test.js +0 -37
- data/dist/es/ember-runtime/tests/mixins/container_proxy_test.js +0 -48
- data/dist/es/ember-runtime/tests/mixins/enumerable_test.js +0 -17
- data/dist/es/ember-runtime/tests/mixins/evented_test.js +0 -23
- data/dist/es/ember-runtime/tests/mixins/mutable_enumerable_test.js +0 -17
- data/dist/es/ember-runtime/tests/mixins/observable_test.js +0 -137
- data/dist/es/ember-runtime/tests/mixins/promise_proxy_test.js +0 -593
- data/dist/es/ember-runtime/tests/mixins/target_action_support_test.js +0 -237
- data/dist/es/ember-runtime/tests/mutable-array/addObject-test.js +0 -76
- data/dist/es/ember-runtime/tests/mutable-array/clear-test.js +0 -64
- data/dist/es/ember-runtime/tests/mutable-array/insertAt-test.js +0 -216
- data/dist/es/ember-runtime/tests/mutable-array/popObject-test.js +0 -91
- data/dist/es/ember-runtime/tests/mutable-array/pushObject-test.js +0 -98
- data/dist/es/ember-runtime/tests/mutable-array/pushObjects-test.js +0 -12
- data/dist/es/ember-runtime/tests/mutable-array/removeAt-test.js +0 -187
- data/dist/es/ember-runtime/tests/mutable-array/removeObject-test.js +0 -77
- data/dist/es/ember-runtime/tests/mutable-array/removeObjects-test.js +0 -202
- data/dist/es/ember-runtime/tests/mutable-array/replace-test.js +0 -221
- data/dist/es/ember-runtime/tests/mutable-array/reverseObjects-test.js +0 -35
- data/dist/es/ember-runtime/tests/mutable-array/setObjects-test.js +0 -63
- data/dist/es/ember-runtime/tests/mutable-array/shiftObject-test.js +0 -105
- data/dist/es/ember-runtime/tests/mutable-array/unshiftObject-test.js +0 -99
- data/dist/es/ember-runtime/tests/mutable-array/unshiftObjects-test.js +0 -102
- data/dist/es/ember-runtime/tests/system/array_proxy/arranged_content_test.js +0 -275
- data/dist/es/ember-runtime/tests/system/array_proxy/array_observer_test.js +0 -51
- data/dist/es/ember-runtime/tests/system/array_proxy/content_change_test.js +0 -85
- data/dist/es/ember-runtime/tests/system/array_proxy/length_test.js +0 -201
- data/dist/es/ember-runtime/tests/system/array_proxy/watching_and_listening_test.js +0 -157
- data/dist/es/ember-runtime/tests/system/core_object_test.js +0 -114
- data/dist/es/ember-runtime/tests/system/namespace/base_test.js +0 -175
- data/dist/es/ember-runtime/tests/system/native_array/a_test.js +0 -16
- data/dist/es/ember-runtime/tests/system/native_array/copyable_suite_test.js +0 -19
- data/dist/es/ember-runtime/tests/system/native_array/replace_test.js +0 -17
- data/dist/es/ember-runtime/tests/system/object/computed_test.js +0 -352
- data/dist/es/ember-runtime/tests/system/object/create_test.js +0 -135
- data/dist/es/ember-runtime/tests/system/object/destroy_test.js +0 -146
- data/dist/es/ember-runtime/tests/system/object/detectInstance_test.js +0 -38
- data/dist/es/ember-runtime/tests/system/object/detect_test.js +0 -33
- data/dist/es/ember-runtime/tests/system/object/es-compatibility-test.js +0 -469
- data/dist/es/ember-runtime/tests/system/object/events_test.js +0 -156
- data/dist/es/ember-runtime/tests/system/object/extend_test.js +0 -153
- data/dist/es/ember-runtime/tests/system/object/observer_test.js +0 -216
- data/dist/es/ember-runtime/tests/system/object/reopenClass_test.js +0 -36
- data/dist/es/ember-runtime/tests/system/object/reopen_test.js +0 -48
- data/dist/es/ember-runtime/tests/system/object/strict-mode-test.js +0 -31
- data/dist/es/ember-runtime/tests/system/object/toString_test.js +0 -125
- data/dist/es/ember-runtime/tests/system/object_proxy_test.js +0 -314
- data/dist/es/ember-template-compiler/index.js +0 -26
- data/dist/es/ember-template-compiler/lib/compat.js +0 -16
- data/dist/es/ember-template-compiler/lib/plugins/assert-if-helper-without-arguments.js +0 -38
- data/dist/es/ember-template-compiler/lib/plugins/assert-input-helper-without-block.js +0 -20
- data/dist/es/ember-template-compiler/lib/plugins/assert-reserved-named-arguments.js +0 -26
- data/dist/es/ember-template-compiler/lib/plugins/assert-splattribute-expression.js +0 -27
- data/dist/es/ember-template-compiler/lib/plugins/deprecate-render-model.js +0 -38
- data/dist/es/ember-template-compiler/lib/plugins/deprecate-render.js +0 -41
- data/dist/es/ember-template-compiler/lib/plugins/deprecate-send-action.js +0 -42
- data/dist/es/ember-template-compiler/lib/plugins/index.js +0 -50
- data/dist/es/ember-template-compiler/lib/plugins/transform-action-syntax.js +0 -52
- data/dist/es/ember-template-compiler/lib/plugins/transform-angle-bracket-components.js +0 -10
- data/dist/es/ember-template-compiler/lib/plugins/transform-attrs-into-args.js +0 -62
- data/dist/es/ember-template-compiler/lib/plugins/transform-dot-component-invocation.js +0 -88
- data/dist/es/ember-template-compiler/lib/plugins/transform-each-in-into-each.js +0 -48
- data/dist/es/ember-template-compiler/lib/plugins/transform-has-block-syntax.js +0 -46
- data/dist/es/ember-template-compiler/lib/plugins/transform-in-element.js +0 -83
- data/dist/es/ember-template-compiler/lib/plugins/transform-inline-link-to.js +0 -31
- data/dist/es/ember-template-compiler/lib/plugins/transform-input-type-syntax.js +0 -52
- data/dist/es/ember-template-compiler/lib/plugins/transform-old-binding-syntax.js +0 -48
- data/dist/es/ember-template-compiler/lib/plugins/transform-old-class-binding-syntax.js +0 -102
- data/dist/es/ember-template-compiler/lib/plugins/transform-quoted-bindings-into-just-bindings.js +0 -34
- data/dist/es/ember-template-compiler/lib/plugins/transform-top-level-components.js +0 -41
- data/dist/es/ember-template-compiler/lib/system/bootstrap.js +0 -44
- data/dist/es/ember-template-compiler/lib/system/calculate-location-display.js +0 -20
- data/dist/es/ember-template-compiler/lib/system/compile-options.js +0 -71
- data/dist/es/ember-template-compiler/lib/system/compile.js +0 -28
- data/dist/es/ember-template-compiler/lib/system/dasherize-component-name.js +0 -13
- data/dist/es/ember-template-compiler/lib/system/initializer.js +0 -22
- data/dist/es/ember-template-compiler/lib/system/precompile.js +0 -18
- data/dist/es/ember-template-compiler/tests/plugins/assert-if-helper-without-arguments-test.js +0 -51
- data/dist/es/ember-template-compiler/tests/plugins/assert-input-helper-without-block-test.js +0 -17
- data/dist/es/ember-template-compiler/tests/plugins/assert-reserved-named-arguments-test.js +0 -416
- data/dist/es/ember-template-compiler/tests/plugins/assert-splattribute-expression-test.js +0 -57
- data/dist/es/ember-template-compiler/tests/plugins/deprecate-render-model-test.js +0 -19
- data/dist/es/ember-template-compiler/tests/plugins/deprecate-render-test.js +0 -19
- data/dist/es/ember-template-compiler/tests/plugins/deprecate-send-action-test.js +0 -29
- data/dist/es/ember-template-compiler/tests/plugins/transform-dot-component-invocation-test.js +0 -27
- data/dist/es/ember-template-compiler/tests/plugins/transform-inline-link-to-test.js +0 -15
- data/dist/es/ember-template-compiler/tests/plugins/transform-input-type-syntax-test.js +0 -25
- data/dist/es/ember-template-compiler/tests/system/bootstrap-test.js +0 -155
- data/dist/es/ember-template-compiler/tests/system/compile_options_test.js +0 -115
- data/dist/es/ember-template-compiler/tests/system/dasherize-component-name-test.js +0 -19
- data/dist/es/ember-testing/index.js +0 -10
- data/dist/es/ember-testing/lib/adapters/adapter.js +0 -58
- data/dist/es/ember-testing/lib/adapters/qunit.js +0 -47
- data/dist/es/ember-testing/lib/events.js +0 -136
- data/dist/es/ember-testing/lib/ext/application.js +0 -191
- data/dist/es/ember-testing/lib/ext/rsvp.js +0 -19
- data/dist/es/ember-testing/lib/helpers.js +0 -30
- data/dist/es/ember-testing/lib/helpers/-is-form-control.js +0 -16
- data/dist/es/ember-testing/lib/helpers/and_then.js +0 -3
- data/dist/es/ember-testing/lib/helpers/click.js +0 -36
- data/dist/es/ember-testing/lib/helpers/current_path.js +0 -27
- data/dist/es/ember-testing/lib/helpers/current_route_name.js +0 -25
- data/dist/es/ember-testing/lib/helpers/current_url.js +0 -27
- data/dist/es/ember-testing/lib/helpers/fill_in.js +0 -46
- data/dist/es/ember-testing/lib/helpers/find.js +0 -41
- data/dist/es/ember-testing/lib/helpers/find_with_assert.js +0 -34
- data/dist/es/ember-testing/lib/helpers/key_event.js +0 -36
- data/dist/es/ember-testing/lib/helpers/pause_test.js +0 -65
- data/dist/es/ember-testing/lib/helpers/trigger_event.js +0 -62
- data/dist/es/ember-testing/lib/helpers/visit.js +0 -42
- data/dist/es/ember-testing/lib/helpers/wait.js +0 -72
- data/dist/es/ember-testing/lib/initializers.js +0 -17
- data/dist/es/ember-testing/lib/setup_for_testing.js +0 -44
- data/dist/es/ember-testing/lib/support.js +0 -62
- data/dist/es/ember-testing/lib/test.js +0 -70
- data/dist/es/ember-testing/lib/test/adapter.js +0 -33
- data/dist/es/ember-testing/lib/test/helpers.js +0 -125
- data/dist/es/ember-testing/lib/test/on_inject_helpers.js +0 -38
- data/dist/es/ember-testing/lib/test/pending_requests.js +0 -24
- data/dist/es/ember-testing/lib/test/promise.js +0 -79
- data/dist/es/ember-testing/lib/test/run.js +0 -9
- data/dist/es/ember-testing/lib/test/waiters.js +0 -117
- data/dist/es/ember-testing/tests/acceptance_test.js +0 -478
- data/dist/es/ember-testing/tests/adapters/adapter_test.js +0 -31
- data/dist/es/ember-testing/tests/adapters/qunit_test.js +0 -50
- data/dist/es/ember-testing/tests/adapters_test.js +0 -405
- data/dist/es/ember-testing/tests/ext/rsvp_test.js +0 -124
- data/dist/es/ember-testing/tests/helper_registration_test.js +0 -98
- data/dist/es/ember-testing/tests/helpers_test.js +0 -1228
- data/dist/es/ember-testing/tests/integration_test.js +0 -106
- data/dist/es/ember-testing/tests/reexports_test.js +0 -26
- data/dist/es/ember-testing/tests/test/waiters-test.js +0 -145
- data/dist/es/ember-utils/index.js +0 -28
- data/dist/es/ember-utils/lib/cache.js +0 -36
- data/dist/es/ember-utils/lib/dictionary.js +0 -11
- data/dist/es/ember-utils/lib/guid.js +0 -120
- data/dist/es/ember-utils/lib/inspect.js +0 -112
- data/dist/es/ember-utils/lib/intern.js +0 -49
- data/dist/es/ember-utils/lib/invoke.js +0 -53
- data/dist/es/ember-utils/lib/is_proxy.js +0 -14
- data/dist/es/ember-utils/lib/lookup-descriptor.js +0 -11
- data/dist/es/ember-utils/lib/make-array.js +0 -7
- data/dist/es/ember-utils/lib/name.js +0 -9
- data/dist/es/ember-utils/lib/proxy-utils.js +0 -1
- data/dist/es/ember-utils/lib/spec.js +0 -14
- data/dist/es/ember-utils/lib/super.js +0 -83
- data/dist/es/ember-utils/lib/symbol-utils.js +0 -8
- data/dist/es/ember-utils/lib/symbol.js +0 -15
- data/dist/es/ember-utils/lib/to-string.js +0 -35
- data/dist/es/ember-utils/lib/weak_set.js +0 -18
- data/dist/es/ember-utils/tests/cache_test.js +0 -77
- data/dist/es/ember-utils/tests/can_invoke_test.js +0 -46
- data/dist/es/ember-utils/tests/checkHasSuper_test.js +0 -17
- data/dist/es/ember-utils/tests/generate_guid_test.js +0 -13
- data/dist/es/ember-utils/tests/guid_for_test.js +0 -101
- data/dist/es/ember-utils/tests/inspect_test.js +0 -146
- data/dist/es/ember-utils/tests/is_proxy_test.js +0 -18
- data/dist/es/ember-utils/tests/make_array_test.js +0 -41
- data/dist/es/ember-utils/tests/to-string-test.js +0 -32
- data/dist/es/ember-utils/tests/try_invoke_test.js +0 -48
- data/dist/es/ember-views/index.js +0 -28
- data/dist/es/ember-views/lib/compat/attrs.js +0 -3
- data/dist/es/ember-views/lib/compat/fallback-view-registry.js +0 -3
- data/dist/es/ember-views/lib/component_lookup.js +0 -27
- data/dist/es/ember-views/lib/mixins/action_support.js +0 -189
- data/dist/es/ember-views/lib/mixins/child_views_support.js +0 -27
- data/dist/es/ember-views/lib/mixins/class_names_support.js +0 -102
- data/dist/es/ember-views/lib/mixins/text_support.js +0 -333
- data/dist/es/ember-views/lib/mixins/view_state_support.js +0 -19
- data/dist/es/ember-views/lib/mixins/view_support.js +0 -452
- data/dist/es/ember-views/lib/system/action_manager.js +0 -14
- data/dist/es/ember-views/lib/system/event_dispatcher.js +0 -454
- data/dist/es/ember-views/lib/system/jquery.js +0 -29
- data/dist/es/ember-views/lib/system/jquery_event_deprecation.js +0 -61
- data/dist/es/ember-views/lib/system/lookup_partial.js +0 -55
- data/dist/es/ember-views/lib/system/utils.js +0 -201
- data/dist/es/ember-views/lib/utils/lookup-component.js +0 -58
- data/dist/es/ember-views/lib/views/core_view.js +0 -83
- data/dist/es/ember-views/lib/views/states.js +0 -48
- data/dist/es/ember-views/lib/views/states/default.js +0 -17
- data/dist/es/ember-views/lib/views/states/destroying.js +0 -16
- data/dist/es/ember-views/lib/views/states/has_element.js +0 -31
- data/dist/es/ember-views/lib/views/states/in_dom.js +0 -28
- data/dist/es/ember-views/lib/views/states/pre_render.js +0 -3
- data/dist/es/ember/index.js +0 -645
- data/dist/es/ember/tests/application_lifecycle_test.js +0 -188
- data/dist/es/ember/tests/component_context_test.js +0 -255
- data/dist/es/ember/tests/component_registration_test.js +0 -252
- data/dist/es/ember/tests/controller_test.js +0 -44
- data/dist/es/ember/tests/error_handler_test.js +0 -581
- data/dist/es/ember/tests/helpers/helper_registration_test.js +0 -103
- data/dist/es/ember/tests/helpers/link_to_test.js +0 -2103
- data/dist/es/ember/tests/helpers/link_to_test/link_to_transitioning_classes_test.js +0 -342
- data/dist/es/ember/tests/helpers/link_to_test/link_to_with_query_params_test.js +0 -694
- data/dist/es/ember/tests/homepage_example_test.js +0 -47
- data/dist/es/ember/tests/integration/multiple-app-test.js +0 -101
- data/dist/es/ember/tests/production_build_test.js +0 -34
- data/dist/es/ember/tests/reexports_test.js +0 -307
- data/dist/es/ember/tests/routing/decoupled_basic_test.js +0 -4506
- data/dist/es/ember/tests/routing/query_params_test.js +0 -1579
- data/dist/es/ember/tests/routing/query_params_test/model_dependent_state_with_query_params_test.js +0 -1117
- data/dist/es/ember/tests/routing/query_params_test/overlapping_query_params_test.js +0 -185
- data/dist/es/ember/tests/routing/query_params_test/query_param_async_get_handler_test.js +0 -327
- data/dist/es/ember/tests/routing/query_params_test/query_params_paramless_link_to_test.js +0 -37
- data/dist/es/ember/tests/routing/query_params_test/shared_state_test.js +0 -84
- data/dist/es/ember/tests/routing/router_map_test.js +0 -46
- data/dist/es/ember/tests/routing/router_service_test/basic_test.js +0 -95
- data/dist/es/ember/tests/routing/router_service_test/currenturl_lifecycle_test.js +0 -149
- data/dist/es/ember/tests/routing/router_service_test/isActive_test.js +0 -113
- data/dist/es/ember/tests/routing/router_service_test/replaceWith_test.js +0 -144
- data/dist/es/ember/tests/routing/router_service_test/transitionTo_test.js +0 -370
- data/dist/es/ember/tests/routing/router_service_test/urlFor_test.js +0 -307
- data/dist/es/ember/tests/routing/substates_test.js +0 -1110
- data/dist/es/ember/tests/routing/toplevel_dom_test.js +0 -37
- data/dist/es/ember/tests/service_injection_test.js +0 -278
- data/dist/es/ember/tests/view_instrumentation_test.js +0 -47
- data/dist/es/ember/version.js +0 -1
- data/dist/es/handlebars.js +0 -1268
- data/dist/es/internal-test-helpers/index.js +0 -31
- data/dist/es/internal-test-helpers/lib/.gitkeep +0 -0
- data/dist/es/internal-test-helpers/lib/apply-mixins.js +0 -37
- data/dist/es/internal-test-helpers/lib/browser-detect.js +0 -4
- data/dist/es/internal-test-helpers/lib/build-owner.js +0 -49
- data/dist/es/internal-test-helpers/lib/confirm-export.js +0 -45
- data/dist/es/internal-test-helpers/lib/ember-dev/assertion.js +0 -87
- data/dist/es/internal-test-helpers/lib/ember-dev/containers.js +0 -34
- data/dist/es/internal-test-helpers/lib/ember-dev/debug.js +0 -47
- data/dist/es/internal-test-helpers/lib/ember-dev/deprecation.js +0 -71
- data/dist/es/internal-test-helpers/lib/ember-dev/index.js +0 -19
- data/dist/es/internal-test-helpers/lib/ember-dev/method-call-tracker.js +0 -127
- data/dist/es/internal-test-helpers/lib/ember-dev/namespaces.js +0 -34
- data/dist/es/internal-test-helpers/lib/ember-dev/run-loop.js +0 -28
- data/dist/es/internal-test-helpers/lib/ember-dev/setup-qunit.js +0 -26
- data/dist/es/internal-test-helpers/lib/ember-dev/utils.js +0 -33
- data/dist/es/internal-test-helpers/lib/ember-dev/warning.js +0 -71
- data/dist/es/internal-test-helpers/lib/equal-inner-html.js +0 -37
- data/dist/es/internal-test-helpers/lib/equal-tokens.js +0 -53
- data/dist/es/internal-test-helpers/lib/factory.js +0 -65
- data/dist/es/internal-test-helpers/lib/get-all-property-names.js +0 -12
- data/dist/es/internal-test-helpers/lib/get-text-of.js +0 -3
- data/dist/es/internal-test-helpers/lib/matchers.js +0 -167
- data/dist/es/internal-test-helpers/lib/module-for.js +0 -89
- data/dist/es/internal-test-helpers/lib/registry-check.js +0 -28
- data/dist/es/internal-test-helpers/lib/run.js +0 -11
- data/dist/es/internal-test-helpers/lib/strip.js +0 -12
- data/dist/es/internal-test-helpers/lib/system/synthetic-events.js +0 -183
- data/dist/es/internal-test-helpers/lib/test-cases/abstract-application.js +0 -70
- data/dist/es/internal-test-helpers/lib/test-cases/abstract-rendering.js +0 -203
- data/dist/es/internal-test-helpers/lib/test-cases/abstract.js +0 -222
- data/dist/es/internal-test-helpers/lib/test-cases/application.js +0 -39
- data/dist/es/internal-test-helpers/lib/test-cases/autoboot-application.js +0 -34
- data/dist/es/internal-test-helpers/lib/test-cases/default-resolver-application.js +0 -43
- data/dist/es/internal-test-helpers/lib/test-cases/node-query.js +0 -120
- data/dist/es/internal-test-helpers/lib/test-cases/query-param.js +0 -124
- data/dist/es/internal-test-helpers/lib/test-cases/rendering.js +0 -14
- data/dist/es/internal-test-helpers/lib/test-cases/router.js +0 -26
- data/dist/es/internal-test-helpers/lib/test-cases/test-resolver-application.js +0 -40
- data/dist/es/internal-test-helpers/lib/test-resolver.js +0 -86
- data/dist/es/internal-test-helpers/tests/index-test.js +0 -10
- data/dist/es/route-recognizer.js +0 -685
- data/dist/es/router.js +0 -2454
- data/dist/es/rsvp.js +0 -2394
- data/dist/es/simple-html-tokenizer.js +0 -638
- data/dist/jquery/jquery.js +0 -10364
- data/dist/node/app-boot-test.js +0 -146
- data/dist/node/build-info-test.js +0 -177
- data/dist/node/component-rendering-test.js +0 -34
- data/dist/node/helpers/app-module.js +0 -198
- data/dist/node/helpers/assert-html-matches.js +0 -25
- data/dist/node/helpers/build-owner.js +0 -28
- data/dist/node/helpers/component-module.js +0 -137
- data/dist/node/sourcemap-test.js +0 -27
- data/dist/node/template-compiler-test.js +0 -45
- data/dist/node/visit-test.js +0 -349
- data/dist/qunit/qunit.css +0 -436
- data/dist/qunit/qunit.js +0 -5188
- data/dist/tests/index.html +0 -254
- data/ember-source.gemspec +0 -28
- data/node_modules/.yarn-integrity +0 -10
- data/yarn.lock +0 -4
@@ -1,35 +0,0 @@
|
|
1
|
-
import { moduleFor, RenderingTest } from '../../utils/test-case';
|
2
|
-
import { set } from 'ember-metal';
|
3
|
-
|
4
|
-
moduleFor(
|
5
|
-
'Components test: web component fallback',
|
6
|
-
class extends RenderingTest {
|
7
|
-
['@test custom elements are rendered']() {
|
8
|
-
let template = `<foo-bar some-attr="123">hello</foo-bar>`;
|
9
|
-
|
10
|
-
this.render(template);
|
11
|
-
|
12
|
-
this.assertHTML(template);
|
13
|
-
|
14
|
-
this.assertStableRerender();
|
15
|
-
}
|
16
|
-
|
17
|
-
['@test custom elements can have bound attributes']() {
|
18
|
-
let template = `<foo-bar some-attr="{{name}}">hello</foo-bar>`;
|
19
|
-
|
20
|
-
this.render(template, { name: 'Robert' });
|
21
|
-
|
22
|
-
this.assertHTML(`<foo-bar some-attr="Robert">hello</foo-bar>`);
|
23
|
-
|
24
|
-
this.assertStableRerender();
|
25
|
-
|
26
|
-
this.runTask(() => set(this.context, 'name', 'Kris'));
|
27
|
-
|
28
|
-
this.assertHTML(`<foo-bar some-attr="Kris">hello</foo-bar>`);
|
29
|
-
|
30
|
-
this.runTask(() => set(this.context, 'name', 'Robert'));
|
31
|
-
|
32
|
-
this.assertHTML(`<foo-bar some-attr="Robert">hello</foo-bar>`);
|
33
|
-
}
|
34
|
-
}
|
35
|
-
);
|
@@ -1,40 +0,0 @@
|
|
1
|
-
import { set } from 'ember-metal';
|
2
|
-
import { Component } from '../../utils/helpers';
|
3
|
-
import { moduleFor, RenderingTest } from '../../utils/test-case';
|
4
|
-
|
5
|
-
moduleFor(
|
6
|
-
'Component willDestroyElement hook',
|
7
|
-
class extends RenderingTest {
|
8
|
-
['@test it calls willDestroyElement when removed by if'](assert) {
|
9
|
-
let didInsertElementCount = 0;
|
10
|
-
let willDestroyElementCount = 0;
|
11
|
-
let FooBarComponent = Component.extend({
|
12
|
-
didInsertElement() {
|
13
|
-
didInsertElementCount++;
|
14
|
-
assert.notEqual(this.element.parentNode, null, 'precond component is in DOM');
|
15
|
-
},
|
16
|
-
willDestroyElement() {
|
17
|
-
willDestroyElementCount++;
|
18
|
-
assert.notEqual(this.element.parentNode, null, 'has not been removed from DOM yet');
|
19
|
-
},
|
20
|
-
});
|
21
|
-
|
22
|
-
this.registerComponent('foo-bar', {
|
23
|
-
ComponentClass: FooBarComponent,
|
24
|
-
template: 'hello',
|
25
|
-
});
|
26
|
-
|
27
|
-
this.render('{{#if switch}}{{foo-bar}}{{/if}}', { switch: true });
|
28
|
-
|
29
|
-
assert.equal(didInsertElementCount, 1, 'didInsertElement was called once');
|
30
|
-
|
31
|
-
this.assertComponentElement(this.firstChild, { content: 'hello' });
|
32
|
-
|
33
|
-
this.runTask(() => set(this.context, 'switch', false));
|
34
|
-
|
35
|
-
assert.equal(willDestroyElementCount, 1, 'willDestroyElement was called once');
|
36
|
-
|
37
|
-
this.assertText('');
|
38
|
-
}
|
39
|
-
}
|
40
|
-
);
|
@@ -1,1759 +0,0 @@
|
|
1
|
-
/* globals EmberDev */
|
2
|
-
import { RenderingTest, moduleFor } from '../utils/test-case';
|
3
|
-
import { applyMixins } from '../utils/abstract-test-case';
|
4
|
-
import { set, computed } from 'ember-metal';
|
5
|
-
import { getDebugFunction, setDebugFunction } from '@ember/debug';
|
6
|
-
import { readOnly } from '@ember/object/computed';
|
7
|
-
import { Object as EmberObject, ObjectProxy } from 'ember-runtime';
|
8
|
-
import { classes } from '../utils/test-helpers';
|
9
|
-
import { constructStyleDeprecationMessage } from 'ember-views';
|
10
|
-
import { Component, SafeString, htmlSafe } from '../utils/helpers';
|
11
|
-
|
12
|
-
moduleFor(
|
13
|
-
'Static content tests',
|
14
|
-
class extends RenderingTest {
|
15
|
-
['@test it can render a static text node']() {
|
16
|
-
this.render('hello');
|
17
|
-
let text1 = this.assertTextNode(this.firstChild, 'hello');
|
18
|
-
|
19
|
-
this.runTask(() => this.rerender());
|
20
|
-
|
21
|
-
let text2 = this.assertTextNode(this.firstChild, 'hello');
|
22
|
-
|
23
|
-
this.assertSameNode(text1, text2);
|
24
|
-
}
|
25
|
-
|
26
|
-
['@test it can render a static element']() {
|
27
|
-
this.render('<p>hello</p>');
|
28
|
-
let p1 = this.assertElement(this.firstChild, { tagName: 'p' });
|
29
|
-
let text1 = this.assertTextNode(this.firstChild.firstChild, 'hello');
|
30
|
-
|
31
|
-
this.runTask(() => this.rerender());
|
32
|
-
|
33
|
-
let p2 = this.assertElement(this.firstChild, { tagName: 'p' });
|
34
|
-
let text2 = this.assertTextNode(this.firstChild.firstChild, 'hello');
|
35
|
-
|
36
|
-
this.assertSameNode(p1, p2);
|
37
|
-
this.assertSameNode(text1, text2);
|
38
|
-
}
|
39
|
-
|
40
|
-
['@test it can render a static template']() {
|
41
|
-
let template = `
|
42
|
-
<div class="header">
|
43
|
-
<h1>Welcome to Ember.js</h1>
|
44
|
-
</div>
|
45
|
-
<div class="body">
|
46
|
-
<h2>Why you should use Ember.js?</h2>
|
47
|
-
<ol>
|
48
|
-
<li>It's great</li>
|
49
|
-
<li>It's awesome</li>
|
50
|
-
<li>It's Ember.js</li>
|
51
|
-
</ol>
|
52
|
-
</div>
|
53
|
-
<div class="footer">
|
54
|
-
Ember.js is free, open source and always will be.
|
55
|
-
</div>
|
56
|
-
`;
|
57
|
-
|
58
|
-
this.render(template);
|
59
|
-
this.assertHTML(template);
|
60
|
-
|
61
|
-
this.runTask(() => this.rerender());
|
62
|
-
|
63
|
-
this.assertHTML(template);
|
64
|
-
}
|
65
|
-
}
|
66
|
-
);
|
67
|
-
|
68
|
-
class DynamicContentTest extends RenderingTest {
|
69
|
-
/* abstract */
|
70
|
-
renderPath(/* path, context = {} */) {
|
71
|
-
throw new Error('Not implemented: `renderValues`');
|
72
|
-
}
|
73
|
-
|
74
|
-
assertIsEmpty() {
|
75
|
-
this.assert.strictEqual(this.firstChild, null);
|
76
|
-
}
|
77
|
-
|
78
|
-
/* abstract */
|
79
|
-
assertContent(/* content */) {
|
80
|
-
throw new Error('Not implemented: `assertContent`');
|
81
|
-
}
|
82
|
-
|
83
|
-
['@test it can render a dynamic path']() {
|
84
|
-
this.renderPath('message', { message: 'hello' });
|
85
|
-
|
86
|
-
this.assertContent('hello');
|
87
|
-
|
88
|
-
this.assertStableRerender();
|
89
|
-
|
90
|
-
this.runTask(() => set(this.context, 'message', 'goodbye'));
|
91
|
-
|
92
|
-
this.assertContent('goodbye');
|
93
|
-
this.assertInvariants();
|
94
|
-
|
95
|
-
this.runTask(() => set(this.context, 'message', 'hello'));
|
96
|
-
|
97
|
-
this.assertContent('hello');
|
98
|
-
this.assertInvariants();
|
99
|
-
}
|
100
|
-
|
101
|
-
['@test resolves the string length properly']() {
|
102
|
-
this.render('<p>{{foo.length}}</p>', { foo: undefined });
|
103
|
-
|
104
|
-
this.assertHTML('<p></p>');
|
105
|
-
|
106
|
-
this.assertStableRerender();
|
107
|
-
|
108
|
-
this.runTask(() => set(this.context, 'foo', 'foo'));
|
109
|
-
|
110
|
-
this.assertHTML('<p>3</p>');
|
111
|
-
|
112
|
-
this.runTask(() => set(this.context, 'foo', ''));
|
113
|
-
|
114
|
-
this.assertHTML('<p>0</p>');
|
115
|
-
|
116
|
-
this.runTask(() => set(this.context, 'foo', undefined));
|
117
|
-
|
118
|
-
this.assertHTML('<p></p>');
|
119
|
-
}
|
120
|
-
|
121
|
-
['@test resolves the array length properly']() {
|
122
|
-
this.render('<p>{{foo.length}}</p>', { foo: undefined });
|
123
|
-
|
124
|
-
this.assertHTML('<p></p>');
|
125
|
-
|
126
|
-
this.assertStableRerender();
|
127
|
-
|
128
|
-
this.runTask(() => set(this.context, 'foo', [1, 2, 3]));
|
129
|
-
|
130
|
-
this.assertHTML('<p>3</p>');
|
131
|
-
|
132
|
-
this.runTask(() => set(this.context, 'foo', []));
|
133
|
-
|
134
|
-
this.assertHTML('<p>0</p>');
|
135
|
-
|
136
|
-
this.runTask(() => set(this.context, 'foo', undefined));
|
137
|
-
|
138
|
-
this.assertHTML('<p></p>');
|
139
|
-
}
|
140
|
-
|
141
|
-
['@test it can render a capitalized path with no deprecation']() {
|
142
|
-
expectNoDeprecation();
|
143
|
-
|
144
|
-
this.renderPath('CaptializedPath', { CaptializedPath: 'no deprecation' });
|
145
|
-
|
146
|
-
this.assertContent('no deprecation');
|
147
|
-
|
148
|
-
this.assertStableRerender();
|
149
|
-
|
150
|
-
this.runTask(() => set(this.context, 'CaptializedPath', 'still no deprecation'));
|
151
|
-
|
152
|
-
this.assertContent('still no deprecation');
|
153
|
-
this.assertInvariants();
|
154
|
-
|
155
|
-
this.runTask(() => set(this.context, 'CaptializedPath', 'no deprecation'));
|
156
|
-
|
157
|
-
this.assertContent('no deprecation');
|
158
|
-
this.assertInvariants();
|
159
|
-
}
|
160
|
-
|
161
|
-
['@test it can render undefined dynamic paths']() {
|
162
|
-
this.renderPath('name', {});
|
163
|
-
|
164
|
-
this.assertIsEmpty();
|
165
|
-
|
166
|
-
this.assertStableRerender();
|
167
|
-
|
168
|
-
this.runTask(() => set(this.context, 'name', 'foo-bar'));
|
169
|
-
|
170
|
-
this.assertContent('foo-bar');
|
171
|
-
|
172
|
-
this.runTask(() => set(this.context, 'name', undefined));
|
173
|
-
|
174
|
-
this.assertIsEmpty();
|
175
|
-
}
|
176
|
-
|
177
|
-
['@test it can render a deeply nested dynamic path']() {
|
178
|
-
this.renderPath('a.b.c.d.e.f', {
|
179
|
-
a: { b: { c: { d: { e: { f: 'hello' } } } } },
|
180
|
-
});
|
181
|
-
|
182
|
-
this.assertContent('hello');
|
183
|
-
|
184
|
-
this.assertStableRerender();
|
185
|
-
|
186
|
-
this.runTask(() => set(this.context, 'a.b.c.d.e.f', 'goodbye'));
|
187
|
-
|
188
|
-
this.assertContent('goodbye');
|
189
|
-
this.assertInvariants();
|
190
|
-
|
191
|
-
this.runTask(() => set(this.context, 'a.b.c.d', { e: { f: 'aloha' } }));
|
192
|
-
|
193
|
-
this.assertContent('aloha');
|
194
|
-
this.assertInvariants();
|
195
|
-
|
196
|
-
this.runTask(() => {
|
197
|
-
set(this.context, 'a', { b: { c: { d: { e: { f: 'hello' } } } } });
|
198
|
-
});
|
199
|
-
|
200
|
-
this.assertContent('hello');
|
201
|
-
this.assertInvariants();
|
202
|
-
}
|
203
|
-
|
204
|
-
['@test it can render a computed property']() {
|
205
|
-
let Formatter = EmberObject.extend({
|
206
|
-
formattedMessage: computed('message', function() {
|
207
|
-
return this.get('message').toUpperCase();
|
208
|
-
}),
|
209
|
-
});
|
210
|
-
|
211
|
-
let m = Formatter.create({ message: 'hello' });
|
212
|
-
|
213
|
-
this.renderPath('m.formattedMessage', { m });
|
214
|
-
|
215
|
-
this.assertContent('HELLO');
|
216
|
-
|
217
|
-
this.assertStableRerender();
|
218
|
-
|
219
|
-
this.runTask(() => set(m, 'message', 'goodbye'));
|
220
|
-
|
221
|
-
this.assertContent('GOODBYE');
|
222
|
-
this.assertInvariants();
|
223
|
-
|
224
|
-
this.runTask(() => set(this.context, 'm', Formatter.create({ message: 'hello' })));
|
225
|
-
|
226
|
-
this.assertContent('HELLO');
|
227
|
-
this.assertInvariants();
|
228
|
-
}
|
229
|
-
|
230
|
-
['@test it can render a computed property with nested dependency']() {
|
231
|
-
let Formatter = EmberObject.extend({
|
232
|
-
formattedMessage: computed('messenger.message', function() {
|
233
|
-
return this.get('messenger.message').toUpperCase();
|
234
|
-
}),
|
235
|
-
});
|
236
|
-
|
237
|
-
let m = Formatter.create({ messenger: { message: 'hello' } });
|
238
|
-
|
239
|
-
this.renderPath('m.formattedMessage', { m });
|
240
|
-
|
241
|
-
this.assertContent('HELLO');
|
242
|
-
|
243
|
-
this.assertStableRerender();
|
244
|
-
|
245
|
-
this.runTask(() => set(m, 'messenger.message', 'goodbye'));
|
246
|
-
|
247
|
-
this.assertContent('GOODBYE');
|
248
|
-
this.assertInvariants();
|
249
|
-
|
250
|
-
this.runTask(() =>
|
251
|
-
set(this.context, 'm', Formatter.create({ messenger: { message: 'hello' } }))
|
252
|
-
);
|
253
|
-
|
254
|
-
this.assertContent('HELLO');
|
255
|
-
this.assertInvariants();
|
256
|
-
}
|
257
|
-
|
258
|
-
['@test it can read from a proxy object']() {
|
259
|
-
this.renderPath('proxy.name', {
|
260
|
-
proxy: ObjectProxy.create({ content: { name: 'Tom Dale' } }),
|
261
|
-
});
|
262
|
-
|
263
|
-
this.assertContent('Tom Dale');
|
264
|
-
|
265
|
-
this.assertStableRerender();
|
266
|
-
|
267
|
-
this.runTask(() => set(this.context, 'proxy.content.name', 'Yehuda Katz'));
|
268
|
-
|
269
|
-
this.assertContent('Yehuda Katz');
|
270
|
-
this.assertInvariants();
|
271
|
-
|
272
|
-
this.runTask(() => set(this.context, 'proxy.content', { name: 'Godfrey Chan' }));
|
273
|
-
|
274
|
-
this.assertContent('Godfrey Chan');
|
275
|
-
this.assertInvariants();
|
276
|
-
|
277
|
-
this.runTask(() => set(this.context, 'proxy.name', 'Stefan Penner'));
|
278
|
-
|
279
|
-
this.assertContent('Stefan Penner');
|
280
|
-
this.assertInvariants();
|
281
|
-
|
282
|
-
this.runTask(() => set(this.context, 'proxy.content', null));
|
283
|
-
|
284
|
-
this.assertIsEmpty();
|
285
|
-
|
286
|
-
this.runTask(() =>
|
287
|
-
set(this.context, 'proxy', ObjectProxy.create({ content: { name: 'Tom Dale' } }))
|
288
|
-
);
|
289
|
-
|
290
|
-
this.assertContent('Tom Dale');
|
291
|
-
this.assertInvariants();
|
292
|
-
}
|
293
|
-
|
294
|
-
['@test it can read from a nested path in a proxy object']() {
|
295
|
-
this.renderPath('proxy.name.last', {
|
296
|
-
proxy: ObjectProxy.create({
|
297
|
-
content: { name: { first: 'Tom', last: 'Dale' } },
|
298
|
-
}),
|
299
|
-
});
|
300
|
-
|
301
|
-
this.assertContent('Dale');
|
302
|
-
|
303
|
-
this.assertStableRerender();
|
304
|
-
|
305
|
-
this.runTask(() => set(this.context, 'proxy.content.name.last', 'Cruise'));
|
306
|
-
|
307
|
-
this.assertContent('Cruise');
|
308
|
-
this.assertInvariants();
|
309
|
-
|
310
|
-
this.runTask(() => set(this.context, 'proxy.content.name.first', 'Suri'));
|
311
|
-
|
312
|
-
this.assertStableRerender();
|
313
|
-
|
314
|
-
this.runTask(() => set(this.context, 'proxy.content.name', { first: 'Yehuda', last: 'Katz' }));
|
315
|
-
|
316
|
-
this.assertContent('Katz');
|
317
|
-
this.assertInvariants();
|
318
|
-
|
319
|
-
this.runTask(() =>
|
320
|
-
set(this.context, 'proxy.content', {
|
321
|
-
name: { first: 'Godfrey', last: 'Chan' },
|
322
|
-
})
|
323
|
-
);
|
324
|
-
|
325
|
-
this.assertContent('Chan');
|
326
|
-
this.assertInvariants();
|
327
|
-
|
328
|
-
this.runTask(() => set(this.context, 'proxy.name', { first: 'Stefan', last: 'Penner' }));
|
329
|
-
|
330
|
-
this.assertContent('Penner');
|
331
|
-
this.assertInvariants();
|
332
|
-
|
333
|
-
this.runTask(() => set(this.context, 'proxy', null));
|
334
|
-
|
335
|
-
this.assertIsEmpty();
|
336
|
-
|
337
|
-
this.runTask(() =>
|
338
|
-
set(
|
339
|
-
this.context,
|
340
|
-
'proxy',
|
341
|
-
ObjectProxy.create({
|
342
|
-
content: { name: { first: 'Tom', last: 'Dale' } },
|
343
|
-
})
|
344
|
-
)
|
345
|
-
);
|
346
|
-
|
347
|
-
this.assertContent('Dale');
|
348
|
-
this.assertInvariants();
|
349
|
-
}
|
350
|
-
|
351
|
-
['@test it can read from a path flipping between a proxy and a real object']() {
|
352
|
-
this.renderPath('proxyOrObject.name.last', {
|
353
|
-
proxyOrObject: ObjectProxy.create({
|
354
|
-
content: { name: { first: 'Tom', last: 'Dale' } },
|
355
|
-
}),
|
356
|
-
});
|
357
|
-
|
358
|
-
this.assertContent('Dale');
|
359
|
-
|
360
|
-
this.assertStableRerender();
|
361
|
-
|
362
|
-
this.runTask(() =>
|
363
|
-
set(this.context, 'proxyOrObject', {
|
364
|
-
name: { first: 'Tom', last: 'Dale' },
|
365
|
-
})
|
366
|
-
);
|
367
|
-
|
368
|
-
this.assertStableRerender();
|
369
|
-
|
370
|
-
this.runTask(() => set(this.context, 'proxyOrObject.name.last', 'Cruise'));
|
371
|
-
|
372
|
-
this.assertContent('Cruise');
|
373
|
-
this.assertInvariants();
|
374
|
-
|
375
|
-
this.runTask(() => set(this.context, 'proxyOrObject.name.first', 'Suri'));
|
376
|
-
|
377
|
-
this.assertStableRerender();
|
378
|
-
|
379
|
-
this.runTask(() =>
|
380
|
-
set(this.context, 'proxyOrObject', {
|
381
|
-
name: { first: 'Yehuda', last: 'Katz' },
|
382
|
-
})
|
383
|
-
);
|
384
|
-
|
385
|
-
this.assertContent('Katz');
|
386
|
-
this.assertInvariants();
|
387
|
-
|
388
|
-
this.runTask(() =>
|
389
|
-
set(
|
390
|
-
this.context,
|
391
|
-
'proxyOrObject',
|
392
|
-
ObjectProxy.create({
|
393
|
-
content: { name: { first: 'Godfrey', last: 'Chan' } },
|
394
|
-
})
|
395
|
-
)
|
396
|
-
);
|
397
|
-
|
398
|
-
this.assertContent('Chan');
|
399
|
-
this.assertInvariants();
|
400
|
-
|
401
|
-
this.runTask(() =>
|
402
|
-
set(this.context, 'proxyOrObject.content.name', {
|
403
|
-
first: 'Stefan',
|
404
|
-
last: 'Penner',
|
405
|
-
})
|
406
|
-
);
|
407
|
-
|
408
|
-
this.assertContent('Penner');
|
409
|
-
this.assertInvariants();
|
410
|
-
|
411
|
-
this.runTask(() => set(this.context, 'proxyOrObject', null));
|
412
|
-
|
413
|
-
this.assertIsEmpty();
|
414
|
-
|
415
|
-
this.runTask(() =>
|
416
|
-
set(
|
417
|
-
this.context,
|
418
|
-
'proxyOrObject',
|
419
|
-
ObjectProxy.create({
|
420
|
-
content: { name: { first: 'Tom', last: 'Dale' } },
|
421
|
-
})
|
422
|
-
)
|
423
|
-
);
|
424
|
-
|
425
|
-
this.assertContent('Dale');
|
426
|
-
this.assertInvariants();
|
427
|
-
}
|
428
|
-
|
429
|
-
['@test it can read from a path flipping between a real object and a proxy']() {
|
430
|
-
this.renderPath('objectOrProxy.name.last', {
|
431
|
-
objectOrProxy: { name: { first: 'Tom', last: 'Dale' } },
|
432
|
-
});
|
433
|
-
|
434
|
-
this.assertContent('Dale');
|
435
|
-
|
436
|
-
this.assertStableRerender();
|
437
|
-
|
438
|
-
this.runTask(() =>
|
439
|
-
set(
|
440
|
-
this.context,
|
441
|
-
'objectOrProxy',
|
442
|
-
ObjectProxy.create({
|
443
|
-
content: { name: { first: 'Tom', last: 'Dale' } },
|
444
|
-
})
|
445
|
-
)
|
446
|
-
);
|
447
|
-
|
448
|
-
this.assertStableRerender();
|
449
|
-
|
450
|
-
this.runTask(() => set(this.context, 'objectOrProxy.content.name.last', 'Cruise'));
|
451
|
-
|
452
|
-
this.assertContent('Cruise');
|
453
|
-
this.assertInvariants();
|
454
|
-
|
455
|
-
this.runTask(() => set(this.context, 'objectOrProxy.content.name.first', 'Suri'));
|
456
|
-
|
457
|
-
this.assertStableRerender();
|
458
|
-
|
459
|
-
this.runTask(() =>
|
460
|
-
set(this.context, 'objectOrProxy.content', {
|
461
|
-
name: { first: 'Yehuda', last: 'Katz' },
|
462
|
-
})
|
463
|
-
);
|
464
|
-
|
465
|
-
this.assertContent('Katz');
|
466
|
-
this.assertInvariants();
|
467
|
-
|
468
|
-
this.runTask(() =>
|
469
|
-
set(this.context, 'objectOrProxy', {
|
470
|
-
name: { first: 'Godfrey', last: 'Chan' },
|
471
|
-
})
|
472
|
-
);
|
473
|
-
|
474
|
-
this.assertContent('Chan');
|
475
|
-
this.assertInvariants();
|
476
|
-
|
477
|
-
this.runTask(() =>
|
478
|
-
set(this.context, 'objectOrProxy.name', {
|
479
|
-
first: 'Stefan',
|
480
|
-
last: 'Penner',
|
481
|
-
})
|
482
|
-
);
|
483
|
-
|
484
|
-
this.assertContent('Penner');
|
485
|
-
this.assertInvariants();
|
486
|
-
|
487
|
-
this.runTask(() => set(this.context, 'objectOrProxy', null));
|
488
|
-
|
489
|
-
this.assertIsEmpty();
|
490
|
-
|
491
|
-
this.runTask(() =>
|
492
|
-
set(this.context, 'objectOrProxy', {
|
493
|
-
name: { first: 'Tom', last: 'Dale' },
|
494
|
-
})
|
495
|
-
);
|
496
|
-
|
497
|
-
this.assertContent('Dale');
|
498
|
-
this.assertInvariants();
|
499
|
-
}
|
500
|
-
|
501
|
-
['@test it can read from a null object']() {
|
502
|
-
let nullObject = Object.create(null);
|
503
|
-
nullObject['message'] = 'hello';
|
504
|
-
|
505
|
-
this.renderPath('nullObject.message', { nullObject });
|
506
|
-
|
507
|
-
this.assertContent('hello');
|
508
|
-
|
509
|
-
this.assertStableRerender();
|
510
|
-
|
511
|
-
this.runTask(() => set(nullObject, 'message', 'goodbye'));
|
512
|
-
|
513
|
-
this.assertContent('goodbye');
|
514
|
-
this.assertInvariants();
|
515
|
-
|
516
|
-
nullObject = Object.create(null);
|
517
|
-
nullObject['message'] = 'hello';
|
518
|
-
|
519
|
-
this.runTask(() => set(this.context, 'nullObject', nullObject));
|
520
|
-
|
521
|
-
this.assertContent('hello');
|
522
|
-
this.assertInvariants();
|
523
|
-
}
|
524
|
-
|
525
|
-
['@test it can render a readOnly property of a path']() {
|
526
|
-
let Messenger = EmberObject.extend({
|
527
|
-
message: readOnly('a.b.c'),
|
528
|
-
});
|
529
|
-
|
530
|
-
let messenger = Messenger.create({
|
531
|
-
a: {
|
532
|
-
b: {
|
533
|
-
c: 'hello',
|
534
|
-
},
|
535
|
-
},
|
536
|
-
});
|
537
|
-
|
538
|
-
this.renderPath('messenger.message', { messenger });
|
539
|
-
|
540
|
-
this.assertContent('hello');
|
541
|
-
|
542
|
-
this.assertStableRerender();
|
543
|
-
|
544
|
-
this.runTask(() => set(messenger, 'a.b.c', 'hi'));
|
545
|
-
|
546
|
-
this.assertContent('hi');
|
547
|
-
this.assertInvariants();
|
548
|
-
|
549
|
-
this.runTask(() =>
|
550
|
-
set(this.context, 'messenger.a.b', {
|
551
|
-
c: 'goodbye',
|
552
|
-
})
|
553
|
-
);
|
554
|
-
|
555
|
-
this.assertContent('goodbye');
|
556
|
-
this.assertInvariants();
|
557
|
-
|
558
|
-
this.runTask(() =>
|
559
|
-
set(this.context, 'messenger', {
|
560
|
-
message: 'hello',
|
561
|
-
})
|
562
|
-
);
|
563
|
-
|
564
|
-
this.assertContent('hello');
|
565
|
-
this.assertInvariants();
|
566
|
-
}
|
567
|
-
|
568
|
-
['@test it can render a property on a function']() {
|
569
|
-
let func = () => {};
|
570
|
-
func.aProp = 'this is a property on a function';
|
571
|
-
|
572
|
-
this.renderPath('func.aProp', { func });
|
573
|
-
|
574
|
-
this.assertContent('this is a property on a function');
|
575
|
-
|
576
|
-
this.assertStableRerender();
|
577
|
-
|
578
|
-
// this.runTask(() => set(func, 'aProp', 'still a property on a function'));
|
579
|
-
// this.assertContent('still a property on a function');
|
580
|
-
// this.assertInvariants();
|
581
|
-
|
582
|
-
// func = () => {};
|
583
|
-
// func.aProp = 'a prop on a new function';
|
584
|
-
|
585
|
-
// this.runTask(() => set(this.context, 'func', func));
|
586
|
-
|
587
|
-
// this.assertContent('a prop on a new function');
|
588
|
-
// this.assertInvariants();
|
589
|
-
}
|
590
|
-
}
|
591
|
-
|
592
|
-
const EMPTY = {};
|
593
|
-
|
594
|
-
class ContentTestGenerator {
|
595
|
-
constructor(cases, tag = '@test') {
|
596
|
-
this.cases = cases;
|
597
|
-
this.tag = tag;
|
598
|
-
}
|
599
|
-
|
600
|
-
generate([value, expected, label]) {
|
601
|
-
let tag = this.tag;
|
602
|
-
label = label || value;
|
603
|
-
|
604
|
-
if (expected === EMPTY) {
|
605
|
-
return {
|
606
|
-
[`${tag} rendering ${label}`]() {
|
607
|
-
this.renderPath('value', { value });
|
608
|
-
|
609
|
-
this.assertIsEmpty();
|
610
|
-
|
611
|
-
this.runTask(() => set(this.context, 'value', 'hello'));
|
612
|
-
|
613
|
-
this.assertContent('hello');
|
614
|
-
|
615
|
-
this.runTask(() => set(this.context, 'value', value));
|
616
|
-
|
617
|
-
this.assertIsEmpty();
|
618
|
-
},
|
619
|
-
};
|
620
|
-
} else {
|
621
|
-
return {
|
622
|
-
[`${tag} rendering ${label}`]() {
|
623
|
-
this.renderPath('value', { value });
|
624
|
-
|
625
|
-
this.assertContent(expected);
|
626
|
-
|
627
|
-
this.assertStableRerender();
|
628
|
-
|
629
|
-
this.runTask(() => set(this.context, 'value', 'hello'));
|
630
|
-
this.assertContent('hello');
|
631
|
-
this.assertInvariants();
|
632
|
-
|
633
|
-
this.runTask(() => set(this.context, 'value', value));
|
634
|
-
|
635
|
-
this.assertContent(expected);
|
636
|
-
this.assertInvariants();
|
637
|
-
},
|
638
|
-
};
|
639
|
-
}
|
640
|
-
}
|
641
|
-
}
|
642
|
-
|
643
|
-
const SharedContentTestCases = new ContentTestGenerator([
|
644
|
-
['foo', 'foo'],
|
645
|
-
[0, '0'],
|
646
|
-
[-0, '0', '-0'],
|
647
|
-
[1, '1'],
|
648
|
-
[-1, '-1'],
|
649
|
-
[0.0, '0', '0.0'],
|
650
|
-
[0.5, '0.5'],
|
651
|
-
[undefined, EMPTY],
|
652
|
-
[null, EMPTY],
|
653
|
-
[true, 'true'],
|
654
|
-
[false, 'false'],
|
655
|
-
[NaN, 'NaN'],
|
656
|
-
[new Date(2000, 0, 1), String(new Date(2000, 0, 1)), 'a Date object'],
|
657
|
-
[Infinity, 'Infinity'],
|
658
|
-
[1 / -0, '-Infinity'],
|
659
|
-
[{ foo: 'bar' }, '[object Object]', `{ foo: 'bar' }`],
|
660
|
-
[
|
661
|
-
{
|
662
|
-
toString() {
|
663
|
-
return 'foo';
|
664
|
-
},
|
665
|
-
},
|
666
|
-
'foo',
|
667
|
-
'an object with a custom toString function',
|
668
|
-
],
|
669
|
-
[
|
670
|
-
{
|
671
|
-
valueOf() {
|
672
|
-
return 1;
|
673
|
-
},
|
674
|
-
},
|
675
|
-
'[object Object]',
|
676
|
-
'an object with a custom valueOf function',
|
677
|
-
],
|
678
|
-
|
679
|
-
// Escaping tests
|
680
|
-
['<b>Max</b><b>James</b>', '<b>Max</b><b>James</b>'],
|
681
|
-
]);
|
682
|
-
|
683
|
-
let GlimmerContentTestCases = new ContentTestGenerator([
|
684
|
-
[Object.create(null), EMPTY, 'an object with no toString'],
|
685
|
-
]);
|
686
|
-
|
687
|
-
if (typeof Symbol !== 'undefined') {
|
688
|
-
GlimmerContentTestCases.cases.push([Symbol('debug'), 'Symbol(debug)', 'a symbol']);
|
689
|
-
}
|
690
|
-
|
691
|
-
applyMixins(DynamicContentTest, SharedContentTestCases, GlimmerContentTestCases);
|
692
|
-
|
693
|
-
moduleFor(
|
694
|
-
'Dynamic content tests (content position)',
|
695
|
-
class extends DynamicContentTest {
|
696
|
-
renderPath(path, context = {}) {
|
697
|
-
this.render(`{{${path}}}`, context);
|
698
|
-
}
|
699
|
-
|
700
|
-
assertContent(content) {
|
701
|
-
this.assert.strictEqual(this.nodesCount, 1, 'It should render exactly one text node');
|
702
|
-
this.assertTextNode(this.firstChild, content);
|
703
|
-
// this.takeSnapshot();
|
704
|
-
}
|
705
|
-
|
706
|
-
['@test it can render empty safe strings [GH#16314]']() {
|
707
|
-
this.render('before {{value}} after', { value: htmlSafe('hello') });
|
708
|
-
|
709
|
-
this.assertHTML('before hello after');
|
710
|
-
|
711
|
-
this.assertStableRerender();
|
712
|
-
|
713
|
-
this.runTask(() => set(this.context, 'value', htmlSafe('')));
|
714
|
-
|
715
|
-
this.assertHTML('before <!----> after');
|
716
|
-
|
717
|
-
this.runTask(() => set(this.context, 'value', htmlSafe('hello')));
|
718
|
-
|
719
|
-
this.assertHTML('before hello after');
|
720
|
-
}
|
721
|
-
}
|
722
|
-
);
|
723
|
-
|
724
|
-
moduleFor(
|
725
|
-
'Dynamic content tests (content concat)',
|
726
|
-
class extends DynamicContentTest {
|
727
|
-
renderPath(path, context = {}) {
|
728
|
-
this.render(`{{concat "" ${path} ""}}`, context);
|
729
|
-
}
|
730
|
-
|
731
|
-
assertContent(content) {
|
732
|
-
this.assert.strictEqual(this.nodesCount, 1, 'It should render exactly one text node');
|
733
|
-
this.assertTextNode(this.firstChild, content);
|
734
|
-
}
|
735
|
-
}
|
736
|
-
);
|
737
|
-
|
738
|
-
moduleFor(
|
739
|
-
'Dynamic content tests (inside an element)',
|
740
|
-
class extends DynamicContentTest {
|
741
|
-
renderPath(path, context = {}) {
|
742
|
-
this.render(`<p>{{${path}}}</p>`, context);
|
743
|
-
}
|
744
|
-
|
745
|
-
assertIsEmpty() {
|
746
|
-
this.assert.strictEqual(this.nodesCount, 1, 'It should render exactly one <p> tag');
|
747
|
-
this.assertElement(this.firstChild, { tagName: 'p' });
|
748
|
-
this.assertText('');
|
749
|
-
}
|
750
|
-
|
751
|
-
assertContent(content) {
|
752
|
-
this.assert.strictEqual(this.nodesCount, 1, 'It should render exactly one <p> tag');
|
753
|
-
this.assertElement(this.firstChild, { tagName: 'p' });
|
754
|
-
this.assertText(content);
|
755
|
-
}
|
756
|
-
}
|
757
|
-
);
|
758
|
-
|
759
|
-
moduleFor(
|
760
|
-
'Dynamic content tests (attribute position)',
|
761
|
-
class extends DynamicContentTest {
|
762
|
-
renderPath(path, context = {}) {
|
763
|
-
this.render(`<div data-foo="{{${path}}}"></div>`, context);
|
764
|
-
}
|
765
|
-
|
766
|
-
assertIsEmpty() {
|
767
|
-
this.assert.strictEqual(this.nodesCount, 1, 'It should render exactly one <div> tag');
|
768
|
-
this.assertElement(this.firstChild, { tagName: 'div', content: '' });
|
769
|
-
}
|
770
|
-
|
771
|
-
assertContent(content) {
|
772
|
-
this.assert.strictEqual(this.nodesCount, 1, 'It should render exactly one <div> tag');
|
773
|
-
this.assertElement(this.firstChild, {
|
774
|
-
tagName: 'div',
|
775
|
-
attrs: { 'data-foo': content },
|
776
|
-
content: '',
|
777
|
-
});
|
778
|
-
}
|
779
|
-
}
|
780
|
-
);
|
781
|
-
|
782
|
-
class TrustedContentTest extends DynamicContentTest {
|
783
|
-
assertIsEmpty() {
|
784
|
-
this.assert.strictEqual(this.firstChild, null);
|
785
|
-
}
|
786
|
-
|
787
|
-
assertContent(content) {
|
788
|
-
this.assertHTML(content);
|
789
|
-
}
|
790
|
-
|
791
|
-
assertStableRerender() {
|
792
|
-
this.takeSnapshot();
|
793
|
-
this.runTask(() => this.rerender());
|
794
|
-
super.assertInvariants();
|
795
|
-
}
|
796
|
-
|
797
|
-
assertInvariants() {
|
798
|
-
// If it's not stable, we will wipe out all the content and replace them,
|
799
|
-
// so there are no invariants
|
800
|
-
}
|
801
|
-
}
|
802
|
-
|
803
|
-
moduleFor(
|
804
|
-
'Dynamic content tests (trusted)',
|
805
|
-
class extends TrustedContentTest {
|
806
|
-
renderPath(path, context = {}) {
|
807
|
-
this.render(`{{{${path}}}}`, context);
|
808
|
-
}
|
809
|
-
|
810
|
-
['@test updating trusted curlies']() {
|
811
|
-
this.render('{{{htmlContent}}}{{{nested.htmlContent}}}', {
|
812
|
-
htmlContent: '<b>Max</b>',
|
813
|
-
nested: { htmlContent: '<b>James</b>' },
|
814
|
-
});
|
815
|
-
|
816
|
-
this.assertContent('<b>Max</b><b>James</b>');
|
817
|
-
|
818
|
-
this.runTask(() => this.rerender());
|
819
|
-
|
820
|
-
this.assertStableRerender();
|
821
|
-
|
822
|
-
this.runTask(() => set(this.context, 'htmlContent', '<i>M</i><u>a</u><s>x</s>'));
|
823
|
-
|
824
|
-
this.assertContent('<i>M</i><u>a</u><s>x</s><b>James</b>');
|
825
|
-
|
826
|
-
this.runTask(() => set(this.context, 'nested.htmlContent', 'Jammie'));
|
827
|
-
|
828
|
-
this.assertContent('<i>M</i><u>a</u><s>x</s>Jammie');
|
829
|
-
|
830
|
-
this.runTask(() => {
|
831
|
-
set(this.context, 'htmlContent', '<b>Max</b>');
|
832
|
-
set(this.context, 'nested', { htmlContent: '<i>James</i>' });
|
833
|
-
});
|
834
|
-
|
835
|
-
this.assertContent('<b>Max</b><i>James</i>');
|
836
|
-
}
|
837
|
-
|
838
|
-
['@test empty content in trusted curlies [GH#14978]']() {
|
839
|
-
this.render('before {{{value}}} after', {
|
840
|
-
value: 'hello',
|
841
|
-
});
|
842
|
-
|
843
|
-
this.assertContent('before hello after');
|
844
|
-
|
845
|
-
this.runTask(() => this.rerender());
|
846
|
-
|
847
|
-
this.assertStableRerender();
|
848
|
-
|
849
|
-
this.runTask(() => set(this.context, 'value', undefined));
|
850
|
-
|
851
|
-
this.assertContent('before <!----> after');
|
852
|
-
|
853
|
-
this.runTask(() => set(this.context, 'value', 'hello'));
|
854
|
-
|
855
|
-
this.assertContent('before hello after');
|
856
|
-
|
857
|
-
this.runTask(() => set(this.context, 'value', null));
|
858
|
-
|
859
|
-
this.assertContent('before <!----> after');
|
860
|
-
|
861
|
-
this.runTask(() => set(this.context, 'value', 'hello'));
|
862
|
-
|
863
|
-
this.assertContent('before hello after');
|
864
|
-
|
865
|
-
this.runTask(() => set(this.context, 'value', ''));
|
866
|
-
|
867
|
-
this.assertContent('before <!----> after');
|
868
|
-
|
869
|
-
this.runTask(() => set(this.context, 'value', 'hello'));
|
870
|
-
|
871
|
-
this.assertContent('before hello after');
|
872
|
-
|
873
|
-
this.runTask(() => set(this.context, 'value', htmlSafe('')));
|
874
|
-
|
875
|
-
this.assertContent('before <!----> after');
|
876
|
-
|
877
|
-
this.runTask(() => set(this.context, 'value', 'hello'));
|
878
|
-
|
879
|
-
this.assertContent('before hello after');
|
880
|
-
}
|
881
|
-
}
|
882
|
-
);
|
883
|
-
|
884
|
-
moduleFor(
|
885
|
-
'Dynamic content tests (integration)',
|
886
|
-
class extends RenderingTest {
|
887
|
-
['@test it can render a dynamic template']() {
|
888
|
-
let template = `
|
889
|
-
<div class="header">
|
890
|
-
<h1>Welcome to {{framework}}</h1>
|
891
|
-
</div>
|
892
|
-
<div class="body">
|
893
|
-
<h2>Why you should use {{framework}}?</h2>
|
894
|
-
<ol>
|
895
|
-
<li>It's great</li>
|
896
|
-
<li>It's awesome</li>
|
897
|
-
<li>It's {{framework}}</li>
|
898
|
-
</ol>
|
899
|
-
</div>
|
900
|
-
<div class="footer">
|
901
|
-
{{framework}} is free, open source and always will be.
|
902
|
-
</div>
|
903
|
-
`;
|
904
|
-
|
905
|
-
let ember = `
|
906
|
-
<div class="header">
|
907
|
-
<h1>Welcome to Ember.js</h1>
|
908
|
-
</div>
|
909
|
-
<div class="body">
|
910
|
-
<h2>Why you should use Ember.js?</h2>
|
911
|
-
<ol>
|
912
|
-
<li>It's great</li>
|
913
|
-
<li>It's awesome</li>
|
914
|
-
<li>It's Ember.js</li>
|
915
|
-
</ol>
|
916
|
-
</div>
|
917
|
-
<div class="footer">
|
918
|
-
Ember.js is free, open source and always will be.
|
919
|
-
</div>
|
920
|
-
`;
|
921
|
-
|
922
|
-
let react = `
|
923
|
-
<div class="header">
|
924
|
-
<h1>Welcome to React</h1>
|
925
|
-
</div>
|
926
|
-
<div class="body">
|
927
|
-
<h2>Why you should use React?</h2>
|
928
|
-
<ol>
|
929
|
-
<li>It's great</li>
|
930
|
-
<li>It's awesome</li>
|
931
|
-
<li>It's React</li>
|
932
|
-
</ol>
|
933
|
-
</div>
|
934
|
-
<div class="footer">
|
935
|
-
React is free, open source and always will be.
|
936
|
-
</div>
|
937
|
-
`;
|
938
|
-
|
939
|
-
this.render(template, {
|
940
|
-
framework: 'Ember.js',
|
941
|
-
});
|
942
|
-
this.assertHTML(ember);
|
943
|
-
|
944
|
-
this.runTask(() => this.rerender());
|
945
|
-
|
946
|
-
this.assertHTML(ember);
|
947
|
-
|
948
|
-
this.runTask(() => set(this.context, 'framework', 'React'));
|
949
|
-
|
950
|
-
this.assertHTML(react);
|
951
|
-
|
952
|
-
this.runTask(() => set(this.context, 'framework', 'Ember.js'));
|
953
|
-
|
954
|
-
this.assertHTML(ember);
|
955
|
-
}
|
956
|
-
|
957
|
-
['@test it should evaluate to nothing if part of the path is `undefined`']() {
|
958
|
-
this.render('{{foo.bar.baz.bizz}}', {
|
959
|
-
foo: {},
|
960
|
-
});
|
961
|
-
|
962
|
-
this.assertText('');
|
963
|
-
|
964
|
-
this.runTask(() => this.rerender());
|
965
|
-
|
966
|
-
this.assertText('');
|
967
|
-
|
968
|
-
this.runTask(() =>
|
969
|
-
set(this.context, 'foo', {
|
970
|
-
bar: { baz: { bizz: 'Hey!' } },
|
971
|
-
})
|
972
|
-
);
|
973
|
-
|
974
|
-
this.assertText('Hey!');
|
975
|
-
|
976
|
-
this.runTask(() => set(this.context, 'foo', {}));
|
977
|
-
|
978
|
-
this.assertText('');
|
979
|
-
|
980
|
-
this.runTask(() =>
|
981
|
-
set(this.context, 'foo', {
|
982
|
-
bar: { baz: { bizz: 'Hello!' } },
|
983
|
-
})
|
984
|
-
);
|
985
|
-
|
986
|
-
this.assertText('Hello!');
|
987
|
-
|
988
|
-
this.runTask(() => set(this.context, 'foo', {}));
|
989
|
-
|
990
|
-
this.assertText('');
|
991
|
-
}
|
992
|
-
|
993
|
-
['@test it should evaluate to nothing if part of the path is a primative']() {
|
994
|
-
this.render('{{foo.bar.baz.bizz}}', {
|
995
|
-
foo: { bar: true },
|
996
|
-
});
|
997
|
-
|
998
|
-
this.assertText('');
|
999
|
-
|
1000
|
-
this.runTask(() => this.rerender());
|
1001
|
-
|
1002
|
-
this.assertText('');
|
1003
|
-
|
1004
|
-
this.runTask(() =>
|
1005
|
-
set(this.context, 'foo', {
|
1006
|
-
bar: false,
|
1007
|
-
})
|
1008
|
-
);
|
1009
|
-
|
1010
|
-
this.assertText('');
|
1011
|
-
|
1012
|
-
this.runTask(() =>
|
1013
|
-
set(this.context, 'foo', {
|
1014
|
-
bar: 'Haha',
|
1015
|
-
})
|
1016
|
-
);
|
1017
|
-
|
1018
|
-
this.assertText('');
|
1019
|
-
|
1020
|
-
this.runTask(() =>
|
1021
|
-
set(this.context, 'foo', {
|
1022
|
-
bar: null,
|
1023
|
-
})
|
1024
|
-
);
|
1025
|
-
|
1026
|
-
this.assertText('');
|
1027
|
-
|
1028
|
-
this.runTask(() =>
|
1029
|
-
set(this.context, 'foo', {
|
1030
|
-
bar: undefined,
|
1031
|
-
})
|
1032
|
-
);
|
1033
|
-
|
1034
|
-
this.assertText('');
|
1035
|
-
|
1036
|
-
this.runTask(() =>
|
1037
|
-
set(this.context, 'foo', {
|
1038
|
-
bar: 1,
|
1039
|
-
})
|
1040
|
-
);
|
1041
|
-
|
1042
|
-
this.assertText('');
|
1043
|
-
|
1044
|
-
this.runTask(() =>
|
1045
|
-
set(this.context, 'foo', {
|
1046
|
-
bar: { baz: { bizz: 'Hello!' } },
|
1047
|
-
})
|
1048
|
-
);
|
1049
|
-
|
1050
|
-
this.assertText('Hello!');
|
1051
|
-
|
1052
|
-
this.runTask(() =>
|
1053
|
-
set(this.context, 'foo', {
|
1054
|
-
bar: true,
|
1055
|
-
})
|
1056
|
-
);
|
1057
|
-
|
1058
|
-
this.assertText('');
|
1059
|
-
}
|
1060
|
-
|
1061
|
-
['@test can set dynamic href']() {
|
1062
|
-
this.render('<a href={{model.url}}>Example</a>', {
|
1063
|
-
model: {
|
1064
|
-
url: 'http://example.com',
|
1065
|
-
},
|
1066
|
-
});
|
1067
|
-
|
1068
|
-
this.assertElement(this.firstChild, {
|
1069
|
-
tagName: 'a',
|
1070
|
-
content: 'Example',
|
1071
|
-
attrs: { href: 'http://example.com' },
|
1072
|
-
});
|
1073
|
-
|
1074
|
-
this.runTask(() => this.rerender());
|
1075
|
-
|
1076
|
-
this.assertElement(this.firstChild, {
|
1077
|
-
tagName: 'a',
|
1078
|
-
content: 'Example',
|
1079
|
-
attrs: { href: 'http://example.com' },
|
1080
|
-
});
|
1081
|
-
|
1082
|
-
this.runTask(() => set(this.context, 'model.url', 'http://linkedin.com'));
|
1083
|
-
|
1084
|
-
this.assertElement(this.firstChild, {
|
1085
|
-
tagName: 'a',
|
1086
|
-
content: 'Example',
|
1087
|
-
attrs: { href: 'http://linkedin.com' },
|
1088
|
-
});
|
1089
|
-
|
1090
|
-
this.runTask(() => set(this.context, 'model', { url: 'http://example.com' }));
|
1091
|
-
|
1092
|
-
this.assertElement(this.firstChild, {
|
1093
|
-
tagName: 'a',
|
1094
|
-
content: 'Example',
|
1095
|
-
attrs: { href: 'http://example.com' },
|
1096
|
-
});
|
1097
|
-
}
|
1098
|
-
|
1099
|
-
['@test quoteless class attributes update correctly']() {
|
1100
|
-
this.render('<div class={{if fooBar "foo-bar"}}>hello</div>', {
|
1101
|
-
fooBar: true,
|
1102
|
-
});
|
1103
|
-
|
1104
|
-
this.assertElement(this.firstChild, {
|
1105
|
-
tagName: 'div',
|
1106
|
-
content: 'hello',
|
1107
|
-
attrs: { class: classes('foo-bar') },
|
1108
|
-
});
|
1109
|
-
|
1110
|
-
this.runTask(() => this.rerender());
|
1111
|
-
|
1112
|
-
this.assertElement(this.firstChild, {
|
1113
|
-
tagName: 'div',
|
1114
|
-
content: 'hello',
|
1115
|
-
attrs: { class: classes('foo-bar') },
|
1116
|
-
});
|
1117
|
-
|
1118
|
-
this.runTask(() => set(this.context, 'fooBar', false));
|
1119
|
-
|
1120
|
-
this.assertElement(this.firstChild, { tagName: 'div', content: 'hello' });
|
1121
|
-
|
1122
|
-
this.runTask(() => set(this.context, 'fooBar', true));
|
1123
|
-
|
1124
|
-
this.assertElement(this.firstChild, {
|
1125
|
-
tagName: 'div',
|
1126
|
-
content: 'hello',
|
1127
|
-
attrs: { class: classes('foo-bar') },
|
1128
|
-
});
|
1129
|
-
}
|
1130
|
-
|
1131
|
-
['@test quoted class attributes update correctly'](assert) {
|
1132
|
-
this.render('<div class="{{if fooBar "foo-bar"}}">hello</div>', {
|
1133
|
-
fooBar: true,
|
1134
|
-
});
|
1135
|
-
|
1136
|
-
this.assertElement(this.firstChild, {
|
1137
|
-
tagName: 'div',
|
1138
|
-
content: 'hello',
|
1139
|
-
attrs: { class: classes('foo-bar') },
|
1140
|
-
});
|
1141
|
-
|
1142
|
-
this.runTask(() => this.rerender());
|
1143
|
-
|
1144
|
-
this.assertElement(this.firstChild, {
|
1145
|
-
tagName: 'div',
|
1146
|
-
content: 'hello',
|
1147
|
-
attrs: { class: classes('foo-bar') },
|
1148
|
-
});
|
1149
|
-
|
1150
|
-
this.runTask(() => set(this.context, 'fooBar', false));
|
1151
|
-
|
1152
|
-
assert.equal(this.firstChild.className, '');
|
1153
|
-
|
1154
|
-
this.runTask(() => set(this.context, 'fooBar', true));
|
1155
|
-
|
1156
|
-
this.assertElement(this.firstChild, {
|
1157
|
-
tagName: 'div',
|
1158
|
-
content: 'hello',
|
1159
|
-
attrs: { class: classes('foo-bar') },
|
1160
|
-
});
|
1161
|
-
}
|
1162
|
-
|
1163
|
-
['@test unquoted class attribute can contain multiple classes']() {
|
1164
|
-
this.render('<div class={{model.classes}}>hello</div>', {
|
1165
|
-
model: {
|
1166
|
-
classes: 'foo bar baz',
|
1167
|
-
},
|
1168
|
-
});
|
1169
|
-
|
1170
|
-
this.assertElement(this.firstChild, {
|
1171
|
-
tagName: 'div',
|
1172
|
-
content: 'hello',
|
1173
|
-
attrs: { class: classes('foo bar baz') },
|
1174
|
-
});
|
1175
|
-
|
1176
|
-
this.runTask(() => this.rerender());
|
1177
|
-
|
1178
|
-
this.assertElement(this.firstChild, {
|
1179
|
-
tagName: 'div',
|
1180
|
-
content: 'hello',
|
1181
|
-
attrs: { class: classes('foo bar baz') },
|
1182
|
-
});
|
1183
|
-
|
1184
|
-
this.runTask(() => set(this.context, 'model.classes', 'fizz bizz'));
|
1185
|
-
|
1186
|
-
this.assertElement(this.firstChild, {
|
1187
|
-
tagName: 'div',
|
1188
|
-
content: 'hello',
|
1189
|
-
attrs: { class: classes('fizz bizz') },
|
1190
|
-
});
|
1191
|
-
|
1192
|
-
this.runTask(() => set(this.context, 'model', { classes: 'foo bar baz' }));
|
1193
|
-
|
1194
|
-
this.assertElement(this.firstChild, {
|
1195
|
-
tagName: 'div',
|
1196
|
-
content: 'hello',
|
1197
|
-
attrs: { class: classes('foo bar baz') },
|
1198
|
-
});
|
1199
|
-
}
|
1200
|
-
|
1201
|
-
['@test unquoted class attribute']() {
|
1202
|
-
this.render('<div class={{model.foo}}>hello</div>', {
|
1203
|
-
model: {
|
1204
|
-
foo: 'foo',
|
1205
|
-
},
|
1206
|
-
});
|
1207
|
-
|
1208
|
-
this.assertElement(this.firstChild, {
|
1209
|
-
tagName: 'div',
|
1210
|
-
content: 'hello',
|
1211
|
-
attrs: { class: classes('foo') },
|
1212
|
-
});
|
1213
|
-
|
1214
|
-
this.runTask(() => this.rerender());
|
1215
|
-
|
1216
|
-
this.assertElement(this.firstChild, {
|
1217
|
-
tagName: 'div',
|
1218
|
-
content: 'hello',
|
1219
|
-
attrs: { class: classes('foo') },
|
1220
|
-
});
|
1221
|
-
|
1222
|
-
this.runTask(() => set(this.context, 'model.foo', 'fizz'));
|
1223
|
-
|
1224
|
-
this.assertElement(this.firstChild, {
|
1225
|
-
tagName: 'div',
|
1226
|
-
content: 'hello',
|
1227
|
-
attrs: { class: classes('fizz') },
|
1228
|
-
});
|
1229
|
-
|
1230
|
-
this.runTask(() => set(this.context, 'model', { foo: 'foo' }));
|
1231
|
-
|
1232
|
-
this.assertElement(this.firstChild, {
|
1233
|
-
tagName: 'div',
|
1234
|
-
content: 'hello',
|
1235
|
-
attrs: { class: classes('foo') },
|
1236
|
-
});
|
1237
|
-
}
|
1238
|
-
|
1239
|
-
['@test quoted class attribute']() {
|
1240
|
-
this.render('<div class="{{model.foo}}">hello</div>', {
|
1241
|
-
model: {
|
1242
|
-
foo: 'foo',
|
1243
|
-
},
|
1244
|
-
});
|
1245
|
-
|
1246
|
-
this.assertElement(this.firstChild, {
|
1247
|
-
tagName: 'div',
|
1248
|
-
content: 'hello',
|
1249
|
-
attrs: { class: classes('foo') },
|
1250
|
-
});
|
1251
|
-
|
1252
|
-
this.runTask(() => this.rerender());
|
1253
|
-
|
1254
|
-
this.assertElement(this.firstChild, {
|
1255
|
-
tagName: 'div',
|
1256
|
-
content: 'hello',
|
1257
|
-
attrs: { class: classes('foo') },
|
1258
|
-
});
|
1259
|
-
|
1260
|
-
this.runTask(() => set(this.context, 'model.foo', 'fizz'));
|
1261
|
-
|
1262
|
-
this.assertElement(this.firstChild, {
|
1263
|
-
tagName: 'div',
|
1264
|
-
content: 'hello',
|
1265
|
-
attrs: { class: classes('fizz') },
|
1266
|
-
});
|
1267
|
-
|
1268
|
-
this.runTask(() => set(this.context, 'model', { foo: 'foo' }));
|
1269
|
-
|
1270
|
-
this.assertElement(this.firstChild, {
|
1271
|
-
tagName: 'div',
|
1272
|
-
content: 'hello',
|
1273
|
-
attrs: { class: classes('foo') },
|
1274
|
-
});
|
1275
|
-
}
|
1276
|
-
|
1277
|
-
['@test quoted class attribute can contain multiple classes']() {
|
1278
|
-
this.render('<div class="{{model.classes}}">hello</div>', {
|
1279
|
-
model: {
|
1280
|
-
classes: 'foo bar baz',
|
1281
|
-
},
|
1282
|
-
});
|
1283
|
-
|
1284
|
-
this.assertElement(this.firstChild, {
|
1285
|
-
tagName: 'div',
|
1286
|
-
content: 'hello',
|
1287
|
-
attrs: { class: classes('foo bar baz') },
|
1288
|
-
});
|
1289
|
-
|
1290
|
-
this.runTask(() => this.rerender());
|
1291
|
-
|
1292
|
-
this.assertElement(this.firstChild, {
|
1293
|
-
tagName: 'div',
|
1294
|
-
content: 'hello',
|
1295
|
-
attrs: { class: classes('foo bar baz') },
|
1296
|
-
});
|
1297
|
-
|
1298
|
-
this.runTask(() => set(this.context, 'model.classes', 'fizz bizz'));
|
1299
|
-
|
1300
|
-
this.assertElement(this.firstChild, {
|
1301
|
-
tagName: 'div',
|
1302
|
-
content: 'hello',
|
1303
|
-
attrs: { class: classes('fizz bizz') },
|
1304
|
-
});
|
1305
|
-
|
1306
|
-
this.runTask(() => set(this.context, 'model', { classes: 'foo bar baz' }));
|
1307
|
-
|
1308
|
-
this.assertElement(this.firstChild, {
|
1309
|
-
tagName: 'div',
|
1310
|
-
content: 'hello',
|
1311
|
-
attrs: { class: classes('foo bar baz') },
|
1312
|
-
});
|
1313
|
-
}
|
1314
|
-
|
1315
|
-
['@test class attribute concats bound values']() {
|
1316
|
-
this.render('<div class="{{model.foo}} {{model.bar}} {{model.bizz}}">hello</div>', {
|
1317
|
-
model: {
|
1318
|
-
foo: 'foo',
|
1319
|
-
bar: 'bar',
|
1320
|
-
bizz: 'bizz',
|
1321
|
-
},
|
1322
|
-
});
|
1323
|
-
|
1324
|
-
this.assertElement(this.firstChild, {
|
1325
|
-
tagName: 'div',
|
1326
|
-
content: 'hello',
|
1327
|
-
attrs: { class: classes('foo bar bizz') },
|
1328
|
-
});
|
1329
|
-
|
1330
|
-
this.runTask(() => this.rerender());
|
1331
|
-
|
1332
|
-
this.assertElement(this.firstChild, {
|
1333
|
-
tagName: 'div',
|
1334
|
-
content: 'hello',
|
1335
|
-
attrs: { class: classes('foo bar bizz') },
|
1336
|
-
});
|
1337
|
-
|
1338
|
-
this.runTask(() => set(this.context, 'model.foo', 'fizz'));
|
1339
|
-
|
1340
|
-
this.assertElement(this.firstChild, {
|
1341
|
-
tagName: 'div',
|
1342
|
-
content: 'hello',
|
1343
|
-
attrs: { class: classes('fizz bar bizz') },
|
1344
|
-
});
|
1345
|
-
|
1346
|
-
this.runTask(() => set(this.context, 'model.bar', null));
|
1347
|
-
|
1348
|
-
this.assertElement(this.firstChild, {
|
1349
|
-
tagName: 'div',
|
1350
|
-
content: 'hello',
|
1351
|
-
attrs: { class: classes('fizz bizz') },
|
1352
|
-
});
|
1353
|
-
|
1354
|
-
this.runTask(() =>
|
1355
|
-
set(this.context, 'model', {
|
1356
|
-
foo: 'foo',
|
1357
|
-
bar: 'bar',
|
1358
|
-
bizz: 'bizz',
|
1359
|
-
})
|
1360
|
-
);
|
1361
|
-
|
1362
|
-
this.assertElement(this.firstChild, {
|
1363
|
-
tagName: 'div',
|
1364
|
-
content: 'hello',
|
1365
|
-
attrs: { class: classes('foo bar bizz') },
|
1366
|
-
});
|
1367
|
-
}
|
1368
|
-
|
1369
|
-
['@test class attribute accepts nested helpers, and updates']() {
|
1370
|
-
this.render(
|
1371
|
-
`<div class="{{if model.hasSize model.size}} {{if model.hasShape model.shape}}">hello</div>`,
|
1372
|
-
{
|
1373
|
-
model: {
|
1374
|
-
size: 'large',
|
1375
|
-
hasSize: true,
|
1376
|
-
hasShape: false,
|
1377
|
-
shape: 'round',
|
1378
|
-
},
|
1379
|
-
}
|
1380
|
-
);
|
1381
|
-
|
1382
|
-
this.assertElement(this.firstChild, {
|
1383
|
-
tagName: 'div',
|
1384
|
-
content: 'hello',
|
1385
|
-
attrs: { class: classes('large') },
|
1386
|
-
});
|
1387
|
-
|
1388
|
-
this.runTask(() => this.rerender());
|
1389
|
-
|
1390
|
-
this.assertElement(this.firstChild, {
|
1391
|
-
tagName: 'div',
|
1392
|
-
content: 'hello',
|
1393
|
-
attrs: { class: classes('large') },
|
1394
|
-
});
|
1395
|
-
|
1396
|
-
this.runTask(() => set(this.context, 'model.hasShape', true));
|
1397
|
-
|
1398
|
-
this.assertElement(this.firstChild, {
|
1399
|
-
tagName: 'div',
|
1400
|
-
content: 'hello',
|
1401
|
-
attrs: { class: classes('large round') },
|
1402
|
-
});
|
1403
|
-
|
1404
|
-
this.runTask(() => set(this.context, 'model.hasSize', false));
|
1405
|
-
|
1406
|
-
this.assertElement(this.firstChild, {
|
1407
|
-
tagName: 'div',
|
1408
|
-
content: 'hello',
|
1409
|
-
attrs: { class: classes('round') },
|
1410
|
-
});
|
1411
|
-
|
1412
|
-
this.runTask(() =>
|
1413
|
-
set(this.context, 'model', {
|
1414
|
-
size: 'large',
|
1415
|
-
hasSize: true,
|
1416
|
-
hasShape: false,
|
1417
|
-
shape: 'round',
|
1418
|
-
})
|
1419
|
-
);
|
1420
|
-
|
1421
|
-
this.assertElement(this.firstChild, {
|
1422
|
-
tagName: 'div',
|
1423
|
-
content: 'hello',
|
1424
|
-
attrs: { class: classes('large') },
|
1425
|
-
});
|
1426
|
-
}
|
1427
|
-
|
1428
|
-
['@test Multiple dynamic classes']() {
|
1429
|
-
this.render(
|
1430
|
-
'<div class="{{model.foo}} {{model.bar}} {{model.fizz}} {{model.baz}}">hello</div>',
|
1431
|
-
{
|
1432
|
-
model: {
|
1433
|
-
foo: 'foo',
|
1434
|
-
bar: 'bar',
|
1435
|
-
fizz: 'fizz',
|
1436
|
-
baz: 'baz',
|
1437
|
-
},
|
1438
|
-
}
|
1439
|
-
);
|
1440
|
-
|
1441
|
-
this.assertElement(this.firstChild, {
|
1442
|
-
tagName: 'div',
|
1443
|
-
content: 'hello',
|
1444
|
-
attrs: { class: classes('foo bar fizz baz') },
|
1445
|
-
});
|
1446
|
-
|
1447
|
-
this.runTask(() => this.rerender());
|
1448
|
-
|
1449
|
-
this.assertElement(this.firstChild, {
|
1450
|
-
tagName: 'div',
|
1451
|
-
content: 'hello',
|
1452
|
-
attrs: { class: classes('foo bar fizz baz') },
|
1453
|
-
});
|
1454
|
-
|
1455
|
-
this.runTask(() => {
|
1456
|
-
set(this.context, 'model.foo', null);
|
1457
|
-
set(this.context, 'model.fizz', null);
|
1458
|
-
});
|
1459
|
-
|
1460
|
-
this.assertElement(this.firstChild, {
|
1461
|
-
tagName: 'div',
|
1462
|
-
content: 'hello',
|
1463
|
-
attrs: { class: classes('bar baz') },
|
1464
|
-
});
|
1465
|
-
|
1466
|
-
this.runTask(() => {
|
1467
|
-
set(this.context, 'model', {
|
1468
|
-
foo: 'foo',
|
1469
|
-
bar: 'bar',
|
1470
|
-
fizz: 'fizz',
|
1471
|
-
baz: 'baz',
|
1472
|
-
});
|
1473
|
-
});
|
1474
|
-
|
1475
|
-
this.assertElement(this.firstChild, {
|
1476
|
-
tagName: 'div',
|
1477
|
-
content: 'hello',
|
1478
|
-
attrs: { class: classes('foo bar fizz baz') },
|
1479
|
-
});
|
1480
|
-
}
|
1481
|
-
|
1482
|
-
['@test classes are ordered: See issue #9912']() {
|
1483
|
-
this.render('<div class="{{model.foo}} static {{model.bar}}">hello</div>', {
|
1484
|
-
model: {
|
1485
|
-
foo: 'foo',
|
1486
|
-
bar: 'bar',
|
1487
|
-
},
|
1488
|
-
});
|
1489
|
-
|
1490
|
-
this.assertElement(this.firstChild, {
|
1491
|
-
tagName: 'div',
|
1492
|
-
content: 'hello',
|
1493
|
-
attrs: { class: 'foo static bar' },
|
1494
|
-
});
|
1495
|
-
|
1496
|
-
this.runTask(() => this.rerender());
|
1497
|
-
|
1498
|
-
this.assertElement(this.firstChild, {
|
1499
|
-
tagName: 'div',
|
1500
|
-
content: 'hello',
|
1501
|
-
attrs: { class: 'foo static bar' },
|
1502
|
-
});
|
1503
|
-
|
1504
|
-
this.runTask(() => {
|
1505
|
-
set(this.context, 'model.bar', null);
|
1506
|
-
});
|
1507
|
-
|
1508
|
-
this.assertElement(this.firstChild, {
|
1509
|
-
tagName: 'div',
|
1510
|
-
content: 'hello',
|
1511
|
-
attrs: { class: 'foo static ' },
|
1512
|
-
});
|
1513
|
-
|
1514
|
-
this.runTask(() => {
|
1515
|
-
set(this.context, 'model', {
|
1516
|
-
foo: 'foo',
|
1517
|
-
bar: 'bar',
|
1518
|
-
});
|
1519
|
-
});
|
1520
|
-
|
1521
|
-
this.assertElement(this.firstChild, {
|
1522
|
-
tagName: 'div',
|
1523
|
-
content: 'hello',
|
1524
|
-
attrs: { class: 'foo static bar' },
|
1525
|
-
});
|
1526
|
-
}
|
1527
|
-
}
|
1528
|
-
);
|
1529
|
-
|
1530
|
-
let warnings, originalWarn;
|
1531
|
-
class StyleTest extends RenderingTest {
|
1532
|
-
constructor() {
|
1533
|
-
super(...arguments);
|
1534
|
-
warnings = [];
|
1535
|
-
originalWarn = getDebugFunction('warn');
|
1536
|
-
setDebugFunction('warn', function(message, test) {
|
1537
|
-
if (!test) {
|
1538
|
-
warnings.push(message);
|
1539
|
-
}
|
1540
|
-
});
|
1541
|
-
}
|
1542
|
-
|
1543
|
-
teardown() {
|
1544
|
-
super.teardown(...arguments);
|
1545
|
-
setDebugFunction('warn', originalWarn);
|
1546
|
-
}
|
1547
|
-
|
1548
|
-
assertStyleWarning(style) {
|
1549
|
-
this.assert.deepEqual(warnings, [constructStyleDeprecationMessage(style)]);
|
1550
|
-
}
|
1551
|
-
|
1552
|
-
assertNoWarning() {
|
1553
|
-
this.assert.deepEqual(warnings, []);
|
1554
|
-
}
|
1555
|
-
}
|
1556
|
-
|
1557
|
-
moduleFor(
|
1558
|
-
'Inline style tests',
|
1559
|
-
class extends StyleTest {
|
1560
|
-
['@test can set dynamic style']() {
|
1561
|
-
this.render('<div style={{model.style}}></div>', {
|
1562
|
-
model: {
|
1563
|
-
style: htmlSafe('width: 60px;'),
|
1564
|
-
},
|
1565
|
-
});
|
1566
|
-
|
1567
|
-
this.assertElement(this.firstChild, {
|
1568
|
-
tagName: 'div',
|
1569
|
-
content: '',
|
1570
|
-
attrs: { style: 'width: 60px;' },
|
1571
|
-
});
|
1572
|
-
|
1573
|
-
this.runTask(() => this.rerender());
|
1574
|
-
|
1575
|
-
this.assertElement(this.firstChild, {
|
1576
|
-
tagName: 'div',
|
1577
|
-
content: '',
|
1578
|
-
attrs: { style: 'width: 60px;' },
|
1579
|
-
});
|
1580
|
-
|
1581
|
-
this.runTask(() => set(this.context, 'model.style', 'height: 60px;'));
|
1582
|
-
|
1583
|
-
this.assertElement(this.firstChild, {
|
1584
|
-
tagName: 'div',
|
1585
|
-
content: '',
|
1586
|
-
attrs: { style: 'height: 60px;' },
|
1587
|
-
});
|
1588
|
-
|
1589
|
-
this.runTask(() => set(this.context, 'model.style', null));
|
1590
|
-
|
1591
|
-
this.assertElement(this.firstChild, {
|
1592
|
-
tagName: 'div',
|
1593
|
-
content: '',
|
1594
|
-
attrs: {},
|
1595
|
-
});
|
1596
|
-
|
1597
|
-
this.runTask(() => set(this.context, 'model', { style: 'width: 60px;' }));
|
1598
|
-
|
1599
|
-
this.assertElement(this.firstChild, {
|
1600
|
-
tagName: 'div',
|
1601
|
-
content: '',
|
1602
|
-
attrs: { style: 'width: 60px;' },
|
1603
|
-
});
|
1604
|
-
}
|
1605
|
-
|
1606
|
-
['@test can set dynamic style with -html-safe']() {
|
1607
|
-
this.render('<div style={{-html-safe model.style}}></div>', {
|
1608
|
-
model: {
|
1609
|
-
style: htmlSafe('width: 60px;'),
|
1610
|
-
},
|
1611
|
-
});
|
1612
|
-
|
1613
|
-
this.assertElement(this.firstChild, {
|
1614
|
-
tagName: 'div',
|
1615
|
-
content: '',
|
1616
|
-
attrs: { style: 'width: 60px;' },
|
1617
|
-
});
|
1618
|
-
|
1619
|
-
this.runTask(() => this.rerender());
|
1620
|
-
|
1621
|
-
this.assertElement(this.firstChild, {
|
1622
|
-
tagName: 'div',
|
1623
|
-
content: '',
|
1624
|
-
attrs: { style: 'width: 60px;' },
|
1625
|
-
});
|
1626
|
-
|
1627
|
-
this.runTask(() => set(this.context, 'model.style', 'height: 60px;'));
|
1628
|
-
|
1629
|
-
this.assertElement(this.firstChild, {
|
1630
|
-
tagName: 'div',
|
1631
|
-
content: '',
|
1632
|
-
attrs: { style: 'height: 60px;' },
|
1633
|
-
});
|
1634
|
-
|
1635
|
-
this.runTask(() => set(this.context, 'model', { style: 'width: 60px;' }));
|
1636
|
-
|
1637
|
-
this.assertElement(this.firstChild, {
|
1638
|
-
tagName: 'div',
|
1639
|
-
content: '',
|
1640
|
-
attrs: { style: 'width: 60px;' },
|
1641
|
-
});
|
1642
|
-
}
|
1643
|
-
}
|
1644
|
-
);
|
1645
|
-
|
1646
|
-
if (!EmberDev.runningProdBuild) {
|
1647
|
-
moduleFor(
|
1648
|
-
'Inline style tests - warnings',
|
1649
|
-
class extends StyleTest {
|
1650
|
-
['@test specifying <div style={{userValue}}></div> generates a warning']() {
|
1651
|
-
let userValue = 'width: 42px';
|
1652
|
-
this.render('<div style={{userValue}}></div>', {
|
1653
|
-
userValue,
|
1654
|
-
});
|
1655
|
-
|
1656
|
-
this.assertStyleWarning(userValue);
|
1657
|
-
}
|
1658
|
-
|
1659
|
-
['@test specifying `attributeBindings: ["style"]` generates a warning']() {
|
1660
|
-
let FooBarComponent = Component.extend({
|
1661
|
-
attributeBindings: ['style'],
|
1662
|
-
});
|
1663
|
-
|
1664
|
-
this.registerComponent('foo-bar', {
|
1665
|
-
ComponentClass: FooBarComponent,
|
1666
|
-
template: 'hello',
|
1667
|
-
});
|
1668
|
-
let userValue = 'width: 42px';
|
1669
|
-
this.render('{{foo-bar style=userValue}}', {
|
1670
|
-
userValue,
|
1671
|
-
});
|
1672
|
-
|
1673
|
-
this.assertStyleWarning(userValue);
|
1674
|
-
}
|
1675
|
-
|
1676
|
-
['@test specifying `<div style={{{userValue}}}></div>` works properly without a warning']() {
|
1677
|
-
this.render('<div style={{{userValue}}}></div>', {
|
1678
|
-
userValue: 'width: 42px',
|
1679
|
-
});
|
1680
|
-
|
1681
|
-
this.assertNoWarning();
|
1682
|
-
}
|
1683
|
-
|
1684
|
-
['@test specifying `<div style={{userValue}}></div>` works properly with a SafeString']() {
|
1685
|
-
this.render('<div style={{userValue}}></div>', {
|
1686
|
-
userValue: new SafeString('width: 42px'),
|
1687
|
-
});
|
1688
|
-
|
1689
|
-
this.assertNoWarning();
|
1690
|
-
}
|
1691
|
-
|
1692
|
-
['@test null value do not generate htmlsafe warning']() {
|
1693
|
-
this.render('<div style={{userValue}}></div>', {
|
1694
|
-
userValue: null,
|
1695
|
-
});
|
1696
|
-
|
1697
|
-
this.assertNoWarning();
|
1698
|
-
}
|
1699
|
-
|
1700
|
-
['@test undefined value do not generate htmlsafe warning']() {
|
1701
|
-
this.render('<div style={{userValue}}></div>');
|
1702
|
-
|
1703
|
-
this.assertNoWarning();
|
1704
|
-
}
|
1705
|
-
|
1706
|
-
['@test no warnings are triggered when using `-html-safe`']() {
|
1707
|
-
this.render('<div style={{-html-safe userValue}}></div>', {
|
1708
|
-
userValue: 'width: 42px',
|
1709
|
-
});
|
1710
|
-
|
1711
|
-
this.assertNoWarning();
|
1712
|
-
}
|
1713
|
-
|
1714
|
-
['@test no warnings are triggered when a safe string is quoted']() {
|
1715
|
-
this.render('<div style="{{userValue}}"></div>', {
|
1716
|
-
userValue: new SafeString('width: 42px'),
|
1717
|
-
});
|
1718
|
-
|
1719
|
-
this.assertNoWarning();
|
1720
|
-
}
|
1721
|
-
|
1722
|
-
['@test binding warning is triggered when an unsafe string is quoted']() {
|
1723
|
-
let userValue = 'width: 42px';
|
1724
|
-
this.render('<div style="{{userValue}}"></div>', {
|
1725
|
-
userValue,
|
1726
|
-
});
|
1727
|
-
|
1728
|
-
this.assertStyleWarning(userValue);
|
1729
|
-
}
|
1730
|
-
|
1731
|
-
['@test binding warning is triggered when a safe string for a complete property is concatenated in place']() {
|
1732
|
-
let userValue = 'width: 42px';
|
1733
|
-
this.render('<div style="color: green; {{userValue}}"></div>', {
|
1734
|
-
userValue: new SafeString('width: 42px'),
|
1735
|
-
});
|
1736
|
-
|
1737
|
-
this.assertStyleWarning(`color: green; ${userValue}`);
|
1738
|
-
}
|
1739
|
-
|
1740
|
-
['@test binding warning is triggered when a safe string for a value is concatenated in place']() {
|
1741
|
-
let userValue = '42px';
|
1742
|
-
this.render('<div style="color: green; width: {{userValue}}"></div>', {
|
1743
|
-
userValue: new SafeString(userValue),
|
1744
|
-
});
|
1745
|
-
|
1746
|
-
this.assertStyleWarning(`color: green; width: ${userValue}`);
|
1747
|
-
}
|
1748
|
-
|
1749
|
-
['@test binding warning is triggered when a safe string for a property name is concatenated in place']() {
|
1750
|
-
let userValue = 'width';
|
1751
|
-
this.render('<div style="color: green; {{userProperty}}: 42px"></div>', {
|
1752
|
-
userProperty: new SafeString(userValue),
|
1753
|
-
});
|
1754
|
-
|
1755
|
-
this.assertStyleWarning(`color: green; ${userValue}: 42px`);
|
1756
|
-
}
|
1757
|
-
}
|
1758
|
-
);
|
1759
|
-
}
|