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
4acba7de
Commit
4acba7de
authored
Feb 24, 2021
by
Scott Hampton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update summary row tests
Update the selectors for the summary row tests.
parent
b5011318
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
17 deletions
+16
-17
app/assets/javascripts/reports/components/summary_row.vue
app/assets/javascripts/reports/components/summary_row.vue
+2
-5
spec/frontend/reports/components/grouped_test_reports_app_spec.js
...ntend/reports/components/grouped_test_reports_app_spec.js
+1
-1
spec/frontend/reports/components/summary_row_spec.js
spec/frontend/reports/components/summary_row_spec.js
+13
-11
No files found.
app/assets/javascripts/reports/components/summary_row.vue
View file @
4acba7de
...
...
@@ -66,13 +66,10 @@ export default {
css-class=
"report-block-list-loading-icon"
size=
"md"
/>
<ci-icon
v-else
:status=
"iconStatus"
:size=
"statusIconSize"
/>
<ci-icon
v-else
:status=
"iconStatus"
:size=
"statusIconSize"
data-testid=
"summary-row-icon"
/>
</div>
<div
class=
"report-block-list-issue-description"
>
<div
class=
"report-block-list-issue-description-text"
data-testid=
"test-summary-row-description"
>
<div
class=
"report-block-list-issue-description-text"
data-testid=
"summary-row-description"
>
<slot
name=
"summary"
>
{{
summary
}}
</slot
><span
v-if=
"popoverOptions"
class=
"text-nowrap"
>
<popover
v-if=
"popoverOptions"
:options=
"popoverOptions"
class=
"align-top"
/>
...
...
spec/frontend/reports/components/grouped_test_reports_app_spec.js
View file @
4acba7de
...
...
@@ -42,7 +42,7 @@ describe('Grouped test reports app', () => {
const
findHeader
=
()
=>
wrapper
.
find
(
'
[data-testid="report-section-code-text"]
'
);
const
findExpandButton
=
()
=>
wrapper
.
find
(
'
[data-testid="report-section-expand-button"]
'
);
const
findFullTestReportLink
=
()
=>
wrapper
.
find
(
'
[data-testid="group-test-reports-full-link"]
'
);
const
findSummaryDescription
=
()
=>
wrapper
.
find
(
'
[data-testid="
test-
summary-row-description"]
'
);
const
findSummaryDescription
=
()
=>
wrapper
.
find
(
'
[data-testid="summary-row-description"]
'
);
const
findIssueDescription
=
()
=>
wrapper
.
find
(
'
[data-testid="test-issue-body-description"]
'
);
const
findAllIssueDescriptions
=
()
=>
wrapper
.
findAll
(
'
[data-testid="test-issue-body-description"]
'
);
...
...
spec/frontend/reports/components/summary_row_spec.js
View file @
4acba7de
import
{
mount
}
from
'
@vue/test-utils
'
;
import
{
extendedWrapper
}
from
'
helpers/vue_test_utils_helper
'
;
import
SummaryRow
from
'
~/reports/components/summary_row.vue
'
;
describe
(
'
Summary row
'
,
()
=>
{
...
...
@@ -14,16 +15,19 @@ describe('Summary row', () => {
};
const
createComponent
=
({
propsData
=
{},
slots
=
{}
}
=
{})
=>
{
wrapper
=
mount
(
SummaryRow
,
{
propsData
:
{
...
props
,
...
propsData
,
},
slots
,
});
wrapper
=
extendedWrapper
(
mount
(
SummaryRow
,
{
propsData
:
{
...
props
,
...
propsData
,
},
slots
,
}),
);
};
const
findSummary
=
()
=>
wrapper
.
find
(
'
.report-block-list-issue-description-text
'
);
const
findSummary
=
()
=>
wrapper
.
findByTestId
(
'
summary-row-description
'
);
const
findStatusIcon
=
()
=>
wrapper
.
findByTestId
(
'
summary-row-icon
'
);
afterEach
(()
=>
{
wrapper
.
destroy
();
...
...
@@ -37,9 +41,7 @@ describe('Summary row', () => {
it
(
'
renders provided icon
'
,
()
=>
{
createComponent
();
expect
(
wrapper
.
find
(
'
.report-block-list-icon span
'
).
classes
()).
toContain
(
'
js-ci-status-icon-warning
'
,
);
expect
(
findStatusIcon
().
classes
()).
toContain
(
'
js-ci-status-icon-warning
'
);
});
describe
(
'
summary slot
'
,
()
=>
{
...
...
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