Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spec update parts 1-5 #2736

Merged
merged 19 commits into from
Oct 1, 2015
Merged

Spec update parts 1-5 #2736

merged 19 commits into from
Oct 1, 2015

Conversation

timwienk
Copy link
Member

As proposed in #2734.

  • part 1: Improvements to three specs I ran into. $$ spec actually turned out to be broken after adding actual elements to select.
  • part 2: A little housekeeping and updating of package.json, server tests and .travis.yml.
  • part 3: First "big" change, removed Tests/Utilities and included syn and sinon packages instead, added Tests/Plugins/syn to use syn in karma. Last commit re-adds a local version of syn (hopefully temporarily).
  • part 4: Update everything to Jasmine to 2.3, major changes: spy API and async API. Instead of using the new Jasmine spy API, I changed these to sinon spies. The new async API is very similar to the mocha async API.
  • part 5: Changed the server specs to be able to test more than just Core/*.js files (which were actually included 5 times)
karma-sauce-connect uses sauce-connect-launcher to download the
right Sauce Connect.
These tasks use the karma:dev config that's already there.
…rma-sinon.

IE compatibility was coincindentally inherited from Utilities/sinon.js,
karma-sinon-ie loads the right files from the sinon package to do this
in a reliable way instead.

The "sinon"-package was already installed through karma-sinon's
peerDependancy, now added to package.json as well.
Also updated Specs files to work with newer version of syn.
Apparently triggering a click on an <a href="javascript:somethin()" />
in IE9 and IE10 causes a page reload of which Karma doesn't approve.

Since we don't use this functionality in our tests anyway, preventing
that trigger from happening has no effects for us.

Diff of the change to the original source (before building):

--- a/src/mouse.support.js
+++ b/src/mouse.support.js
@@ -22,7 +22,7 @@ if (!document.body) {
	select = form.getElementsByTagName('select')[0];

	//trigger click for linkHrefJS support, childNodes[6] === anchor
-	syn.trigger(form.childNodes[6], 'click', {});
+	//syn.trigger(form.childNodes[6], 'click', {});

	checkbox.checked = false;
	checkbox.onchange = function () {
Even though Jasmine 2.3 has been in the devDependencies, the version of
karma-jasmine we used came with its own Jasmine 1.3.
Also includes sinon in server spec runner, since the newly added spec
files use it.
arian pushed a commit that referenced this pull request Oct 1, 2015
@arian arian merged commit 1d6c908 into mootools:master Oct 1, 2015
@timwienk timwienk deleted the spec-update-part-5 branch October 1, 2015 10:49
@mootools mootools deleted a comment Aug 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants