Skip to content
Snippets Groups Projects
Commit 1e450220 authored by Xiao Gui's avatar Xiao Gui
Browse files

bugfix: e2e failing on parseUrl

parent edc60996
No related branches found
No related tags found
No related merge requests found
......@@ -42,7 +42,7 @@ const localConfig = {
// polyfill for node10 or lower
if (typeof globalThis === 'undefined') global.globalThis = {}
jasmine.getEnv().addReporter({
specDone: async ({ status, id, fullName, ...rest }) => {
specDone: async ({ status, id, message, fullName, ...rest }) => {
if (status === 'failed') {
console.log(`spec failed, taking screenshot`)
const b64 = await globalThis.IAVBase.takeScreenshot()
......@@ -55,7 +55,7 @@ const localConfig = {
)
await asyncWrite(
path.join(dir, `${id}.txt`),
JSON.stringify({ id, status, fullName }, null, 2),
JSON.stringify({ id, status, message, fullName }, null, 2),
'utf-8'
)
}
......
const { AtlasPage } = require("../util")
const proxy = require('selenium-webdriver/proxy')
const { ARIA_LABELS } = require('../../../common/constants')
describe('> url parsing', () => {
let iavPage
......@@ -77,12 +75,19 @@ describe('> url parsing', () => {
await iavPage.wait(5000)
await iavPage.waitForAsync()
const log = await iavPage.getLog()
const filteredLog = log.filter(({ message }) => !/Access-Control-Allow-Origin/.test(message))
const filteredLog = log
// in headless & non gpu mode, a lot of webgl warnings are thrown
.filter(({ level }) => level.toString() === 'SEVERE')
.filter(({ message }) => !/Access-Control-Allow-Origin/.test(message))
// expecting some errors in the console. In catastrophic event, there will most likely be looped errors (on each render cycle)
// capture logs and write to spec https://stackoverflow.com/a/24980483/6059235
expect(
filteredLog.length
).toBeLessThan(50)
).toBeLessThan(
50,
JSON.stringify(filteredLog)
)
})
it('> if niftiLayers are defined, parcellation layer should be hidden', async () => {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment