Commit bbf3f7fc authored by Savas Vedova's avatar Savas Vedova Committed by Kushal Pandya

Display empty text placeholder

parent 18a34cdb
...@@ -30,6 +30,7 @@ export default { ...@@ -30,6 +30,7 @@ export default {
description: s__( description: s__(
'SecurityOrchestration|Select a project to store your security policies in. %{linkStart}More information.%{linkEnd}', 'SecurityOrchestration|Select a project to store your security policies in. %{linkStart}More information.%{linkEnd}',
), ),
emptyPlaceholder: s__('SecurityOrchestration|Choose a project'),
}, },
components: { components: {
GlButton, GlButton,
...@@ -216,7 +217,7 @@ export default { ...@@ -216,7 +217,7 @@ export default {
class="gl-w-full" class="gl-w-full"
menu-class="gl-w-full! gl-max-w-full!" menu-class="gl-w-full! gl-max-w-full!"
:disabled="disableSecurityPolicyProject" :disabled="disableSecurityPolicyProject"
:text="selectedProjectName" :text="selectedProjectName || $options.i18n.emptyPlaceholder"
> >
<instance-project-selector <instance-project-selector
class="gl-w-full" class="gl-w-full"
......
...@@ -99,6 +99,10 @@ describe('ScanNewPolicyModal Component', () => { ...@@ -99,6 +99,10 @@ describe('ScanNewPolicyModal Component', () => {
}); });
}); });
it('displays a placeholder when no project is selected', () => {
expect(findDropdown().props('text')).toBe('Choose a project');
});
it('does not display a warning', () => { it('does not display a warning', () => {
expect(findAlert().exists()).toBe(false); expect(findAlert().exists()).toBe(false);
}); });
......
...@@ -30875,6 +30875,9 @@ msgstr "" ...@@ -30875,6 +30875,9 @@ msgstr ""
msgid "SecurityOrchestration|An error occurred unassigning your security policy project" msgid "SecurityOrchestration|An error occurred unassigning your security policy project"
msgstr "" msgstr ""
msgid "SecurityOrchestration|Choose a project"
msgstr ""
msgid "SecurityOrchestration|Description" msgid "SecurityOrchestration|Description"
msgstr "" msgstr ""
......
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