Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
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 Scrum Team 02
Frontend
Commits
b15d736e
Commit
b15d736e
authored
1 year ago
by
Ingrid Martinsheimen Egge
Browse files
Options
Downloads
Patches
Plain Diff
sypress tester til navbar
parent
e910ead7
No related branches found
Branches containing commit
No related tags found
1 merge request
!21
Merge profilinnstillinger into main
Pipeline
#218812
failed
1 year ago
Stage: build
Stage: test
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
cypress.config.js
+1
-1
1 addition, 1 deletion
cypress.config.js
cypress/e2e/navbar.cy.js
+21
-2
21 additions, 2 deletions
cypress/e2e/navbar.cy.js
src/components/Navbar.vue
+2
-2
2 additions, 2 deletions
src/components/Navbar.vue
src/views/MissingPage.vue
+1
-1
1 addition, 1 deletion
src/views/MissingPage.vue
with
25 additions
and
6 deletions
cypress.config.js
+
1
−
1
View file @
b15d736e
...
...
@@ -3,6 +3,6 @@ const { defineConfig } = require('cypress')
module
.
exports
=
defineConfig
({
e2e
:
{
specPattern
:
'
cypress/e2e/**/*.{cy,spec}.{js,jsx,ts,tsx}
'
,
baseUrl
:
'
http://localhost:
4
173
'
baseUrl
:
'
http://localhost:
5
173
'
}
})
This diff is collapsed.
Click to expand it.
cypress/e2e/navbar.cy.js
+
21
−
2
View file @
b15d736e
describe
(
'
Correct navigation links
'
,
()
=>
{
/*TODO*/
it
(
"
is sent to error page if page does not exist
"
,
()
=>
{
cy
.
visit
(
'
/qwerty
'
)
cy
.
contains
(
'
#msg
'
,
'
404
'
)
})
it
(
"
navigates to settings page
"
,
()
=>
{
cy
.
visit
(
'
/
'
)
cy
.
get
(
'
#settingsIcon
'
).
click
()
cy
.
url
().
should
(
'
include
'
,
'
/profileSettings
'
)
})
/*TODO: Other pages*/
})
describe
(
'
Navbar on all pages
'
,
()
=>
{
/*TODO*/
it
(
"
front page has a navbar
"
,()
=>
{
cy
.
visit
(
'
/
'
)
cy
.
get
(
'
nav
'
).
should
(
'
exist
'
)
})
it
(
"
settings page has a navbar
"
,()
=>
{
cy
.
visit
(
'
/profileSettings
'
)
cy
.
get
(
'
nav
'
).
should
(
'
exist
'
)
})
/*TODO: other pages*/
})
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/components/Navbar.vue
+
2
−
2
View file @
b15d736e
...
...
@@ -26,8 +26,8 @@
</RouterLink>
</li>
<li>
<RouterLink
:to=
"'/'"
:aria-label=
"'link to settings page'"
>
<Icon
icon=
"mdi:cog"
:color=
"iconColor"
:style=
"
{ fontSize: iconSize }"/>
<RouterLink
:to=
"'/
profileSettings
'"
:aria-label=
"'link to settings page'"
>
<Icon
id=
"settingsIcon"
icon=
"mdi:cog"
:color=
"iconColor"
:style=
"
{ fontSize: iconSize }"/>
</RouterLink>
</li>
</ul>
...
...
This diff is collapsed.
Click to expand it.
src/views/MissingPage.vue
+
1
−
1
View file @
b15d736e
<
template
>
<h1>
404
</h1>
<h1
id=
"msg"
>
404
</h1>
<h2>
Oida, denne siden finnes ikke
</h2>
<RouterLink
to=
"/"
>
Gå tilbake til forsiden
</RouterLink>
</
template
>
...
...
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