Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
sparesti-frontend
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
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_2024_01
sparesti-frontend
Merge requests
!128
Test onboarding view
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Test onboarding view
test-onboarding-view
into
development
Overview
0
Commits
2
Pipelines
1
Changes
2
Merged
Maria Elizabeth Pauna Lane
requested to merge
test-onboarding-view
into
development
10 months ago
Overview
0
Commits
2
Pipelines
1
Changes
2
Expand
0
0
Merge request reports
Compare
development
development (base)
and
latest version
latest version
d9aae617
2 commits,
10 months ago
2 files
+
52
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
cypress/e2e/OnboardingView.cy.js
0 → 100644
+
51
−
0
Options
describe
(
'
OnboardingView
'
,
()
=>
{
beforeEach
(()
=>
{
window
.
localStorage
.
setItem
(
'
access_token
'
,
'
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIzIiwiaXNzIjoiZnN0X3Rva2VuX2lzc3Vlcl9hc
'
+
'
HAiLCJleHAiOjE3MjIyMzk3MTQsImlhdCI6MTcxNDQ2MzcxNH0.AjYqAXgFKnhzeOBOTICVciiKpvOGDGyfQq0--
'
+
'
YuA0GlLSsplrETK1AbaQTYWnMPBJPF2MGWsbRESN1g-DTEeKg
'
);
cy
.
visit
(
'
http://localhost:5173/onboarding
'
);
});
it
(
'
renders without crashing
'
,
()
=>
{
cy
.
get
(
'
body
'
).
should
(
'
be.visible
'
);
});
it
(
'
renders the onboarding form
'
,
()
=>
{
cy
.
get
(
'
form
'
).
should
(
'
be.visible
'
);
});
it
(
'
checkbox is disabled when email is not filled in
'
,
()
=>
{
cy
.
get
(
'
#radix-3-form-item
'
).
click
();
cy
.
get
(
'
input[type="checkbox"]
'
).
should
(
'
be.disabled
'
);
})
it
(
'
checkbox is disabled when invalid email is filled in
'
,
()
=>
{
cy
.
get
(
'
#radix-3-form-item
'
).
click
().
type
(
'
TEst
'
);
cy
.
get
(
'
input[type="checkbox"]
'
).
should
(
'
be.disabled
'
);
})
it
(
'
checkbox is enabled when valid email is filled in
'
,
()
=>
{
cy
.
get
(
'
#radix-3-form-item
'
).
click
().
type
(
'
maria@banan.no
'
);
cy
.
get
(
'
input[type="checkbox"]
'
).
should
(
'
not.be.disabled
'
);
})
it
(
'
changes to question component when clicking the next button
'
,
()
=>
{
cy
.
get
(
'
button
'
).
contains
(
'
Neste
'
).
click
();
cy
.
get
(
'
.mx-4
'
).
should
(
'
be.visible
'
);
})
it
(
'
submits the form when clicking the submit button
'
,
()
=>
{
cy
.
get
(
'
button
'
).
contains
(
'
Neste
'
).
click
();
cy
.
get
(
'
button
'
).
contains
(
'
Neste
'
).
click
();
cy
.
get
(
'
button
'
).
contains
(
'
Neste
'
).
click
();
cy
.
get
(
'
.justify-between.pt-4 > .bg-primary-dark
'
).
click
();
cy
.
url
().
should
(
'
include
'
,
'
/dashboard
'
);
})
it
(
'
goes back to the previous question when clicking the previous button
'
,
()
=>
{
cy
.
get
(
'
button
'
).
contains
(
'
Neste
'
).
click
();
cy
.
get
(
'
button
'
).
contains
(
'
Tilbake
'
).
click
();
cy
.
get
(
'
.p-4
'
).
should
(
'
be.visible
'
);
})
});
\ No newline at end of file
Loading