Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ghiculescu/3cdaf74b051b8ce022f79f39285ac4f8 to your computer and use it in GitHub Desktop.
Save ghiculescu/3cdaf74b051b8ce022f79f39285ac4f8 to your computer and use it in GitHub Desktop.
> @rails/ujs@7.0.0-alpha lint
> coffeelint app/assets/javascripts && eslint test/ujs/public/test
✓ app/assets/javascripts/rails-ujs.coffee
✓ app/assets/javascripts/rails-ujs/features/confirm.coffee
⚡ app/assets/javascripts/rails-ujs/features/disable.coffee
⚡ #93: Unnecessary double quotes are forbidden.
✓ app/assets/javascripts/rails-ujs/features/method.coffee
⚡ app/assets/javascripts/rails-ujs/features/remote.coffee
⚡ #16-72: The cyclomatic complexity is too damn high. 15.
⚡ #94: File does not end with a single newline.
✓ app/assets/javascripts/rails-ujs/start.coffee
✓ app/assets/javascripts/rails-ujs/utils/ajax.coffee
⚡ app/assets/javascripts/rails-ujs/utils/csp.coffee
⚡ #4: Unnecessary double quotes are forbidden.
✓ app/assets/javascripts/rails-ujs/utils/csrf.coffee
✓ app/assets/javascripts/rails-ujs/utils/dom.coffee
✓ app/assets/javascripts/rails-ujs/utils/event.coffee
✓ app/assets/javascripts/rails-ujs/utils/form.coffee
⚡ Warning! » 0 errors and 4 warnings in 12 files
2021-06-16 13:52:58 WARN Selenium [DEPRECATION] [:browser_options] :options as a parameter for driver initialization is deprecated. Use :capabilities with an Array of value capabilities/options if necessary instead.
Time: 4 seconds, Total: 419, Passed: 415, Failed: 4
Qunit output follows. Look for lines that have failures, eg (1, n, n) - those are your failing lines
data-confirm: clicking on a link with data-confirm attribute. Confirm yes. (0, 6, 6)Rerun
41 ms
data-confirm: clicking on a button with data-confirm attribute. Confirm yes. (0, 6, 6)Rerun
29 ms
data-confirm: clicking on a link with data-confirm attribute. Confirm No. (0, 3, 3)Rerun
71 ms
data-confirm: clicking on a button with data-confirm attribute. Confirm No. (0, 3, 3)Rerun
70 ms
data-confirm: clicking on a button with data-confirm attribute. Confirm error. (0, 3, 3)Rerun
67 ms
data-confirm: clicking on a submit button with form and data-confirm attributes. Confirm No. (0, 3, 3)Rerun
66 ms
data-confirm: binding to confirm event of a link and returning false (0, 1, 1)Rerun
73 ms
data-confirm: binding to confirm event of a button and returning false (0, 1, 1)Rerun
66 ms
data-confirm: binding to confirm:complete event of a link and returning false (0, 2, 2)Rerun
69 ms
data-confirm: binding to confirm:complete event of a button and returning false (0, 2, 2)Rerun
72 ms
data-confirm: a button inside a form only confirms once (0, 1, 1)Rerun
22 ms
data-confirm: clicking on the children of a link should also trigger a confirm (0, 6, 6)Rerun
20 ms
data-confirm: clicking on the children of a disabled button should not trigger a confirm. (1, 0, 1)Rerun
71 ms
Expected 1 assertions, but 0 were run
Source:
at asyncTest (http://localhost:4567/vendor/qunit.js:108:9)
at http://localhost:4567/test/data-confirm.js:297:1
data-confirm: clicking on a link with data-confirm attribute with custom confirm handler. Confirm yes. (0, 7, 7)Rerun
27 ms
data-remote: ctrl-clicking on a link does not fire ajaxyness (0, 0, 0)Rerun
30 ms
data-remote: right/mouse-wheel-clicking on a link does not fire ajaxyness (0, 0, 0)Rerun
29 ms
data-remote: clicking on a link via a non-mouse Event (such as from js) works (0, 1, 1)Rerun
33 ms
data-remote: ctrl-clicking on a link still fires ajax for non-GET links and for links with "data-params" (0, 2, 2)Rerun
30 ms
data-remote: clicking on a link with data-remote attribute (0, 5, 5)Rerun
20 ms
data-remote: clicking on a link with both query string in href and data-params (0, 4, 4)Rerun
24 ms
data-remote: clicking on a link with both query string in href and data-params with POST method (0, 4, 4)Rerun
21 ms
data-remote: clicking on a link with disabled attribute (0, 0, 0)Rerun
32 ms
data-remote: clicking on a button with data-remote attribute (0, 5, 5)Rerun
21 ms
data-remote: right/mouse-wheel-clicking on a button with data-remote attribute does not fire ajaxyness (0, 0, 0)Rerun
31 ms
data-remote: changing a select option with data-remote attribute (0, 5, 5)Rerun
22 ms
data-remote: submitting form with data-remote attribute (0, 4, 4)Rerun
19 ms
data-remote: submitting form with data-remote attribute should include inputs in a fieldset only once (0, 3, 3)Rerun
22 ms
data-remote: submitting form with data-remote attribute submits input with matching [form] attribute (0, 6, 6)Rerun
22 ms
data-remote: submitting form with data-remote attribute by clicking button with matching [form] attribute (0, 5, 5)Rerun
21 ms
data-remote: form's submit bindings in browsers that don't support submit bubbling (2, 2, 4)Rerun
24 ms
nothing is called
form being submitted via ajax
binding handler already called
Source:
at HTMLFormElement.<anonymous> (http://localhost:4567/test/data-remote.js:307:7)
at HTMLFormElement.<anonymous> (http://localhost:4567/test/settings.js:114:22)
at Rails.fire (http://localhost:4567/rails-ujs.js:145:9)
at Object.beforeSend (http://localhost:4567/rails-ujs.js:594:13)
at Rails.ajax (http://localhost:4567/rails-ujs.js:202:50)
at HTMLFormElement.Rails.handleRemote (http://localhost:4567/rails-ujs.js:588:5)
at HTMLDocument.<anonymous> (http://localhost:4567/rails-ujs.js:163:48)
at jQuery.fn.init.triggerNative (http://localhost:4567/test/settings.js:97:8)
Expected 5 assertions, but 3 were run
Source:
at asyncTest (http://localhost:4567/vendor/qunit.js:108:9)
at http://localhost:4567/test/data-remote.js:293:1
at http://localhost:4567/test/data-remote.js:511:3
data-remote: returning false in form's submit bindings in non-submit-bubbling browsers (1, 0, 1)Rerun
32 ms
form should not be submitted
Source:
at HTMLFormElement.<anonymous> (http://localhost:4567/test/data-remote.js:333:7)
at HTMLFormElement.<anonymous> (http://localhost:4567/test/settings.js:114:22)
at Rails.fire (http://localhost:4567/rails-ujs.js:145:9)
at Object.beforeSend (http://localhost:4567/rails-ujs.js:594:13)
at Rails.ajax (http://localhost:4567/rails-ujs.js:202:50)
at HTMLFormElement.Rails.handleRemote (http://localhost:4567/rails-ujs.js:588:5)
at HTMLDocument.<anonymous> (http://localhost:4567/rails-ujs.js:163:48)
at jQuery.fn.init.triggerNative (http://localhost:4567/test/settings.js:97:8)
data-remote: clicking on a link with falsy "data-remote" attribute does not fire ajaxyness (0, 0, 0)Rerun
35 ms
data-remote: ctrl-clicking on a link with falsy "data-remote" attribute does not fire ajaxyness even if "data-params" present (0, 0, 0)Rerun
43 ms
data-remote: clicking on a button with falsy "data-remote" attribute (0, 0, 0)Rerun
38 ms
data-remote: submitting a form with falsy "data-remote" attribute (0, 0, 0)Rerun
35 ms
data-remote: changing a select option with falsy "data-remote" attribute (0, 0, 0)Rerun
38 ms
data-remote: form should be serialized correctly (0, 6, 6)Rerun
24 ms
data-remote: form buttons should only be serialized when clicked (0, 4, 4)Rerun
23 ms
data-remote: changing a select option without "data-url" attribute still fires ajax request to current location (0, 1, 1)Rerun
41 ms
data-remote: inputs inside disabled fieldset are not submitted on remote forms (0, 3, 3)Rerun
24 ms
data-disable: form input field with "data-disable" attribute (0, 7, 7)Rerun
37 ms
data-disable: form button with "data-disable" attribute (0, 7, 7)Rerun
38 ms
data-disable: form input[type=submit][data-disable] disables (0, 6, 6)Rerun
67 ms
data-disable: form[data-remote] input[type=submit][data-disable] is replaced in ajax callback (0, 2, 2)Rerun
52 ms
data-disable: form[data-remote] input[data-disable] is replaced with disabled field in ajax callback (0, 2, 2)Rerun
51 ms
data-disable: form[data-remote] textarea[data-disable] attribute (0, 3, 3)Rerun
33 ms
data-disable: a[data-disable] disables (0, 5, 5)Rerun
15 ms
data-disable: a[data-remote][data-disable] disables and re-enables (0, 6, 6)Rerun
38 ms
data-disable: a[data-remote][data-disable] re-enables when `ajax:before` event is cancelled (0, 6, 6)Rerun
46 ms
data-disable: a[data-remote][data-disable] re-enables when `ajax:beforeSend` event is cancelled (0, 6, 6)Rerun
46 ms
data-disable: a[data-remote][data-disable] re-enables when `ajax:error` event is triggered (0, 6, 6)Rerun
48 ms
data-disable: form[data-remote] input|button|textarea[data-disable] does not disable when `ajax:beforeSend` event is cancelled (0, 8, 8)Rerun
17 ms
data-disable: ctrl-clicking on a link does not disables the link (0, 6, 6)Rerun
16 ms
data-disable: right/mouse-wheel-clicking on a link does not disable the link (0, 10, 10)Rerun
16 ms
data-disable: button[data-remote][data-disable] disables and re-enables (0, 6, 6)Rerun
39 ms
data-disable: button[data-remote][data-disable] re-enables when `ajax:before` event is cancelled (0, 6, 6)Rerun
48 ms
data-disable: button[data-remote][data-disable] re-enables when `ajax:beforeSend` event is cancelled (0, 6, 6)Rerun
51 ms
data-disable: button[data-remote][data-disable] re-enables when `ajax:error` event is triggered (0, 6, 6)Rerun
47 ms
data-disable: do not enable elements for XHR redirects (0, 6, 6)Rerun
47 ms
data-disable-with: form input field with "data-disable-with" attribute (0, 7, 7)Rerun
36 ms
data-disable-with: blank form input field with "data-disable-with" attribute (0, 7, 7)Rerun
36 ms
data-disable-with: form button with "data-disable-with" attribute (0, 6, 6)Rerun
34 ms
data-disable-with: a[data-remote][data-disable-with] within a form disables and re-enables (0, 6, 6)Rerun
41 ms
data-disable-with: form input[type=submit][data-disable-with] disables (0, 6, 6)Rerun
70 ms
data-disable-with: form input[type=submit][data-disable-with] re-enables when `pageshow` event is triggered (0, 6, 6)Rerun
2 ms
data-disable-with: form[data-remote] input[type=submit][data-disable-with] is replaced in ajax callback (0, 2, 2)Rerun
53 ms
data-disable-with: form[data-remote] input[data-disable-with] is replaced with disabled field in ajax callback (0, 2, 2)Rerun
54 ms
data-disable-with: form input[type=submit][data-disable-with] using "form" attribute disables (0, 6, 6)Rerun
69 ms
data-disable-with: form[data-remote] textarea[data-disable-with] attribute (0, 3, 3)Rerun
34 ms
data-disable-with: a[data-disable-with] disables (0, 4, 4)Rerun
16 ms
data-disable-with: a[data-disable-with] re-enables when `pageshow` event is triggered (0, 6, 6)Rerun
2 ms
data-disable-with: a[data-remote][data-disable-with] disables and re-enables (0, 6, 6)Rerun
40 ms
data-disable-with: a[data-remote][data-disable-with] re-enables when `ajax:before` event is cancelled (0, 6, 6)Rerun
45 ms
data-disable-with: a[data-remote][data-disable-with] re-enables when `ajax:beforeSend` event is cancelled (0, 6, 6)Rerun
47 ms
data-disable-with: a[data-remote][data-disable-with] re-enables when `ajax:error` event is triggered (0, 6, 6)Rerun
48 ms
data-disable-with: form[data-remote] input|button|textarea[data-disable-with] does not disable when `ajax:beforeSend` event is cancelled (0, 8, 8)Rerun
23 ms
data-disable-with: ctrl-clicking on a link does not disable the link (0, 6, 6)Rerun
15 ms
data-disable-with: right/mouse-wheel-clicking on a link does not disable the link (0, 10, 10)Rerun
15 ms
data-disable-with: button[data-remote][data-disable-with] disables and re-enables (0, 6, 6)Rerun
39 ms
data-disable-with: button[data-remote][data-disable-with] re-enables when `ajax:before` event is cancelled (0, 6, 6)Rerun
49 ms
data-disable-with: button[data-remote][data-disable-with] re-enables when `ajax:beforeSend` event is cancelled (0, 6, 6)Rerun
47 ms
data-disable-with: button[data-remote][data-disable-with] re-enables when `ajax:error` event is triggered (0, 6, 6)Rerun
48 ms
call-remote: form method is read from "method" and not from "data-method" (0, 1, 1)Rerun
21 ms
call-remote: form method is not read from "data-method" attribute in case of missing "method" (0, 1, 1)Rerun
21 ms
call-remote: form method is read from submit button "formmethod" if submit is triggered by that button (0, 1, 1)Rerun
21 ms
call-remote: form default method is GET (0, 1, 1)Rerun
22 ms
call-remote: form URL is picked up from "action" (0, 1, 1)Rerun
21 ms
call-remote: form URL is read from "action" not "href" (0, 1, 1)Rerun
21 ms
call-remote: form URL is read from submit button "formaction" if submit is triggered by that button (0, 1, 1)Rerun
21 ms
call-remote: prefer JS, but accept any format (0, 1, 1)Rerun
21 ms
call-remote: JS code should be executed (0, 1, 1)Rerun
22 ms
call-remote: ecmascript code should be executed (0, 1, 1)Rerun
22 ms
call-remote: execution of JS code does not modify current DOM (0, 1, 1)Rerun
21 ms
call-remote: HTML document should be parsed (0, 1, 1)Rerun
21 ms
call-remote: XML document should be parsed (0, 1, 1)Rerun
22 ms
call-remote: accept application/json if "data-type" is json (0, 1, 1)Rerun
20 ms
call-remote: allow empty "data-remote" attribute (0, 1, 1)Rerun
20 ms
call-remote: query string in form action should be stripped in a GET request in normal submit (0, 1, 1)Rerun
32 ms
call-remote: query string in form action should be stripped in a GET request in ajax submit (0, 1, 1)Rerun
19 ms
call-remote: query string in form action should not be stripped in a POST request in normal submit (0, 1, 1)Rerun
31 ms
call-remote: query string in form action should not be stripped in a POST request in ajax submit (0, 1, 1)Rerun
19 ms
call-remote: allow empty form "action" (0, 1, 1)Rerun
29 ms
call-remote: sends CSRF token in custom header (0, 1, 1)Rerun
21 ms
call-remote: intelligently guesses crossDomain behavior when target URL has a different protocol and/or hostname (0, 1, 1)Rerun
32 ms
call-remote: intelligently guesses crossDomain behavior when target URL consists of only a path (0, 1, 1)Rerun
29 ms
call-remote-callbacks: modifying form fields with "ajax:before" sends modified data in request (0, 3, 3)Rerun
31 ms
call-remote-callbacks: modifying data("type") with "ajax:before" requests new dataType in request (0, 1, 1)Rerun
31 ms
call-remote-callbacks: setting data("with-credentials",true) with "ajax:before" uses new setting in request (0, 1, 1)Rerun
30 ms
call-remote-callbacks: stopping the "ajax:beforeSend" event aborts the request (0, 1, 1)Rerun
33 ms
call-remote-callbacks: "ajax:beforeSend" can be observed and stopped with event delegation (0, 1, 1)Rerun
32 ms
call-remote-callbacks: "ajax:beforeSend", "ajax:send", "ajax:success" and "ajax:complete" are triggered (0, 8, 8)Rerun
29 ms
call-remote-callbacks: "ajax:beforeSend", "ajax:send", "ajax:error" and "ajax:complete" are triggered on error (0, 8, 8)Rerun
29 ms
call-remote-callbacks: binding to ajax callbacks via .delegate() triggers handlers properly (0, 4, 4)Rerun
28 ms
data-method: link with "data-method" set to "delete" (0, 3, 3)Rerun
35 ms
data-method: click on the child of link with "data-method" (0, 3, 3)Rerun
31 ms
data-method: link with "data-method" and CSRF (0, 1, 1)Rerun
31 ms
data-method: link "target" should be carried over to generated form (0, 1, 1)Rerun
33 ms
data-method: link with "data-method" and cross origin (0, 1, 1)Rerun
17 ms
override: the getter for an element's href is publicly accessible (0, 1, 1)Rerun
15 ms
override: the getter for an element's href is overridable (0, 1, 1)Rerun
17 ms
override: the getter for an element's href works normally if not overridden (0, 1, 1)Rerun
17 ms
override: the event selector strings are overridable (0, 1, 1)Rerun
13 ms
override: including rails-ujs multiple times throws error (0, 1, 1)Rerun
72 ms
csrf-refresh: refresh all csrf tokens (0, 1, 1)Rerun
15 ms
csrf-token: find csrf token (0, 1, 1)Rerun
13 ms
csrf-token: find csrf param (0, 1, 1)Rerun
14 ms
call-ajax: call ajax without "ajax:beforeSend" (0, 1, 1)Rerun
65 ms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment