Commit 5bd65700 authored by Andrew Fontaine's avatar Andrew Fontaine

Merge branch '321978-fix-pipeline-configuration-input-resetting-value-while-typing' into 'master'

Resolve "Fix pipeline configuration input resetting value while typing"

See merge request gitlab-org/gitlab!55724
parents f4ef8ca3 5a828da2
......@@ -116,9 +116,9 @@ export default {
this.$emit('submit');
},
async updatePipelineConfiguration(path) {
this.pipelineConfigurationFileExists = await fetchPipelineConfigurationFileExists(path);
this.$emit('update:pipelineConfigurationFullPath', path);
this.pipelineConfigurationFileExists = await fetchPipelineConfigurationFileExists(path);
},
},
i18n: {
......
......@@ -224,4 +224,18 @@ describe('SharedForm', () => {
expect(wrapper.emitted('submit')).toHaveLength(1);
});
});
describe('On pipeline configuration path input', () => {
it('updates the pipelineConfigurationFullPath value', async () => {
jest.spyOn(Utils, 'fetchPipelineConfigurationFileExists').mockResolvedValue(true);
wrapper = createComponent();
await findPipelineConfigurationInput().vm.$emit('input', 'foo.yaml@bar/baz');
expect(wrapper.emitted('update:pipelineConfigurationFullPath')[0][0]).toBe(
'foo.yaml@bar/baz',
);
});
});
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment