diff options
Diffstat (limited to 'spec/frontend/clusters')
-rw-r--r-- | spec/frontend/clusters/agents/components/show_spec.js | 8 | ||||
-rw-r--r-- | spec/frontend/clusters/forms/components/integration_form_spec.js | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/spec/frontend/clusters/agents/components/show_spec.js b/spec/frontend/clusters/agents/components/show_spec.js index d5a8117f48c..2a3c11f4b47 100644 --- a/spec/frontend/clusters/agents/components/show_spec.js +++ b/spec/frontend/clusters/agents/components/show_spec.js @@ -19,7 +19,7 @@ describe('ClusterAgentShow', () => { let wrapper; useFakeDate([2021, 2, 15]); - const propsData = { + const provide = { agentName: 'cluster-agent', projectPath: 'path/to/project', }; @@ -49,7 +49,7 @@ describe('ClusterAgentShow', () => { shallowMount(ClusterAgentShow, { localVue, apolloProvider, - propsData, + provide, stubs: { GlSprintf, TimeAgoTooltip, GlTab }, }), ); @@ -60,7 +60,7 @@ describe('ClusterAgentShow', () => { wrapper = extendedWrapper( shallowMount(ClusterAgentShow, { - propsData, + provide, mocks: { $apollo, clusterAgent }, slots, stubs: { GlTab }, @@ -85,7 +85,7 @@ describe('ClusterAgentShow', () => { }); it('displays the agent name', () => { - expect(wrapper.text()).toContain(propsData.agentName); + expect(wrapper.text()).toContain(provide.agentName); }); it('displays agent create information', () => { diff --git a/spec/frontend/clusters/forms/components/integration_form_spec.js b/spec/frontend/clusters/forms/components/integration_form_spec.js index b129baa2d83..d041cd1e164 100644 --- a/spec/frontend/clusters/forms/components/integration_form_spec.js +++ b/spec/frontend/clusters/forms/components/integration_form_spec.js @@ -82,6 +82,8 @@ describe('ClusterIntegrationForm', () => { .then(() => { // setData is a bad approach because it changes the internal implementation which we should not touch // but our GlFormInput lacks the ability to set a new value. + // setData usage is discouraged. See https://gitlab.com/groups/gitlab-org/-/epics/7330 for details + // eslint-disable-next-line no-restricted-syntax wrapper.setData({ toggleEnabled: !defaultStoreValues.enabled }); }) .then(() => { @@ -93,6 +95,8 @@ describe('ClusterIntegrationForm', () => { return wrapper.vm .$nextTick() .then(() => { + // setData usage is discouraged. See https://gitlab.com/groups/gitlab-org/-/epics/7330 for details + // eslint-disable-next-line no-restricted-syntax wrapper.setData({ envScope: `${defaultStoreValues.environmentScope}1` }); }) .then(() => { |