Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Travis config according to new Custom Element API #477

Open
korneliakobiela opened this issue Feb 24, 2020 · 2 comments
Open

Fix Travis config according to new Custom Element API #477

korneliakobiela opened this issue Feb 24, 2020 · 2 comments
Assignees
Labels
bug Something isn't working environment Changes in development environment

Comments

@korneliakobiela
Copy link

Technical

WATT/VSCode

Description

Our test environment isn't prepared for Custom Elements v1.

Steps to reproduce

  1. Run: 'npm run test' in DE

Expected behaviour

Test pass

Actual behaviour

Test fail

Testing WATT...
/home/k.kobiela/Workspace/WATT/libs/tau-wysiwig/node_modules/yargs/yargs.js:1163
      else throw err
           ^

ReferenceError: customElements is not defined
    at Object.<anonymous> (/home/k.kobiela/Workspace/WATT/libs/tau-wysiwig/design-editor/src/panel/property/component/component-element.js:605:1)
    at Module._compile (internal/modules/cjs/loader.js:799:30)
    at Module._compile (/home/k.kobiela/Workspace/WATT/libs/tau-wysiwig/node_modules/pirates/lib/index.js:99:24)
    at Module._extensions..js (internal/modules/cjs/loader.js:810:10)
    at Object.newLoader [as .js] (/home/k.kobiela/Workspace/WATT/libs/tau-wysiwig/node_modules/pirates/lib/index.js:104:7)
    at Module.load (internal/modules/cjs/loader.js:666:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:606:12)
    at Function.Module._load (internal/modules/cjs/loader.js:598:3)
    at Module.require (internal/modules/cjs/loader.js:705:19)
    at require (internal/modules/cjs/helpers.js:14:16)
    at Object.<anonymous> (/home/k.kobiela/Workspace/WATT/libs/tau-wysiwig/test/panel/property/component/component-element.test.js:5:1)
    at Module._compile (internal/modules/cjs/loader.js:799:30)
    at Module._compile (/home/k.kobiela/Workspace/WATT/libs/tau-wysiwig/node_modules/pirates/lib/index.js:99:24)
    at Module._extensions..js (internal/modules/cjs/loader.js:810:10)
    at Object.newLoader [as .js] (/home/k.kobiela/Workspace/WATT/libs/tau-wysiwig/node_modules/pirates/lib/index.js:104:7)
    at Module.load (internal/modules/cjs/loader.js:666:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:606:12)
    at Function.Module._load (internal/modules/cjs/loader.js:598:3)
    at Module.require (internal/modules/cjs/loader.js:705:19)
    at require (internal/modules/cjs/helpers.js:14:16)
    at /home/k.kobiela/Workspace/WATT/libs/tau-wysiwig/node_modules/mocha/lib/mocha.js:334:36
    at Array.forEach (<anonymous>)
    at Mocha.loadFiles (/home/k.kobiela/Workspace/WATT/libs/tau-wysiwig/node_modules/mocha/lib/mocha.js:331:14)
    at Mocha.run (/home/k.kobiela/Workspace/WATT/libs/tau-wysiwig/node_modules/mocha/lib/mocha.js:809:10)
    at Object.exports.singleRun (/home/k.kobiela/Workspace/WATT/libs/tau-wysiwig/node_modules/mocha/lib/cli/run-helpers.js:108:16)
    at exports.runMocha (/home/k.kobiela/Workspace/WATT/libs/tau-wysiwig/node_modules/mocha/lib/cli/run-helpers.js:142:13)
    at Object.exports.handler.argv [as handler] (/home/k.kobiela/Workspace/WATT/libs/tau-wysiwig/node_modules/mocha/lib/cli/run.js:292:3)
    at Object.runCommand (/home/k.kobiela/Workspace/WATT/libs/tau-wysiwig/node_modules/yargs/lib/command.js:242:26)
    at Object.parseArgs [as _parseArgs] (/home/k.kobiela/Workspace/WATT/libs/tau-wysiwig/node_modules/yargs/yargs.js:1104:24)
    at Object.parse (/home/k.kobiela/Workspace/WATT/libs/tau-wysiwig/node_modules/yargs/yargs.js:566:25)
    at Object.exports.main (/home/k.kobiela/Workspace/WATT/libs/tau-wysiwig/node_modules/mocha/lib/cli/cli.js:68:6)
    at Object.<anonymous> (/home/k.kobiela/Workspace/WATT/libs/tau-wysiwig/node_modules/mocha/bin/mocha:164:29)
    at Module._compile (internal/modules/cjs/loader.js:799:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:810:10)
    at Module.load (internal/modules/cjs/loader.js:666:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:606:12)
    at Function.Module._load (internal/modules/cjs/loader.js:598:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:862:12)
    at internal/main/run_main_module.js:21:11
@korneliakobiela korneliakobiela added the bug Something isn't working label Feb 24, 2020
@korneliakobiela
Copy link
Author

I've tried to install new jsdom package. It wasn't worked but after some research, I found some helper package. https://www.npmjs.com/package/happy-dom

It should work I think I will do it tomorrow.

@korneliakobiela korneliakobiela added the environment Changes in development environment label Feb 24, 2020
@korneliakobiela korneliakobiela self-assigned this Feb 25, 2020
@korneliakobiela korneliakobiela added the in progress Someone is now working on this issue label Feb 25, 2020
@korneliakobiela
Copy link
Author

The issue is more complicated. We need to implement our test system on Karma. There isn't another software to Unit Test Web Components. So it looks like one week of work to configure all environment. For this reason, I'll switch to make DE work not only in DEMO mode instead of it.

@korneliakobiela korneliakobiela removed the in progress Someone is now working on this issue label Feb 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working environment Changes in development environment
Projects
None yet
Development

No branches or pull requests

1 participant