web-component-tester | Moved to Polymer/tools monorepo | Web Framework library
kandi X-RAY | web-component-tester Summary
kandi X-RAY | web-component-tester Summary
Moved to Polymer/tools monorepo
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of web-component-tester
web-component-tester Key Features
web-component-tester Examples and Code Snippets
Community Discussions
Trending Discussions on web-component-tester
QUESTION
I'm using Gitlab as a CI/CD tool for my project and, I'm having this error trying to run the tests:
...ANSWER
Answered 2020-Mar-25 at 08:35Looks like you need to build your own image. Start with node:latest (Debian based) and add Chromium/Firefox.
QUESTION
I am trying to find some good way to unit test m y vanilla webcomponents and I am trying this approach open-wc and I am getting error mentioned above
my-component-test.js
...ANSWER
Answered 2019-Jul-17 at 13:05You should try to add ./
if the @open-wc
is in the main public folder:
QUESTION
I am struggling to find someway approach to test my vanilla webcomponents. I found someone trying the same and I try to reproduce exactly his steps and the answer accepted (Web Component / HtmlElement : unit testing).
I can't imagine a reason for not finding the test. It seems it looks in wrong place. If so, maybe the answer to my question will be how to edit the path to in wct.conf.js to find the real test (I am not sure it is the root cause but it is my best in front of the error provided).
wct.conf.js
...ANSWER
Answered 2019-Jul-16 at 21:33I stumbled in the answer in Specify browser location for wct-local test. It is different question (it is regard using gulp) but I noticed something different from my wct.conf.js which I gave a try and it in https://github.com/jimisdrpc/basic-vanilla-webcomponent now unit testing working with wct. What I changed was instead of
QUESTION
I am trying to generate an iron-ajax
request and run a test on its response in Polymer 2.x with using the Mocha test suite.
However, when running this test I get the following error:
...Cannot read property 'generateRequest' of undefined Context. at my-test.html:25
ANSWER
Answered 2019-Jun-28 at 12:56I would advice to use fetch for this. It also will send an ajax call and is native to your browser.
QUESTION
I'm trying to test a web component. Here is my project structure :
...ANSWER
Answered 2018-Nov-25 at 20:23There are many errors :
- First, please read the whole documentation as in the last paragraph it's clear that for those who use
npm
you need an additional dependency through thewctPackageName
:
Components which wish to support npm-based installation should include wct-browser-legacy in their devDependencies, which is a package that contains only the client-side javascript necessary for executing WCT tests in an npm-based environment. WCT will attempt to identify which package provides the client-side code by checking for compatible packages in the following order of preference: wct-mocha, wct-browser-legacy and web-component-tester. If you want to specify which package provides WCT client-side code, use the --wct-package-name flag or wctPackageName option in wct.conf.json with the npm package name.
So you will need to add wct-browser-legacy
in your devDependencies
- Giving your project structure, you are including the
app.js
as if it was at the same level. It should be../src/app.js
. - You should add the
type="module"
to that import - You declared a fixture but didn't take profit of it through the function
fixture
If I had to correct your code :
- The command should be
wct --npm -wct-package-name=wct-browser-legacy
. Or even better create awct.conf.js
file with the following information :
QUESTION
I could'not simulate a simple press enter in a paper-input using MockInteractions.pressEnter inside a web-component-tester test case.
When I press enter with a true keyboard it do the job.
Here is my code, does anyone has an idea or a work around?
...ANSWER
Answered 2017-Feb-22 at 13:59I found a solution. When I listen on key down event the event is correctly catch.
It's a missing feature in MockInteractions.
QUESTION
I want to run tests without the browser pop-up.Installed wct-headless and configured wct.config.json as shown
...ANSWER
Answered 2018-Sep-14 at 14:01No need to install wct-headless
. Just create file wct.conf.json
with the following content:
QUESTION
I am trying to get a11ySuite
in Polymer 3.0 tests to work.
When I am running the test with polymer test
, the tests times out, and I can see in the console of the automated browser the following error:
ANSWER
Answered 2018-May-24 at 23:25a11ySuite
was moved to wct-browser-legacy
as of web-component-tester
version 6.4.3. Given the "legacy" naming, I'm guessing it's deprecated. I assume it's used like this:
QUESTION
WCT is not able to detect google chrome browser in Redhat Linux when running
polymer test --skip-selenium-install
and is throwing below error:
...ANSWER
Answered 2018-May-04 at 07:09I've tried to debug further and found that we are not able to launch google-chrome in docker container which is throwing an error Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitted
Trace/breakpoint trap (core dumped)
.
So while investigating the issue I found that there was an issue in chrome which prevents chrome to startup in docker environment. run google chrome headless in docker.
With all these options now I managed to resolve this issue.
I'm using configuration file for WCT and passing the --no-sandbox
option in config file.
So now WCT is launching google-chrome
My wct.conf.json
file is
QUESTION
I have a question with loading polymer element. When i configure my bower.json
file dependency not loading correctly.
Here is my bower.json file:
...ANSWER
Answered 2018-Apr-30 at 07:09By looking at the other dependencies you're loading from the same directory, I would say that the path is case sensitive, and that for app-layout
you only used lower case letters, instead of the PascalCase format, so maybe you should try:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install web-component-tester
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page