Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
idatt2106_2024_03_frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Scrum_Team_3
idatt2106_2024_03_frontend
Commits
6b7a5421
Commit
6b7a5421
authored
1 year ago
by
Sverre Frogner Haugen
Browse files
Options
Downloads
Patches
Plain Diff
Updated Milestone Path unit test now that total nodes is always 50 instead of dynamic
parent
0322c219
No related branches found
Branches containing commit
No related tags found
1 merge request
!40
Milestone path backend connection
Pipeline
#279142
passed
1 year ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/components/__tests__/MilestonePath.spec.ts
+1
-11
1 addition, 11 deletions
src/components/__tests__/MilestonePath.spec.ts
with
1 addition
and
11 deletions
src/components/__tests__/MilestonePath.spec.ts
+
1
−
11
View file @
6b7a5421
...
...
@@ -4,16 +4,6 @@ import { describe, it, expect } from 'vitest'
describe
(
'
PathNode.vue
'
,
()
=>
{
describe
(
'
computed
'
,
()
=>
{
it
(
'
calculates total nodes correctly
'
,
()
=>
{
const
totalToSave
=
2000
const
wrapper
=
shallowMount
(
MilestonePath
,
{
props
:
{
totalToSave
,
totalSaved
:
0
}
})
const
actualValue
=
(
wrapper
.
vm
as
any
).
totalNodes
;
expect
(
actualValue
).
toBe
(
Math
.
ceil
(
totalToSave
/
250
))
})
it
(
'
calculates remaining nodes correctly
'
,
()
=>
{
const
totalToSave
=
2000
...
...
@@ -41,7 +31,7 @@ describe('PathNode.vue', () => {
describe
(
'
node generation and styling
'
,
()
=>
{
it
(
'
generates nodes correctly
'
,
()
=>
{
const
totalNodes
=
8
// For example
const
totalNodes
=
50
// For example
const
totalToSave
=
2000
const
totalSaved
=
1000
const
wrapper
=
shallowMount
(
MilestonePath
,
{
...
...
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