Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Prosjekt 2
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
Container Registry
Model registry
Operate
Environments
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
Anne Mosvold Ørke
Prosjekt 2
Commits
c5f4a9be
Commit
c5f4a9be
authored
4 years ago
by
Edvard Dønvold Sjøborg
Browse files
Options
Downloads
Patches
Plain Diff
added one simple snapshot test
parent
fd52f4bc
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
frontend/src/__tests__/ArtPage.snapshot.test.tsx
+10
-0
10 additions, 0 deletions
frontend/src/__tests__/ArtPage.snapshot.test.tsx
frontend/src/__tests__/__snapshots__/ArtPage.snapshot.test.tsx.snap
+85
-0
85 additions, 0 deletions
...rc/__tests__/__snapshots__/ArtPage.snapshot.test.tsx.snap
with
95 additions
and
0 deletions
frontend/src/__tests__/ArtPage.snapshot.test.tsx
0 → 100644
+
10
−
0
View file @
c5f4a9be
import
React
from
'
react
'
import
ArtPage
from
"
../Components/ArtPage
"
import
renderer
from
'
react-test-renderer
'
it
(
'
renders correctly
'
,
()
=>
{
const
tree
=
renderer
.
create
(<
ArtPage
pageId
=
{
0
}
/>)
.
toJSON
();
expect
(
tree
).
toMatchSnapshot
()
})
This diff is collapsed.
Click to expand it.
frontend/src/__tests__/__snapshots__/ArtPage.snapshot.test.tsx.snap
0 → 100644
+
85
−
0
View file @
c5f4a9be
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders correctly 1`] = `
<div
className="artpage background-one font-calibri"
>
<div
className="favorite-button"
>
<img
alt="favorite-active"
onClick={[Function]}
src="favorite.png"
style={
Object {
"height": "4rem",
"width": "4rem",
}
}
/>
</div>
<div
className="dropdown"
>
<span
className="settings-icon"
onClick={[Function]}
/>
</div>
<div
className="exhibition-piece"
>
<div
className="exhibition-piece-title"
>
<h1>
Loading...
</h1>
</div>
<div
className="author"
>
Loading...
</div>
<div
className="svg-artwork"
/>
<div
className="poem"
>
<p>
Loading...
</p>
</div>
</div>
<div
className="navbutton left"
>
<img
onClick={[Function]}
src="left-arrow.png"
style={
Object {
"height": "4rem",
"width": "4rem",
}
}
/>
</div>
<div
className="navbutton right"
>
<img
onClick={[Function]}
src="right-arrow.png"
style={
Object {
"height": "4rem",
"width": "4rem",
}
}
/>
</div>
</div>
`;
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