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
dc21858e
Commit
dc21858e
authored
Oct 11, 2021
by
Paul Gascou-Vaillancourt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DRY up tab specs
Leverage .each to regroup all non-default specs in a single file.
parent
728cd966
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
87 deletions
+0
-87
ee/spec/frontend/on_demand_scans/components/tabs/finished_spec.js
...frontend/on_demand_scans/components/tabs/finished_spec.js
+0
-29
ee/spec/frontend/on_demand_scans/components/tabs/running_spec.js
.../frontend/on_demand_scans/components/tabs/running_spec.js
+0
-29
ee/spec/frontend/on_demand_scans/components/tabs/scheduled_spec.js
...rontend/on_demand_scans/components/tabs/scheduled_spec.js
+0
-29
No files found.
ee/spec/frontend/on_demand_scans/components/tabs/finished_spec.js
deleted
100644 → 0
View file @
728cd966
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
FinishedTab
from
'
ee/on_demand_scans/components/tabs/finished.vue
'
;
import
BaseTab
from
'
ee/on_demand_scans/components/tabs/base_tab.vue
'
;
describe
(
'
FinishedTab
'
,
()
=>
{
let
wrapper
;
// Finders
const
findBaseTab
=
()
=>
wrapper
.
findComponent
(
BaseTab
);
const
createComponent
=
(
propsData
)
=>
{
wrapper
=
shallowMount
(
FinishedTab
,
{
propsData
,
});
};
beforeEach
(()
=>
{
createComponent
({
itemCount
:
12
,
});
});
it
(
'
renders the base tab with the correct props
'
,
()
=>
{
expect
(
findBaseTab
().
props
(
'
title
'
)).
toBe
(
'
Finished
'
);
expect
(
findBaseTab
().
props
(
'
itemCount
'
)).
toBe
(
12
);
expect
(
findBaseTab
().
props
(
'
emptyStateTitle
'
)).
toBe
(
wrapper
.
vm
.
$options
.
i18n
.
emptyStateTitle
);
expect
(
findBaseTab
().
props
(
'
emptyStateText
'
)).
toBe
(
wrapper
.
vm
.
$options
.
i18n
.
emptyStateText
);
});
});
ee/spec/frontend/on_demand_scans/components/tabs/running_spec.js
deleted
100644 → 0
View file @
728cd966
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
RunningTab
from
'
ee/on_demand_scans/components/tabs/running.vue
'
;
import
BaseTab
from
'
ee/on_demand_scans/components/tabs/base_tab.vue
'
;
describe
(
'
RunningTab
'
,
()
=>
{
let
wrapper
;
// Finders
const
findBaseTab
=
()
=>
wrapper
.
findComponent
(
BaseTab
);
const
createComponent
=
(
propsData
)
=>
{
wrapper
=
shallowMount
(
RunningTab
,
{
propsData
,
});
};
beforeEach
(()
=>
{
createComponent
({
itemCount
:
12
,
});
});
it
(
'
renders the base tab with the correct props
'
,
()
=>
{
expect
(
findBaseTab
().
props
(
'
title
'
)).
toBe
(
'
Running
'
);
expect
(
findBaseTab
().
props
(
'
itemCount
'
)).
toBe
(
12
);
expect
(
findBaseTab
().
props
(
'
emptyStateTitle
'
)).
toBe
(
wrapper
.
vm
.
$options
.
i18n
.
emptyStateTitle
);
expect
(
findBaseTab
().
props
(
'
emptyStateText
'
)).
toBe
(
wrapper
.
vm
.
$options
.
i18n
.
emptyStateText
);
});
});
ee/spec/frontend/on_demand_scans/components/tabs/scheduled_spec.js
deleted
100644 → 0
View file @
728cd966
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
ScheduledTab
from
'
ee/on_demand_scans/components/tabs/scheduled.vue
'
;
import
BaseTab
from
'
ee/on_demand_scans/components/tabs/base_tab.vue
'
;
describe
(
'
ScheduledTab
'
,
()
=>
{
let
wrapper
;
// Finders
const
findBaseTab
=
()
=>
wrapper
.
findComponent
(
BaseTab
);
const
createComponent
=
(
propsData
)
=>
{
wrapper
=
shallowMount
(
ScheduledTab
,
{
propsData
,
});
};
beforeEach
(()
=>
{
createComponent
({
itemCount
:
12
,
});
});
it
(
'
renders the base tab with the correct props
'
,
()
=>
{
expect
(
findBaseTab
().
props
(
'
title
'
)).
toBe
(
'
Scheduled
'
);
expect
(
findBaseTab
().
props
(
'
itemCount
'
)).
toBe
(
12
);
expect
(
findBaseTab
().
props
(
'
emptyStateTitle
'
)).
toBe
(
wrapper
.
vm
.
$options
.
i18n
.
emptyStateTitle
);
expect
(
findBaseTab
().
props
(
'
emptyStateText
'
)).
toBe
(
wrapper
.
vm
.
$options
.
i18n
.
emptyStateText
);
});
});
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