Michał Gołębiowski-Owczarek
0ec25abba2
Build: Run the basic test suite in jsdom
...
The basic test suite is now run in jsdom on all supported Node.js versions
(8, 10 & 11 as of now).
Closes gh-4310
2019-03-11 20:03:54 +01:00
Michał Gołębiowski-Owczarek
84b6a0beb1
Build: Remove manual QUnit fixture resetting
...
It was needed when QUnit 1.x one used but we've since upgraded to QUnit 2.x.
Closes gh-4312
Ref gh-4307
2019-03-11 17:25:48 +01:00
Michał Gołębiowski-Owczarek
6ced2639b5
Build: Update QUnit from 1.23.1 to 2.9.2
...
Closes gh-4307
2019-03-04 20:10:21 +01:00
Michał Gołębiowski-Owczarek
9cb124ed00
Build: Update jsdom; migrate a test with Symbol polyfill to an iframe test
...
So far, we've been testing that jQuery element iteration works with polyfilled
Symbol & transpiled for-of via a Node test with jsdom with the Symbol global
removed. Unfortunately, jsdom now requires Symbol to be present for its internal
functionality so such a test is no longer possible. Instead, it's been migrated
to an iframe test with transpiled JavaScript.
This PR also enables us to use ECMAScript 2017 or newer in Node.js code.
Closes gh-4305
2019-03-04 18:30:51 +01:00
abnud1
c349818742
Build: Update test code for compatibility with QUnit 2.x ( #4297 )
...
Also, run `grunt npmcopy` to sync the "external" directory with dependencies
from package.json. For example, the Sinon library version didn't match.
Ref gh-4234
Closes gh-4297
2019-02-18 19:03:26 +01:00
Michał Gołębiowski-Owczarek
5bdc85b82b
Core: Support passing nonce through jQuery.globalEval
...
Fixes gh-4278
Closes gh-4280
Ref gh-3541
Ref gh-4269
2019-01-21 18:42:39 +01:00
Michał Gołębiowski-Owczarek
e4de8b4626
Manipulation: Respect script nomodule attribute in DOM manipulation
...
PR #3869 added support for `<script type="module">` & some support for
the `nomodule` attribute but with no tests for `nomodule` and with the
attribute only respected on inline scripts. This commit adds support for
source-based scripts as well. It also adds tests for `nomodule`, including
making sure legacy browsers execute such scripts as they'd natively do - that's
the whole point of `nomodule` scripts, after all.
Fixes gh-4281
Closes gh-4282
Ref gh-3871
Ref gh-3869
2019-01-21 18:34:40 +01:00
Michał Gołębiowski-Owczarek
c7c2855ed1
Core: Preserve CSP nonce on scripts in DOM manipulation
...
Fixes gh-3541
Closes gh-4269
2019-01-14 19:29:54 +01:00
Timmy Willison
315199c156
Dimensions: fall back to offsetWidth/Height for border-box in IE
...
- Use getClientRects() to explicitly detect hidden/disconnected
elements
Close gh-4223
Fixes gh-4102
2018-11-27 14:28:59 -05:00
Timmy Willison
b8195fb94c
Tests: fix ajax test failure; add to header instead of replace
2018-11-26 12:46:58 -05:00
Andrei Fangli
e0d9411569
Ajax: Fix getResponseHeader(key) for IE11
...
- getResponseHeader(key) combines all header values for the provided key into a
single result where values are concatenated by ', '. This does not happen for
IE11 since multiple values for the same header are returned on separate lines.
This makes the function only return the last value of the header for IE11.
- Updated ajax headers test to better cover Object.prototype collisions
Close gh-4173
Fixes gh-3403
2018-11-26 12:00:41 -05:00
Richard Gibson
dfa92ccead
Tests: Allow Karma to load unminfied source
...
Closes gh-4128
2018-09-07 10:14:01 -04:00
Luis Emilio Velasco Sanchez
0ba8e38d0c
Traversing: $.fn.contents() support for object
...
Fixes gh-4045
Closes gh-4046
2018-05-14 13:41:42 -04:00
Richard Gibson
821bf34353
CSS: Correctly detect scrollbox support with non-default zoom
...
Fixes gh-4029
Closes gh-4030
2018-05-07 09:28:18 -04:00
Timmy Willison
625e19cd9b
Tests: ensure that module assertions run on supported browsers
...
- Also fixes tests for karma, where the URL for the module is different
Ref gh-3871
2018-01-16 15:18:32 -05:00
basil.belokon
5d3a968e03
Manipulation: Add support for scripts with module type
...
Fixes gh-3871
Close gh-3869
2018-01-16 11:39:16 -05:00
Jason Bedard
3d732cca6b
Core: deprecate jQuery.isFunction
...
Fixes gh-3609
2018-01-15 09:26:19 -08:00
Timo Tijhof
ecd8ddea33
Tests: Add support for running unit tests via grunt with karma
...
- Update QUnit to 1.23.1
- Remove unused dl#dl from test/index.html
- Remove unused map#imgmap from test/index.html
- Ensure all urls to data use baseURI
- Add the 'grunt karma:main' task
- customContextFile & customDebugFile
- Add 'npm run jenkins' script
Close gh-3744
Fixes gh-1999
2017-12-18 12:27:38 -05:00
Saptak Sengupta
f00a07590e
CSS: Correctly set support properties with non-default zoom
...
Fixes gh-3808
Closes gh-3872
2017-12-05 23:59:54 -05:00
Richard Gibson
928c580a1a
Tests: Reduce the abort timeout for simple focus testing
...
Ref gh-3732
2017-07-19 11:45:03 -04:00
Richard Gibson
b3defccdc0
Tests: Revert some testIframe changes to fix dimensions tests
...
Ref c0edd8dc18
2017-04-29 09:46:19 -04:00
Richard Gibson
72af0c4c7e
Revert "Tests: Revert some testIframe changes to fix dimensions tests"
...
This reverts commit c4368a9311
.
2017-04-29 02:05:46 -04:00
Richard Gibson
c4368a9311
Tests: Revert some testIframe changes to fix dimensions tests
...
Ref c0edd8dc18
2017-04-29 02:00:12 -04:00
Richard Gibson
e94b5b0bbf
Tests: Clean up offset debugging
...
Ref 1d2df772b4
Ref c0edd8dc18
2017-04-29 01:35:20 -04:00
Richard Gibson
da533c6acc
Tests: Adjust by actual scroll position, rather than expected
...
Ref 1d2df772b4
2017-04-29 01:22:55 -04:00
Richard Gibson
c0edd8dc18
Tests: Keep iframes visible in TestSwarm
...
Ref 1d2df772b4
2017-04-28 23:54:06 -04:00
Richard Gibson
5aaa514555
Tests: Prepend test iframes for even *more* consistency
...
Ref 1d2df772b4
2017-04-25 16:32:40 -04:00
Richard Gibson
bb757213b2
Tests: Allow a mock QUnit.test for perfect testIframe fidelity
...
Ref 1d2df772b4
Closes gh-3647
2017-04-25 16:22:35 -04:00
Richard Gibson
bb79f728b0
Tests: Attach test iframes to the body for visibility-dependent code
...
Ref 1d2df772b4
Closes gh-3645
2017-04-25 15:39:41 -04:00
Richard Gibson
87a2d3aae7
Tests: Be even more async for iOS
...
Ref 1d2df772b4
Closes gh-3643
2017-04-24 22:59:18 -04:00
Richard Gibson
9e121482a5
Tests: Improve offset test setup and labels
...
Hopefully this fixes iOS testing: http://swarm.jquery.org/job/5226
Ref 1d2df772b4
Closes gh-3641
2017-04-24 21:44:51 -04:00
Richard Gibson
1d2df772b4
Offset: Use correct offset parents; include all border/scroll values
...
Thanks @anseki
Fixes gh-3080
Fixes gh-3107
Closes gh-3096
Closes gh-3487
2017-04-24 12:15:39 -04:00
Steve Mao
fcc9a9ec96
Tests: move readywait to an iframe test
...
Close gh-3576
Fixes gh-3573
2017-03-20 11:37:15 -04:00
Manoj Kumar
1b9575b9d1
Core: Deprecate jQuery.isArray
...
Fixes gh-2961
Closes gh-3278
2016-11-30 12:22:24 +01:00
Timmy Willison
3bbcce68d7
Core: rnotwhite -> rhtmlnotwhite and jQuery.trim -> stripAndCollapse
...
- Renames and changes rnotwhite to focus on HTML whitespace chars
- Change internal use of jQuery.trim to more accurate strip and collapse
- Adds tests to ensure HTML space characters are retained where valid
- Doesn't add tests where the difference is inconsequential and
existing tests are adequate.
Fixes gh-3003
Fixes gh-3072
Close gh-3316
2016-09-15 10:40:27 -04:00
Timmy Willison
52e24471c8
Core: expose noConflict in AMD mode
...
- For compability reasons, we had already added the global
in AMD mode, but without noConflict. This adds back noConflict
to AMD (which fixes noConflict mode in the tests).
Fixes gh-2930
2016-08-15 11:54:55 -04:00
Oleg Gaidarenko
58c6ca9822
Build: ESLint details
...
Use eslint pragmas, fix new errors, etc
Closes gh-3148
2016-06-11 10:41:33 +03:00
Christophe Tafani-Dereeper
69db408d82
CSS: Remove units from a 0 width/height element
...
Close gh-3122
2016-05-16 10:46:47 -04:00
Dave Methvin
e5ffcb0838
Tests: Refactor testIframe() to make it DRYer and more consistent
...
Ref gh-3040
Closes gh-3049
2016-04-11 13:32:51 -04:00
Dave Methvin
08d73d7f9c
Tests: Make iframe tests wait after checking isReady
...
Ref gh-3040
2016-04-11 13:29:11 -04:00
Oleg Gaidarenko
c158f5761a
Tests: do not run IE9 effect tests if inside testswarm
...
That test doesn't work properly in such environment
Ref e04e246552
Fixes gh-2888
Closes gh-3034
2016-04-04 21:58:33 +03:00
Michał Gołębiowski
622db29d9c
Docs:Tests: Remove legacy code & add support comments where needed
...
This commits backports some changes done in the patch to the then-existing
compat branch that removed support for old browsers and added some support
comments.
Refs 90d7cc1d8b
2016-03-30 11:21:36 +02:00
Alexander Lisianoi
59ec78e602
Tests: Restrict "p > * > *" selection in selector.js to #qunit-fixture
...
Add `match` and `QUnit.assert.selectInFixture` functions that
mimic `QUnit.assert.t`.
Ref gh-2880
Closes gh-2973
2016-03-09 14:09:20 -05:00
Oleg Gaidarenko
a2f63ffd96
Tests: test element position outside view
...
Ref 49833f7795
Ref gh-2828
Ref gh-2836
Fixes gh-2909
2016-02-11 22:59:09 +03:00
Richard Gibson
dba93f79c4
CSS: Restore cascade-override behavior in .show
...
Fixes gh-2654
Fixes gh-2308
Close gh-2810
Ref 86419b10bf
2016-01-13 16:05:09 -05:00
Timmy Willison
22449eb968
Manipulation: execute scripts from iframe in the iframe's context
...
Fixes gh-1757
Close gh-2696
2015-11-09 14:14:30 -05:00
Dave Methvin
2cb8ebadcb
Event: Make event aliases optional in unit tests
2015-11-06 10:00:46 -05:00
Timmy Willison
dabd5ba96c
Core: use interactive to evaluate dom ready, barring IE9-10
...
Fixes gh-2100
2015-10-29 10:21:50 -04:00
Richard Gibson
487d5ca913
CSS: Correct misrepresentation of "auto" horizontal margins as 0
...
Fixes gh-2237
Closes gh-2276
(cherry picked from commit 214e1634ab
)
Conflicts:
src/css.js
src/css/support.js
test/unit/support.js
2015-10-18 16:58:38 -04:00
Julian Alexander Murillo
c577928d45
Tests: Change quotes according to style guidelines
...
Close gh-2339
2015-10-18 13:17:23 -04:00
Richard Gibson
0fb84fa8cc
Tests: Keep test iframes around for assertions
...
Ref 44f8239d3f
Ref gh-2644
Ref gh-2390
2015-10-17 17:41:50 -04:00
Oleg Gaidarenko
239169bb2e
Ajax: improve content-type detection
...
Fixes gh-2584
Closes gh-2643
2015-10-12 22:38:15 +03:00
Oleg Gaidarenko
d92310050c
Event: fix incorrect test
...
Which was revealed by 03eaadb131
commit,
also do not try to fix typos in data/jquery version
2015-10-12 18:37:04 +03:00
Gary Ye
03eaadb131
Tests:Docs: Fix various typos
...
* Changes "baar" to "bar" when used with "foo" in readme
and comments of js files
* mousenter -> mouseenter
Thanks @garysye, @KimTaehee
Closes gh-2613
Closes gh-2601
2015-10-12 18:08:13 +03:00
Dave Methvin
ee0854f85b
Event: Move .bind() and .delegate() to deprecated
...
Fixes gh-2288
Closes gh-2624
2015-10-12 17:32:08 +03:00
Richard Gibson
f23a64d745
Tests: Use QUnit URL parameter parsing
2015-10-08 23:29:32 -04:00
Richard Gibson
f9af896bb8
Tests: Add dummy modules when running basic tests
...
Without this, other modules don't appear in the QUnit module picker.
Ref 855b0c8c28
Closes gh-2582
2015-10-08 23:26:03 -04:00
Michał Gołębiowski
1b566d37a2
Tests: Really fix tests in IE 8 this time
...
IE 8 doesn't have indexOf on arrays. Also, one toLowerCase() was missing. Oops.
This commit is not necessary on master but has been brought here to keep
tests similar in both branches.
(cherry-picked from 1b48eef4ca
)
2015-09-08 19:02:35 +02:00
Michał Gołębiowski
855b0c8c28
Tests: Don't load non-basic tests when basic module is selected
...
When loading basic tests don't load any others to not overload Android 2.3.
The drawback is that most tests are not selectable in the module dropdown
when the basic module is seelcted.
Refs 2c7e9c9349
2015-09-08 18:36:42 +02:00
Michał Gołębiowski
2c7e9c9349
Tests: Add simple tests for Android 2.3
...
Fixes gh-2505
Closes gh-2509
Refs gh-2483
2015-09-08 18:03:49 +02:00
Oleg Gaidarenko
c8d15a2f9f
Tests: further improvements QUnit 2.0 migration
...
* Remove QUnit jshint globals
* Extend QUnit.assert methods
* Use assert.async instead of start/stop/done
Ref b930d14ce6
2015-09-08 04:06:20 +03:00
Michał Gołębiowski
02e10082b2
Tests: lower the PHP sleep time in unreleasedXHR.html
...
The AJAX test performed in unreleasedXHR.html was scheduling PHP processes
sleeping for 10 minutes. When a lot of commits are tested in short intervals
this was causing build failures due to the drained php-fpm pool.
The 10 seconds sleep time should be enough for this test.
Refs 62acda819f
2015-09-08 00:44:44 +02:00
Oleg Gaidarenko
e35bdc1a22
Build: correct style tests files which could be automatically corrected
2015-09-07 20:03:50 +03:00
Oleg Gaidarenko
10fdad742a
Build: Update jscs and lint files
...
Fixes gh-2056
2015-09-07 20:03:50 +03:00
Oleg Gaidarenko
b930d14ce6
Tests: partially use new qunit interface
...
http://qunitjs.com/upgrade-guide-2.x/
For most of the boring work was used
https://github.com/apsdehal/qunit-migrate package
However, it can't update local qunit helpers, plus in some places
old QUnit.asyncTest signature is still used
Fixes gh-2540
2015-08-16 09:02:01 +03:00
Bruno Pérel
360a478033
Docs: Fix various spelling mistakes
...
Closes gh-2487
2015-07-30 15:47:23 +02:00
Corey Frang
b3b2d6c3dd
Effects: Adding unit tests for jQuery.Animation
...
Closes gh-2326
2015-06-26 20:06:03 -04:00
Corey Frang
cdaed15c7e
Effects: Add tests for jQuery.Tween
2015-06-26 20:05:25 -04:00
Timmy Willison
b041242223
Offset: add tests for hidden elements + scroll
...
- Also add comments to hidden/disconnected tests noting
this is to ensure consistency between branches
2015-06-16 13:28:51 -04:00
Michał Gołębiowski
e831856490
Tests: Remove test/data/ua.txt
...
The file was used by $.browser tests but $.browser now doesn't exists
in Core and this file hasn't been updated for a few years.
Fixes gh-2398
2015-06-16 16:25:16 +02:00
Richard Gibson
86419b10bf
CSS: Ignore the CSS cascade in show()/hide()/etc.
...
Fixes gh-1767
Fixes gh-2071
Closes gh-2180
2015-05-11 13:00:49 -04:00
Michał Gołębiowski
ff18d8e206
Tests: Increase QUnit timeout
...
Android 2.3 is very slow & times out a lot in async tests, they have to be
restarted multiple times to settle. Long test execution is not a huge problem
as Android 2.3 is tested only periodically during the night, unstable tests
are a bigger problem. This might mitigate that.
In a regular scenario almost all tests should pass so increasing the timeout
for all browsers shouldn't have a huge impact on overall test time.
Closes gh-2232
2015-04-27 20:27:05 +02:00
Oleg Gaidarenko
4ef120d3f2
Ajax: make jQuery#load "type" field explicit
...
* Move "evalScript.php" file to appropriate place
* Make jQuery#load "type" field explicit and add test for it
Ref trac-11264
2015-02-15 02:01:59 +03:00
Timmy Willison
cfe468f29c
Core: re-introduce createHTMLDocument in parseHTML; Safari 8 left out
...
Close gh-1505
2014-12-10 09:51:30 -05:00
Timmy Willison
6051609df3
Build: fix tests in AMD mode
2014-12-09 15:39:24 -05:00
Richard Gibson
26276a307c
Tests: Minor updates for QUnit 1.16 compatibility
...
More to come later.
(cherry picked from commit f6f8848fbe
)
2014-12-05 12:34:17 -05:00
Michał Gołębiowski
e81b258ace
Misc: Remove leftover -moz-box-sizing in tests
2014-11-03 20:03:03 +01:00
Timmy Willison
c869a1ef8a
Build: update grunt-jscs-checker and pass with the new rules
2014-07-17 10:25:59 -07:00
Oleg Gaidarenko
bbdfbb4ee8
Ajax: Always use script injection in globalEval
...
Fixes #14757
Closes gh-1449
2014-06-16 03:08:46 +04:00
Dave Methvin
b8133e282c
Data: Work around IE11 bug with onpageshow attribute
...
Fixes #14894
2014-04-30 10:46:26 -04:00
Oleg Gaidarenko
c34dbf5a8d
Effects: Respect display value on inline elements
...
Take "olddisplay" value into the account
Fixes #14824
Closes gh-1566
Ref 73fe17299a
2014-04-30 17:05:48 +04:00
Oleg Gaidarenko
95dfcc50ed
Build: Fix code style issue
...
Remove needless empty line character
2014-04-15 18:06:18 +04:00
Oleg Gaidarenko
f3b89ba082
Tests: Fix failing ajax tests in oldIE
...
(cherry-picked from the 7178096507
)
Picked up so tests from the 1.x-master would be more similar to this branch
2014-04-15 17:46:00 +04:00
Oleg Gaidarenko
1dedd3185e
Tests: Bring back some of the clean-up logic
2014-04-15 17:46:00 +04:00
Oleg Gaidarenko
9475e31d32
Tests: Do global clean up in teardown function
2014-04-15 17:45:59 +04:00
Oleg Gaidarenko
3dee2983ab
Build: Use jscs to check test helpers
...
Also fix issues found by jscs
2014-04-15 17:45:59 +04:00
Oleg Gaidarenko
8e5d1caf7a
Tests: More improvments for testrunner
...
Conform to style guide and simplify it
2014-04-15 17:45:58 +04:00
Oleg Gaidarenko
92cff8b1a3
Tests: Remove Sizzle intergration tests
...
Fixes #14818
2014-04-15 17:45:58 +04:00
Oleg Gaidarenko
a7c9facc35
Tests: Simplify globals cleanup
2014-04-15 17:45:58 +04:00
Oleg Gaidarenko
7149726485
Tests: Remove QUnit start hook
2014-04-15 17:45:58 +04:00
Oleg Gaidarenko
e0b606d2bd
Tests: Remove uselss "keys" helper
2014-04-15 17:45:58 +04:00
Oleg Gaidarenko
b26628a2bb
Tests: Simplify "testTimeout" option
2014-04-15 17:45:58 +04:00
Michał Gołębiowski
a10aa3aac5
Core: Change the sleep time in dont_return.php from 100s to 30s
...
Half a minute is more than enough for the test to finish even in the slowest
browsers and in case of starving the PHP FPM process pool, one has to wait
for only half a minute to try again.
2014-03-19 02:29:04 +01:00
Michał Gołębiowski
b5074944b0
Core: Change the sleep time in dont_return.php to a sane value
...
PHP sleep function accepts time in seconds, not milliseconds; the previous
value was starving the PHP FPM process pool.
2014-03-18 16:50:04 +01:00
Michał Gołębiowski
854d242db4
Core: Bump timeouts to stabilize doc ready test
...
The "document ready when jQuery loaded asynchronously" test fails all the time
in iOS7 and sometimes in other browsers. Bumping the timeouts *might* help
these other browsers to be less flakey here.
2014-03-13 03:26:42 +01:00
Dave Methvin
2df1aad6a1
Core: Do not run window.onready when ready
...
Fixes #14802
2014-03-04 21:00:04 -05:00
Dave Methvin
06adf7c95d
Event: Allow triggerHandler(beforeunload)
...
Fixes #14791
2014-03-04 20:49:57 -05:00
Dave Methvin
3a68c114e3
Ajax: .load() should trim its selector
...
Fixes #14773
2014-03-04 20:43:14 -05:00
Oleg
38c122a73a
Tests: Remove one of the checks for memory leak
...
This check is redundant since jQuery.fragments object does not exist anymore
2014-01-14 22:01:39 +04:00
cjqed
537e9ced61
Tests: Avoid use of QUnit.reset() in tests by splitting them
...
Fix #14040
Close gh-1457
2013-12-23 17:21:22 -05:00