summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorLuke "Jared" Bennett <lbennett@gitlab.com>2017-05-12 22:57:50 +0100
committerLuke "Jared" Bennett <lbennett@gitlab.com>2017-05-15 16:34:04 +0100
commit7e7f266139ca9f4721f18e85e99e9796fd87eca3 (patch)
tree7155903852ebbe65d1bbd019cdaef2c3c93537a0 /app
parente2ffb8698751769879e21626c79f9c607a630bf5 (diff)
downloadgitlab-ce-7e7f266139ca9f4721f18e85e99e9796fd87eca3.tar.gz
Add test.js and test.css to disable animations during testing and include these in _head when testingdisable-css-and-jquery-animations-for-capybara
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/test.js1
-rw-r--r--app/assets/stylesheets/test.scss17
-rw-r--r--app/views/layouts/_head.html.haml2
3 files changed, 20 insertions, 0 deletions
diff --git a/app/assets/javascripts/test.js b/app/assets/javascripts/test.js
new file mode 100644
index 00000000000..c4c7918a68f
--- /dev/null
+++ b/app/assets/javascripts/test.js
@@ -0,0 +1 @@
+$.fx.off = true;
diff --git a/app/assets/stylesheets/test.scss b/app/assets/stylesheets/test.scss
new file mode 100644
index 00000000000..7d9f3da79c5
--- /dev/null
+++ b/app/assets/stylesheets/test.scss
@@ -0,0 +1,17 @@
+* {
+ -o-transition: none !important;
+ -moz-transition: none !important;
+ -ms-transition: none !important;
+ -webkit-transition: none !important;
+ transition: none !important;
+ -o-transform: none !important;
+ -moz-transform: none !important;
+ -ms-transform: none !important;
+ -webkit-transform: none !important;
+ transform: none !important;
+ -webkit-animation: none !important;
+ -moz-animation: none !important;
+ -o-animation: none !important;
+ -ms-animation: none !important;
+ animation: none !important;
+}
diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml
index afcc2b6e4f3..9e354987401 100644
--- a/app/views/layouts/_head.html.haml
+++ b/app/views/layouts/_head.html.haml
@@ -27,6 +27,7 @@
= stylesheet_link_tag "application", media: "all"
= stylesheet_link_tag "print", media: "print"
+ = stylesheet_link_tag "test", media: "all" if Rails.env.test?
= Gon::Base.render_data
@@ -34,6 +35,7 @@
= webpack_bundle_tag "common"
= webpack_bundle_tag "main"
= webpack_bundle_tag "raven" if current_application_settings.clientside_sentry_enabled
+ = webpack_bundle_tag "test" if Rails.env.test?
- if content_for?(:page_specific_javascripts)
= yield :page_specific_javascripts