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
5c6aaee2
Commit
5c6aaee2
authored
Oct 16, 2017
by
Simon Knox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
local queryselector for specs
parent
fe0e0b73
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
20 deletions
+20
-20
spec/javascripts/boards/components/assignee_select_spec.js
spec/javascripts/boards/components/assignee_select_spec.js
+2
-2
spec/javascripts/boards/components/labels_select_spec.js
spec/javascripts/boards/components/labels_select_spec.js
+6
-6
spec/javascripts/boards/components/weight_select_spec.js
spec/javascripts/boards/components/weight_select_spec.js
+9
-9
spec/javascripts/boards/milestone_select_spec.js
spec/javascripts/boards/milestone_select_spec.js
+3
-3
No files found.
spec/javascripts/boards/components/assignee_select_spec.js
View file @
5c6aaee2
...
...
@@ -61,7 +61,7 @@ describe('Assignee select component', () => {
it
(
'
hides Edit button
'
,
(
done
)
=>
{
vm
.
canEdit
=
false
;
Vue
.
nextTick
(()
=>
{
expect
(
document
.
querySelector
(
'
.edit-link
'
)).
toBeFalsy
();
expect
(
vm
.
$el
.
querySelector
(
'
.edit-link
'
)).
toBeFalsy
();
done
();
});
});
...
...
@@ -69,7 +69,7 @@ describe('Assignee select component', () => {
it
(
'
shows Edit button if true
'
,
(
done
)
=>
{
vm
.
canEdit
=
true
;
Vue
.
nextTick
(()
=>
{
expect
(
document
.
querySelector
(
'
.edit-link
'
)).
toBeTruthy
();
expect
(
vm
.
$el
.
querySelector
(
'
.edit-link
'
)).
toBeTruthy
();
done
();
});
});
...
...
spec/javascripts/boards/components/labels_select_spec.js
View file @
5c6aaee2
...
...
@@ -67,7 +67,7 @@ describe('LabelsSelect', () => {
it
(
'
hides Edit button
'
,
(
done
)
=>
{
vm
.
canEdit
=
false
;
Vue
.
nextTick
(()
=>
{
expect
(
document
.
querySelector
(
'
.edit-link
'
)).
toBeFalsy
();
expect
(
vm
.
$el
.
querySelector
(
'
.edit-link
'
)).
toBeFalsy
();
done
();
});
});
...
...
@@ -75,7 +75,7 @@ describe('LabelsSelect', () => {
it
(
'
shows Edit button if true
'
,
(
done
)
=>
{
vm
.
canEdit
=
true
;
Vue
.
nextTick
(()
=>
{
expect
(
document
.
querySelector
(
'
.edit-link
'
)).
toBeTruthy
();
expect
(
vm
.
$el
.
querySelector
(
'
.edit-link
'
)).
toBeTruthy
();
done
();
});
});
...
...
@@ -107,10 +107,10 @@ describe('LabelsSelect', () => {
describe
(
'
clicking dropdown items
'
,
()
=>
{
it
(
'
sets No labels
'
,
(
done
)
=>
{
vm
.
board
.
labels
=
[
label
];
document
.
querySelector
(
'
.edit-link
'
).
click
();
vm
.
$el
.
querySelector
(
'
.edit-link
'
).
click
();
setTimeout
(()
=>
{
document
.
querySelectorAll
(
'
li a
'
)[
0
].
click
();
vm
.
$el
.
querySelectorAll
(
'
li a
'
)[
0
].
click
();
});
setTimeout
(()
=>
{
...
...
@@ -121,10 +121,10 @@ describe('LabelsSelect', () => {
});
it
(
'
sets value
'
,
(
done
)
=>
{
document
.
querySelector
(
'
.edit-link
'
).
click
();
vm
.
$el
.
querySelector
(
'
.edit-link
'
).
click
();
setTimeout
(()
=>
{
document
.
querySelectorAll
(
'
li a
'
)[
1
].
click
();
vm
.
$el
.
querySelectorAll
(
'
li a
'
)[
1
].
click
();
});
setTimeout
(()
=>
{
...
...
spec/javascripts/boards/components/weight_select_spec.js
View file @
5c6aaee2
...
...
@@ -72,7 +72,7 @@ describe('WeightSelect', () => {
describe
(
'
active item in dropdown
'
,
()
=>
{
it
(
'
defaults to Any Weight
'
,
(
done
)
=>
{
document
.
querySelector
(
'
.edit-link
'
).
click
();
vm
.
$el
.
querySelector
(
'
.edit-link
'
).
click
();
setTimeout
(()
=>
{
expect
(
activeDropdownItem
()).
toEqual
(
'
Any Weight
'
);
...
...
@@ -82,7 +82,7 @@ describe('WeightSelect', () => {
it
(
'
shows No Weight
'
,
(
done
)
=>
{
vm
.
value
=
0
;
document
.
querySelector
(
'
.edit-link
'
).
click
();
vm
.
$el
.
querySelector
(
'
.edit-link
'
).
click
();
setTimeout
(()
=>
{
expect
(
activeDropdownItem
()).
toEqual
(
'
No Weight
'
);
...
...
@@ -92,7 +92,7 @@ describe('WeightSelect', () => {
it
(
'
shows correct weight
'
,
(
done
)
=>
{
vm
.
value
=
1
;
document
.
querySelector
(
'
.edit-link
'
).
click
();
vm
.
$el
.
querySelector
(
'
.edit-link
'
).
click
();
setTimeout
(()
=>
{
expect
(
activeDropdownItem
()).
toEqual
(
'
1
'
);
...
...
@@ -103,10 +103,10 @@ describe('WeightSelect', () => {
describe
(
'
changing weight
'
,
()
=>
{
it
(
'
sets value
'
,
(
done
)
=>
{
document
.
querySelector
(
'
.edit-link
'
).
click
();
vm
.
$el
.
querySelector
(
'
.edit-link
'
).
click
();
setTimeout
(()
=>
{
document
.
querySelectorAll
(
'
li a
'
)[
3
].
click
();
vm
.
$el
.
querySelectorAll
(
'
li a
'
)[
3
].
click
();
});
setTimeout
(()
=>
{
...
...
@@ -118,10 +118,10 @@ describe('WeightSelect', () => {
it
(
'
sets Any Weight
'
,
(
done
)
=>
{
vm
.
value
=
2
;
document
.
querySelector
(
'
.edit-link
'
).
click
();
vm
.
$el
.
querySelector
(
'
.edit-link
'
).
click
();
setTimeout
(()
=>
{
document
.
querySelectorAll
(
'
li a
'
)[
0
].
click
();
vm
.
$el
.
querySelectorAll
(
'
li a
'
)[
0
].
click
();
});
setTimeout
(()
=>
{
...
...
@@ -133,10 +133,10 @@ describe('WeightSelect', () => {
it
(
'
sets No Weight
'
,
(
done
)
=>
{
vm
.
value
=
2
;
document
.
querySelector
(
'
.edit-link
'
).
click
();
vm
.
$el
.
querySelector
(
'
.edit-link
'
).
click
();
setTimeout
(()
=>
{
document
.
querySelectorAll
(
'
li a
'
)[
1
].
click
();
vm
.
$el
.
querySelectorAll
(
'
li a
'
)[
1
].
click
();
});
setTimeout
(()
=>
{
...
...
spec/javascripts/boards/milestone_select_spec.js
View file @
5c6aaee2
...
...
@@ -15,7 +15,7 @@ function selectedText() {
}
function
activeDropdownItem
(
index
)
{
const
items
=
document
.
querySelectorAll
(
'
.is-active
'
);
const
items
=
vm
.
$el
.
querySelectorAll
(
'
.is-active
'
);
if
(
!
items
[
index
])
return
''
;
return
items
[
index
].
innerText
.
trim
();
}
...
...
@@ -55,7 +55,7 @@ describe('Milestone select component', () => {
it
(
'
hides Edit button
'
,
(
done
)
=>
{
vm
.
canEdit
=
false
;
Vue
.
nextTick
(()
=>
{
expect
(
document
.
querySelector
(
'
.edit-link
'
)).
toBeFalsy
();
expect
(
vm
.
$el
.
querySelector
(
'
.edit-link
'
)).
toBeFalsy
();
done
();
});
});
...
...
@@ -63,7 +63,7 @@ describe('Milestone select component', () => {
it
(
'
shows Edit button if true
'
,
(
done
)
=>
{
vm
.
canEdit
=
true
;
Vue
.
nextTick
(()
=>
{
expect
(
document
.
querySelector
(
'
.edit-link
'
)).
toBeTruthy
();
expect
(
vm
.
$el
.
querySelector
(
'
.edit-link
'
)).
toBeTruthy
();
done
();
});
});
...
...
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