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
e05b3cf7
Commit
e05b3cf7
authored
Oct 11, 2021
by
Brandon Labuschagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove DA data-testid consts
parent
94aeceba
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
59 deletions
+17
-59
ee/app/assets/javascripts/analytics/devops_report/devops_adoption/components/devops_adoption_overview_table.vue
...ps_adoption/components/devops_adoption_overview_table.vue
+3
-13
ee/app/assets/javascripts/analytics/devops_report/devops_adoption/components/devops_adoption_table.vue
...port/devops_adoption/components/devops_adoption_table.vue
+5
-29
ee/app/assets/javascripts/analytics/devops_report/devops_adoption/constants.js
...ipts/analytics/devops_report/devops_adoption/constants.js
+0
-5
ee/spec/frontend/analytics/devops_report/devops_adoption/components/devops_adoption_overview_table_spec.js
...doption/components/devops_adoption_overview_table_spec.js
+4
-6
ee/spec/frontend/analytics/devops_report/devops_adoption/components/devops_adoption_table_spec.js
.../devops_adoption/components/devops_adoption_table_spec.js
+5
-6
No files found.
ee/app/assets/javascripts/analytics/devops_report/devops_adoption/components/devops_adoption_overview_table.vue
View file @
e05b3cf7
...
@@ -12,14 +12,11 @@ import { uniqueId } from 'lodash';
...
@@ -12,14 +12,11 @@ import { uniqueId } from 'lodash';
import
LocalStorageSync
from
'
~/vue_shared/components/local_storage_sync.vue
'
;
import
LocalStorageSync
from
'
~/vue_shared/components/local_storage_sync.vue
'
;
import
{
formatNumber
}
from
'
~/locale
'
;
import
{
formatNumber
}
from
'
~/locale
'
;
import
{
import
{
TABLE_TEST_IDS_HEADERS
,
I18N_GROUP_COL_LABEL
,
I18N_GROUP_COL_LABEL
,
I18N_TABLE_REMOVE_BUTTON_DISABLED
,
I18N_TABLE_REMOVE_BUTTON_DISABLED
,
I18N_TABLE_REMOVE_BUTTON
,
I18N_TABLE_REMOVE_BUTTON
,
I18N_OVERVIEW_TABLE_HEADER_GROUP
,
I18N_OVERVIEW_TABLE_HEADER_GROUP
,
I18N_OVERVIEW_TABLE_HEADER_SUBGROUP
,
I18N_OVERVIEW_TABLE_HEADER_SUBGROUP
,
TABLE_TEST_IDS_ACTIONS
,
TABLE_TEST_IDS_NAMESPACE
,
DEVOPS_ADOPTION_TABLE_CONFIGURATION
,
DEVOPS_ADOPTION_TABLE_CONFIGURATION
,
OVERVIEW_TABLE_SORT_BY_STORAGE_KEY
,
OVERVIEW_TABLE_SORT_BY_STORAGE_KEY
,
OVERVIEW_TABLE_SORT_DESC_STORAGE_KEY
,
OVERVIEW_TABLE_SORT_DESC_STORAGE_KEY
,
...
@@ -39,7 +36,7 @@ const formatter = (value, key, item) => {
...
@@ -39,7 +36,7 @@ const formatter = (value, key, item) => {
const
fieldOptions
=
{
const
fieldOptions
=
{
thClass
,
thClass
,
thAttr
:
{
'
data-testid
'
:
TABLE_TEST_IDS_HEADERS
},
thAttr
:
{
'
data-testid
'
:
'
headers
'
},
sortable
:
true
,
sortable
:
true
,
sortByFormatted
:
true
,
sortByFormatted
:
true
,
formatter
,
formatter
,
...
@@ -65,10 +62,6 @@ export default {
...
@@ -65,10 +62,6 @@ export default {
default
:
null
,
default
:
null
,
},
},
},
},
testids
:
{
ACTIONS
:
TABLE_TEST_IDS_ACTIONS
,
NAMESPACE
:
TABLE_TEST_IDS_NAMESPACE
,
},
cols
:
DEVOPS_ADOPTION_TABLE_CONFIGURATION
,
cols
:
DEVOPS_ADOPTION_TABLE_CONFIGURATION
,
sortByStorageKey
:
OVERVIEW_TABLE_SORT_BY_STORAGE_KEY
,
sortByStorageKey
:
OVERVIEW_TABLE_SORT_BY_STORAGE_KEY
,
sortDescStorageKey
:
OVERVIEW_TABLE_SORT_DESC_STORAGE_KEY
,
sortDescStorageKey
:
OVERVIEW_TABLE_SORT_DESC_STORAGE_KEY
,
...
@@ -174,7 +167,7 @@ export default {
...
@@ -174,7 +167,7 @@ export default {
</
template
>
</
template
>
<
template
#cell(name)=
"{ item }"
>
<
template
#cell(name)=
"{ item }"
>
<div
:data-testid=
"$options.testids.NAMESPACE
"
>
<div
data-testid=
"namespace
"
>
<span
v-if=
"item.group.latestSnapshot"
class=
"gl-font-weight-bold"
>
{{
<span
v-if=
"item.group.latestSnapshot"
class=
"gl-font-weight-bold"
>
{{
item
.
group
.
namespace
.
fullName
item
.
group
.
namespace
.
fullName
}}
</span>
}}
</span>
...
@@ -206,10 +199,7 @@ export default {
...
@@ -206,10 +199,7 @@ export default {
</
template
>
</
template
>
<
template
#cell(actions)=
"{ item }"
>
<
template
#cell(actions)=
"{ item }"
>
<span
<span
v-gl-tooltip.hover=
"getDeleteButtonTooltipText(item.group)"
data-testid=
"actions"
>
v-gl-tooltip.hover=
"getDeleteButtonTooltipText(item.group)"
:data-testid=
"$options.testids.ACTIONS"
>
<gl-button
<gl-button
v-gl-modal=
"deleteModalId"
v-gl-modal=
"deleteModalId"
:disabled=
"isCurrentGroup(item.group)"
:disabled=
"isCurrentGroup(item.group)"
...
...
ee/app/assets/javascripts/analytics/devops_report/devops_adoption/components/devops_adoption_table.vue
View file @
e05b3cf7
...
@@ -10,11 +10,6 @@ import {
...
@@ -10,11 +10,6 @@ import {
import
{
uniqueId
}
from
'
lodash
'
;
import
{
uniqueId
}
from
'
lodash
'
;
import
LocalStorageSync
from
'
~/vue_shared/components/local_storage_sync.vue
'
;
import
LocalStorageSync
from
'
~/vue_shared/components/local_storage_sync.vue
'
;
import
{
import
{
TABLE_TEST_IDS_HEADERS
,
TABLE_TEST_IDS_NAMESPACE
,
TABLE_TEST_IDS_ACTIONS
,
TABLE_TEST_IDS_LOCAL_STORAGE_SORT_BY
,
TABLE_TEST_IDS_LOCAL_STORAGE_SORT_DESC
,
TABLE_SORT_BY_STORAGE_KEY
,
TABLE_SORT_BY_STORAGE_KEY
,
TABLE_SORT_DESC_STORAGE_KEY
,
TABLE_SORT_DESC_STORAGE_KEY
,
I18N_TABLE_REMOVE_BUTTON
,
I18N_TABLE_REMOVE_BUTTON
,
...
@@ -44,7 +39,7 @@ const thClass = ['gl-bg-white!', 'gl-text-gray-400'];
...
@@ -44,7 +39,7 @@ const thClass = ['gl-bg-white!', 'gl-text-gray-400'];
const
fieldOptions
=
{
const
fieldOptions
=
{
thClass
,
thClass
,
thAttr
:
{
'
data-testid
'
:
TABLE_TEST_IDS_HEADERS
},
thAttr
:
{
'
data-testid
'
:
'
headers
'
},
formatter
,
formatter
,
sortable
:
true
,
sortable
:
true
,
sortByFormatted
:
true
,
sortByFormatted
:
true
,
...
@@ -74,12 +69,6 @@ export default {
...
@@ -74,12 +69,6 @@ export default {
removeButtonDisabled
:
I18N_TABLE_REMOVE_BUTTON_DISABLED
,
removeButtonDisabled
:
I18N_TABLE_REMOVE_BUTTON_DISABLED
,
removeButton
:
I18N_TABLE_REMOVE_BUTTON
,
removeButton
:
I18N_TABLE_REMOVE_BUTTON
,
},
},
testids
:
{
NAMESPACE
:
TABLE_TEST_IDS_NAMESPACE
,
ACTIONS
:
TABLE_TEST_IDS_ACTIONS
,
LOCAL_STORAGE_SORT_BY
:
TABLE_TEST_IDS_LOCAL_STORAGE_SORT_BY
,
LOCAL_STORAGE_SORT_DESC
:
TABLE_TEST_IDS_LOCAL_STORAGE_SORT_DESC
,
},
sortByStorageKey
:
TABLE_SORT_BY_STORAGE_KEY
,
sortByStorageKey
:
TABLE_SORT_BY_STORAGE_KEY
,
sortDescStorageKey
:
TABLE_SORT_DESC_STORAGE_KEY
,
sortDescStorageKey
:
TABLE_SORT_DESC_STORAGE_KEY
,
props
:
{
props
:
{
...
@@ -145,18 +134,8 @@ export default {
...
@@ -145,18 +134,8 @@ export default {
</
script
>
</
script
>
<
template
>
<
template
>
<div>
<div>
<local-storage-sync
<local-storage-sync
v-model=
"sortBy"
:storage-key=
"$options.sortByStorageKey"
as-json
/>
v-model=
"sortBy"
<local-storage-sync
v-model=
"sortDesc"
:storage-key=
"$options.sortDescStorageKey"
as-json
/>
:storage-key=
"$options.sortByStorageKey"
:data-testid=
"$options.testids.LOCAL_STORAGE_SORT_BY"
as-json
/>
<local-storage-sync
v-model=
"sortDesc"
:storage-key=
"$options.sortDescStorageKey"
:data-testid=
"$options.testids.LOCAL_STORAGE_SORT_DESC"
as-json
/>
<gl-table
<gl-table
:fields=
"tableHeaderFields"
:fields=
"tableHeaderFields"
:items=
"enabledNamespaces"
:items=
"enabledNamespaces"
...
@@ -179,7 +158,7 @@ export default {
...
@@ -179,7 +158,7 @@ export default {
</
template
>
</
template
>
<
template
#cell(name)=
"{ item }"
>
<
template
#cell(name)=
"{ item }"
>
<div
:data-testid=
"$options.testids.NAMESPACE
"
>
<div
data-testid=
"namespace
"
>
<strong
v-if=
"item.latestSnapshot"
>
{{
item
.
namespace
.
fullName
}}
</strong>
<strong
v-if=
"item.latestSnapshot"
>
{{
item
.
namespace
.
fullName
}}
</strong>
<template
v-else
>
<template
v-else
>
<span
class=
"gl-text-gray-400"
>
{{
item
.
namespace
.
fullName
}}
</span>
<span
class=
"gl-text-gray-400"
>
{{
item
.
namespace
.
fullName
}}
</span>
...
@@ -201,10 +180,7 @@ export default {
...
@@ -201,10 +180,7 @@ export default {
</
template
>
</
template
>
<
template
#cell(actions)=
"{ item }"
>
<
template
#cell(actions)=
"{ item }"
>
<span
<span
v-gl-tooltip.hover=
"getDeleteButtonTooltipText(item)"
data-testid=
"actions"
>
v-gl-tooltip.hover=
"getDeleteButtonTooltipText(item)"
:data-testid=
"$options.testids.ACTIONS"
>
<gl-button
<gl-button
v-gl-modal=
"deleteModalId"
v-gl-modal=
"deleteModalId"
:disabled=
"isCurrentGroup(item)"
:disabled=
"isCurrentGroup(item)"
...
...
ee/app/assets/javascripts/analytics/devops_report/devops_adoption/constants.js
View file @
e05b3cf7
...
@@ -7,11 +7,6 @@ export const PROGRESS_BAR_HEIGHT = '8px';
...
@@ -7,11 +7,6 @@ export const PROGRESS_BAR_HEIGHT = '8px';
export
const
DATE_TIME_FORMAT
=
'
yyyy-mm-dd HH:MM
'
;
export
const
DATE_TIME_FORMAT
=
'
yyyy-mm-dd HH:MM
'
;
export
const
OVERVIEW_TABLE_NAME_KEY
=
'
name
'
;
export
const
OVERVIEW_TABLE_NAME_KEY
=
'
name
'
;
export
const
TABLE_TEST_IDS_HEADERS
=
'
header
'
;
export
const
TABLE_TEST_IDS_NAMESPACE
=
'
namespaceCol
'
;
export
const
TABLE_TEST_IDS_ACTIONS
=
'
actionsCol
'
;
export
const
TABLE_TEST_IDS_LOCAL_STORAGE_SORT_BY
=
'
localStorageSortBy
'
;
export
const
TABLE_TEST_IDS_LOCAL_STORAGE_SORT_DESC
=
'
localStorageSortDesc
'
;
export
const
TABLE_SORT_BY_STORAGE_KEY
=
'
devops_adoption_table_sort_by
'
;
export
const
TABLE_SORT_BY_STORAGE_KEY
=
'
devops_adoption_table_sort_by
'
;
export
const
TABLE_SORT_DESC_STORAGE_KEY
=
'
devops_adoption_table_sort_desc
'
;
export
const
TABLE_SORT_DESC_STORAGE_KEY
=
'
devops_adoption_table_sort_desc
'
;
...
...
ee/spec/frontend/analytics/devops_report/devops_adoption/components/devops_adoption_overview_table_spec.js
View file @
e05b3cf7
import
{
GlButton
,
GlIcon
,
GlBadge
,
GlProgressBar
}
from
'
@gitlab/ui
'
;
import
{
GlButton
,
GlIcon
,
GlBadge
,
GlProgressBar
}
from
'
@gitlab/ui
'
;
import
DevopsAdoptionDeleteModal
from
'
ee/analytics/devops_report/devops_adoption/components/devops_adoption_delete_modal.vue
'
;
import
DevopsAdoptionDeleteModal
from
'
ee/analytics/devops_report/devops_adoption/components/devops_adoption_delete_modal.vue
'
;
import
DevopsAdoptionOverviewTable
from
'
ee/analytics/devops_report/devops_adoption/components/devops_adoption_overview_table.vue
'
;
import
DevopsAdoptionOverviewTable
from
'
ee/analytics/devops_report/devops_adoption/components/devops_adoption_overview_table.vue
'
;
import
{
import
{
DEVOPS_ADOPTION_TABLE_CONFIGURATION
}
from
'
ee/analytics/devops_report/devops_adoption/constants
'
;
TABLE_TEST_IDS_NAMESPACE
,
TABLE_TEST_IDS_ACTIONS
,
TABLE_TEST_IDS_HEADERS
,
DEVOPS_ADOPTION_TABLE_CONFIGURATION
,
}
from
'
ee/analytics/devops_report/devops_adoption/constants
'
;
import
{
createMockDirective
,
getBinding
}
from
'
helpers/vue_mock_directive
'
;
import
{
createMockDirective
,
getBinding
}
from
'
helpers/vue_mock_directive
'
;
import
{
mountExtended
}
from
'
helpers/vue_test_utils_helper
'
;
import
{
mountExtended
}
from
'
helpers/vue_test_utils_helper
'
;
import
LocalStorageSync
from
'
~/vue_shared/components/local_storage_sync.vue
'
;
import
LocalStorageSync
from
'
~/vue_shared/components/local_storage_sync.vue
'
;
import
{
devopsAdoptionNamespaceData
}
from
'
../mock_data
'
;
import
{
devopsAdoptionNamespaceData
}
from
'
../mock_data
'
;
const
DELETE_MODAL_ID
=
'
delete-modal-test-unique-id
'
;
const
DELETE_MODAL_ID
=
'
delete-modal-test-unique-id
'
;
const
TABLE_TEST_IDS_HEADERS
=
'
headers
'
;
const
TABLE_TEST_IDS_NAMESPACE
=
'
namespace
'
;
const
TABLE_TEST_IDS_ACTIONS
=
'
actions
'
;
jest
.
mock
(
'
lodash/uniqueId
'
,
()
=>
(
x
)
=>
`
${
x
}
test-unique-id`
);
jest
.
mock
(
'
lodash/uniqueId
'
,
()
=>
(
x
)
=>
`
${
x
}
test-unique-id`
);
...
...
ee/spec/frontend/analytics/devops_report/devops_adoption/components/devops_adoption_table_spec.js
View file @
e05b3cf7
...
@@ -4,16 +4,15 @@ import { nextTick } from 'vue';
...
@@ -4,16 +4,15 @@ import { nextTick } from 'vue';
import
DevopsAdoptionDeleteModal
from
'
ee/analytics/devops_report/devops_adoption/components/devops_adoption_delete_modal.vue
'
;
import
DevopsAdoptionDeleteModal
from
'
ee/analytics/devops_report/devops_adoption/components/devops_adoption_delete_modal.vue
'
;
import
DevopsAdoptionTable
from
'
ee/analytics/devops_report/devops_adoption/components/devops_adoption_table.vue
'
;
import
DevopsAdoptionTable
from
'
ee/analytics/devops_report/devops_adoption/components/devops_adoption_table.vue
'
;
import
DevopsAdoptionTableCellFlag
from
'
ee/analytics/devops_report/devops_adoption/components/devops_adoption_table_cell_flag.vue
'
;
import
DevopsAdoptionTableCellFlag
from
'
ee/analytics/devops_report/devops_adoption/components/devops_adoption_table_cell_flag.vue
'
;
import
{
import
{
DEVOPS_ADOPTION_TABLE_CONFIGURATION
}
from
'
ee/analytics/devops_report/devops_adoption/constants
'
;
TABLE_TEST_IDS_NAMESPACE
,
TABLE_TEST_IDS_ACTIONS
,
TABLE_TEST_IDS_HEADERS
,
DEVOPS_ADOPTION_TABLE_CONFIGURATION
,
}
from
'
ee/analytics/devops_report/devops_adoption/constants
'
;
import
{
createMockDirective
,
getBinding
}
from
'
helpers/vue_mock_directive
'
;
import
{
createMockDirective
,
getBinding
}
from
'
helpers/vue_mock_directive
'
;
import
LocalStorageSync
from
'
~/vue_shared/components/local_storage_sync.vue
'
;
import
LocalStorageSync
from
'
~/vue_shared/components/local_storage_sync.vue
'
;
import
{
devopsAdoptionNamespaceData
,
devopsAdoptionTableHeaders
}
from
'
../mock_data
'
;
import
{
devopsAdoptionNamespaceData
,
devopsAdoptionTableHeaders
}
from
'
../mock_data
'
;
const
TABLE_TEST_IDS_HEADERS
=
'
headers
'
;
const
TABLE_TEST_IDS_NAMESPACE
=
'
namespace
'
;
const
TABLE_TEST_IDS_ACTIONS
=
'
actions
'
;
describe
(
'
DevopsAdoptionTable
'
,
()
=>
{
describe
(
'
DevopsAdoptionTable
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
...
...
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