Skip to content
代码片段 群组 项目
未验证 提交 4e29b053 编辑于 作者: Artur Fedorov's avatar Artur Fedorov 提交者: GitLab
浏览文件

Merge branch '437943-update-ref-selector' into 'master'

No related branches found
No related tags found
无相关合并请求
......@@ -29,6 +29,9 @@ export default {
),
formGroupLabel: s__('ScanExecutionPolicy|file path group'),
},
refSelectorTranslations: {
noRefSelected: __('default branch'),
},
name: 'CodeBlockFilePath',
components: {
CodeBlockSourceSelector,
......@@ -157,6 +160,7 @@ export default {
:disabled="!selectedProjectId"
:project-id="selectedProjectIdShortFormat"
:state="projectAndRefState"
:translations="$options.refSelectorTranslations"
:value="selectedRef"
@input="setSelectedRef"
/>
......
......@@ -90,7 +90,14 @@ describe('CodeBlockFilePath', () => {
expect(findTruncate().props('text')).toBe('fullPath');
expect(findRefSelector().exists()).toBe(true);
expect(findFormInput().exists()).toBe(false);
expect(findRefSelector().props('value')).toBe('ref');
expect(findRefSelector().props()).toEqual(
expect.objectContaining({
translations: {
noRefSelected: 'default branch',
},
value: 'ref',
}),
);
expect(findGroupProjectsDropdown().props('selected')).toBe(PROJECT_ID);
});
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册