Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
siibra-explorer
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
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xiao Gui
siibra-explorer
Commits
ee233ba4
Commit
ee233ba4
authored
4 years ago
by
Xiao Gui
Browse files
Options
Downloads
Patches
Plain Diff
fix e2e
parent
fc321f19
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
e2e/src/layout/layout.e2e-spec.js
+37
-37
37 additions, 37 deletions
e2e/src/layout/layout.e2e-spec.js
with
37 additions
and
37 deletions
e2e/src/layout/layout.e2e-spec.js
+
37
−
37
View file @
ee233ba4
const
{
Layout
Page
}
=
require
(
'
../util
'
)
const
{
Atlas
Page
}
=
require
(
'
../util
'
)
const
MAT_SIDENAV_TIMEOUT
=
500
describe
(
'
> sidenav
'
,
()
=>
{
let
layout
Page
let
atlas
Page
beforeEach
(
async
()
=>
{
layout
Page
=
new
Layout
Page
()
await
layout
Page
.
init
()
await
layout
Page
.
goto
(
'
/?templateSelected=MNI+152+ICBM+2009c+Nonlinear+Asymmetric&parcellationSelected=JuBrain+Cytoarchitectonic+Atlas
'
)
await
layout
Page
.
wait
(
MAT_SIDENAV_TIMEOUT
)
await
layout
Page
.
dismissModal
()
atlas
Page
=
new
Atlas
Page
()
await
atlas
Page
.
init
()
await
atlas
Page
.
goto
(
'
/?templateSelected=MNI+152+ICBM+2009c+Nonlinear+Asymmetric&parcellationSelected=JuBrain+Cytoarchitectonic+Atlas
'
)
await
atlas
Page
.
wait
(
MAT_SIDENAV_TIMEOUT
)
await
atlas
Page
.
dismissModal
()
do
{
}
while
(
await
layout
Page
.
wait
(
100
),
!
(
await
layout
Page
.
viewerIsPopulated
())
await
atlas
Page
.
wait
(
100
),
!
(
await
atlas
Page
.
viewerIsPopulated
())
)
})
it
(
'
> on init, side panel should be visible
'
,
async
()
=>
{
const
sideNavIsDisplayed
=
await
layout
Page
.
sideNavIsVisible
()
const
sideNavIsDisplayed
=
await
atlas
Page
.
sideNavIsVisible
()
expect
(
sideNavIsDisplayed
).
toEqual
(
true
)
const
toggleTabIsDIsplayed
=
await
layout
Page
.
sideNavTabIsVisible
()
const
toggleTabIsDIsplayed
=
await
atlas
Page
.
sideNavTabIsVisible
()
expect
(
toggleTabIsDIsplayed
).
toEqual
(
true
)
})
describe
(
'
> toggling
'
,
()
=>
{
it
(
'
> toggle tab should toggle side nav
'
,
async
()
=>
{
const
init
=
await
layout
Page
.
sideNavIsVisible
()
const
init
=
await
atlas
Page
.
sideNavIsVisible
()
expect
(
init
).
toEqual
(
true
)
await
layout
Page
.
clickSideNavTab
()
await
layout
Page
.
wait
(
MAT_SIDENAV_TIMEOUT
)
const
expectHidden
=
await
layout
Page
.
sideNavIsVisible
()
await
atlas
Page
.
clickSideNavTab
()
await
atlas
Page
.
wait
(
MAT_SIDENAV_TIMEOUT
)
const
expectHidden
=
await
atlas
Page
.
sideNavIsVisible
()
expect
(
expectHidden
).
toEqual
(
false
)
await
layout
Page
.
clickSideNavTab
()
await
layout
Page
.
wait
(
MAT_SIDENAV_TIMEOUT
)
const
expectShown
=
await
layout
Page
.
sideNavIsVisible
()
await
atlas
Page
.
clickSideNavTab
()
await
atlas
Page
.
wait
(
MAT_SIDENAV_TIMEOUT
)
const
expectShown
=
await
atlas
Page
.
sideNavIsVisible
()
expect
(
expectShown
).
toEqual
(
true
)
})
})
...
...
@@ -48,53 +48,53 @@ describe('> sidenav', () => {
describe
(
'
> status panel
'
,
()
=>
{
let
layout
Page
let
atlas
Page
beforeEach
(
async
()
=>
{
layout
Page
=
new
Layout
Page
()
await
layout
Page
.
init
()
await
layout
Page
.
goto
(
'
/?templateSelected=MNI+152+ICBM+2009c+Nonlinear+Asymmetric&parcellationSelected=JuBrain+Cytoarchitectonic+Atlas
'
)
await
layout
Page
.
wait
(
MAT_SIDENAV_TIMEOUT
)
await
layout
Page
.
dismissModal
()
atlas
Page
=
new
Atlas
Page
()
await
atlas
Page
.
init
()
await
atlas
Page
.
goto
(
'
/?templateSelected=MNI+152+ICBM+2009c+Nonlinear+Asymmetric&parcellationSelected=JuBrain+Cytoarchitectonic+Atlas
'
)
await
atlas
Page
.
wait
(
MAT_SIDENAV_TIMEOUT
)
await
atlas
Page
.
dismissModal
()
do
{
}
while
(
await
layout
Page
.
wait
(
100
),
!
(
await
layout
Page
.
viewerIsPopulated
())
await
atlas
Page
.
wait
(
100
),
!
(
await
atlas
Page
.
viewerIsPopulated
())
)
})
afterEach
(()
=>
{
layout
Page
=
null
atlas
Page
=
null
})
it
(
'
> on init, status panel should not be visible
'
,
async
()
=>
{
const
init
=
await
layout
Page
.
statusPanelIsVisible
()
const
init
=
await
atlas
Page
.
statusPanelIsVisible
()
expect
(
init
).
toEqual
(
false
)
})
it
(
'
> on toggling side panel, status panel should become visible
'
,
async
()
=>
{
await
layout
Page
.
clickSideNavTab
()
await
layout
Page
.
wait
(
MAT_SIDENAV_TIMEOUT
)
await
atlas
Page
.
clickSideNavTab
()
await
atlas
Page
.
wait
(
MAT_SIDENAV_TIMEOUT
)
const
expectVisible
=
await
layout
Page
.
statusPanelIsVisible
()
const
expectVisible
=
await
atlas
Page
.
statusPanelIsVisible
()
expect
(
expectVisible
).
toEqual
(
true
)
})
it
(
'
> on click status panel, side nav become visible, status panel become invisible
'
,
async
()
=>
{
await
layout
Page
.
clickSideNavTab
()
await
layout
Page
.
wait
(
MAT_SIDENAV_TIMEOUT
)
await
atlas
Page
.
clickSideNavTab
()
await
atlas
Page
.
wait
(
MAT_SIDENAV_TIMEOUT
)
await
layout
Page
.
clickStatusPanel
()
await
layout
Page
.
wait
(
MAT_SIDENAV_TIMEOUT
)
await
atlas
Page
.
clickStatusPanel
()
await
atlas
Page
.
wait
(
MAT_SIDENAV_TIMEOUT
)
const
expectHidden
=
await
layout
Page
.
statusPanelIsVisible
()
const
expectHidden
=
await
atlas
Page
.
statusPanelIsVisible
()
expect
(
expectHidden
).
toEqual
(
false
)
const
expectVisible
=
await
layout
Page
.
sideNavIsVisible
()
const
expectVisible
=
await
atlas
Page
.
sideNavIsVisible
()
expect
(
expectVisible
).
toEqual
(
true
)
})
})
This diff is collapsed.
Click to expand it.
Preview
0%
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