Commit ab199394 authored by Miguel Rincon's avatar Miguel Rincon

Merge branch '233401-link-from-library-to-edit-form' into 'master'

Enable "edit" links in DAST profiles library

See merge request gitlab-org/gitlab!39137
parents 3c5b180f 44c5e38c
...@@ -161,20 +161,7 @@ export default { ...@@ -161,20 +161,7 @@ export default {
:aria-label="__('Delete')" :aria-label="__('Delete')"
@click="prepareProfileDeletion(item.id)" @click="prepareProfileDeletion(item.id)"
/> />
<!-- <gl-button :href="item.editPath">{{ __('Edit') }}</gl-button>
NOTE: The tooltip and `disable` on the button is temporary until the edit feature has been implemented
further details: https://gitlab.com/gitlab-org/gitlab/-/issues/222479#proposal
-->
<span
v-gl-tooltip.hover
:title="
s__(
'DastProfiles|Edit feature will come soon. Please create a new profile if changes needed',
)
"
>
<gl-button disabled>{{ __('Edit') }}</gl-button>
</span>
</div> </div>
</template> </template>
......
...@@ -12,6 +12,7 @@ query DastSiteProfiles($fullPath: ID!, $after: String, $before: String, $first: ...@@ -12,6 +12,7 @@ query DastSiteProfiles($fullPath: ID!, $after: String, $before: String, $first:
id id
profileName profileName
targetUrl targetUrl
editPath
validationStatus validationStatus
} }
} }
......
...@@ -106,12 +106,14 @@ describe('EE - DastProfilesList', () => { ...@@ -106,12 +106,14 @@ describe('EE - DastProfilesList', () => {
id: 1, id: 1,
profileName: 'Profile 1', profileName: 'Profile 1',
targetUrl: 'http://example-1.com', targetUrl: 'http://example-1.com',
editPath: '/1/edit',
validationStatus: 'Pending', validationStatus: 'Pending',
}, },
{ {
id: 2, id: 2,
profileName: 'Profile 2', profileName: 'Profile 2',
targetUrl: 'http://example-2.com', targetUrl: 'http://example-2.com',
editPath: '/2/edit',
validationStatus: 'Pending', validationStatus: 'Pending',
}, },
]; ];
...@@ -143,8 +145,11 @@ describe('EE - DastProfilesList', () => { ...@@ -143,8 +145,11 @@ describe('EE - DastProfilesList', () => {
expect(profileCell.innerText).toContain(profile.profileName); expect(profileCell.innerText).toContain(profile.profileName);
expect(targetUrlCell.innerText).toContain(profile.targetUrl); expect(targetUrlCell.innerText).toContain(profile.targetUrl);
expect(validationStatusCell.innerText).toContain(profile.validationStatus); expect(validationStatusCell.innerText).toContain(profile.validationStatus);
expect(within(actionsCell).getByRole('button', { name: /edit/i })).not.toBe(null);
expect(within(actionsCell).getByRole('button', { name: /delete/i })).not.toBe(null); expect(within(actionsCell).getByRole('button', { name: /delete/i })).not.toBe(null);
const editLink = within(actionsCell).getByRole('link', { name: /edit/i });
expect(editLink).not.toBe(null);
expect(editLink.getAttribute('href')).toBe(profile.editPath);
}); });
}); });
......
...@@ -7611,9 +7611,6 @@ msgstr "" ...@@ -7611,9 +7611,6 @@ msgstr ""
msgid "DastProfiles|Do you want to discard your changes?" msgid "DastProfiles|Do you want to discard your changes?"
msgstr "" msgstr ""
msgid "DastProfiles|Edit feature will come soon. Please create a new profile if changes needed"
msgstr ""
msgid "DastProfiles|Edit site profile" msgid "DastProfiles|Edit site profile"
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