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
8dbe5cf0
Commit
8dbe5cf0
authored
Aug 10, 2020
by
Lukas Eipert
Committed by
Justin Ho
Aug 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests relating to GLIcon
Fix all tests relating to GlIcon
parent
4c6ff73c
Changes
35
Show whitespace changes
Inline
Side-by-side
Showing
35 changed files
with
93 additions
and
87 deletions
+93
-87
ee/spec/features/projects/audit_events_spec.rb
ee/spec/features/projects/audit_events_spec.rb
+1
-1
ee/spec/frontend/billings/components/subscription_table_row_spec.js
...ontend/billings/components/subscription_table_row_spec.js
+3
-1
ee/spec/frontend/environments/environments_app_spec.js
ee/spec/frontend/environments/environments_app_spec.js
+3
-1
ee/spec/frontend/environments/environments_folder_view_spec.js
...ec/frontend/environments/environments_folder_view_spec.js
+1
-1
ee/spec/frontend/environments_dashboard/components/__snapshots__/environment_header_spec.js.snap
.../components/__snapshots__/environment_header_spec.js.snap
+3
-3
ee/spec/frontend/geo_nodes/components/geo_node_header_spec.js
...pec/frontend/geo_nodes/components/geo_node_header_spec.js
+1
-1
ee/spec/frontend/geo_nodes/components/node_detail_sections/section_reveal_button_spec.js
...onents/node_detail_sections/section_reveal_button_spec.js
+1
-1
ee/spec/frontend/geo_replicable/components/geo_replicable_status_spec.js
...d/geo_replicable/components/geo_replicable_status_spec.js
+2
-2
ee/spec/frontend/group_member_contributions/components/table_header_spec.js
...roup_member_contributions/components/table_header_spec.js
+1
-3
ee/spec/frontend/security_dashboard/components/__snapshots__/unscanned_projects_spec.js.snap
.../components/__snapshots__/unscanned_projects_spec.js.snap
+3
-3
ee/spec/frontend/security_dashboard/components/__snapshots__/vulnerability_severity_spec.js.snap
...ponents/__snapshots__/vulnerability_severity_spec.js.snap
+15
-15
ee/spec/frontend/security_dashboard/components/security_dashboard_table_row_spec.js
...dashboard/components/security_dashboard_table_row_spec.js
+4
-4
ee/spec/frontend/vue_shared/components/notes/system_note_spec.js
.../frontend/vue_shared/components/notes/system_note_spec.js
+3
-1
ee/spec/frontend/vue_shared/license_compliance/components/admin_license_management_row_spec.js
...ompliance/components/admin_license_management_row_spec.js
+1
-1
spec/features/merge_request/user_posts_notes_spec.rb
spec/features/merge_request/user_posts_notes_spec.rb
+1
-1
spec/features/projects/deploy_keys_spec.rb
spec/features/projects/deploy_keys_spec.rb
+1
-1
spec/features/projects/environments/environments_spec.rb
spec/features/projects/environments/environments_spec.rb
+2
-2
spec/features/projects/settings/repository_settings_spec.rb
spec/features/projects/settings/repository_settings_spec.rb
+4
-4
spec/frontend/collapsed_sidebar_todo_spec.js
spec/frontend/collapsed_sidebar_todo_spec.js
+6
-6
spec/frontend/deploy_keys/components/key_spec.js
spec/frontend/deploy_keys/components/key_spec.js
+5
-5
spec/frontend/environments/environments_app_spec.js
spec/frontend/environments/environments_app_spec.js
+3
-3
spec/frontend/groups/components/item_actions_spec.js
spec/frontend/groups/components/item_actions_spec.js
+4
-4
spec/frontend/groups/components/item_caret_spec.js
spec/frontend/groups/components/item_caret_spec.js
+2
-2
spec/frontend/groups/components/item_stats_value_spec.js
spec/frontend/groups/components/item_stats_value_spec.js
+1
-1
spec/frontend/groups/components/item_type_icon_spec.js
spec/frontend/groups/components/item_type_icon_spec.js
+4
-4
spec/frontend/ide/components/file_row_extra_spec.js
spec/frontend/ide/components/file_row_extra_spec.js
+2
-2
spec/frontend/ide/components/jobs/detail/description_spec.js
spec/frontend/ide/components/jobs/detail/description_spec.js
+3
-1
spec/frontend/ide/components/jobs/item_spec.js
spec/frontend/ide/components/jobs/item_spec.js
+1
-1
spec/frontend/ide/components/merge_requests/item_spec.js
spec/frontend/ide/components/merge_requests/item_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/new_dropdown/button_spec.js
spec/frontend/ide/components/new_dropdown/button_spec.js
+1
-1
spec/frontend/jobs/components/log/collapsible_section_spec.js
.../frontend/jobs/components/log/collapsible_section_spec.js
+2
-2
spec/frontend/matchers.js
spec/frontend/matchers.js
+3
-3
spec/frontend/vue_shared/components/issue/related_issuable_item_spec.js
...vue_shared/components/issue/related_issuable_item_spec.js
+2
-2
spec/support/shared_examples/features/error_tracking_shared_example.rb
...shared_examples/features/error_tracking_shared_example.rb
+2
-2
No files found.
ee/spec/features/projects/audit_events_spec.rb
View file @
8dbe5cf0
...
@@ -91,7 +91,7 @@ RSpec.describe 'Projects > Audit Events', :js do
...
@@ -91,7 +91,7 @@ RSpec.describe 'Projects > Audit Events', :js do
visit
project_deploy_keys_path
(
project
)
visit
project_deploy_keys_path
(
project
)
accept_confirm
do
accept_confirm
do
find
(
'
.ic-remove
'
).
click
find
(
'
[data-testid="remove-icon"]
'
).
click
end
end
visit
project_audit_events_path
(
project
)
visit
project_audit_events_path
(
project
)
...
...
ee/spec/frontend/billings/components/subscription_table_row_spec.js
View file @
8dbe5cf0
...
@@ -54,7 +54,9 @@ describe('Subscription Table Row', () => {
...
@@ -54,7 +54,9 @@ describe('Subscription Table Row', () => {
});
});
it
(
'
should render an icon in the header cell
'
,
()
=>
{
it
(
'
should render an icon in the header cell
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
`.header-cell .ic-
${
header
.
icon
}
`
)).
not
.
toBe
(
null
);
expect
(
vm
.
$el
.
querySelector
(
`.header-cell [data-testid="
${
header
.
icon
}
-icon"]`
)).
not
.
toBe
(
null
,
);
});
});
columns
.
forEach
((
col
,
idx
)
=>
{
columns
.
forEach
((
col
,
idx
)
=>
{
...
...
ee/spec/frontend/environments/environments_app_spec.js
View file @
8dbe5cf0
...
@@ -83,7 +83,9 @@ describe('Environment', () => {
...
@@ -83,7 +83,9 @@ describe('Environment', () => {
});
});
it
(
'
should render arrow to open deploy boards
'
,
()
=>
{
it
(
'
should render arrow to open deploy boards
'
,
()
=>
{
expect
(
wrapper
.
find
(
'
.deploy-board-icon .ic-chevron-down
'
).
exists
()).
toBe
(
true
);
expect
(
wrapper
.
find
(
'
.deploy-board-icon [data-testid="chevron-down-icon"]
'
).
exists
()).
toBe
(
true
,
);
});
});
});
});
...
...
ee/spec/frontend/environments/environments_folder_view_spec.js
View file @
8dbe5cf0
...
@@ -54,7 +54,7 @@ describe('Environments Folder View', () => {
...
@@ -54,7 +54,7 @@ describe('Environments Folder View', () => {
describe
(
'
deploy boards
'
,
()
=>
{
describe
(
'
deploy boards
'
,
()
=>
{
it
(
'
should render arrow to open deploy boards
'
,
()
=>
{
it
(
'
should render arrow to open deploy boards
'
,
()
=>
{
expect
(
wrapper
.
find
(
'
.folder-icon
.ic-chevron-right
'
).
exists
()).
toBe
(
true
);
expect
(
wrapper
.
find
(
'
.folder-icon
[data-testid="chevron-right-icon"]
'
).
exists
()).
toBe
(
true
);
});
});
});
});
});
});
...
...
ee/spec/frontend/environments_dashboard/components/__snapshots__/environment_header_spec.js.snap
View file @
8dbe5cf0
...
@@ -94,11 +94,11 @@ exports[`Environment Header renders name and link to app matches the snapshot 1`
...
@@ -94,11 +94,11 @@ exports[`Environment Header renders name and link to app matches the snapshot 1`
View app
View app
<svg
<svg
aria-hidden="true
"
class="fgray gl-icon s16
"
class="fgray s16 ic-external-link
"
data-testid="external-link-icon
"
>
>
<use
<use
xlink:
href="#external-link"
href="#external-link"
/>
/>
</svg>
</svg>
</a>
</a>
...
...
ee/spec/frontend/geo_nodes/components/geo_node_header_spec.js
View file @
8dbe5cf0
...
@@ -65,7 +65,7 @@ describe('GeoNodeHeader', () => {
...
@@ -65,7 +65,7 @@ describe('GeoNodeHeader', () => {
});
});
it
(
`should
${
showWarning
?
'
render
'
:
'
not render
'
}
the status icon`
,
()
=>
{
it
(
`should
${
showWarning
?
'
render
'
:
'
not render
'
}
the status icon`
,
()
=>
{
expect
(
Boolean
(
vm
.
$el
.
querySelector
(
'
.ic-warning
'
))).
toBe
(
showWarning
);
expect
(
Boolean
(
vm
.
$el
.
querySelector
(
'
[data-testid="warning-icon"]
'
))).
toBe
(
showWarning
);
});
});
});
});
});
});
...
...
ee/spec/frontend/geo_nodes/components/node_detail_sections/section_reveal_button_spec.js
View file @
8dbe5cf0
...
@@ -63,7 +63,7 @@ describe('SectionRevealButton', () => {
...
@@ -63,7 +63,7 @@ describe('SectionRevealButton', () => {
describe
(
'
template
'
,
()
=>
{
describe
(
'
template
'
,
()
=>
{
it
(
'
renders button element
'
,
()
=>
{
it
(
'
renders button element
'
,
()
=>
{
expect
(
vm
.
$el
.
classList
.
contains
(
'
btn-link
'
)).
toBe
(
true
);
expect
(
vm
.
$el
.
classList
.
contains
(
'
btn-link
'
)).
toBe
(
true
);
expect
(
vm
.
$el
.
querySelector
(
'
svg
use
'
).
getAttribute
(
'
xlink:href
'
)).
toContain
(
'
#angle-dow
n
'
);
expect
(
vm
.
$el
.
querySelector
(
'
svg
'
).
getAttribute
(
'
data-testid
'
)).
toBe
(
'
angle-down-ico
n
'
);
expect
(
vm
.
$el
.
querySelector
(
'
span
'
).
innerText
.
trim
()).
toBe
(
'
Foo button
'
);
expect
(
vm
.
$el
.
querySelector
(
'
span
'
).
innerText
.
trim
()).
toBe
(
'
Foo button
'
);
});
});
});
});
...
...
ee/spec/frontend/geo_replicable/components/geo_replicable_status_spec.js
View file @
8dbe5cf0
...
@@ -71,8 +71,8 @@ describe('GeoReplicableStatus', () => {
...
@@ -71,8 +71,8 @@ describe('GeoReplicableStatus', () => {
expect
(
wrapper
.
vm
.
icon
.
cssClass
).
toEqual
(
iconClass
);
expect
(
wrapper
.
vm
.
icon
.
cssClass
).
toEqual
(
iconClass
);
});
});
it
(
`sets svg to ic
-
${
iconName
}
`
,
()
=>
{
it
(
`sets svg to ic
on '
${
iconName
}
'
`
,
()
=>
{
expect
(
findIcon
().
classes
()).
toContain
(
`ic-
${
wrapper
.
vm
.
icon
.
name
}
`
);
expect
(
findIcon
().
attributes
(
'
data-testid
'
)).
toBe
(
`
${
wrapper
.
vm
.
icon
.
name
}
-icon
`
);
});
});
});
});
});
});
...
...
ee/spec/frontend/group_member_contributions/components/table_header_spec.js
View file @
8dbe5cf0
...
@@ -87,9 +87,7 @@ describe('TableHeaderComponent', () => {
...
@@ -87,9 +87,7 @@ describe('TableHeaderComponent', () => {
expect
(
headerItemEl
).
not
.
toBeNull
();
expect
(
headerItemEl
).
not
.
toBeNull
();
expect
(
headerItemEl
.
innerText
.
trim
()).
toBe
(
'
Name
'
);
expect
(
headerItemEl
.
innerText
.
trim
()).
toBe
(
'
Name
'
);
expect
(
headerItemEl
.
querySelector
(
'
svg use
'
).
getAttribute
(
'
xlink:href
'
)).
toContain
(
expect
(
headerItemEl
.
querySelector
(
'
svg
'
).
getAttribute
(
'
data-testid
'
)).
toBe
(
'
angle-up-icon
'
);
'
angle-up
'
,
);
});
});
});
});
});
});
ee/spec/frontend/security_dashboard/components/__snapshots__/unscanned_projects_spec.js.snap
View file @
8dbe5cf0
...
@@ -41,11 +41,11 @@ exports[`UnscannedProjects component header matches the snapshot when the "helpP
...
@@ -41,11 +41,11 @@ exports[`UnscannedProjects component header matches the snapshot when the "helpP
title="Project scanning help page"
title="Project scanning help page"
>
>
<svg
<svg
aria-hidden="true
"
class="align-top gl-icon s12
"
class="align-top s12 ic-questi
on"
data-testid="question-ic
on"
>
>
<use
<use
xlink:
href="#question"
href="#question"
/>
/>
</svg>
</svg>
</a>
</a>
...
...
ee/spec/frontend/security_dashboard/components/__snapshots__/vulnerability_severity_spec.js.snap
View file @
8dbe5cf0
...
@@ -49,11 +49,11 @@ exports[`Vulnerability Severity component when the data has loaded matches snaps
...
@@ -49,11 +49,11 @@ exports[`Vulnerability Severity component when the data has loaded matches snaps
class="d-flex align-items-center p-2"
class="d-flex align-items-center p-2"
>
>
<svg
<svg
aria-hidden="true
"
class="mr-2 gl-text-gray-900 gl-icon s16
"
class="mr-2 gl-text-gray-900 s16 ic-angle-right
"
data-testid="angle-right-icon
"
>
>
<use
<use
xlink:
href="#angle-right"
href="#angle-right"
/>
/>
</svg>
</svg>
...
@@ -126,11 +126,11 @@ exports[`Vulnerability Severity component when the data has loaded matches snaps
...
@@ -126,11 +126,11 @@ exports[`Vulnerability Severity component when the data has loaded matches snaps
class="d-flex align-items-center p-2"
class="d-flex align-items-center p-2"
>
>
<svg
<svg
aria-hidden="true
"
class="mr-2 gl-text-gray-900 gl-icon s16
"
class="mr-2 gl-text-gray-900 s16 ic-angle-right
"
data-testid="angle-right-icon
"
>
>
<use
<use
xlink:
href="#angle-right"
href="#angle-right"
/>
/>
</svg>
</svg>
...
@@ -203,11 +203,11 @@ exports[`Vulnerability Severity component when the data has loaded matches snaps
...
@@ -203,11 +203,11 @@ exports[`Vulnerability Severity component when the data has loaded matches snaps
class="d-flex align-items-center p-2"
class="d-flex align-items-center p-2"
>
>
<svg
<svg
aria-hidden="true
"
class="mr-2 gl-text-gray-900 gl-icon s16
"
class="mr-2 gl-text-gray-900 s16 ic-angle-right
"
data-testid="angle-right-icon
"
>
>
<use
<use
xlink:
href="#angle-right"
href="#angle-right"
/>
/>
</svg>
</svg>
...
@@ -280,11 +280,11 @@ exports[`Vulnerability Severity component when the data has loaded matches snaps
...
@@ -280,11 +280,11 @@ exports[`Vulnerability Severity component when the data has loaded matches snaps
class="d-flex align-items-center p-2"
class="d-flex align-items-center p-2"
>
>
<svg
<svg
aria-hidden="true
"
class="mr-2 gl-text-gray-900 gl-icon s16
"
class="mr-2 gl-text-gray-900 s16 ic-angle-right
"
data-testid="angle-right-icon
"
>
>
<use
<use
xlink:
href="#angle-right"
href="#angle-right"
/>
/>
</svg>
</svg>
...
@@ -357,11 +357,11 @@ exports[`Vulnerability Severity component when the data has loaded matches snaps
...
@@ -357,11 +357,11 @@ exports[`Vulnerability Severity component when the data has loaded matches snaps
class="d-flex align-items-center p-2"
class="d-flex align-items-center p-2"
>
>
<svg
<svg
aria-hidden="true
"
class="mr-2 gl-text-gray-900 gl-icon s16
"
class="mr-2 gl-text-gray-900 s16 ic-angle-right
"
data-testid="angle-right-icon
"
>
>
<use
<use
xlink:
href="#angle-right"
href="#angle-right"
/>
/>
</svg>
</svg>
...
...
ee/spec/frontend/security_dashboard/components/security_dashboard_table_row_spec.js
View file @
8dbe5cf0
...
@@ -36,7 +36,7 @@ describe('Security Dashboard Table Row', () => {
...
@@ -36,7 +36,7 @@ describe('Security Dashboard Table Row', () => {
const
findLoader
=
()
=>
wrapper
.
find
(
'
.js-skeleton-loader
'
);
const
findLoader
=
()
=>
wrapper
.
find
(
'
.js-skeleton-loader
'
);
const
findContent
=
i
=>
wrapper
.
findAll
(
'
.table-mobile-content
'
).
at
(
i
);
const
findContent
=
i
=>
wrapper
.
findAll
(
'
.table-mobile-content
'
).
at
(
i
);
const
findAllIssueCreated
=
()
=>
wrapper
.
findAll
(
'
.ic-issue-created
'
);
const
findAllIssueCreated
=
()
=>
wrapper
.
findAll
(
'
[data-testid="issue-created-icon"]
'
);
const
hasSelectedClass
=
()
=>
wrapper
.
classes
(
'
gl-bg-blue-50
'
);
const
hasSelectedClass
=
()
=>
wrapper
.
classes
(
'
gl-bg-blue-50
'
);
const
findCheckbox
=
()
=>
wrapper
.
find
(
GlFormCheckbox
);
const
findCheckbox
=
()
=>
wrapper
.
find
(
GlFormCheckbox
);
...
@@ -173,7 +173,7 @@ describe('Security Dashboard Table Row', () => {
...
@@ -173,7 +173,7 @@ describe('Security Dashboard Table Row', () => {
createComponent
(
mount
,
{
props
:
{
vulnerability
}
});
createComponent
(
mount
,
{
props
:
{
vulnerability
}
});
});
});
it
(
'
should have a `i
c-issue-created` class
'
,
()
=>
{
it
(
'
should have a `i
ssue-created` icon
'
,
()
=>
{
expect
(
findAllIssueCreated
()).
toHaveLength
(
1
);
expect
(
findAllIssueCreated
()).
toHaveLength
(
1
);
});
});
});
});
...
@@ -185,7 +185,7 @@ describe('Security Dashboard Table Row', () => {
...
@@ -185,7 +185,7 @@ describe('Security Dashboard Table Row', () => {
createComponent
(
mount
,
{
props
:
{
vulnerability
}
});
createComponent
(
mount
,
{
props
:
{
vulnerability
}
});
});
});
it
(
'
should not have a `i
c-issue-created` class
'
,
()
=>
{
it
(
'
should not have a `i
ssue-created` icon
'
,
()
=>
{
expect
(
findAllIssueCreated
()).
toHaveLength
(
0
);
expect
(
findAllIssueCreated
()).
toHaveLength
(
0
);
});
});
});
});
...
@@ -197,7 +197,7 @@ describe('Security Dashboard Table Row', () => {
...
@@ -197,7 +197,7 @@ describe('Security Dashboard Table Row', () => {
createComponent
(
shallowMount
,
{
props
:
{
vulnerability
}
});
createComponent
(
shallowMount
,
{
props
:
{
vulnerability
}
});
});
});
it
(
'
should not have a `i
c-issue-created` class
'
,
()
=>
{
it
(
'
should not have a `i
ssue-created` icon
'
,
()
=>
{
expect
(
findAllIssueCreated
()).
toHaveLength
(
0
);
expect
(
findAllIssueCreated
()).
toHaveLength
(
0
);
});
});
...
...
ee/spec/frontend/vue_shared/components/notes/system_note_spec.js
View file @
8dbe5cf0
...
@@ -90,7 +90,9 @@ describe('system note component', () => {
...
@@ -90,7 +90,9 @@ describe('system note component', () => {
expect
(
findDescriptionVersion
().
html
()).
toContain
(
diffData
);
expect
(
findDescriptionVersion
().
html
()).
toContain
(
diffData
);
expect
(
expect
(
wrapper
wrapper
.
find
(
'
.description-version button.delete-description-history svg.ic-remove
'
)
.
find
(
'
.description-version button.delete-description-history svg[data-testid="remove-icon"]
'
,
)
.
exists
(),
.
exists
(),
).
toBe
(
true
);
).
toBe
(
true
);
done
();
done
();
...
...
ee/spec/frontend/vue_shared/license_compliance/components/admin_license_management_row_spec.js
View file @
8dbe5cf0
...
@@ -167,7 +167,7 @@ describe('AdminLicenseManagementRow', () => {
...
@@ -167,7 +167,7 @@ describe('AdminLicenseManagementRow', () => {
const
buttonEl
=
findRemoveButton
();
const
buttonEl
=
findRemoveButton
();
expect
(
buttonEl
).
not
.
toBeNull
();
expect
(
buttonEl
).
not
.
toBeNull
();
expect
(
buttonEl
.
querySelector
(
'
.ic-remove
'
)).
not
.
toBeNull
();
expect
(
buttonEl
.
querySelector
(
'
[data-testid="remove-icon"]
'
)).
not
.
toBeNull
();
});
});
it
(
'
renders computed property dropdownText into dropdown toggle
'
,
()
=>
{
it
(
'
renders computed property dropdownText into dropdown toggle
'
,
()
=>
{
...
...
spec/features/merge_request/user_posts_notes_spec.rb
View file @
8dbe5cf0
...
@@ -82,7 +82,7 @@ RSpec.describe 'Merge request > User posts notes', :js do
...
@@ -82,7 +82,7 @@ RSpec.describe 'Merge request > User posts notes', :js do
it
'shows a reply button'
do
it
'shows a reply button'
do
reply_button
=
find
(
'.js-reply-button'
,
match: :first
)
reply_button
=
find
(
'.js-reply-button'
,
match: :first
)
expect
(
reply_button
).
to
have_selector
(
'
.ic-comment
'
)
expect
(
reply_button
).
to
have_selector
(
'
[data-testid="comment-icon"]
'
)
end
end
it
'shows reply placeholder when clicking reply button'
do
it
'shows reply placeholder when clicking reply button'
do
...
...
spec/features/projects/deploy_keys_spec.rb
View file @
8dbe5cf0
...
@@ -22,7 +22,7 @@ RSpec.describe 'Project deploy keys', :js do
...
@@ -22,7 +22,7 @@ RSpec.describe 'Project deploy keys', :js do
page
.
within
(
find
(
'.qa-deploy-keys-settings'
))
do
page
.
within
(
find
(
'.qa-deploy-keys-settings'
))
do
expect
(
page
).
to
have_selector
(
'.deploy-key'
,
count:
1
)
expect
(
page
).
to
have_selector
(
'.deploy-key'
,
count:
1
)
accept_confirm
{
find
(
'
.ic-remove
'
).
click
}
accept_confirm
{
find
(
'
[data-testid="remove-icon"]
'
).
click
}
wait_for_requests
wait_for_requests
...
...
spec/features/projects/environments/environments_spec.rb
View file @
8dbe5cf0
...
@@ -106,7 +106,7 @@ RSpec.describe 'Environments page', :js do
...
@@ -106,7 +106,7 @@ RSpec.describe 'Environments page', :js do
expect
(
page
).
to
have_css
(
'.environments-container'
)
expect
(
page
).
to
have_css
(
'.environments-container'
)
expect
(
page
.
all
(
'.environment-name'
).
length
).
to
eq
(
1
)
expect
(
page
.
all
(
'.environment-name'
).
length
).
to
eq
(
1
)
expect
(
page
.
all
(
'
.ic-stop
'
).
length
).
to
eq
(
0
)
expect
(
page
.
all
(
'
[data-testid="stop-icon"]
'
).
length
).
to
eq
(
0
)
end
end
end
end
end
end
...
@@ -301,7 +301,7 @@ RSpec.describe 'Environments page', :js do
...
@@ -301,7 +301,7 @@ RSpec.describe 'Environments page', :js do
end
end
it
'has a dropdown for actionable jobs'
do
it
'has a dropdown for actionable jobs'
do
expect
(
page
).
to
have_selector
(
'.dropdown-new.btn.btn-default
.ic-play
'
)
expect
(
page
).
to
have_selector
(
'.dropdown-new.btn.btn-default
[data-testid="play-icon"]
'
)
end
end
it
"has link to the delayed job's action"
do
it
"has link to the delayed job's action"
do
...
...
spec/features/projects/settings/repository_settings_spec.rb
View file @
8dbe5cf0
...
@@ -70,7 +70,7 @@ RSpec.describe 'Projects > Settings > Repository settings' do
...
@@ -70,7 +70,7 @@ RSpec.describe 'Projects > Settings > Repository settings' do
project
.
deploy_keys
<<
private_deploy_key
project
.
deploy_keys
<<
private_deploy_key
visit
project_settings_repository_path
(
project
)
visit
project_settings_repository_path
(
project
)
find
(
'.deploy-key'
,
text:
private_deploy_key
.
title
).
find
(
'
.ic-pencil
'
).
click
find
(
'.deploy-key'
,
text:
private_deploy_key
.
title
).
find
(
'
[data-testid="pencil-icon"]
'
).
click
fill_in
'deploy_key_title'
,
with:
'updated_deploy_key'
fill_in
'deploy_key_title'
,
with:
'updated_deploy_key'
check
'deploy_key_deploy_keys_projects_attributes_0_can_push'
check
'deploy_key_deploy_keys_projects_attributes_0_can_push'
...
@@ -84,7 +84,7 @@ RSpec.describe 'Projects > Settings > Repository settings' do
...
@@ -84,7 +84,7 @@ RSpec.describe 'Projects > Settings > Repository settings' do
project
.
deploy_keys
<<
public_deploy_key
project
.
deploy_keys
<<
public_deploy_key
visit
project_settings_repository_path
(
project
)
visit
project_settings_repository_path
(
project
)
find
(
'.deploy-key'
,
text:
public_deploy_key
.
title
).
find
(
'
.ic-pencil
'
).
click
find
(
'.deploy-key'
,
text:
public_deploy_key
.
title
).
find
(
'
[data-testid="pencil-icon"]
'
).
click
check
'deploy_key_deploy_keys_projects_attributes_0_can_push'
check
'deploy_key_deploy_keys_projects_attributes_0_can_push'
click_button
'Save changes'
click_button
'Save changes'
...
@@ -102,7 +102,7 @@ RSpec.describe 'Projects > Settings > Repository settings' do
...
@@ -102,7 +102,7 @@ RSpec.describe 'Projects > Settings > Repository settings' do
find
(
'.js-deployKeys-tab-available_project_keys'
).
click
find
(
'.js-deployKeys-tab-available_project_keys'
).
click
find
(
'.deploy-key'
,
text:
private_deploy_key
.
title
).
find
(
'
.ic-pencil
'
).
click
find
(
'.deploy-key'
,
text:
private_deploy_key
.
title
).
find
(
'
[data-testid="pencil-icon"]
'
).
click
fill_in
'deploy_key_title'
,
with:
'updated_deploy_key'
fill_in
'deploy_key_title'
,
with:
'updated_deploy_key'
click_button
'Save changes'
click_button
'Save changes'
...
@@ -116,7 +116,7 @@ RSpec.describe 'Projects > Settings > Repository settings' do
...
@@ -116,7 +116,7 @@ RSpec.describe 'Projects > Settings > Repository settings' do
project
.
deploy_keys
<<
private_deploy_key
project
.
deploy_keys
<<
private_deploy_key
visit
project_settings_repository_path
(
project
)
visit
project_settings_repository_path
(
project
)
accept_confirm
{
find
(
'.deploy-key'
,
text:
private_deploy_key
.
title
).
find
(
'
.ic-remove
'
).
click
}
accept_confirm
{
find
(
'.deploy-key'
,
text:
private_deploy_key
.
title
).
find
(
'
[data-testid="remove-icon"]
'
).
click
}
expect
(
page
).
not_to
have_content
(
private_deploy_key
.
title
)
expect
(
page
).
not_to
have_content
(
private_deploy_key
.
title
)
end
end
...
...
spec/frontend/collapsed_sidebar_todo_spec.js
View file @
8dbe5cf0
...
@@ -47,9 +47,9 @@ describe('Issuable right sidebar collapsed todo toggle', () => {
...
@@ -47,9 +47,9 @@ describe('Issuable right sidebar collapsed todo toggle', () => {
expect
(
expect
(
document
document
.
querySelector
(
'
.js-issuable-todo.sidebar-collapsed-icon svg
use
'
)
.
querySelector
(
'
.js-issuable-todo.sidebar-collapsed-icon svg
'
)
.
getAttribute
(
'
xlink:href
'
),
.
getAttribute
(
'
data-testid
'
),
).
to
Contain
(
'
todo-add
'
);
).
to
Be
(
'
todo-add-icon
'
);
expect
(
expect
(
document
.
querySelector
(
'
.js-issuable-todo.sidebar-collapsed-icon .todo-undone
'
),
document
.
querySelector
(
'
.js-issuable-todo.sidebar-collapsed-icon .todo-undone
'
),
...
@@ -72,9 +72,9 @@ describe('Issuable right sidebar collapsed todo toggle', () => {
...
@@ -72,9 +72,9 @@ describe('Issuable right sidebar collapsed todo toggle', () => {
expect
(
expect
(
document
document
.
querySelector
(
'
.js-issuable-todo.sidebar-collapsed-icon svg.todo-undone
use
'
)
.
querySelector
(
'
.js-issuable-todo.sidebar-collapsed-icon svg.todo-undone
'
)
.
getAttribute
(
'
xlink:href
'
),
.
getAttribute
(
'
data-testid
'
),
).
to
Contain
(
'
todo-done
'
);
).
to
Be
(
'
todo-done-icon
'
);
done
();
done
();
});
});
...
...
spec/frontend/deploy_keys/components/key_spec.js
View file @
8dbe5cf0
...
@@ -55,20 +55,20 @@ describe('Deploy keys key', () => {
...
@@ -55,20 +55,20 @@ describe('Deploy keys key', () => {
it
(
'
shows pencil button for editing
'
,
()
=>
{
it
(
'
shows pencil button for editing
'
,
()
=>
{
createComponent
({
deployKey
});
createComponent
({
deployKey
});
expect
(
wrapper
.
find
(
'
.btn
.ic-pencil
'
)).
toExist
();
expect
(
wrapper
.
find
(
'
.btn
[data-testid="pencil-icon"]
'
)).
toExist
();
});
});
it
(
'
shows disable button when the project is not deletable
'
,
()
=>
{
it
(
'
shows disable button when the project is not deletable
'
,
()
=>
{
createComponent
({
deployKey
});
createComponent
({
deployKey
});
expect
(
wrapper
.
find
(
'
.btn
.ic-cancel
'
)).
toExist
();
expect
(
wrapper
.
find
(
'
.btn
[data-testid="cancel-icon"]
'
)).
toExist
();
});
});
it
(
'
shows remove button when the project is deletable
'
,
()
=>
{
it
(
'
shows remove button when the project is deletable
'
,
()
=>
{
createComponent
({
createComponent
({
deployKey
:
{
...
deployKey
,
destroyed_when_orphaned
:
true
,
almost_orphaned
:
true
},
deployKey
:
{
...
deployKey
,
destroyed_when_orphaned
:
true
,
almost_orphaned
:
true
},
});
});
expect
(
wrapper
.
find
(
'
.btn
.ic-remove
'
)).
toExist
();
expect
(
wrapper
.
find
(
'
.btn
[data-testid="remove-icon"]
'
)).
toExist
();
});
});
});
});
...
@@ -147,7 +147,7 @@ describe('Deploy keys key', () => {
...
@@ -147,7 +147,7 @@ describe('Deploy keys key', () => {
it
(
'
shows pencil button for editing
'
,
()
=>
{
it
(
'
shows pencil button for editing
'
,
()
=>
{
createComponent
({
deployKey
});
createComponent
({
deployKey
});
expect
(
wrapper
.
find
(
'
.btn
.ic-pencil
'
)).
toExist
();
expect
(
wrapper
.
find
(
'
.btn
[data-testid="pencil-icon"]
'
)).
toExist
();
});
});
it
(
'
shows disable button when key is enabled
'
,
()
=>
{
it
(
'
shows disable button when key is enabled
'
,
()
=>
{
...
@@ -155,7 +155,7 @@ describe('Deploy keys key', () => {
...
@@ -155,7 +155,7 @@ describe('Deploy keys key', () => {
createComponent
({
deployKey
});
createComponent
({
deployKey
});
expect
(
wrapper
.
find
(
'
.btn
.ic-cancel
'
)).
toExist
();
expect
(
wrapper
.
find
(
'
.btn
[data-testid="cancel-icon"]
'
)).
toExist
();
});
});
});
});
});
});
spec/frontend/environments/environments_app_spec.js
View file @
8dbe5cf0
...
@@ -144,16 +144,16 @@ describe('Environment', () => {
...
@@ -144,16 +144,16 @@ describe('Environment', () => {
});
});
it
(
'
should open a closed folder
'
,
()
=>
{
it
(
'
should open a closed folder
'
,
()
=>
{
expect
(
wrapper
.
find
(
'
.folder-icon
.ic-chevron-right
'
).
exists
()).
toBe
(
false
);
expect
(
wrapper
.
find
(
'
.folder-icon
[data-testid="chevron-right-icon"]
'
).
exists
()).
toBe
(
false
);
});
});
it
(
'
should close an opened folder
'
,
()
=>
{
it
(
'
should close an opened folder
'
,
()
=>
{
expect
(
wrapper
.
find
(
'
.folder-icon
.ic-chevron-down
'
).
exists
()).
toBe
(
true
);
expect
(
wrapper
.
find
(
'
.folder-icon
[data-testid="chevron-down-icon"]
'
).
exists
()).
toBe
(
true
);
// close folder
// close folder
wrapper
.
find
(
'
.folder-name
'
).
trigger
(
'
click
'
);
wrapper
.
find
(
'
.folder-name
'
).
trigger
(
'
click
'
);
wrapper
.
vm
.
$nextTick
(()
=>
{
wrapper
.
vm
.
$nextTick
(()
=>
{
expect
(
wrapper
.
find
(
'
.folder-icon
.ic-chevron-down
'
).
exists
()).
toBe
(
false
);
expect
(
wrapper
.
find
(
'
.folder-icon
[data-testid="chevron-down-icon"]
'
).
exists
()).
toBe
(
false
);
});
});
});
});
...
...
spec/frontend/groups/components/item_actions_spec.js
View file @
8dbe5cf0
...
@@ -57,8 +57,8 @@ describe('ItemActionsComponent', () => {
...
@@ -57,8 +57,8 @@ describe('ItemActionsComponent', () => {
expect
(
editBtn
.
getAttribute
(
'
href
'
)).
toBe
(
group
.
editPath
);
expect
(
editBtn
.
getAttribute
(
'
href
'
)).
toBe
(
group
.
editPath
);
expect
(
editBtn
.
getAttribute
(
'
aria-label
'
)).
toBe
(
'
Edit group
'
);
expect
(
editBtn
.
getAttribute
(
'
aria-label
'
)).
toBe
(
'
Edit group
'
);
expect
(
editBtn
.
dataset
.
originalTitle
).
toBe
(
'
Edit group
'
);
expect
(
editBtn
.
dataset
.
originalTitle
).
toBe
(
'
Edit group
'
);
expect
(
editBtn
.
querySelectorAll
(
'
svg
use
'
).
length
).
not
.
toBe
(
0
);
expect
(
editBtn
.
querySelectorAll
(
'
svg
'
).
length
).
not
.
toBe
(
0
);
expect
(
editBtn
.
querySelector
(
'
svg
use
'
).
getAttribute
(
'
xlink:href
'
)).
toContain
(
'
#settings
'
);
expect
(
editBtn
.
querySelector
(
'
svg
'
).
getAttribute
(
'
data-testid
'
)).
toBe
(
'
settings-icon
'
);
newVm
.
$destroy
();
newVm
.
$destroy
();
});
});
...
@@ -75,8 +75,8 @@ describe('ItemActionsComponent', () => {
...
@@ -75,8 +75,8 @@ describe('ItemActionsComponent', () => {
expect
(
leaveBtn
.
getAttribute
(
'
href
'
)).
toBe
(
group
.
leavePath
);
expect
(
leaveBtn
.
getAttribute
(
'
href
'
)).
toBe
(
group
.
leavePath
);
expect
(
leaveBtn
.
getAttribute
(
'
aria-label
'
)).
toBe
(
'
Leave this group
'
);
expect
(
leaveBtn
.
getAttribute
(
'
aria-label
'
)).
toBe
(
'
Leave this group
'
);
expect
(
leaveBtn
.
dataset
.
originalTitle
).
toBe
(
'
Leave this group
'
);
expect
(
leaveBtn
.
dataset
.
originalTitle
).
toBe
(
'
Leave this group
'
);
expect
(
leaveBtn
.
querySelectorAll
(
'
svg
use
'
).
length
).
not
.
toBe
(
0
);
expect
(
leaveBtn
.
querySelectorAll
(
'
svg
'
).
length
).
not
.
toBe
(
0
);
expect
(
leaveBtn
.
querySelector
(
'
svg
use
'
).
getAttribute
(
'
xlink:href
'
)).
toContain
(
'
#leave
'
);
expect
(
leaveBtn
.
querySelector
(
'
svg
'
).
getAttribute
(
'
data-testid
'
)).
toBe
(
'
leave-icon
'
);
newVm
.
$destroy
();
newVm
.
$destroy
();
});
});
...
...
spec/frontend/groups/components/item_caret_spec.js
View file @
8dbe5cf0
...
@@ -27,12 +27,12 @@ describe('ItemCaretComponent', () => {
...
@@ -27,12 +27,12 @@ describe('ItemCaretComponent', () => {
it
(
'
should render caret down icon if `isGroupOpen` prop is `true`
'
,
()
=>
{
it
(
'
should render caret down icon if `isGroupOpen` prop is `true`
'
,
()
=>
{
vm
=
createComponent
(
true
);
vm
=
createComponent
(
true
);
expect
(
vm
.
$el
.
querySelector
(
'
svg
use
'
).
getAttribute
(
'
xlink:href
'
)).
toContain
(
'
angle-dow
n
'
);
expect
(
vm
.
$el
.
querySelector
(
'
svg
'
).
getAttribute
(
'
data-testid
'
)).
toBe
(
'
angle-down-ico
n
'
);
});
});
it
(
'
should render caret right icon if `isGroupOpen` prop is `false`
'
,
()
=>
{
it
(
'
should render caret right icon if `isGroupOpen` prop is `false`
'
,
()
=>
{
vm
=
createComponent
();
vm
=
createComponent
();
expect
(
vm
.
$el
.
querySelector
(
'
svg
use
'
).
getAttribute
(
'
xlink:href
'
)).
toContain
(
'
angle-right
'
);
expect
(
vm
.
$el
.
querySelector
(
'
svg
'
).
getAttribute
(
'
data-testid
'
)).
toBe
(
'
angle-right-icon
'
);
});
});
});
});
});
});
spec/frontend/groups/components/item_stats_value_spec.js
View file @
8dbe5cf0
...
@@ -72,7 +72,7 @@ describe('ItemStatsValueComponent', () => {
...
@@ -72,7 +72,7 @@ describe('ItemStatsValueComponent', () => {
});
});
it
(
'
renders element icon correctly
'
,
()
=>
{
it
(
'
renders element icon correctly
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
svg
use
'
).
getAttribute
(
'
xlink:href
'
)).
toContain
(
'
folder
'
);
expect
(
vm
.
$el
.
querySelector
(
'
svg
'
).
getAttribute
(
'
data-testid
'
)).
toBe
(
'
folder-icon
'
);
});
});
it
(
'
renders value count correctly
'
,
()
=>
{
it
(
'
renders value count correctly
'
,
()
=>
{
...
...
spec/frontend/groups/components/item_type_icon_spec.js
View file @
8dbe5cf0
...
@@ -27,12 +27,12 @@ describe('ItemTypeIconComponent', () => {
...
@@ -27,12 +27,12 @@ describe('ItemTypeIconComponent', () => {
vm
=
createComponent
(
ITEM_TYPE
.
GROUP
,
true
);
vm
=
createComponent
(
ITEM_TYPE
.
GROUP
,
true
);
expect
(
vm
.
$el
.
querySelector
(
'
use
'
).
getAttribute
(
'
xlink:href
'
)).
toContain
(
'
folder-ope
n
'
);
expect
(
vm
.
$el
.
querySelector
(
'
svg
'
).
getAttribute
(
'
data-testid
'
)).
toBe
(
'
folder-open-ico
n
'
);
vm
.
$destroy
();
vm
.
$destroy
();
vm
=
createComponent
(
ITEM_TYPE
.
GROUP
);
vm
=
createComponent
(
ITEM_TYPE
.
GROUP
);
expect
(
vm
.
$el
.
querySelector
(
'
use
'
).
getAttribute
(
'
xlink:href
'
)).
toContain
(
'
folder
'
);
expect
(
vm
.
$el
.
querySelector
(
'
svg
'
).
getAttribute
(
'
data-testid
'
)).
toBe
(
'
folder-icon
'
);
vm
.
$destroy
();
vm
.
$destroy
();
});
});
...
@@ -41,12 +41,12 @@ describe('ItemTypeIconComponent', () => {
...
@@ -41,12 +41,12 @@ describe('ItemTypeIconComponent', () => {
vm
=
createComponent
(
ITEM_TYPE
.
PROJECT
);
vm
=
createComponent
(
ITEM_TYPE
.
PROJECT
);
expect
(
vm
.
$el
.
querySelector
(
'
use
'
).
getAttribute
(
'
xlink:href
'
)).
toContain
(
'
bookmark
'
);
expect
(
vm
.
$el
.
querySelector
(
'
svg
'
).
getAttribute
(
'
data-testid
'
)).
toBe
(
'
bookmark-icon
'
);
vm
.
$destroy
();
vm
.
$destroy
();
vm
=
createComponent
(
ITEM_TYPE
.
GROUP
);
vm
=
createComponent
(
ITEM_TYPE
.
GROUP
);
expect
(
vm
.
$el
.
querySelector
(
'
use
'
).
getAttribute
(
'
xlink:href
'
)).
not
.
toContain
(
'
bookmark
'
);
expect
(
vm
.
$el
.
querySelector
(
'
svg
'
).
getAttribute
(
'
data-testid
'
)).
not
.
toBe
(
'
bookmark-icon
'
);
vm
.
$destroy
();
vm
.
$destroy
();
});
});
});
});
...
...
spec/frontend/ide/components/file_row_extra_spec.js
View file @
8dbe5cf0
...
@@ -153,14 +153,14 @@ describe('IDE extra file row component', () => {
...
@@ -153,14 +153,14 @@ describe('IDE extra file row component', () => {
describe
(
'
merge request icon
'
,
()
=>
{
describe
(
'
merge request icon
'
,
()
=>
{
it
(
'
hides when not a merge request change
'
,
()
=>
{
it
(
'
hides when not a merge request change
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.ic-git-merge
'
)).
toBe
(
null
);
expect
(
vm
.
$el
.
querySelector
(
'
[data-testid="git-merge-icon"]
'
)).
toBe
(
null
);
});
});
it
(
'
shows when a merge request change
'
,
done
=>
{
it
(
'
shows when a merge request change
'
,
done
=>
{
vm
.
file
.
mrChange
=
true
;
vm
.
file
.
mrChange
=
true
;
vm
.
$nextTick
(()
=>
{
vm
.
$nextTick
(()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.ic-git-merge
'
)).
not
.
toBe
(
null
);
expect
(
vm
.
$el
.
querySelector
(
'
[data-testid="git-merge-icon"]
'
)).
not
.
toBe
(
null
);
done
();
done
();
});
});
...
...
spec/frontend/ide/components/jobs/detail/description_spec.js
View file @
8dbe5cf0
...
@@ -23,6 +23,8 @@ describe('IDE job description', () => {
...
@@ -23,6 +23,8 @@ describe('IDE job description', () => {
});
});
it
(
'
renders CI icon
'
,
()
=>
{
it
(
'
renders CI icon
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.ci-status-icon .ic-status_success_borderless
'
)).
not
.
toBe
(
null
);
expect
(
vm
.
$el
.
querySelector
(
'
.ci-status-icon [data-testid="status_success_borderless-icon"]
'
),
).
not
.
toBe
(
null
);
});
});
});
});
spec/frontend/ide/components/jobs/item_spec.js
View file @
8dbe5cf0
...
@@ -24,7 +24,7 @@ describe('IDE jobs item', () => {
...
@@ -24,7 +24,7 @@ describe('IDE jobs item', () => {
});
});
it
(
'
renders CI icon
'
,
()
=>
{
it
(
'
renders CI icon
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.ic-status_success_borderless
'
)).
not
.
toBe
(
null
);
expect
(
vm
.
$el
.
querySelector
(
'
[data-testid="status_success_borderless-icon"]
'
)).
not
.
toBe
(
null
);
});
});
it
(
'
does not render view logs button if not started
'
,
done
=>
{
it
(
'
does not render view logs button if not started
'
,
done
=>
{
...
...
spec/frontend/ide/components/merge_requests/item_spec.js
View file @
8dbe5cf0
...
@@ -33,7 +33,7 @@ describe('IDE merge request item', () => {
...
@@ -33,7 +33,7 @@ describe('IDE merge request item', () => {
store
,
store
,
});
});
};
};
const
findIcon
=
()
=>
wrapper
.
find
(
'
.ic-mobile-issue-close
'
);
const
findIcon
=
()
=>
wrapper
.
find
(
'
[data-testid="mobile-issue-close-icon"]
'
);
beforeEach
(()
=>
{
beforeEach
(()
=>
{
store
=
createStore
();
store
=
createStore
();
...
...
spec/frontend/ide/components/nav_dropdown_button_spec.js
View file @
8dbe5cf0
...
@@ -23,7 +23,7 @@ describe('NavDropdown', () => {
...
@@ -23,7 +23,7 @@ describe('NavDropdown', () => {
vm
.
$mount
();
vm
.
$mount
();
};
};
const
findIcon
=
name
=>
vm
.
$el
.
querySelector
(
`
.ic-
${
name
}
`
);
const
findIcon
=
name
=>
vm
.
$el
.
querySelector
(
`
[data-testid="
${
name
}
-icon]
`
);
const
findMRIcon
=
()
=>
findIcon
(
'
merge-request
'
);
const
findMRIcon
=
()
=>
findIcon
(
'
merge-request
'
);
const
findBranchIcon
=
()
=>
findIcon
(
'
branch
'
);
const
findBranchIcon
=
()
=>
findIcon
(
'
branch
'
);
...
...
spec/frontend/ide/components/new_dropdown/button_spec.js
View file @
8dbe5cf0
...
@@ -28,7 +28,7 @@ describe('IDE new entry dropdown button component', () => {
...
@@ -28,7 +28,7 @@ describe('IDE new entry dropdown button component', () => {
});
});
it
(
'
renders icon
'
,
()
=>
{
it
(
'
renders icon
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.ic-doc-new
'
)).
not
.
toBe
(
null
);
expect
(
vm
.
$el
.
querySelector
(
'
[data-testid="doc-new-icon"]
'
)).
not
.
toBe
(
null
);
});
});
it
(
'
emits click event
'
,
()
=>
{
it
(
'
emits click event
'
,
()
=>
{
...
...
spec/frontend/jobs/components/log/collapsible_section_spec.js
View file @
8dbe5cf0
...
@@ -35,7 +35,7 @@ describe('Job Log Collapsible Section', () => {
...
@@ -35,7 +35,7 @@ describe('Job Log Collapsible Section', () => {
});
});
it
(
'
renders an icon with the closed state
'
,
()
=>
{
it
(
'
renders an icon with the closed state
'
,
()
=>
{
expect
(
findCollapsibleLineSvg
().
classes
()).
toContain
(
'
ic-angle-right
'
);
expect
(
findCollapsibleLineSvg
().
attributes
(
'
data-testid
'
)).
toBe
(
'
angle-right-icon
'
);
});
});
});
});
...
@@ -52,7 +52,7 @@ describe('Job Log Collapsible Section', () => {
...
@@ -52,7 +52,7 @@ describe('Job Log Collapsible Section', () => {
});
});
it
(
'
renders an icon with the open state
'
,
()
=>
{
it
(
'
renders an icon with the open state
'
,
()
=>
{
expect
(
findCollapsibleLineSvg
().
classes
()).
toContain
(
'
ic-angle-dow
n
'
);
expect
(
findCollapsibleLineSvg
().
attributes
(
'
data-testid
'
)).
toBe
(
'
angle-down-ico
n
'
);
});
});
it
(
'
renders collapsible lines content
'
,
()
=>
{
it
(
'
renders collapsible lines content
'
,
()
=>
{
...
...
spec/frontend/matchers.js
View file @
8dbe5cf0
...
@@ -9,8 +9,8 @@ export default {
...
@@ -9,8 +9,8 @@ export default {
}
}
const
iconReferences
=
[].
slice
.
apply
(
element
.
querySelectorAll
(
'
svg use
'
));
const
iconReferences
=
[].
slice
.
apply
(
element
.
querySelectorAll
(
'
svg use
'
));
const
matchingIcon
=
iconReferences
.
find
(
reference
=>
const
matchingIcon
=
iconReferences
.
find
(
reference
.
getAttribute
(
'
xlink:href
'
).
endsWith
(
`#
${
iconName
}
`
)
,
reference
=>
reference
.
parentNode
.
getAttribute
(
'
data-testid
'
)
===
`
${
iconName
}
-icon`
,
);
);
const
pass
=
Boolean
(
matchingIcon
);
const
pass
=
Boolean
(
matchingIcon
);
...
@@ -22,7 +22,7 @@ export default {
...
@@ -22,7 +22,7 @@ export default {
message
=
`
${
element
.
outerHTML
}
does not contain the sprite icon "
${
iconName
}
"!`
;
message
=
`
${
element
.
outerHTML
}
does not contain the sprite icon "
${
iconName
}
"!`
;
const
existingIcons
=
iconReferences
.
map
(
reference
=>
{
const
existingIcons
=
iconReferences
.
map
(
reference
=>
{
const
iconUrl
=
reference
.
getAttribute
(
'
xlink:
href
'
);
const
iconUrl
=
reference
.
getAttribute
(
'
href
'
);
return
`"
${
iconUrl
.
replace
(
/^.+#/
,
''
)}
"`
;
return
`"
${
iconUrl
.
replace
(
/^.+#/
,
''
)}
"`
;
});
});
if
(
existingIcons
.
length
>
0
)
{
if
(
existingIcons
.
length
>
0
)
{
...
...
spec/frontend/vue_shared/components/issue/related_issuable_item_spec.js
View file @
8dbe5cf0
...
@@ -121,10 +121,10 @@ describe('RelatedIssuableItem', () => {
...
@@ -121,10 +121,10 @@ describe('RelatedIssuableItem', () => {
});
});
it
(
'
renders milestone icon and name
'
,
()
=>
{
it
(
'
renders milestone icon and name
'
,
()
=>
{
const
milestoneIcon
=
tokenMetadata
().
find
(
'
.item-milestone svg
use
'
);
const
milestoneIcon
=
tokenMetadata
().
find
(
'
.item-milestone svg
'
);
const
milestoneTitle
=
tokenMetadata
().
find
(
'
.item-milestone .milestone-title
'
);
const
milestoneTitle
=
tokenMetadata
().
find
(
'
.item-milestone .milestone-title
'
);
expect
(
milestoneIcon
.
attributes
(
'
href
'
)).
toContain
(
'
clock
'
);
expect
(
milestoneIcon
.
attributes
(
'
data-testid
'
)).
toBe
(
'
clock-icon
'
);
expect
(
milestoneTitle
.
text
()).
toContain
(
'
Milestone title
'
);
expect
(
milestoneTitle
.
text
()).
toContain
(
'
Milestone title
'
);
});
});
...
...
spec/support/shared_examples/features/error_tracking_shared_example.rb
View file @
8dbe5cf0
...
@@ -36,10 +36,10 @@ end
...
@@ -36,10 +36,10 @@ end
RSpec
.
shared_examples
'expanded stack trace context'
do
|
selected_line:
nil
,
expected_line:
1
|
RSpec
.
shared_examples
'expanded stack trace context'
do
|
selected_line:
nil
,
expected_line:
1
|
it
'expands the stack trace context'
,
quarantine:
{
issue:
'https://gitlab.com/gitlab-org/gitlab/-/issues/217810'
}
do
it
'expands the stack trace context'
,
quarantine:
{
issue:
'https://gitlab.com/gitlab-org/gitlab/-/issues/217810'
}
do
within
(
'div.stacktrace'
)
do
within
(
'div.stacktrace'
)
do
find
(
"div.file-holder:nth-child(
#{
selected_line
}
) svg
.ic-chevron-right
"
).
click
if
selected_line
find
(
"div.file-holder:nth-child(
#{
selected_line
}
) svg
[data-testid='chevron-right-icon']
"
).
click
if
selected_line
expanded_line
=
find
(
"div.file-holder:nth-child(
#{
expected_line
}
)"
)
expanded_line
=
find
(
"div.file-holder:nth-child(
#{
expected_line
}
)"
)
expect
(
expanded_line
).
to
have_css
(
'svg
.ic-chevron-down
'
)
expect
(
expanded_line
).
to
have_css
(
'svg
[data-testid="chevron-down-icon"]
'
)
event_response
[
'entries'
][
0
][
'data'
][
'values'
][
0
][
'stacktrace'
][
'frames'
][
-
expected_line
][
'context'
].
each
do
|
context
|
event_response
[
'entries'
][
0
][
'data'
][
'values'
][
0
][
'stacktrace'
][
'frames'
][
-
expected_line
][
'context'
].
each
do
|
context
|
expect
(
page
).
to
have_content
(
context
[
0
])
expect
(
page
).
to
have_content
(
context
[
0
])
...
...
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