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
f9f66ce9
Commit
f9f66ce9
authored
Aug 12, 2020
by
Justin Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix all Jest specs
Most only need updates to selectors
parent
8dbe5cf0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
8 deletions
+10
-8
spec/frontend/groups/components/item_type_icon_spec.js
spec/frontend/groups/components/item_type_icon_spec.js
+1
-1
spec/frontend/ide/components/nav_dropdown_button_spec.js
spec/frontend/ide/components/nav_dropdown_button_spec.js
+1
-1
spec/frontend/ide/components/nav_dropdown_spec.js
spec/frontend/ide/components/nav_dropdown_spec.js
+1
-1
spec/frontend/jobs/components/log/log_spec.js
spec/frontend/jobs/components/log/log_spec.js
+5
-3
spec/frontend/reports/codequality_report/grouped_codequality_reports_app_spec.js
...odequality_report/grouped_codequality_reports_app_spec.js
+2
-2
No files found.
spec/frontend/groups/components/item_type_icon_spec.js
View file @
f9f66ce9
...
...
@@ -32,7 +32,7 @@ describe('ItemTypeIconComponent', () => {
vm
=
createComponent
(
ITEM_TYPE
.
GROUP
);
expect
(
vm
.
$el
.
querySelector
(
'
svg
'
).
getAttribute
(
'
data-testid
'
)).
toBe
(
'
folder-icon
'
);
expect
(
vm
.
$el
.
querySelector
(
'
svg
'
).
getAttribute
(
'
data-testid
'
)).
toBe
(
'
folder-
o-
icon
'
);
vm
.
$destroy
();
});
...
...
spec/frontend/ide/components/nav_dropdown_button_spec.js
View file @
f9f66ce9
...
...
@@ -23,7 +23,7 @@ describe('NavDropdown', () => {
vm
.
$mount
();
};
const
findIcon
=
name
=>
vm
.
$el
.
querySelector
(
`[data-testid="
${
name
}
-icon]`
);
const
findIcon
=
name
=>
vm
.
$el
.
querySelector
(
`[data-testid="
${
name
}
-icon
"
]`
);
const
findMRIcon
=
()
=>
findIcon
(
'
merge-request
'
);
const
findBranchIcon
=
()
=>
findIcon
(
'
branch
'
);
...
...
spec/frontend/ide/components/nav_dropdown_spec.js
View file @
f9f66ce9
...
...
@@ -39,7 +39,7 @@ describe('IDE NavDropdown', () => {
});
};
const
findIcon
=
name
=>
wrapper
.
find
(
`
.ic-
${
name
}
`
);
const
findIcon
=
name
=>
wrapper
.
find
(
`
[data-testid="
${
name
}
-icon"]
`
);
const
findMRIcon
=
()
=>
findIcon
(
'
merge-request
'
);
const
findNavForm
=
()
=>
wrapper
.
find
(
'
.ide-nav-form
'
);
const
showDropdown
=
()
=>
{
...
...
spec/frontend/jobs/components/log/log_spec.js
View file @
f9f66ce9
...
...
@@ -42,6 +42,8 @@ describe('Job Log', () => {
wrapper
.
destroy
();
});
const
findCollapsibleLine
=
()
=>
wrapper
.
find
(
'
.collapsible-line
'
);
describe
(
'
line numbers
'
,
()
=>
{
it
(
'
renders a line number for each open line
'
,
()
=>
{
expect
(
wrapper
.
find
(
'
#L1
'
).
text
()).
toBe
(
'
1
'
);
...
...
@@ -56,18 +58,18 @@ describe('Job Log', () => {
describe
(
'
collapsible sections
'
,
()
=>
{
it
(
'
renders a clickable header section
'
,
()
=>
{
expect
(
wrapper
.
find
(
'
.collapsible-line
'
).
attributes
(
'
role
'
)).
toBe
(
'
button
'
);
expect
(
findCollapsibleLine
(
).
attributes
(
'
role
'
)).
toBe
(
'
button
'
);
});
it
(
'
renders an icon with the open state
'
,
()
=>
{
expect
(
wrapper
.
find
(
'
.collapsible-line svg
'
).
classes
()).
toContain
(
'
ic-angle-down
'
);
expect
(
findCollapsibleLine
().
contains
(
'
[data-testid="angle-down-icon"]
'
)).
toBe
(
true
);
});
describe
(
'
on click header section
'
,
()
=>
{
it
(
'
calls toggleCollapsibleLine
'
,
()
=>
{
jest
.
spyOn
(
wrapper
.
vm
,
'
toggleCollapsibleLine
'
);
wrapper
.
find
(
'
.collapsible-line
'
).
trigger
(
'
click
'
);
findCollapsibleLine
(
).
trigger
(
'
click
'
);
expect
(
wrapper
.
vm
.
toggleCollapsibleLine
).
toHaveBeenCalled
();
});
...
...
spec/frontend/reports/codequality_report/grouped_codequality_reports_app_spec.js
View file @
f9f66ce9
...
...
@@ -126,7 +126,7 @@ describe('Grouped code quality reports app', () => {
});
it
(
'
renders a help icon with more information
'
,
()
=>
{
expect
(
findWidget
().
html
()).
toContain
(
'
ic-question
'
);
expect
(
findWidget
().
contains
(
'
[data-testid="question-icon"]
'
)).
toBe
(
true
);
});
});
...
...
@@ -140,7 +140,7 @@ describe('Grouped code quality reports app', () => {
});
it
(
'
does not render a help icon
'
,
()
=>
{
expect
(
findWidget
().
html
()).
not
.
toContain
(
'
ic-question
'
);
expect
(
findWidget
().
contains
(
'
[data-testid="question-icon"]
'
)).
toBe
(
false
);
});
});
});
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