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
abec81f9
Commit
abec81f9
authored
Mar 03, 2021
by
Olena Horal-Koretska
Committed by
David O'Regan
Mar 03, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update value in rotation time controls
parent
e367975a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
15 deletions
+8
-15
ee/app/assets/javascripts/oncall_schedules/components/rotations/components/add_edit_rotation_form.vue
...omponents/rotations/components/add_edit_rotation_form.vue
+2
-2
ee/spec/frontend/oncall_schedule/rotations/components/add_edit_rotation_form_spec.js
...edule/rotations/components/add_edit_rotation_form_spec.js
+6
-13
No files found.
ee/app/assets/javascripts/oncall_schedules/components/rotations/components/add_edit_rotation_form.vue
View file @
abec81f9
...
...
@@ -219,7 +219,7 @@ export default {
class=
"gl-px-3"
>
<gl-dropdown-item
v-for=
"
time
in $options.HOURS_IN_DAY"
v-for=
"
(_, time)
in $options.HOURS_IN_DAY"
:key=
"time"
:is-checked=
"form.startsAt.time === time"
is-check-item
...
...
@@ -278,7 +278,7 @@ export default {
class=
"gl-px-3"
>
<gl-dropdown-item
v-for=
"
time
in $options.HOURS_IN_DAY"
v-for=
"
(_, time)
in $options.HOURS_IN_DAY"
:key=
"time"
:is-checked=
"form.endsAt.time === time"
is-check-item
...
...
ee/spec/frontend/oncall_schedule/rotations/components/add_edit_rotation_form_spec.js
View file @
abec81f9
...
...
@@ -112,11 +112,12 @@ describe('AddEditRotationForm', () => {
});
it
(
'
should emit an event with selected value on time selection
'
,
async
()
=>
{
findStartsOnTimeOptions
().
at
(
3
).
vm
.
$emit
(
'
click
'
);
const
option
=
3
;
findStartsOnTimeOptions
().
at
(
option
).
vm
.
$emit
(
'
click
'
);
await
wrapper
.
vm
.
$nextTick
();
const
emittedEvent
=
wrapper
.
emitted
(
'
update-rotation-form
'
);
expect
(
emittedEvent
).
toHaveLength
(
1
);
expect
(
emittedEvent
[
0
][
0
]).
toEqual
({
type
:
'
startsAt.time
'
,
value
:
4
});
expect
(
emittedEvent
[
0
][
0
]).
toEqual
({
type
:
'
startsAt.time
'
,
value
:
option
});
});
it
(
'
should add a checkmark to a selected start time
'
,
async
()
=>
{
...
...
@@ -133,11 +134,7 @@ describe('AddEditRotationForm', () => {
},
});
await
wrapper
.
vm
.
$nextTick
();
expect
(
findStartsOnTimeOptions
()
.
at
(
time
-
1
)
.
props
(
'
isChecked
'
),
).
toBe
(
true
);
expect
(
findStartsOnTimeOptions
().
at
(
time
).
props
(
'
isChecked
'
)).
toBe
(
true
);
});
});
...
...
@@ -160,7 +157,7 @@ describe('AddEditRotationForm', () => {
await
wrapper
.
vm
.
$nextTick
();
const
emittedEvent
=
wrapper
.
emitted
(
'
update-rotation-form
'
);
expect
(
emittedEvent
).
toHaveLength
(
1
);
expect
(
emittedEvent
[
0
][
0
]).
toEqual
({
type
:
'
endsAt.time
'
,
value
:
option
+
1
});
expect
(
emittedEvent
[
0
][
0
]).
toEqual
({
type
:
'
endsAt.time
'
,
value
:
option
});
});
it
(
'
should add a checkmark to a selected end time
'
,
async
()
=>
{
...
...
@@ -181,11 +178,7 @@ describe('AddEditRotationForm', () => {
},
});
await
wrapper
.
vm
.
$nextTick
();
expect
(
findEndsOnTimeOptions
()
.
at
(
time
-
1
)
.
props
(
'
isChecked
'
),
).
toBe
(
true
);
expect
(
findEndsOnTimeOptions
().
at
(
time
).
props
(
'
isChecked
'
)).
toBe
(
true
);
});
});
...
...
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