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
743c560d
Commit
743c560d
authored
Jan 20, 2022
by
Illya Klymov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace usage of find/findAll in ee/spec/frontend/iterations
* migrate to proper use of findComponent/findAllComponents
parent
68755b38
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
24 additions
and
24 deletions
+24
-24
ee/spec/frontend/iterations/components/iteration_breadcumb_spec.js
...rontend/iterations/components/iteration_breadcumb_spec.js
+2
-2
ee/spec/frontend/iterations/components/iteration_cadence_list_item_spec.js
...iterations/components/iteration_cadence_list_item_spec.js
+5
-5
ee/spec/frontend/iterations/components/iteration_form_spec.js
...pec/frontend/iterations/components/iteration_form_spec.js
+1
-1
ee/spec/frontend/iterations/components/iteration_form_without_vue_router_spec.js
...ions/components/iteration_form_without_vue_router_spec.js
+2
-2
ee/spec/frontend/iterations/components/iteration_report_spec.js
...c/frontend/iterations/components/iteration_report_spec.js
+3
-3
ee/spec/frontend/iterations/components/iteration_report_without_vue_router_spec.js
...ns/components/iteration_report_without_vue_router_spec.js
+3
-3
ee/spec/frontend/iterations/components/iterations_list_spec.js
...ec/frontend/iterations/components/iterations_list_spec.js
+1
-1
ee/spec/frontend/iterations/components/iterations_spec.js
ee/spec/frontend/iterations/components/iterations_spec.js
+7
-7
No files found.
ee/spec/frontend/iterations/components/iteration_breadcumb_spec.js
View file @
743c560d
...
...
@@ -26,7 +26,7 @@ describe('Iteration Breadcrumb', () => {
const
cadenceId
=
1234
;
const
iterationId
=
4567
;
const
findBreadcrumb
=
()
=>
wrapper
.
find
(
GlBreadcrumb
);
const
findBreadcrumb
=
()
=>
wrapper
.
find
Component
(
GlBreadcrumb
);
const
waitForApollo
=
async
()
=>
{
jest
.
runOnlyPendingTimers
();
...
...
@@ -101,7 +101,7 @@ describe('Iteration Breadcrumb', () => {
it
(
'
finds GlIcon
'
,
()
=>
{
mountComponent
(
shallowMount
);
expect
(
findBreadcrumb
().
find
(
GlIcon
).
exists
()).
toBe
(
true
);
expect
(
findBreadcrumb
().
find
Component
(
GlIcon
).
exists
()).
toBe
(
true
);
});
});
...
...
ee/spec/frontend/iterations/components/iteration_cadence_list_item_spec.js
View file @
743c560d
...
...
@@ -264,7 +264,7 @@ describe('Iteration cadence list item', () => {
});
it
(
'
hides dropdown and delete button
'
,
()
=>
{
expect
(
wrapper
.
find
(
GlDropdown
).
exists
()).
toBe
(
false
);
expect
(
wrapper
.
find
Component
(
GlDropdown
).
exists
()).
toBe
(
false
);
});
});
...
...
@@ -278,7 +278,7 @@ describe('Iteration cadence list item', () => {
});
it
(
'
shows delete button
'
,
()
=>
{
expect
(
wrapper
.
find
(
GlDropdown
).
exists
()).
toBe
(
true
);
expect
(
wrapper
.
find
Component
(
GlDropdown
).
exists
()).
toBe
(
true
);
});
it
(
'
opens confirmation modal to delete cadence
'
,
()
=>
{
...
...
@@ -288,7 +288,7 @@ describe('Iteration cadence list item', () => {
});
it
(
'
emits delete-cadence event with cadence ID
'
,
()
=>
{
wrapper
.
find
(
GlModal
).
vm
.
$emit
(
'
ok
'
);
wrapper
.
find
Component
(
GlModal
).
vm
.
$emit
(
'
ok
'
);
expect
(
wrapper
.
emitted
(
'
delete-cadence
'
)).
toEqual
([[
cadence
.
id
]]);
});
...
...
@@ -298,13 +298,13 @@ describe('Iteration cadence list item', () => {
it
(
'
hides dropdown when canEditCadence is false
'
,
async
()
=>
{
await
createComponent
({
canEditCadence
:
false
});
expect
(
wrapper
.
find
(
GlDropdown
).
exists
()).
toBe
(
false
);
expect
(
wrapper
.
find
Component
(
GlDropdown
).
exists
()).
toBe
(
false
);
});
it
(
'
shows dropdown when canEditCadence is true
'
,
async
()
=>
{
await
createComponent
({
canEditCadence
:
true
});
expect
(
wrapper
.
find
(
GlDropdown
).
exists
()).
toBe
(
true
);
expect
(
wrapper
.
find
Component
(
GlDropdown
).
exists
()).
toBe
(
true
);
});
it
.
each
([
...
...
ee/spec/frontend/iterations/components/iteration_form_spec.js
View file @
743c560d
...
...
@@ -77,7 +77,7 @@ describe('Iteration Form', () => {
wrapper
.
destroy
();
});
const
findPageTitle
=
()
=>
wrapper
.
find
({
ref
:
'
pageTitle
'
});
const
findPageTitle
=
()
=>
wrapper
.
find
Component
({
ref
:
'
pageTitle
'
});
const
findTitle
=
()
=>
wrapper
.
find
(
'
#iteration-title
'
);
const
findDescription
=
()
=>
wrapper
.
find
(
'
#iteration-description
'
);
const
findStartDate
=
()
=>
wrapper
.
find
(
'
#iteration-start-date
'
);
...
...
ee/spec/frontend/iterations/components/iteration_form_without_vue_router_spec.js
View file @
743c560d
...
...
@@ -52,7 +52,7 @@ describe('Iteration Form', () => {
wrapper
=
null
;
});
const
findPageTitle
=
()
=>
wrapper
.
find
({
ref
:
'
pageTitle
'
});
const
findPageTitle
=
()
=>
wrapper
.
find
Component
({
ref
:
'
pageTitle
'
});
const
findTitle
=
()
=>
wrapper
.
find
(
'
#iteration-title
'
);
const
findDescription
=
()
=>
wrapper
.
find
(
'
#iteration-description
'
);
const
findStartDate
=
()
=>
wrapper
.
find
(
'
#iteration-start-date
'
);
...
...
@@ -65,7 +65,7 @@ describe('Iteration Form', () => {
it
(
'
renders a form
'
,
()
=>
{
createComponent
();
expect
(
wrapper
.
find
(
GlForm
).
exists
()).
toBe
(
true
);
expect
(
wrapper
.
find
Component
(
GlForm
).
exists
()).
toBe
(
true
);
});
describe
(
'
New iteration
'
,
()
=>
{
...
...
ee/spec/frontend/iterations/components/iteration_report_spec.js
View file @
743c560d
...
...
@@ -35,9 +35,9 @@ describe('Iterations report', () => {
};
const
labelsFetchPath
=
'
/labels.json
'
;
const
findTopbar
=
()
=>
wrapper
.
find
({
ref
:
'
topbar
'
});
const
findTitle
=
()
=>
wrapper
.
find
({
ref
:
'
title
'
});
const
findDescription
=
()
=>
wrapper
.
find
({
ref
:
'
description
'
});
const
findTopbar
=
()
=>
wrapper
.
find
Component
({
ref
:
'
topbar
'
});
const
findTitle
=
()
=>
wrapper
.
find
Component
({
ref
:
'
title
'
});
const
findDescription
=
()
=>
wrapper
.
find
Component
({
ref
:
'
description
'
});
const
findActionsDropdown
=
()
=>
wrapper
.
find
(
'
[data-testid="actions-dropdown"]
'
);
const
findLoadingIcon
=
()
=>
wrapper
.
findComponent
(
GlLoadingIcon
);
...
...
ee/spec/frontend/iterations/components/iteration_report_without_vue_router_spec.js
View file @
743c560d
...
...
@@ -22,9 +22,9 @@ describe('Iterations report', () => {
labelsFetchPath
:
'
/gitlab-org/gitlab-test/-/labels.json?include_ancestor_groups=true
'
,
};
const
findTopbar
=
()
=>
wrapper
.
find
({
ref
:
'
topbar
'
});
const
findTitle
=
()
=>
wrapper
.
find
({
ref
:
'
title
'
});
const
findDescription
=
()
=>
wrapper
.
find
({
ref
:
'
description
'
});
const
findTopbar
=
()
=>
wrapper
.
find
Component
({
ref
:
'
topbar
'
});
const
findTitle
=
()
=>
wrapper
.
find
Component
({
ref
:
'
title
'
});
const
findDescription
=
()
=>
wrapper
.
find
Component
({
ref
:
'
description
'
});
const
findActionsDropdown
=
()
=>
wrapper
.
find
(
'
[data-testid="actions-dropdown"]
'
);
const
clickEditButton
=
()
=>
{
findActionsDropdown
().
vm
.
$emit
(
'
click
'
);
...
...
ee/spec/frontend/iterations/components/iterations_list_spec.js
View file @
743c560d
...
...
@@ -6,7 +6,7 @@ import IterationsList from 'ee/iterations/components/iterations_list.vue';
describe
(
'
Iterations list
'
,
()
=>
{
let
wrapper
;
const
findGlLink
=
()
=>
wrapper
.
find
(
GlLink
);
const
findGlLink
=
()
=>
wrapper
.
find
Component
(
GlLink
);
const
mountComponent
=
(
propsData
=
{
iterations
:
[]
})
=>
{
wrapper
=
shallowMount
(
IterationsList
,
{
...
...
ee/spec/frontend/iterations/components/iterations_spec.js
View file @
743c560d
...
...
@@ -36,8 +36,8 @@ describe('Iterations', () => {
loading
:
true
,
});
expect
(
wrapper
.
find
(
GlLoadingIcon
).
exists
()).
toBeTruthy
();
expect
(
wrapper
.
find
(
IterationsList
).
exists
()).
toBeFalsy
();
expect
(
wrapper
.
find
Component
(
GlLoadingIcon
).
exists
()).
toBeTruthy
();
expect
(
wrapper
.
find
Component
(
IterationsList
).
exists
()).
toBeFalsy
();
});
it
(
'
shows iterations list when not loading
'
,
()
=>
{
...
...
@@ -45,8 +45,8 @@ describe('Iterations', () => {
loading
:
false
,
});
expect
(
wrapper
.
find
(
GlLoadingIcon
).
exists
()).
toBeFalsy
();
expect
(
wrapper
.
find
(
IterationsList
).
exists
()).
toBeTruthy
();
expect
(
wrapper
.
find
Component
(
GlLoadingIcon
).
exists
()).
toBeFalsy
();
expect
(
wrapper
.
find
Component
(
IterationsList
).
exists
()).
toBeTruthy
();
});
it
(
'
sets computed state from tabIndex
'
,
()
=>
{
...
...
@@ -64,7 +64,7 @@ describe('Iterations', () => {
});
describe
(
'
pagination
'
,
()
=>
{
const
findPagination
=
()
=>
wrapper
.
find
(
GlPagination
);
const
findPagination
=
()
=>
wrapper
.
find
Component
(
GlPagination
);
const
setPage
=
(
page
)
=>
{
findPagination
().
vm
.
$emit
(
'
input
'
,
page
);
return
findPagination
().
vm
.
$nextTick
();
...
...
@@ -131,7 +131,7 @@ describe('Iterations', () => {
afterCursor
:
'
last-item
'
,
});
wrapper
.
find
(
GlTabs
).
vm
.
$emit
(
'
activate-tab
'
,
2
);
wrapper
.
find
Component
(
GlTabs
).
vm
.
$emit
(
'
activate-tab
'
,
2
);
await
wrapper
.
vm
.
$nextTick
();
...
...
@@ -195,7 +195,7 @@ describe('Iterations', () => {
});
it
(
'
tab shows error in alert
'
,
()
=>
{
expect
(
wrapper
.
find
(
GlAlert
).
text
()).
toContain
(
'
Oh no!
'
);
expect
(
wrapper
.
find
Component
(
GlAlert
).
text
()).
toContain
(
'
Oh no!
'
);
});
});
});
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