Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
5f92b84f
Commit
5f92b84f
authored
Nov 26, 2021
by
Jannik Lehmann
Committed by
Brandon Labuschagne
Nov 26, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace GlTable with GlTablelite for Merge Request throughput table
parent
2559a9d1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
10 deletions
+17
-10
ee/app/assets/javascripts/analytics/merge_request_analytics/components/throughput_table.vue
...s/merge_request_analytics/components/throughput_table.vue
+4
-4
ee/spec/frontend/analytics/merge_request_analytics/components/throughput_table_spec.js
...rge_request_analytics/components/throughput_table_spec.js
+13
-6
No files found.
ee/app/assets/javascripts/analytics/merge_request_analytics/components/throughput_table.vue
View file @
5f92b84f
<
script
>
<
script
>
import
{
import
{
GlTable
,
GlTable
Lite
,
GlLink
,
GlLink
,
GlAvatarLink
,
GlAvatarLink
,
GlAvatar
,
GlAvatar
,
...
@@ -42,7 +42,7 @@ const initialPaginationState = {
...
@@ -42,7 +42,7 @@ const initialPaginationState = {
export
default
{
export
default
{
name
:
'
ThroughputTable
'
,
name
:
'
ThroughputTable
'
,
components
:
{
components
:
{
GlTable
,
GlTable
Lite
,
GlLink
,
GlLink
,
GlAvatarLink
,
GlAvatarLink
,
GlAvatar
,
GlAvatar
,
...
@@ -264,7 +264,7 @@ export default {
...
@@ -264,7 +264,7 @@ export default {
<
template
>
<
template
>
<gl-loading-icon
v-if=
"tableDataLoading"
size=
"md"
/>
<gl-loading-icon
v-if=
"tableDataLoading"
size=
"md"
/>
<div
v-else-if=
"tableDataAvailable"
>
<div
v-else-if=
"tableDataAvailable"
>
<gl-table
<gl-table
-lite
:fields=
"$options.tableHeaderFields"
:fields=
"$options.tableHeaderFields"
:items=
"throughputTableData.list"
:items=
"throughputTableData.list"
stacked=
"sm"
stacked=
"sm"
...
@@ -376,7 +376,7 @@ export default {
...
@@ -376,7 +376,7 @@ export default {
</gl-avatars-inline>
</gl-avatars-inline>
</div>
</div>
</template>
</template>
</gl-table>
</gl-table
-lite
>
<gl-pagination
<gl-pagination
v-if=
"showPaginationControls"
v-if=
"showPaginationControls"
:value=
"pagination.currentPage"
:value=
"pagination.currentPage"
...
...
ee/spec/frontend/analytics/merge_request_analytics/components/throughput_table_spec.js
View file @
5f92b84f
import
{
GlAlert
,
GlLoadingIcon
,
GlTable
,
GlIcon
,
GlAvatarsInline
,
GlPagination
}
from
'
@gitlab/ui
'
;
import
{
GlAlert
,
GlLoadingIcon
,
GlTableLite
,
GlIcon
,
GlAvatarsInline
,
GlPagination
,
}
from
'
@gitlab/ui
'
;
import
{
mount
,
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
mount
,
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
ThroughputTable
from
'
ee/analytics/merge_request_analytics/components/throughput_table.vue
'
;
import
ThroughputTable
from
'
ee/analytics/merge_request_analytics/components/throughput_table.vue
'
;
...
@@ -66,7 +73,7 @@ describe('ThroughputTable', () => {
...
@@ -66,7 +73,7 @@ describe('ThroughputTable', () => {
});
});
};
};
const
findTable
=
()
=>
wrapper
.
find
(
GlTable
);
const
findTable
=
()
=>
wrapper
.
find
(
GlTable
Lite
);
const
findCol
=
(
testId
)
=>
findTable
().
find
(
`[data-testid="
${
testId
}
"]`
);
const
findCol
=
(
testId
)
=>
findTable
().
find
(
`[data-testid="
${
testId
}
"]`
);
...
@@ -104,7 +111,7 @@ describe('ThroughputTable', () => {
...
@@ -104,7 +111,7 @@ describe('ThroughputTable', () => {
});
});
it
(
'
does not display the table
'
,
()
=>
{
it
(
'
does not display the table
'
,
()
=>
{
displaysComponent
(
GlTable
,
false
);
displaysComponent
(
GlTable
Lite
,
false
);
});
});
it
(
'
does not display the pagination
'
,
()
=>
{
it
(
'
does not display the pagination
'
,
()
=>
{
...
@@ -130,7 +137,7 @@ describe('ThroughputTable', () => {
...
@@ -130,7 +137,7 @@ describe('ThroughputTable', () => {
});
});
it
(
'
does not display the table
'
,
()
=>
{
it
(
'
does not display the table
'
,
()
=>
{
displaysComponent
(
GlTable
,
false
);
displaysComponent
(
GlTable
Lite
,
false
);
});
});
it
(
'
does not display the no data message
'
,
()
=>
{
it
(
'
does not display the no data message
'
,
()
=>
{
...
@@ -150,7 +157,7 @@ describe('ThroughputTable', () => {
...
@@ -150,7 +157,7 @@ describe('ThroughputTable', () => {
});
});
it
(
'
displays the table
'
,
()
=>
{
it
(
'
displays the table
'
,
()
=>
{
displaysComponent
(
GlTable
,
true
);
displaysComponent
(
GlTable
Lite
,
true
);
});
});
it
(
'
does not display a loading icon
'
,
()
=>
{
it
(
'
does not display a loading icon
'
,
()
=>
{
...
@@ -429,7 +436,7 @@ describe('ThroughputTable', () => {
...
@@ -429,7 +436,7 @@ describe('ThroughputTable', () => {
});
});
it
(
'
does not display the table
'
,
()
=>
{
it
(
'
does not display the table
'
,
()
=>
{
displaysComponent
(
GlTable
,
false
);
displaysComponent
(
GlTable
Lite
,
false
);
});
});
it
(
'
does not display a loading icon
'
,
()
=>
{
it
(
'
does not display a loading icon
'
,
()
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment