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
7a107b4a
Commit
7a107b4a
authored
10 months ago
by
Sverre Frogner Haugen
Browse files
Options
Downloads
Plain Diff
Merge branch 'test-fix' into 'master'
Fixed tests. See merge request
!70
parents
c6b0c239
95c224b4
No related branches found
Branches containing commit
No related tags found
1 merge request
!70
Fixed tests.
Pipeline
#281280
passed
10 months ago
Stage: build
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/__tests__/ActiveMilestoneDisplay.spec.ts
+6
-2
6 additions, 2 deletions
src/components/__tests__/ActiveMilestoneDisplay.spec.ts
src/components/__tests__/CompletedMilestoneDisplay.spec.ts
+3
-3
3 additions, 3 deletions
src/components/__tests__/CompletedMilestoneDisplay.spec.ts
with
9 additions
and
5 deletions
src/components/__tests__/ActiveMilestoneDisplay.spec.ts
+
6
−
2
View file @
7a107b4a
...
...
@@ -53,8 +53,12 @@ describe('ActiveMilestoneDisplay', () => {
})
await
wrapper
.
setProps
({
image
:
''
})
const
activeMilestoneDisplay
=
wrapper
.
find
(
'
.active-milestone-display
'
).
element
as
HTMLDivElement
expect
(
activeMilestoneDisplay
.
style
.
backgroundImage
).
toContain
(
'
src/assets/pig.png
'
)
const
imgElement
=
wrapper
.
find
(
'
img
'
);
// Assert that the <img> element exists
expect
(
imgElement
.
exists
()).
toBe
(
true
);
expect
(
imgElement
.
attributes
(
'
src
'
)).
toBe
(
'
/src/assets/background/img.png
'
);
})
});
This diff is collapsed.
Click to expand it.
src/components/__tests__/CompletedMilestoneDisplay.spec.ts
+
3
−
3
View file @
7a107b4a
...
...
@@ -21,21 +21,21 @@ describe('CompletedMilestoneDisplay', () => {
expect
(
wrapper
.
find
(
'
.title
'
).
text
()).
toBe
(
'
Test Title
'
);
expect
(
wrapper
.
find
(
'
.info
'
).
exists
()).
toBe
(
true
);
expect
(
wrapper
.
find
(
'
.info h4
'
).
text
()).
toBe
(
'
Du sparte 500kr
'
);
expect
(
wrapper
.
find
(
'
.info h4
'
).
text
()).
toBe
(
'
Du sparte 500kr
av 1000kr
'
);
await
wrapper
.
trigger
(
'
mouseover
'
);
await
nextTick
();
expect
(
wrapper
.
find
(
'
.info
'
).
exists
()).
toBe
(
true
);
expect
(
wrapper
.
find
(
'
.info h4
'
).
text
()).
toBe
(
'
Test Description
'
);
expect
(
wrapper
.
find
(
'
.info h4
'
).
text
()).
toBe
(
'
Du sparte 500kr av 1000kr
'
);
await
wrapper
.
trigger
(
'
mouseleave
'
);
await
nextTick
();
expect
(
wrapper
.
find
(
'
.info
'
).
exists
()).
toBe
(
true
);
expect
(
wrapper
.
find
(
'
.info h4
'
).
text
()).
toBe
(
'
Du sparte 500kr
'
);
expect
(
wrapper
.
find
(
'
.info h4
'
).
text
()).
toBe
(
'
Du sparte 500kr
av 1000kr
'
);
});
});
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