From 6af9c0152f408893e3ac00bc809626646a0cb379 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Wed, 24 Feb 2021 16:29:55 +0100 Subject: [PATCH] fixed frontend tests for count post teaser --- webapp/package.json | 1 + webapp/test/testSetup.js | 5 +++++ webapp/yarn.lock | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/webapp/package.json b/webapp/package.json index 6aa53682f..84cf154a5 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -71,6 +71,7 @@ "date-fns": "2.12.0", "express": "~4.17.1", "graphql": "~14.6.0", + "intersection-observer": "^0.12.0", "jsonwebtoken": "~8.5.1", "linkify-it": "~2.2.0", "node-fetch": "^2.6.1", diff --git a/webapp/test/testSetup.js b/webapp/test/testSetup.js index 1c93d14b5..1b1183788 100644 --- a/webapp/test/testSetup.js +++ b/webapp/test/testSetup.js @@ -1,3 +1,5 @@ +require('intersection-observer') + import { createLocalVue } from '@vue/test-utils' import Vuex from 'vuex' import VTooltip from 'v-tooltip' @@ -6,6 +8,8 @@ import BaseComponents from '~/plugins/base-components' import Filters from '~/plugins/vue-filters' import InfiniteLoading from '~/plugins/vue-infinite-loading' import Directives from '~/plugins/vue-directives' +import VueObserveVisibility from '~/plugins/vue-observe-visibility' + global.localVue = createLocalVue() @@ -16,3 +20,4 @@ global.localVue.use(BaseComponents) global.localVue.use(Filters) global.localVue.use(Directives) global.localVue.use(InfiniteLoading) +global.localVue.use(VueObserveVisibility) diff --git a/webapp/yarn.lock b/webapp/yarn.lock index bf800a6d9..6a768406d 100644 --- a/webapp/yarn.lock +++ b/webapp/yarn.lock @@ -10077,6 +10077,11 @@ interpret@^2.0.0: resolved "https://registry.yarnpkg.com/interpret/-/interpret-2.0.0.tgz#b783ffac0b8371503e9ab39561df223286aa5433" integrity sha512-e0/LknJ8wpMMhTiWcjivB+ESwIuvHnBSlBbmP/pSb8CQJldoj1p2qv7xGZ/+BtbTziYRFSz8OsvdbiX45LtYQA== +intersection-observer@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/intersection-observer/-/intersection-observer-0.12.0.tgz#6c84628f67ce8698e5f9ccf857d97718745837aa" + integrity sha512-2Vkz8z46Dv401zTWudDGwO7KiGHNDkMv417T5ItcNYfmvHR/1qCTVBO9vwH8zZmQ0WkA/1ARwpysR9bsnop4NQ== + invariant@2.2.4, invariant@^2.2.2, invariant@^2.2.3, invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"