Reduce direct jQuery usage in tests.#215
Merged
rwjblue merged 13 commits intoemberjs:masterfrom Oct 9, 2017
Merged
Conversation
trentmwillis
reviewed
Oct 8, 2017
| var actuallyInDOM = $.contains(document, this.$()[0]); | ||
| var actuallyInDOM = document.contains(this._element); | ||
|
|
||
| QUnit.config.current.assert.ok( |
Member
There was a problem hiding this comment.
Should probably break this up into two assertions so you can get more granular feedback when it fails.
673f402 to
c3b1a6d
Compare
added 10 commits
October 8, 2017 18:09
Updating the resolver to fallback to "real" resolving (so that we can automatically get the event_dispatcher:main for jQueryless usage) leads to some tests failing now due to `application.hbs` having the text contents of the welcome page component. Remove this template so that it doesn't interfere with the existing tests...
Without this looking up `event_dispatcher:main` does not find the event dispatcher that is normally provided by ember-native-dom-event-dispatcher.
Mostly copied/stolen from emberjs's packages/ember-testing/lib/events.js but with some tweaks to make it work without jQuery (I think those changes were made upstream in Ember as well). The long term goal here is to remove this file and have ember-test-helpers _include_ the helpers from ember-native-dom-helpers, but that will require an RFC once the changes proposed in emberjs/rfcs#230 are implemented.
When a given test is explicitly testing jQuery behaviors, this helper will be used...
Apparently, the dummy app _must_ have an `app/templates/` tree. 😡
Member
Author
|
Updated with lots more changes. Tests are passing locally without jQuery (and scenarios were added to ember-try config to test with and without jQuery). Playing a bit of whack-a-mole with various issues in CI, but generally speaking I think this pretty close... |
added 2 commits
October 9, 2017 12:18
The built-in `packages/ember-testing` does not work for acceptance tests in 2.12.
Member
Author
|
Finally green. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.