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
d5298c29
Commit
d5298c29
authored
Jan 06, 2022
by
Jonston Chan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix pipeline schedule resets to UTC on edit
Changelog: fixed
parent
a3edbc85
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/timezone_dropdown.js
...pipeline_schedules/shared/components/timezone_dropdown.js
+2
-2
spec/frontend/pages/projects/pipeline_schedules/shared/components/timezone_dropdown_spec.js
...ine_schedules/shared/components/timezone_dropdown_spec.js
+3
-3
No files found.
app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/timezone_dropdown.js
View file @
d5298c29
import
initDeprecatedJQueryDropdown
from
'
~/deprecated_jquery_dropdown
'
;
const
defaultTimezone
=
{
name
:
'
UTC
'
,
offset
:
0
};
const
defaultTimezone
=
{
identifier
:
'
Etc/UTC
'
,
name
:
'
UTC
'
,
offset
:
0
};
const
defaults
=
{
$inputEl
:
null
,
$dropdownEl
:
null
,
...
...
@@ -70,7 +70,7 @@ export default class TimezoneDropdown {
setDropdownValue
(
timezone
)
{
this
.
$dropdownToggle
.
text
(
this
.
displayFormat
(
timezone
));
this
.
$input
.
val
(
timezone
.
name
);
this
.
$input
.
val
(
timezone
.
identifier
);
}
handleDropdownChange
({
selectedObj
,
e
})
{
...
...
spec/frontend/pages/projects/pipeline_schedules/shared/components/timezone_dropdown_spec.js
View file @
d5298c29
...
...
@@ -38,14 +38,14 @@ describe('Timezone Dropdown', () => {
const
tzStr
=
'
[UTC + 5.5] Sri Jayawardenepura
'
;
const
tzValue
=
'
Asia/Colombo
'
;
expect
(
$inputEl
.
val
()).
toBe
(
'
UTC
'
);
expect
(
$inputEl
.
val
()).
toBe
(
'
Etc/
UTC
'
);
$
(
`
${
tzListSel
}
:contains('
${
tzStr
}
')`
,
$wrapper
).
trigger
(
'
click
'
);
const
val
=
$inputEl
.
val
();
expect
(
val
).
toBe
(
tzValue
);
expect
(
val
).
not
.
toBe
(
'
UTC
'
);
expect
(
val
).
not
.
toBe
(
'
Etc/
UTC
'
);
});
it
(
'
will format data array of timezones into a list of offsets
'
,
()
=>
{
...
...
@@ -67,7 +67,7 @@ describe('Timezone Dropdown', () => {
it
(
'
will default the timezone to UTC
'
,
()
=>
{
const
tz
=
$inputEl
.
val
();
expect
(
tz
).
toBe
(
'
UTC
'
);
expect
(
tz
).
toBe
(
'
Etc/
UTC
'
);
});
});
...
...
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