Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
b1404dd5
Commit
b1404dd5
authored
Apr 16, 2020
by
Tom Quirk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add spec for getAnnotationPositon
parent
a8a1da98
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
ee/spec/frontend/design_management/components/design_presentation_spec.js
.../design_management/components/design_presentation_spec.js
+17
-0
No files found.
ee/spec/frontend/design_management/components/design_presentation_spec.js
View file @
b1404dd5
...
...
@@ -436,6 +436,23 @@ describe('Design management design presentation component', () => {
});
});
describe
(
'
getAnnotationPositon
'
,
()
=>
{
it
.
each
`
coordinates | overlayDimensions | position
${{
x
:
100
,
y
:
100
}
} |
${{
width
:
50
,
height
:
50
}
} |
${{
x
:
100
,
y
:
100
,
width
:
50
,
height
:
50
}
}
${{
x
:
100.2
,
y
:
100.5
}
} |
${{
width
:
50.6
,
height
:
50.0
}
} |
${{
x
:
100
,
y
:
101
,
width
:
51
,
height
:
50
}
}
`
(
'
returns correct annotation position
'
,
({
coordinates
,
overlayDimensions
,
position
})
=>
{
createComponent
(
undefined
,
{
overlayDimensions
:
{
width
:
overlayDimensions
.
width
,
height
:
overlayDimensions
.
height
,
},
});
expect
(
wrapper
.
vm
.
getAnnotationPositon
(
coordinates
)).
toStrictEqual
(
position
);
});
});
describe
(
'
when design is overflowing
'
,
()
=>
{
beforeEach
(()
=>
{
createComponent
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment