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
3378baf0
Commit
3378baf0
authored
Apr 05, 2022
by
Justin Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update trigger_block.vue to use GlTableLite
And update specs
parent
4347d81f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
app/assets/javascripts/jobs/components/trigger_block.vue
app/assets/javascripts/jobs/components/trigger_block.vue
+4
-4
spec/frontend/jobs/components/trigger_block_spec.js
spec/frontend/jobs/components/trigger_block_spec.js
+3
-4
No files found.
app/assets/javascripts/jobs/components/trigger_block.vue
View file @
3378baf0
<
script
>
import
{
GlButton
,
GlTable
}
from
'
@gitlab/ui
'
;
import
{
GlButton
,
GlTable
Lite
}
from
'
@gitlab/ui
'
;
import
{
__
}
from
'
~/locale
'
;
const
DEFAULT_TD_CLASSES
=
'
gl-w-half gl-font-sm! gl-border-gray-200!
'
;
...
...
@@ -25,7 +25,7 @@ export default {
],
components
:
{
GlButton
,
GlTable
,
GlTable
Lite
,
},
props
:
{
trigger
:
{
...
...
@@ -84,7 +84,7 @@ export default {
>
</p>
<gl-table
:items=
"trigger.variables"
:fields=
"$options.fields"
small
bordered
fixed
>
<gl-table
-lite
:items=
"trigger.variables"
:fields=
"$options.fields"
small
bordered
fixed
>
<template
#cell(key)=
"
{ item }">
<span
class=
"gl-overflow-break-word"
>
{{
item
.
key
}}
</span>
</
template
>
...
...
@@ -92,7 +92,7 @@ export default {
<
template
#cell(value)=
"data"
>
<span
class=
"gl-overflow-break-word"
>
{{
getDisplayValue
(
data
.
value
)
}}
</span>
</
template
>
</gl-table>
</gl-table
-lite
>
</template>
</div>
</template>
spec/frontend/jobs/components/trigger_block_spec.js
View file @
3378baf0
import
{
GlButton
,
GlTable
}
from
'
@gitlab/ui
'
;
import
{
GlButton
,
GlTable
Lite
}
from
'
@gitlab/ui
'
;
import
{
mount
}
from
'
@vue/test-utils
'
;
import
TriggerBlock
from
'
~/jobs/components/trigger_block.vue
'
;
describe
(
'
Trigger block
'
,
()
=>
{
let
wrapper
;
const
findRevealButton
=
()
=>
wrapper
.
find
(
GlButton
);
const
findVariableTable
=
()
=>
wrapper
.
find
(
GlTabl
e
);
const
findRevealButton
=
()
=>
wrapper
.
find
Component
(
GlButton
);
const
findVariableTable
=
()
=>
wrapper
.
find
Component
(
GlTableLit
e
);
const
findShortToken
=
()
=>
wrapper
.
find
(
'
[data-testid="trigger-short-token"]
'
);
const
findVariableValue
=
(
index
)
=>
wrapper
.
findAll
(
'
[data-testid="trigger-build-value"]
'
).
at
(
index
);
...
...
@@ -22,7 +22,6 @@ describe('Trigger block', () => {
afterEach
(()
=>
{
wrapper
.
destroy
();
wrapper
=
null
;
});
describe
(
'
with short token and no variables
'
,
()
=>
{
...
...
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