Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
teknikattan-scoring-system
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tddd96-grupp1
teknikattan-scoring-system
Commits
5125d895
Commit
5125d895
authored
3 years ago
by
Albin Henriksson
Browse files
Options
Downloads
Patches
Plain Diff
Fix broken test
parent
3036579b
No related branches found
No related tags found
1 merge request
!131
Resolve "Increase client test coverage"
Pipeline
#44416
passed with warnings
3 years ago
Stage: setup
Stage: test
Stage: report
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
client/src/utils/renderSlideIcon.test.tsx
+14
-2
14 additions, 2 deletions
client/src/utils/renderSlideIcon.test.tsx
with
14 additions
and
2 deletions
client/src/utils/renderSlideIcon.test.tsx
+
14
−
2
View file @
5125d895
import
BuildOutlinedIcon
from
'
@material-ui/icons/BuildOutlined
'
import
CheckBoxOutlinedIcon
from
'
@material-ui/icons/CheckBoxOutlined
'
import
CreateOutlinedIcon
from
'
@material-ui/icons/CreateOutlined
'
import
DnsOutlinedIcon
from
'
@material-ui/icons/DnsOutlined
'
import
InfoOutlinedIcon
from
'
@material-ui/icons/InfoOutlined
'
import
RadioButtonCheckedIcon
from
'
@material-ui/icons/RadioButtonChecked
'
import
{
shallow
}
from
'
enzyme
'
import
{
RichSlide
}
from
'
../interfaces/ApiRichModels
'
import
{
renderSlideIcon
}
from
'
./renderSlideIcon
'
...
...
@@ -34,7 +35,18 @@ it('returns DnsOutlinedIcon correctly ', async () => {
expect
(
icon
).
toBeDefined
()
if
(
icon
)
{
const
actualResult
=
shallow
(
icon
)
const
expectedResult
=
shallow
(<
DnsOutlinedIcon
/>)
const
expectedResult
=
shallow
(<
CheckBoxOutlinedIcon
/>)
expect
(
actualResult
).
toEqual
(
expectedResult
)
}
})
it
(
'
returns DnsOutlinedIcon correctly
'
,
async
()
=>
{
const
testSlide
=
{
questions
:
[{
id
:
5
,
type_id
:
4
}]
}
as
RichSlide
const
icon
=
renderSlideIcon
(
testSlide
)
expect
(
icon
).
toBeDefined
()
if
(
icon
)
{
const
actualResult
=
shallow
(
icon
)
const
expectedResult
=
shallow
(<
RadioButtonCheckedIcon
/>)
expect
(
actualResult
).
toEqual
(
expectedResult
)
}
})
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment