diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-14 00:10:15 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-14 00:10:15 +0300 |
commit | a269fb8e7cca24b826dd3f53485641ffce93bbee (patch) | |
tree | 81a7c4f56feba26bb6244c8a3a76123533f68aa8 /spec/frontend/snippets | |
parent | 7e064974b92de60a3ef4642905e8af98a364a7a0 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/snippets')
-rw-r--r-- | spec/frontend/snippets/components/edit_spec.js | 3 | ||||
-rw-r--r-- | spec/frontend/snippets/components/show_spec.js | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/spec/frontend/snippets/components/edit_spec.js b/spec/frontend/snippets/components/edit_spec.js index 8a767765149..f49ceb2fede 100644 --- a/spec/frontend/snippets/components/edit_spec.js +++ b/spec/frontend/snippets/components/edit_spec.js @@ -5,6 +5,7 @@ import { merge } from 'lodash'; import VueApollo, { ApolloMutation } from 'vue-apollo'; import { useFakeDate } from 'helpers/fake_date'; import createMockApollo from 'helpers/mock_apollo_helper'; +import { stubPerformanceWebAPI } from 'helpers/performance'; import waitForPromises from 'helpers/wait_for_promises'; import { shallowMountExtended } from 'helpers/vue_test_utils_helper'; import GetSnippetQuery from 'shared_queries/snippet/snippet.query.graphql'; @@ -96,6 +97,8 @@ describe('Snippet Edit app', () => { const originalRelativeUrlRoot = gon.relative_url_root; beforeEach(() => { + stubPerformanceWebAPI(); + getSpy = jest.fn().mockResolvedValue(createQueryResponse()); // See `mutateSpy` declaration comment for why we send a key diff --git a/spec/frontend/snippets/components/show_spec.js b/spec/frontend/snippets/components/show_spec.js index c73bf8f80a2..b29ed97099f 100644 --- a/spec/frontend/snippets/components/show_spec.js +++ b/spec/frontend/snippets/components/show_spec.js @@ -12,6 +12,7 @@ import { SNIPPET_VISIBILITY_PUBLIC, } from '~/snippets/constants'; import CloneDropdownButton from '~/vue_shared/components/clone_dropdown.vue'; +import { stubPerformanceWebAPI } from 'helpers/performance'; describe('Snippet view app', () => { let wrapper; @@ -45,6 +46,10 @@ describe('Snippet view app', () => { const findLoadingIcon = () => wrapper.findComponent(GlLoadingIcon); const findEmbedDropdown = () => wrapper.findComponent(EmbedDropdown); + beforeEach(() => { + stubPerformanceWebAPI(); + }); + afterEach(() => { wrapper.destroy(); }); |