Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
idatt2106_2024_02_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
IDATT2106 - Gruppe 2
idatt2106_2024_02_frontend
Merge requests
!14
Enhancement/implement more config steps
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Enhancement/implement more config steps
enhancement/implement-more-config-steps
into
dev
Overview
0
Commits
18
Pipelines
1
Changes
10
Merged
Eline Evje
requested to merge
enhancement/implement-more-config-steps
into
dev
1 year ago
Overview
0
Commits
18
Pipelines
1
Changes
10
Expand
0
0
Merge request reports
Compare
dev
dev (base)
and
latest version
latest version
c6c8ad54
18 commits,
1 year ago
10 files
+
577
−
183
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
10
Search (e.g. *.vue) (Ctrl+P)
src/components/__tests__/ContinueButtonTest.spec.ts
0 → 100644
+
36
−
0
Options
import
{
describe
,
it
,
expect
}
from
'
vitest
'
import
{
mount
}
from
'
@vue/test-utils
'
import
ContinueButtonComponent
from
'
@/components/ContinueButtonComponent.vue
'
describe
(
'
ContinueButtonComponent
'
,
()
=>
{
it
(
'
renders correctly
'
,
()
=>
{
const
wrapper
=
mount
(
ContinueButtonComponent
)
expect
(
wrapper
.
text
()).
toContain
(
'
Fortsett
'
)
})
it
(
'
is disabled when the `disabled` prop is true
'
,
()
=>
{
const
wrapper
=
mount
(
ContinueButtonComponent
,
{
props
:
{
disabled
:
true
}
})
const
button
=
wrapper
.
find
(
'
button
'
)
expect
(
button
.
attributes
(
'
disabled
'
)).
toBeDefined
()
expect
(
button
.
classes
()).
toContain
(
'
opacity-60
'
)
expect
(
button
.
classes
()).
toContain
(
'
cursor-not-allowed
'
)
})
it
(
'
does not emit click event when disabled
'
,
async
()
=>
{
const
wrapper
=
mount
(
ContinueButtonComponent
,
{
props
:
{
disabled
:
true
}
})
await
wrapper
.
trigger
(
'
click
'
)
expect
(
wrapper
.
emitted
()).
not
.
toHaveProperty
(
'
click
'
)
})
it
(
'
emits click event when not disabled
'
,
async
()
=>
{
const
wrapper
=
mount
(
ContinueButtonComponent
,
{
props
:
{
disabled
:
false
}
})
await
wrapper
.
trigger
(
'
click
'
)
expect
(
wrapper
.
emitted
()).
toHaveProperty
(
'
click
'
)
})
})
Loading