Commit 465fdc49 authored by Ezekiel Kigbo's avatar Ezekiel Kigbo

Merge branch '336501-corpus-management-css-tweaks' into 'master'

Various corpus management style tweaks

See merge request gitlab-org/gitlab!67715
parents abe44ef4 9fbfbb47
...@@ -21,7 +21,7 @@ export default { ...@@ -21,7 +21,7 @@ export default {
}, },
modal: { modal: {
actionPrimary: { actionPrimary: {
text: s__('Delete'), text: s__('Delete corpus'),
attributes: { variant: 'danger', 'data-testid': 'modal-confirm' }, attributes: { variant: 'danger', 'data-testid': 'modal-confirm' },
}, },
actionCancel: { actionCancel: {
...@@ -41,13 +41,7 @@ export default { ...@@ -41,13 +41,7 @@ export default {
</script> </script>
<template> <template>
<span> <span>
<gl-button <gl-button class="gl-mr-2" icon="download" :href="downloadPath" />
class="gl-mr-2"
icon="download"
category="secondary"
variant="confirm"
:href="downloadPath"
/>
<gl-button <gl-button
v-gl-modal-directive="`confirmation-modal-${corpus.name}`" v-gl-modal-directive="`confirmation-modal-${corpus.name}`"
icon="remove" icon="remove"
......
...@@ -36,8 +36,8 @@ export default { ...@@ -36,8 +36,8 @@ export default {
<template> <template>
<div> <div>
<div class="gl-text-gray-900" data-testid="corpus-name"> <div class="gl-text-gray-900" data-testid="corpus-name">
{{ corpus.name }} <span data-testid="file-size">{{ fileSize }}</span {{ corpus.name }}
>) <span class="gl-text-gray-500" data-testid="file-size">({{ fileSize }})</span>
</div> </div>
<div data-testid="latest-job"> <div data-testid="latest-job">
{{ this.$options.i18n.latestJob }} {{ this.$options.i18n.latestJob }}
......
...@@ -56,10 +56,10 @@ export default { ...@@ -56,10 +56,10 @@ export default {
<h4 class="gl-my-5"> <h4 class="gl-my-5">
{{ this.$options.i18n.header }} {{ this.$options.i18n.header }}
</h4> </h4>
<h5 class="gl-font-base gl-font-weight-100"> <p>
{{ this.$options.i18n.subHeader }} {{ this.$options.i18n.subHeader }}
<gl-link :href="corpusHelpPath">{{ this.$options.i18n.learnMore }}</gl-link> <gl-link :href="corpusHelpPath">{{ this.$options.i18n.learnMore }}</gl-link>
</h5> </p>
</header> </header>
<gl-loading-icon v-if="isLoading" size="lg" /> <gl-loading-icon v-if="isLoading" size="lg" />
......
...@@ -27,7 +27,7 @@ export default { ...@@ -27,7 +27,7 @@ export default {
corpusName: s__('CorpusManagement|Corpus name'), corpusName: s__('CorpusManagement|Corpus name'),
uploadButtonText: __('Choose File...'), uploadButtonText: __('Choose File...'),
uploadMessage: s__( uploadMessage: s__(
'CorpusManagement|New corpus needs to be a upload in *.zip format. Maximum 10Gib', 'CorpusManagement|New corpus needs to be a upload in *.zip format. Maximum 10GB',
), ),
}, },
apollo: { apollo: {
...@@ -142,6 +142,7 @@ export default { ...@@ -142,6 +142,7 @@ export default {
/> />
<gl-button <gl-button
class="gl-absolute gl-top-2 gl-right-2 gl-z-index-3"
variant="default" variant="default"
category="tertiary" category="tertiary"
size="small" size="small"
......
...@@ -10,9 +10,7 @@ exports[`EE - CorpusManagement corpus management when loaded renders the correct ...@@ -10,9 +10,7 @@ exports[`EE - CorpusManagement corpus management when loaded renders the correct
</h4> </h4>
<h5 <p>
class="gl-font-base gl-font-weight-100"
>
Corpus are used in fuzz testing as mutation source to Improve future testing. Corpus are used in fuzz testing as mutation source to Improve future testing.
...@@ -21,6 +19,6 @@ exports[`EE - CorpusManagement corpus management when loaded renders the correct ...@@ -21,6 +19,6 @@ exports[`EE - CorpusManagement corpus management when loaded renders the correct
> >
Learn More Learn More
</gl-link-stub> </gl-link-stub>
</h5> </p>
</header> </header>
`; `;
...@@ -6,14 +6,14 @@ exports[`Name component renders name with correct file size 1`] = ` ...@@ -6,14 +6,14 @@ exports[`Name component renders name with correct file size 1`] = `
data-testid="corpus-name" data-testid="corpus-name"
> >
Test corpus 1 Test corpus 1
<span <span
class="gl-text-gray-500"
data-testid="file-size" data-testid="file-size"
> >
400MB (400MB)
</span> </span>
)
</div> </div>
`; `;
...@@ -23,14 +23,14 @@ exports[`Name component renders the latest job 1`] = ` ...@@ -23,14 +23,14 @@ exports[`Name component renders the latest job 1`] = `
data-testid="corpus-name" data-testid="corpus-name"
> >
Test corpus 1 Test corpus 1
<span <span
class="gl-text-gray-500"
data-testid="file-size" data-testid="file-size"
> >
400MB (400MB)
</span> </span>
)
</div> </div>
`; `;
...@@ -40,13 +40,13 @@ exports[`Name component without job path renders a - string instead of a link 1` ...@@ -40,13 +40,13 @@ exports[`Name component without job path renders a - string instead of a link 1`
data-testid="corpus-name" data-testid="corpus-name"
> >
Corpus-sample-2-1431-4425 Corpus-sample-2-1431-4425
<span <span
class="gl-text-gray-500"
data-testid="file-size" data-testid="file-size"
> >
321MB (321MB)
</span> </span>
)
</div> </div>
`; `;
...@@ -28,14 +28,14 @@ describe('Name', () => { ...@@ -28,14 +28,14 @@ describe('Name', () => {
describe('component', () => { describe('component', () => {
it('renders name with correct file size', () => { it('renders name with correct file size', () => {
createComponent(); createComponent();
expect(findFileSize().text()).toBe('400MB'); expect(findFileSize().text()).toBe('(400MB)');
expect(findName().element).toMatchSnapshot(); expect(findName().element).toMatchSnapshot();
}); });
it('renders the latest job', () => { it('renders the latest job', () => {
createComponent(); createComponent();
expect(wrapper.findComponent(GlLink).exists()).toBe(true); expect(wrapper.findComponent(GlLink).exists()).toBe(true);
expect(findFileSize().text()).toBe('400MB'); expect(findFileSize().text()).toBe('(400MB)');
expect(findName().element).toMatchSnapshot(); expect(findName().element).toMatchSnapshot();
}); });
...@@ -43,7 +43,7 @@ describe('Name', () => { ...@@ -43,7 +43,7 @@ describe('Name', () => {
it('renders a - string instead of a link', () => { it('renders a - string instead of a link', () => {
createComponent({ propsData: { corpus: corpuses[2] } }); createComponent({ propsData: { corpus: corpuses[2] } });
expect(wrapper.findComponent(GlLink).exists()).toBe(false); expect(wrapper.findComponent(GlLink).exists()).toBe(false);
expect(findFileSize().text()).toBe('321MB'); expect(findFileSize().text()).toBe('(321MB)');
expect(findName().element).toMatchSnapshot(); expect(findName().element).toMatchSnapshot();
}); });
}); });
......
...@@ -9198,7 +9198,7 @@ msgstr "" ...@@ -9198,7 +9198,7 @@ msgstr ""
msgid "CorpusManagement|Latest Job:" msgid "CorpusManagement|Latest Job:"
msgstr "" msgstr ""
msgid "CorpusManagement|New corpus needs to be a upload in *.zip format. Maximum 10Gib" msgid "CorpusManagement|New corpus needs to be a upload in *.zip format. Maximum 10GB"
msgstr "" msgstr ""
msgid "CorpusManagement|New upload" msgid "CorpusManagement|New upload"
...@@ -10737,6 +10737,9 @@ msgstr "" ...@@ -10737,6 +10737,9 @@ msgstr ""
msgid "Delete comment" msgid "Delete comment"
msgstr "" msgstr ""
msgid "Delete corpus"
msgstr ""
msgid "Delete domain" msgid "Delete domain"
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