Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Mirador Video
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
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
IIIF
Mirador
Mirador Video
Commits
397eb358
Commit
397eb358
authored
6 years ago
by
Andrew Winget (Standard)
Browse files
Options
Downloads
Patches
Plain Diff
fix action tests
parent
42ae5aec
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
__tests__/src/actions/window.test.js
+5
-3
5 additions, 3 deletions
__tests__/src/actions/window.test.js
__tests__/src/reducers/windows.test.js
+1
-22
1 addition, 22 deletions
__tests__/src/reducers/windows.test.js
with
6 additions
and
25 deletions
__tests__/src/actions/window.test.js
+
5
−
3
View file @
397eb358
...
@@ -120,12 +120,14 @@ describe('window actions', () => {
...
@@ -120,12 +120,14 @@ describe('window actions', () => {
expect
(
mockDispatch
).
toHaveBeenCalledWith
({
expect
(
mockDispatch
).
toHaveBeenCalledWith
({
type
:
ActionTypes
.
TOGGLE_WINDOW_SIDE_BAR_PANEL
,
windowId
,
panelType
:
'
closed
'
,
type
:
ActionTypes
.
TOGGLE_WINDOW_SIDE_BAR_PANEL
,
windowId
,
panelType
:
'
closed
'
,
});
});
});
});
describe
(
'
setWindowSize
'
,
()
=>
{
describe
(
'
setWindowSize
'
,
()
=>
{
it
(
'
returns the appropriate action type
'
,
()
=>
{
it
(
'
returns the appropriate action type
'
,
()
=>
{
const
id
=
'
abc123
'
;
const
id
=
'
abc123
'
;
const
expectedAction
=
{
const
expectedAction
=
{
type
:
ActionTypes
.
SET_WINDOW_
THUMBNAIL_POSITION
,
type
:
ActionTypes
.
SET_WINDOW_
SIZE
,
payload
:
{
payload
:
{
windowId
:
id
,
windowId
:
id
,
size
:
{
size
:
{
...
@@ -136,11 +138,11 @@ describe('window actions', () => {
...
@@ -136,11 +138,11 @@ describe('window actions', () => {
},
},
},
},
};
};
expect
(
actions
.
setWindow
ThumbnailPosition
(
id
,
{
expect
(
actions
.
setWindow
Size
(
id
,
{
x
:
20
,
x
:
20
,
y
:
20
,
y
:
20
,
width
:
200
,
width
:
200
,
width
:
200
,
height
:
200
,
})).
toEqual
(
expectedAction
);
})).
toEqual
(
expectedAction
);
});
});
});
});
...
...
This diff is collapsed.
Click to expand it.
__tests__/src/reducers/windows.test.js
+
1
−
22
View file @
397eb358
...
@@ -231,28 +231,6 @@ describe('windows reducer', () => {
...
@@ -231,28 +231,6 @@ describe('windows reducer', () => {
});
});
});
});
it
(
'
should handle UPDATE_VIEWPORT
'
,
()
=>
{
expect
(
windowsReducer
({
abc123
:
{
id
:
'
abc123
'
,
},
def456
:
{
id
:
'
def456
'
,
},
},
{
type
:
ActionTypes
.
UPDATE_VIEWPORT
,
windowId
:
'
abc123
'
,
payload
:
{
x
:
0
,
y
:
1
,
zoom
:
0.5
},
})).
toEqual
({
abc123
:
{
id
:
'
abc123
'
,
viewer
:
{
x
:
0
,
y
:
1
,
zoom
:
0.5
},
},
def456
:
{
id
:
'
def456
'
,
},
});
});
it
(
'
should handle SET_WINDOW_SIZE
'
,
()
=>
{
it
(
'
should handle SET_WINDOW_SIZE
'
,
()
=>
{
expect
(
windowsReducer
({
expect
(
windowsReducer
({
abc123
:
{
abc123
:
{
...
@@ -285,6 +263,7 @@ describe('windows reducer', () => {
...
@@ -285,6 +263,7 @@ describe('windows reducer', () => {
},
},
});
});
});
});
it
(
'
should handle UPDATE_WINDOW_POSITION
'
,
()
=>
{
it
(
'
should handle UPDATE_WINDOW_POSITION
'
,
()
=>
{
expect
(
windowsReducer
({
expect
(
windowsReducer
({
abc123
:
{
abc123
:
{
...
...
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