Commit 136f200c authored by Kushal Pandya's avatar Kushal Pandya

Merge branch '352128-improvements-vuln-form' into 'master'

Improve form user experience

See merge request gitlab-org/gitlab!81172
parents 5b9d733a 5f670c92
......@@ -96,7 +96,7 @@ export default {
v-model.trim="identifier.identifierCode"
:state="validationStateIdentifierCode(index)"
type="text"
@change="emitChanges"
@input="emitChanges"
/>
</gl-form-group>
<gl-form-group
......@@ -111,7 +111,7 @@ export default {
v-model.trim="identifier.identifierUrl"
:state="validationStateIdentifierUrl(index)"
type="text"
@change="emitChanges"
@input="emitChanges"
/>
</gl-form-group>
<gl-button
......
......@@ -66,7 +66,7 @@ export default {
v-model.trim="vulnerabilityName"
:state="validationState.name"
type="text"
@change="emitChanges"
@input="emitChanges"
/>
</gl-form-group>
<gl-form-group
......@@ -93,7 +93,7 @@ export default {
class="gl-shadow-none! gl-px-0! gl-py-4! gl-h-auto!"
:aria-label="$options.i18n.vulnerabilityDesc.description"
:placeholder="$options.i18n.vulnerabilityDesc.description"
@change="emitChanges"
@input="emitChanges"
/>
</template>
</markdown-field>
......
......@@ -62,9 +62,12 @@ describe('New vulnerability - Section Identifiers', () => {
codeInput.setValue('cve-23');
urlInput.setValue('https://gitlab.com');
codeInput.trigger('change');
expect(wrapper.emitted('change')[0][0]).toEqual({
identifiers: [{ name: 'cve-23', url: '' }],
});
expect(wrapper.emitted('change')[1][0]).toEqual({
identifiers: [{ name: 'cve-23', url: 'https://gitlab.com' }],
});
});
......
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