BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
83310369
Commit
83310369
authored
Jan 06, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some specs
CHANGELOG item
parent
2b945741
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
38 additions
and
36 deletions
+38
-36
issuable_form.js
app/assets/javascripts/issuable_form.js
+2
-2
member_expiration_date.js.es6
app/assets/javascripts/member_expiration_date.js.es6
+2
-2
calendar.scss
app/assets/stylesheets/framework/calendar.scss
+1
-1
remove-jquery-ui-datepicker.yml
changelogs/unreleased/remove-jquery-ui-datepicker.yml
+4
-0
sidebar_spec.rb
spec/features/boards/sidebar_spec.rb
+1
-1
issues_spec.rb
spec/features/issues_spec.rb
+9
-9
personal_access_tokens_spec.rb
spec/features/profiles/personal_access_tokens_spec.rb
+1
-1
master_adds_member_with_expiration_date_spec.rb
...s/members/master_adds_member_with_expiration_date_spec.rb
+18
-20
No files found.
app/assets/javascripts/issuable_form.js
View file @
83310369
...
...
@@ -15,7 +15,7 @@
IssuableForm
.
prototype
.
wipRegex
=
/^
\s
*
(\[
WIP
\]\s
*|WIP:
\s
*|WIP
\s
+
)
+
\s
*/i
;
function
IssuableForm
(
form
)
{
var
$issuableDueDate
;
var
$issuableDueDate
,
calendar
;
this
.
form
=
form
;
this
.
toggleWip
=
bind
(
this
.
toggleWip
,
this
);
this
.
renderWipExplanation
=
bind
(
this
.
renderWipExplanation
,
this
);
...
...
@@ -37,7 +37,7 @@
this
.
initMoveDropdown
();
$issuableDueDate
=
$
(
'#issuable-due-date'
);
if
(
$issuableDueDate
.
length
)
{
var
calendar
=
new
Pikaday
({
calendar
=
new
Pikaday
({
field
:
$issuableDueDate
.
get
(
0
),
theme
:
'gitlab-theme'
,
format
:
'yyyy-mm-dd'
,
...
...
app/assets/javascripts/member_expiration_date.js.es6
View file @
83310369
...
...
@@ -21,12 +21,12 @@
theme: 'gitlab-theme',
format: 'yyyy-mm-dd',
minDate: new Date(),
onSelect
: (dateText) =>
{
onSelect
(dateText)
{
$input.val(dateFormat(new Date(dateText), 'yyyy-mm-dd'));
$input.trigger('change');
toggleClearInput.call(
this
);
toggleClearInput.call(
$input
);
},
});
...
...
app/assets/stylesheets/framework/calendar.scss
View file @
83310369
...
...
@@ -46,7 +46,7 @@
.pika-single.gitlab-theme
{
.pika-label
{
color
:
$gl-
gra
y
;
color
:
$gl-
text-color-secondar
y
;
font-size
:
14px
;
font-weight
:
normal
;
}
...
...
changelogs/unreleased/remove-jquery-ui-datepicker.yml
0 → 100644
View file @
83310369
---
title
:
Replaced jQuery UI datepicker
merge_request
:
author
:
spec/features/boards/sidebar_spec.rb
View file @
83310369
...
...
@@ -241,7 +241,7 @@ describe 'Issue Boards', feature: true, js: true do
page
.
within
(
'.due_date'
)
do
click_link
'Edit'
click_
link
Date
.
today
.
day
click_
button
Date
.
today
.
day
wait_for_vue_resource
...
...
spec/features/issues_spec.rb
View file @
83310369
...
...
@@ -78,8 +78,8 @@ describe 'Issues', feature: true do
fill_in
'issue_description'
,
with:
'bug description'
find
(
'#issuable-due-date'
).
click
page
.
within
'.
ui-datepicker
'
do
click_
link
date
.
day
page
.
within
'.
pika-single
'
do
click_
button
date
.
day
end
expect
(
find
(
'#issuable-due-date'
).
value
).
to
eq
date
.
to_s
...
...
@@ -110,8 +110,8 @@ describe 'Issues', feature: true do
fill_in
'issue_description'
,
with:
'bug description'
find
(
'#issuable-due-date'
).
click
page
.
within
'.
ui-datepicker
'
do
click_
link
date
.
day
page
.
within
'.
pika-single
'
do
click_
button
date
.
day
end
expect
(
find
(
'#issuable-due-date'
).
value
).
to
eq
date
.
to_s
...
...
@@ -624,8 +624,8 @@ describe 'Issues', feature: true do
page
.
within
'.due_date'
do
click_link
'Edit'
page
.
within
'.
ui-datepicker-calendar
'
do
click_
link
date
.
day
page
.
within
'.
pika-single
'
do
click_
button
date
.
day
end
wait_for_ajax
...
...
@@ -636,10 +636,10 @@ describe 'Issues', feature: true do
it
'removes due date from issue'
do
page
.
within
'.due_date'
do
click_link
'Edit'
date
=
Date
.
today
.
at_beginning_of_month
+
2
.
days
page
.
within
'.
ui-datepicker-calendar
'
do
first
(
'.ui-state-default'
).
click
page
.
within
'.
pika-single
'
do
click_button
date
.
day
end
wait_for_ajax
...
...
spec/features/profiles/personal_access_tokens_spec.rb
View file @
83310369
...
...
@@ -34,7 +34,7 @@ describe 'Profile > Personal Access Tokens', feature: true, js: true do
# Set date to 1st of next month
find_field
(
"Expires at"
).
trigger
(
'focus'
)
find
(
"
a[title='Next']
"
).
click
find
(
"
.pika-next
"
).
click
click_on
"1"
# Scopes
...
...
spec/features/projects/members/master_adds_member_with_expiration_date_spec.rb
View file @
83310369
...
...
@@ -14,32 +14,30 @@ feature 'Projects > Members > Master adds member with expiration date', feature:
login_as
(
master
)
end
scenario
'expiration date is displayed in the members list'
,
js:
true
do
travel_to
Time
.
zone
.
parse
(
'2016-08-06 08:00'
)
do
visit
namespace_project_settings_members_path
(
project
.
namespace
,
project
)
page
.
within
'.users-project-form'
do
select2
(
new_member
.
id
,
from:
'#user_ids'
,
multiple:
true
)
fill_in
'expires_at'
,
with:
'2016-08-10'
end
find
(
'.users-project-form'
).
click
scenario
'expiration date is displayed in the members list'
do
date
=
5
.
days
.
from_now
visit
namespace_project_project_members_path
(
project
.
namespace
,
project
)
page
.
within
'.users-project-form'
do
select2
(
new_member
.
id
,
from:
'#user_ids'
,
multiple:
true
)
fill_in
'expires_at'
,
with:
date
.
to_s
(
:medium
)
click_on
'Add to project'
end
page
.
within
"#project_member_
#{
new_member
.
project_members
.
first
.
id
}
"
do
expect
(
page
).
to
have_content
(
'Expires in 4 days'
)
end
page
.
within
"#project_member_
#{
new_member
.
project_members
.
first
.
id
}
"
do
expect
(
page
).
to
have_content
(
'Expires in 4 days'
)
end
end
scenario
'change expiration date'
do
travel_to
Time
.
zone
.
parse
(
'2016-08-06 08:00'
)
do
project
.
team
.
add_users
([
new_member
.
id
],
:developer
,
expires_at:
'2016-09-06'
)
visit
namespace_project_project_members_path
(
project
.
namespace
,
project
)
page
.
within
"#project_member_
#{
new_member
.
project_members
.
first
.
id
}
"
do
find
(
'.js-access-expiration-date'
).
set
'2016-08-09'
wait_for_ajax
expect
(
page
).
to
have_content
(
'Expires in 3 days'
)
end
date
=
4
.
days
.
from_now
project
.
team
.
add_users
([
new_member
.
id
],
:developer
,
expires_at:
Date
.
today
.
to_s
(
:medium
))
visit
namespace_project_project_members_path
(
project
.
namespace
,
project
)
page
.
within
"#project_member_
#{
new_member
.
project_members
.
first
.
id
}
"
do
find
(
'.js-access-expiration-date'
).
set
date
.
to_s
(
:medium
)
wait_for_ajax
expect
(
page
).
to
have_content
(
'Expires in 3 days'
)
end
end
end
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