Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
const { WdIavPage } = require('../../util/selenium/iav')
const { AtlasPage } = require('../util')
const { height, width } = require("../../opts")
const atlasName = `Multilevel Human Atlas`
describe('> navigating IAV via history', () => {
let iavPage = new AtlasPage()
beforeEach(async () => {
iavPage = new AtlasPage()
await iavPage.init()
await iavPage.goto()
await iavPage.setAtlasSpecifications(atlasName)
await iavPage.wait(5000)
await iavPage.waitUntilAllChunksLoaded()
})
it('> after navigate, navigation state differs', async () => {
const nav = await iavPage.getNavigationState()
await iavPage.cursorMoveToAndDrag({
position: [ Math.round(width / 4), Math.round(height / 4) ],
delta: [ Math.round(width / 8), Math.round(height / 8) ]
})
const nav2 = await iavPage.getNavigationState()
// expect some positions to change after dragging
expect(
nav.position.some((v, idx) => v !== nav2.position[idx])
).toBeTrue()
})
it('> after navigate, history back, navigation should ', async () => {
const nav = await iavPage.getNavigationState()
await iavPage.cursorMoveToAndDrag({
position: [ Math.round(width / 4), Math.round(height / 4) ],
delta: [ Math.round(width / 8), Math.round(height / 8) ]
})
await iavPage.wait(5000)
await iavPage.waitUntilAllChunksLoaded()
await iavPage.wait(5000)
await iavPage.waitUntilAllChunksLoaded()
const nav2 = await iavPage.getNavigationState()
// expect some positions to change after dragging
expect(
nav.position.every((v, idx) => v === nav2.position[idx])
).toBeTrue()
})
it('> history back, viewer should despawn ', async () => {
await iavPage.wait(5000)
await iavPage.waitUntilAllChunksLoaded()
await iavPage.wait(5000)
await iavPage.waitUntilAllChunksLoaded()