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
ff9b5a37
Commit
ff9b5a37
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/geo
* migrate to proper use of findComponent/findAllComponents
parent
68755b38
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
37 additions
and
34 deletions
+37
-34
ee/spec/frontend/geo_node_form/components/app_spec.js
ee/spec/frontend/geo_node_form/components/app_spec.js
+2
-2
ee/spec/frontend/geo_node_form/components/geo_node_form_capacities_spec.js
...geo_node_form/components/geo_node_form_capacities_spec.js
+1
-1
ee/spec/frontend/geo_node_form/components/geo_node_form_namespaces_spec.js
...geo_node_form/components/geo_node_form_namespaces_spec.js
+3
-3
ee/spec/frontend/geo_node_form/components/geo_node_form_selective_sync_spec.js
...node_form/components/geo_node_form_selective_sync_spec.js
+3
-3
ee/spec/frontend/geo_node_form/components/geo_node_form_shards_spec.js
...end/geo_node_form/components/geo_node_form_shards_spec.js
+2
-2
ee/spec/frontend/geo_node_form/components/geo_node_form_spec.js
...c/frontend/geo_node_form/components/geo_node_form_spec.js
+3
-3
ee/spec/frontend/geo_nodes/components/details/secondary_node/geo_node_replication_details_responsive_spec.js
...dary_node/geo_node_replication_details_responsive_spec.js
+2
-2
ee/spec/frontend/geo_nodes/components/details/secondary_node/geo_node_replication_status_mobile_spec.js
...secondary_node/geo_node_replication_status_mobile_spec.js
+4
-2
ee/spec/frontend/geo_nodes/components/details/secondary_node/geo_node_replication_status_spec.js
...etails/secondary_node/geo_node_replication_status_spec.js
+1
-1
ee/spec/frontend/geo_nodes/components/header/geo_node_last_updated_spec.js
...geo_nodes/components/header/geo_node_last_updated_spec.js
+2
-2
ee/spec/frontend/geo_replicable/components/app_spec.js
ee/spec/frontend/geo_replicable/components/app_spec.js
+4
-4
ee/spec/frontend/geo_replicable/components/geo_replicable_item_spec.js
...end/geo_replicable/components/geo_replicable_item_spec.js
+2
-2
ee/spec/frontend/geo_replicable/components/geo_replicable_spec.js
...frontend/geo_replicable/components/geo_replicable_spec.js
+3
-2
ee/spec/frontend/geo_replicable/components/geo_replicable_status_spec.js
...d/geo_replicable/components/geo_replicable_status_spec.js
+1
-1
ee/spec/frontend/geo_replicable/components/geo_replicable_time_ago_spec.js
...geo_replicable/components/geo_replicable_time_ago_spec.js
+2
-2
ee/spec/frontend/geo_settings/components/app_spec.js
ee/spec/frontend/geo_settings/components/app_spec.js
+2
-2
No files found.
ee/spec/frontend/geo_node_form/components/app_spec.js
View file @
ff9b5a37
...
...
@@ -24,8 +24,8 @@ describe('GeoNodeFormApp', () => {
});
const
findGeoNodeFormTitle
=
()
=>
wrapper
.
find
(
'
h2
'
);
const
findGeoNodeFormBadge
=
()
=>
wrapper
.
find
(
GlBadge
);
const
findGeoForm
=
()
=>
wrapper
.
find
(
GeoNodeForm
);
const
findGeoNodeFormBadge
=
()
=>
wrapper
.
find
Component
(
GlBadge
);
const
findGeoForm
=
()
=>
wrapper
.
find
Component
(
GeoNodeForm
);
describe
(
'
render
'
,
()
=>
{
beforeEach
(()
=>
{
...
...
ee/spec/frontend/geo_node_form/components/geo_node_form_capacities_spec.js
View file @
ff9b5a37
...
...
@@ -50,7 +50,7 @@ describe('GeoNodeFormCapacities', () => {
});
const
findGeoNodeFormCapcitiesSectionDescription
=
()
=>
wrapper
.
find
(
'
p
'
);
const
findGeoNodeFormCapacitiesMoreInfoLink
=
()
=>
wrapper
.
find
(
GlLink
);
const
findGeoNodeFormCapacitiesMoreInfoLink
=
()
=>
wrapper
.
find
Component
(
GlLink
);
const
findGeoNodeFormRepositoryCapacityField
=
()
=>
wrapper
.
find
(
'
#node-repository-capacity-field
'
);
const
findGeoNodeFormFileCapacityField
=
()
=>
wrapper
.
find
(
'
#node-file-capacity-field
'
);
...
...
ee/spec/frontend/geo_node_form/components/geo_node_form_namespaces_spec.js
View file @
ff9b5a37
...
...
@@ -45,11 +45,11 @@ describe('GeoNodeFormNamespaces', () => {
wrapper
.
destroy
();
});
const
findGlDropdown
=
()
=>
wrapper
.
find
(
GlDropdown
);
const
findGlDropdownSearch
=
()
=>
findGlDropdown
().
find
(
GlSearchBoxByType
);
const
findGlDropdown
=
()
=>
wrapper
.
find
Component
(
GlDropdown
);
const
findGlDropdownSearch
=
()
=>
findGlDropdown
().
find
Component
(
GlSearchBoxByType
);
const
findDropdownItems
=
()
=>
findGlDropdown
().
findAll
(
'
button
'
);
const
findDropdownItemsText
=
()
=>
findDropdownItems
().
wrappers
.
map
((
w
)
=>
w
.
text
());
const
findGlIcons
=
()
=>
wrapper
.
findAll
(
GlIcon
);
const
findGlIcons
=
()
=>
wrapper
.
findAll
Components
(
GlIcon
);
describe
(
'
template
'
,
()
=>
{
beforeEach
(()
=>
{
...
...
ee/spec/frontend/geo_node_form/components/geo_node_form_selective_sync_spec.js
View file @
ff9b5a37
...
...
@@ -34,12 +34,12 @@ describe('GeoNodeFormSelectiveSync', () => {
});
const
findGeoNodeFormSyncContainer
=
()
=>
wrapper
.
find
({
ref
:
'
geoNodeFormSelectiveSyncContainer
'
});
wrapper
.
find
Component
({
ref
:
'
geoNodeFormSelectiveSyncContainer
'
});
const
findGeoNodeFormSelectiveSyncMoreInfoLink
=
()
=>
wrapper
.
find
(
'
[data-testid="selectiveSyncMoreInfo"]
'
);
const
findGeoNodeFormSyncTypeField
=
()
=>
wrapper
.
find
(
'
#node-selective-synchronization-field
'
);
const
findGeoNodeFormNamespacesField
=
()
=>
wrapper
.
find
(
GeoNodeFormNamespaces
);
const
findGeoNodeFormShardsField
=
()
=>
wrapper
.
find
(
GeoNodeFormShards
);
const
findGeoNodeFormNamespacesField
=
()
=>
wrapper
.
find
Component
(
GeoNodeFormNamespaces
);
const
findGeoNodeFormShardsField
=
()
=>
wrapper
.
find
Component
(
GeoNodeFormShards
);
const
findGeoNodeObjectStorageField
=
()
=>
wrapper
.
find
(
'
#node-object-storage-field
'
);
const
findGeoNodeFormObjectStorageMoreInformation
=
()
=>
wrapper
.
find
(
'
[data-testid="objectStorageMoreInfo"]
'
);
...
...
ee/spec/frontend/geo_node_form/components/geo_node_form_shards_spec.js
View file @
ff9b5a37
...
...
@@ -24,7 +24,7 @@ describe('GeoNodeFormShards', () => {
wrapper
.
destroy
();
});
const
findGlDropdown
=
()
=>
wrapper
.
find
(
GlDropdown
);
const
findGlDropdown
=
()
=>
wrapper
.
find
Component
(
GlDropdown
);
const
findDropdownItems
=
()
=>
findGlDropdown
().
findAll
(
'
li
'
);
describe
(
'
template
'
,
()
=>
{
...
...
@@ -55,7 +55,7 @@ describe('GeoNodeFormShards', () => {
const
dropdownItems
=
findDropdownItems
();
dropdownItems
.
wrappers
.
forEach
((
dI
,
index
)
=>
{
const
dropdownItemIcon
=
dI
.
find
(
GlIcon
);
const
dropdownItemIcon
=
dI
.
find
Component
(
GlIcon
);
expect
(
dropdownItemIcon
.
classes
(
'
invisible
'
)).
toBe
(
!
wrapper
.
vm
.
isSelected
(
wrapper
.
vm
.
syncShardsOptions
[
index
]),
...
...
ee/spec/frontend/geo_node_form/components/geo_node_form_spec.js
View file @
ff9b5a37
...
...
@@ -41,9 +41,9 @@ describe('GeoNodeForm', () => {
wrapper
.
destroy
();
});
const
findGeoNodeFormCoreField
=
()
=>
wrapper
.
find
(
GeoNodeFormCore
);
const
findGeoNodeFormSelectiveSyncField
=
()
=>
wrapper
.
find
(
GeoNodeFormSelectiveSync
);
const
findGeoNodeFormCapacitiesField
=
()
=>
wrapper
.
find
(
GeoNodeFormCapacities
);
const
findGeoNodeFormCoreField
=
()
=>
wrapper
.
find
Component
(
GeoNodeFormCore
);
const
findGeoNodeFormSelectiveSyncField
=
()
=>
wrapper
.
find
Component
(
GeoNodeFormSelectiveSync
);
const
findGeoNodeFormCapacitiesField
=
()
=>
wrapper
.
find
Component
(
GeoNodeFormCapacities
);
const
findGeoNodeSaveButton
=
()
=>
wrapper
.
find
(
'
#node-save-button
'
);
const
findGeoNodeCancelButton
=
()
=>
wrapper
.
find
(
'
#node-cancel-button
'
);
...
...
ee/spec/frontend/geo_nodes/components/details/secondary_node/geo_node_replication_details_responsive_spec.js
View file @
ff9b5a37
...
...
@@ -97,7 +97,7 @@ describe('GeoNodeReplicationDetailsResponsive', () => {
it
(
'
renders sync progress correctly
'
,
()
=>
{
expect
(
findFirstReplicationDetailsItemSyncStatus
().
find
(
GeoNodeProgressBar
).
exists
(),
findFirstReplicationDetailsItemSyncStatus
().
find
Component
(
GeoNodeProgressBar
).
exists
(),
).
toBe
(
renderSyncProgress
);
expect
(
extendedWrapper
(
findFirstReplicationDetailsItemSyncStatus
()).
findByText
(
'
N/A
'
).
exists
(),
...
...
@@ -106,7 +106,7 @@ describe('GeoNodeReplicationDetailsResponsive', () => {
it
(
'
renders verification progress correctly
'
,
()
=>
{
expect
(
findFirstReplicationDetailsItemVerifStatus
().
find
(
GeoNodeProgressBar
).
exists
(),
findFirstReplicationDetailsItemVerifStatus
().
find
Component
(
GeoNodeProgressBar
).
exists
(),
).
toBe
(
renderVerifProgress
);
expect
(
extendedWrapper
(
findFirstReplicationDetailsItemVerifStatus
())
...
...
ee/spec/frontend/geo_nodes/components/details/secondary_node/geo_node_replication_status_mobile_spec.js
View file @
ff9b5a37
...
...
@@ -50,14 +50,16 @@ describe('GeoNodeReplicationStatusMobile', () => {
});
it
(
'
renders sync progress correctly
'
,
()
=>
{
expect
(
findItemSyncStatus
().
find
(
GeoNodeProgressBar
).
exists
()).
toBe
(
renderSyncProgress
);
expect
(
findItemSyncStatus
().
findComponent
(
GeoNodeProgressBar
).
exists
()).
toBe
(
renderSyncProgress
,
);
expect
(
extendedWrapper
(
findItemSyncStatus
()).
findByText
(
'
N/A
'
).
exists
()).
toBe
(
!
renderSyncProgress
,
);
});
it
(
'
renders verification progress correctly
'
,
()
=>
{
expect
(
findItemVerificationStatus
().
find
(
GeoNodeProgressBar
).
exists
()).
toBe
(
expect
(
findItemVerificationStatus
().
find
Component
(
GeoNodeProgressBar
).
exists
()).
toBe
(
renderVerifProgress
,
);
expect
(
extendedWrapper
(
findItemVerificationStatus
()).
findByText
(
'
N/A
'
).
exists
()).
toBe
(
...
...
ee/spec/frontend/geo_nodes/components/details/secondary_node/geo_node_replication_status_spec.js
View file @
ff9b5a37
...
...
@@ -28,7 +28,7 @@ describe('GeoNodeReplicationStatus', () => {
});
const
findReplicationStatusText
=
()
=>
wrapper
.
findByTestId
(
'
replication-status-text
'
);
const
findQuestionIcon
=
()
=>
wrapper
.
find
({
ref
:
'
replicationStatus
'
});
const
findQuestionIcon
=
()
=>
wrapper
.
find
Component
({
ref
:
'
replicationStatus
'
});
const
findGlPopover
=
()
=>
wrapper
.
findComponent
(
GlPopover
);
const
findGlPopoverLink
=
()
=>
findGlPopover
().
findComponent
(
GlLink
);
...
...
ee/spec/frontend/geo_nodes/components/header/geo_node_last_updated_spec.js
View file @
ff9b5a37
...
...
@@ -51,7 +51,7 @@ describe('GeoNodeLastUpdated', () => {
it
(
'
renders main text correctly
'
,
()
=>
{
expect
(
findMainText
().
exists
()).
toBe
(
true
);
expect
(
findMainText
().
find
(
TimeAgo
).
props
(
'
time
'
)).
toBe
(
staleStatusTime
);
expect
(
findMainText
().
find
Component
(
TimeAgo
).
props
(
'
time
'
)).
toBe
(
staleStatusTime
);
});
it
(
'
renders the question icon correctly
'
,
()
=>
{
...
...
@@ -65,7 +65,7 @@ describe('GeoNodeLastUpdated', () => {
it
(
'
renders the popover text correctly
'
,
()
=>
{
expect
(
findPopoverText
().
exists
()).
toBe
(
true
);
expect
(
findPopoverText
().
find
(
TimeAgo
).
props
(
'
time
'
)).
toBe
(
staleStatusTime
);
expect
(
findPopoverText
().
find
Component
(
TimeAgo
).
props
(
'
time
'
)).
toBe
(
staleStatusTime
);
});
it
(
'
renders the popover link always
'
,
()
=>
{
...
...
ee/spec/frontend/geo_replicable/components/app_spec.js
View file @
ff9b5a37
...
...
@@ -44,12 +44,12 @@ describe('GeoReplicableApp', () => {
});
const
findGeoReplicableContainer
=
()
=>
wrapper
.
find
(
'
.geo-replicable-container
'
);
const
findGlLoadingIcon
=
()
=>
findGeoReplicableContainer
().
find
(
GlLoadingIcon
);
const
findGeoReplicable
=
()
=>
findGeoReplicableContainer
().
find
(
GeoReplicable
);
const
findGlLoadingIcon
=
()
=>
findGeoReplicableContainer
().
find
Component
(
GlLoadingIcon
);
const
findGeoReplicable
=
()
=>
findGeoReplicableContainer
().
find
Component
(
GeoReplicable
);
const
findGeoReplicableEmptyState
=
()
=>
findGeoReplicableContainer
().
find
(
GeoReplicableEmptyState
);
findGeoReplicableContainer
().
find
Component
(
GeoReplicableEmptyState
);
const
findGeoReplicableFilterBar
=
()
=>
findGeoReplicableContainer
().
find
(
GeoReplicableFilterBar
);
findGeoReplicableContainer
().
find
Component
(
GeoReplicableFilterBar
);
describe
.
each
`
isLoading | graphqlFieldName | replicableItems | showReplicableItems | showEmptyState | showFilterBar | showLoader
...
...
ee/spec/frontend/geo_replicable/components/geo_replicable_item_spec.js
View file @
ff9b5a37
...
...
@@ -47,8 +47,8 @@ describe('GeoReplicableItem', () => {
});
const
findCard
=
()
=>
wrapper
.
find
(
'
.card
'
);
const
findGlLink
=
()
=>
findCard
().
find
(
GlLink
);
const
findGlButton
=
()
=>
findCard
().
find
(
GlButton
);
const
findGlLink
=
()
=>
findCard
().
find
Component
(
GlLink
);
const
findGlButton
=
()
=>
findCard
().
find
Component
(
GlButton
);
const
findCardHeader
=
()
=>
findCard
().
find
(
'
.card-header
'
);
const
findTextTitle
=
()
=>
findCardHeader
().
find
(
'
span
'
);
const
findCardBody
=
()
=>
findCard
().
find
(
'
.card-body
'
);
...
...
ee/spec/frontend/geo_replicable/components/geo_replicable_spec.js
View file @
ff9b5a37
...
...
@@ -39,8 +39,9 @@ describe('GeoReplicable', () => {
});
const
findGeoReplicableContainer
=
()
=>
wrapper
.
find
(
'
section
'
);
const
findGlPagination
=
()
=>
findGeoReplicableContainer
().
find
(
GlPagination
);
const
findGeoReplicableItem
=
()
=>
findGeoReplicableContainer
().
findAll
(
GeoReplicableItem
);
const
findGlPagination
=
()
=>
findGeoReplicableContainer
().
findComponent
(
GlPagination
);
const
findGeoReplicableItem
=
()
=>
findGeoReplicableContainer
().
findAllComponents
(
GeoReplicableItem
);
describe
(
'
template
'
,
()
=>
{
beforeEach
(()
=>
{
...
...
ee/spec/frontend/geo_replicable/components/geo_replicable_status_spec.js
View file @
ff9b5a37
...
...
@@ -34,7 +34,7 @@ describe('GeoReplicableStatus', () => {
});
const
findGeoReplicableStatusContainer
=
()
=>
wrapper
.
find
(
'
div
'
);
const
findIcon
=
()
=>
findGeoReplicableStatusContainer
().
find
(
GlIcon
);
const
findIcon
=
()
=>
findGeoReplicableStatusContainer
().
find
Component
(
GlIcon
);
describe
(
'
template
'
,
()
=>
{
beforeEach
(()
=>
{
...
...
ee/spec/frontend/geo_replicable/components/geo_replicable_time_ago_spec.js
View file @
ff9b5a37
...
...
@@ -30,8 +30,8 @@ describe('GeoReplicableTimeAgo', () => {
wrapper
.
destroy
();
});
const
findGeoReplicableTimeAgo
=
()
=>
wrapper
.
find
(
GeoReplicableTimeAgo
);
const
findTimeAgo
=
()
=>
findGeoReplicableTimeAgo
().
find
(
TimeAgo
);
const
findGeoReplicableTimeAgo
=
()
=>
wrapper
.
find
Component
(
GeoReplicableTimeAgo
);
const
findTimeAgo
=
()
=>
findGeoReplicableTimeAgo
().
find
Component
(
TimeAgo
);
const
findDefaultText
=
()
=>
findGeoReplicableTimeAgo
().
find
(
'
span
'
);
describe
(
'
template
'
,
()
=>
{
...
...
ee/spec/frontend/geo_settings/components/app_spec.js
View file @
ff9b5a37
...
...
@@ -30,8 +30,8 @@ describe('GeoSettingsApp', () => {
});
const
findGeoSettingsContainer
=
()
=>
wrapper
.
find
(
'
[data-testid="geoSettingsContainer"]
'
);
const
containsGeoSettingsForm
=
()
=>
wrapper
.
find
(
GeoSettingsForm
).
exists
();
const
containsGlLoadingIcon
=
()
=>
wrapper
.
find
(
GlLoadingIcon
).
exists
();
const
containsGeoSettingsForm
=
()
=>
wrapper
.
find
Component
(
GeoSettingsForm
).
exists
();
const
containsGlLoadingIcon
=
()
=>
wrapper
.
find
Component
(
GlLoadingIcon
).
exists
();
describe
(
'
renders
'
,
()
=>
{
beforeEach
(()
=>
{
...
...
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