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
4471f328
Commit
4471f328
authored
Jul 13, 2021
by
Olena Horal-Koretska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update oncall schedule component markup
parent
14f4b2e5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
44 deletions
+39
-44
ee/app/assets/javascripts/oncall_schedules/components/oncall_schedule.vue
...vascripts/oncall_schedules/components/oncall_schedule.vue
+15
-18
ee/spec/frontend/oncall_schedule/oncall_schedule_spec.js
ee/spec/frontend/oncall_schedule/oncall_schedule_spec.js
+24
-26
No files found.
ee/app/assets/javascripts/oncall_schedules/components/oncall_schedule.vue
View file @
4471f328
...
...
@@ -175,8 +175,8 @@ export default {
},
scheduleVisibleAriaLabel
()
{
return
this
.
scheduleVisible
?
this
.
$options
.
i18n
.
schedule
Open
:
this
.
$options
.
i18n
.
schedule
Close
;
?
this
.
$options
.
i18n
.
schedule
Close
:
this
.
$options
.
i18n
.
schedule
Open
;
},
scheduleVisibleAngleIcon
()
{
return
this
.
scheduleVisible
?
'
angle-down
'
:
'
angle-right
'
;
...
...
@@ -240,22 +240,19 @@ export default {
:header-class="{ 'gl-py-3': true, 'gl-rounded-small': !scheduleVisible }"
>
<template
#header
>
<div
class=
"gl-display-flex gl-justify-content-space-between gl-align-items-center gl-m-0"
data-testid=
"scheduleHeader"
>
<div
class=
"gl-font-weight-bold gl-font-lg"
>
<gl-icon
v-gl-tooltip
class=
"gl-hover-cursor-pointer"
:aria-label=
"scheduleVisibleAriaLabel"
:size=
"12"
:name=
"scheduleVisibleAngleIcon"
@
click=
"scheduleVisible = !scheduleVisible"
/>
<span
class=
"gl-pl-2"
>
{{
schedule
.
name
}}
</span>
</div>
<gl-button-group>
<div
class=
"gl-display-flex gl-align-items-center"
data-testid=
"scheduleHeader"
>
<gl-button
v-gl-tooltip
class=
"gl-mr-2 gl-p-0!"
:title=
"scheduleVisibleAriaLabel"
:aria-label=
"scheduleVisibleAriaLabel"
category=
"tertiary"
@
click=
"scheduleVisible = !scheduleVisible"
>
<gl-icon
:size=
"12"
:name=
"scheduleVisibleAngleIcon"
/>
</gl-button>
<h3
class=
"gl-font-weight-bold gl-font-lg gl-m-0"
>
{{
schedule
.
name
}}
</h3>
<gl-button-group
class=
"gl-ml-auto"
>
<gl-button
v-gl-modal=
"editScheduleModalId"
v-gl-tooltip
...
...
ee/spec/frontend/oncall_schedule/oncall_schedule_spec.js
View file @
4471f328
import
{
GlButton
,
GlCard
,
GlIcon
,
GlCollapse
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
nextTick
}
from
'
vue
'
;
import
VueApollo
from
'
vue-apollo
'
;
import
OnCallSchedule
,
{
i18n
}
from
'
ee/oncall_schedules/components/oncall_schedule.vue
'
;
...
...
@@ -10,7 +10,7 @@ import { PRESET_TYPES } from 'ee/oncall_schedules/constants';
import
getShiftsForRotationsQuery
from
'
ee/oncall_schedules/graphql/queries/get_oncall_schedules_with_rotations_shifts.query.graphql
'
;
import
*
as
commonUtils
from
'
ee/oncall_schedules/utils/common_utils
'
;
import
createMockApollo
from
'
helpers/mock_apollo_helper
'
;
import
{
extendedWrapper
}
from
'
helpers/vue_test_utils_helper
'
;
import
{
shallowMountExtended
}
from
'
helpers/vue_test_utils_helper
'
;
import
waitForPromises
from
'
helpers/wait_for_promises
'
;
import
*
as
dateTimeUtility
from
'
~/lib/utils/datetime/date_calculation_utility
'
;
import
{
getOncallSchedulesQueryResponse
}
from
'
./mocks/apollo_mock
'
;
...
...
@@ -55,30 +55,28 @@ describe('On-call schedule', () => {
[
getShiftsForRotationsQuery
,
getShiftsForRotationsQueryHandler
],
]);
wrapper
=
extendedWrapper
(
shallowMount
(
OnCallSchedule
,
{
localVue
,
apolloProvider
:
fakeApollo
,
propsData
:
{
schedule
,
scheduleIndex
,
...
props
,
},
data
()
{
return
{
rotations
:
schedule
.
rotations
.
nodes
,
};
},
provide
:
{
timezones
:
mockTimezones
,
projectPath
,
...
provide
,
},
stubs
:
{
GlCard
,
},
}),
);
wrapper
=
shallowMountExtended
(
OnCallSchedule
,
{
localVue
,
apolloProvider
:
fakeApollo
,
propsData
:
{
schedule
,
scheduleIndex
,
...
props
,
},
data
()
{
return
{
rotations
:
schedule
.
rotations
.
nodes
,
};
},
provide
:
{
timezones
:
mockTimezones
,
projectPath
,
...
provide
,
},
stubs
:
{
GlCard
,
},
});
};
beforeEach
(()
=>
{
...
...
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