From e4b402c60353b0fe2dc745ed6cde845b7d73476b Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Mon, 30 May 2022 12:09:59 +0100 Subject: [PATCH] Sped up tests that use `{{liquid-if}}` no issue - some tests were unnecessarily slowed down by waiting repeatedly for animations to complete - added override for `` component that `` uses internally with the only change being to set the default growth animation duration to 5ms when running tests --- ghost/admin/app/components/liquid-container.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 ghost/admin/app/components/liquid-container.js diff --git a/ghost/admin/app/components/liquid-container.js b/ghost/admin/app/components/liquid-container.js new file mode 100644 index 0000000000..537addc788 --- /dev/null +++ b/ghost/admin/app/components/liquid-container.js @@ -0,0 +1,12 @@ +import LiquidContainer from 'liquid-fire/components/liquid-container'; +import config from 'ghost-admin/config/environment'; + +export default LiquidContainer.extend({ + init() { + this._super(...arguments); + + if (config.environment === 'test') { + this.growDuration = 5; + } + } +});