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
43287302
Commit
43287302
authored
May 05, 2021
by
Paul Gascou-Vaillancourt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make test case descriptions more relevant
parent
850487e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
16 deletions
+19
-16
spec/frontend/incidents/components/incidents_list_spec.js
spec/frontend/incidents/components/incidents_list_spec.js
+19
-16
No files found.
spec/frontend/incidents/components/incidents_list_spec.js
View file @
43287302
...
...
@@ -270,22 +270,25 @@ describe('Incidents List', () => {
const
noneSort
=
'
none
'
;
it
.
each
`
selector | initialSort | firstSort | nextSort
${
TH_CREATED_AT_TEST_ID
}
|
${
descSort
}
|
${
ascSort
}
|
${
descSort
}
${
TH_SEVERITY_TEST_ID
}
|
${
noneSort
}
|
${
descSort
}
|
${
ascSort
}
${
TH_PUBLISHED_TEST_ID
}
|
${
noneSort
}
|
${
descSort
}
|
${
ascSort
}
${
TH_INCIDENT_SLA_TEST_ID
}
|
${
noneSort
}
|
${
ascSort
}
|
${
descSort
}
`
(
'
updates sort with new direction
'
,
async
({
selector
,
initialSort
,
firstSort
,
nextSort
})
=>
{
const
[[
attr
,
value
]]
=
Object
.
entries
(
selector
);
const
columnHeader
=
()
=>
wrapper
.
find
(
`[
${
attr
}
="
${
value
}
"]`
);
expect
(
columnHeader
().
attributes
(
'
aria-sort
'
)).
toBe
(
initialSort
);
columnHeader
().
trigger
(
'
click
'
);
await
wrapper
.
vm
.
$nextTick
();
expect
(
columnHeader
().
attributes
(
'
aria-sort
'
)).
toBe
(
firstSort
);
columnHeader
().
trigger
(
'
click
'
);
await
wrapper
.
vm
.
$nextTick
();
expect
(
columnHeader
().
attributes
(
'
aria-sort
'
)).
toBe
(
nextSort
);
});
description | selector | initialSort | firstSort | nextSort
${
'
creation date
'
}
|
${
TH_CREATED_AT_TEST_ID
}
|
${
descSort
}
|
${
ascSort
}
|
${
descSort
}
${
'
severity
'
}
|
${
TH_SEVERITY_TEST_ID
}
|
${
noneSort
}
|
${
descSort
}
|
${
ascSort
}
${
'
publish date
'
}
|
${
TH_PUBLISHED_TEST_ID
}
|
${
noneSort
}
|
${
descSort
}
|
${
ascSort
}
${
'
due date
'
}
|
${
TH_INCIDENT_SLA_TEST_ID
}
|
${
noneSort
}
|
${
ascSort
}
|
${
descSort
}
`
(
'
updates sort with new direction when sorting by $description
'
,
async
({
selector
,
initialSort
,
firstSort
,
nextSort
})
=>
{
const
[[
attr
,
value
]]
=
Object
.
entries
(
selector
);
const
columnHeader
=
()
=>
wrapper
.
find
(
`[
${
attr
}
="
${
value
}
"]`
);
expect
(
columnHeader
().
attributes
(
'
aria-sort
'
)).
toBe
(
initialSort
);
columnHeader
().
trigger
(
'
click
'
);
await
wrapper
.
vm
.
$nextTick
();
expect
(
columnHeader
().
attributes
(
'
aria-sort
'
)).
toBe
(
firstSort
);
columnHeader
().
trigger
(
'
click
'
);
await
wrapper
.
vm
.
$nextTick
();
expect
(
columnHeader
().
attributes
(
'
aria-sort
'
)).
toBe
(
nextSort
);
},
);
});
describe
(
'
Snowplow tracking
'
,
()
=>
{
...
...
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