Web-Components-Tester is a unit-test harness that makes testing your Polymer Web components a breeze!
Questions tagged [wct]
33 questions
7
votes
1 answer
Unit testing dynamically-rendered elements in Polymer
Overview
DOM elements that are dynamically-rendered within dom-if, dom-repeat seem to be rendered asynchronously thus making unit-testing a bit of a pain.
The Polymer Component
template(is='dom-if', if='{{!defaultPrintAll}}')
…

nicholaswmin
- 21,686
- 15
- 91
- 167
5
votes
2 answers
How to measure common coverage for Polymer components + .js files?
How to measure common coverage for Polymer components with all .js files in solution (for non-component tests QUnit is used)?
I tried karma-coverage, but it works only for .js files.

Julia Savinkova
- 573
- 8
- 18
4
votes
1 answer
Code coverage of Polymer Application with WCT
I have the sapplication developed in Polymer and unit testing with WCT. I want to generate the code coverage report for that.
I tried with the istanbul(web-component-tester-istanbul), but it is not supporting it, I am using Polymer Version 1.2.
And…

Anita Mehta
- 625
- 2
- 13
- 30
3
votes
0 answers
Cannot read property 'match' of undefined at testing polymer
I'm trying to run tests using polymer CLI in the command line using $ polymer test, but i'm getting this error:
TypeError: Cannot read property 'match' of undefined
error: cli runtime exception: TypeError: Cannot read property 'match' of…

mumumilk
- 170
- 2
- 7
3
votes
0 answers
WCT script failing outside test with : 'Error thrown outside of test function'
I have a custom polymer element which creates another polymer element in its properties. The code is as such :
Polymer({
is: 'pg-create-ad-new',
properties:{
creative: {
type: "String"
},
storyId: {
type: "String",
value: ()=>{
…

Kumar Pratyush
- 71
- 5
3
votes
1 answer
Polymer Webcomponent Tester (WCT) XVFB unable to connect to selenium
I am getting this error on ubuntu when we use XVFB to load WCT test. The test goes through fine the first time however, when we run the second time it fails.
Looks like its missing HTMLunit Driver. I tried installing unit driver but could not fix.…

Srikanth Kondaparthy
- 3,247
- 3
- 16
- 19
3
votes
0 answers
MockInteractions tap on item doesn't select the item in web component tester
I have an element that populates a with a .
I want to test that once I add something in the , I can select it and that it updates a property as expected.

Nicolas
- 2,191
- 3
- 29
- 49
2
votes
1 answer
during wct test: Failed to load resource: the server responded with a status of 404 (Not Found)
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…

Jim C
- 3,957
- 25
- 85
- 162
2
votes
0 answers
Polymer Tests fail waiting for the driver server to start
I am following polymer's (2.0) official tutorial to run and test a sample application. When running the tests using polymer test or polymer test -l chrome, the following error shows up:
Tests failed:…

Kishan Kishore
- 451
- 6
- 12
2
votes
0 answers
Polymer Web Component Tester Unable to connect to selenium
I am running Polymer Web Component Tester on a simple Polymer 2.x application template and get the following output:
hook: prepare
hook: prepare:selenium
Starting Selenium server for local browsers
15:00:30.747 INFO - Selenium build info: version:…

Joseph
- 21
- 1
2
votes
0 answers
setting up unit test involving observer
i'm having trouble figuring out how to approach writing a unit test for a few methods involving an observer. I have an Iron-pages element that is set up like this
selected="[[page]]"
attr-for-selected="name"
…

cbald24
- 55
- 1
- 6
2
votes
0 answers
WCT Testing Polymer Examples
Just discovered how powerful WCT testing is. Should have been doing it a long time ago. We use 100% Polymer for SPAs without any other frameworks.
Seems there would be a need for examples of how to test typical features of a Polymer App or…

Dean
- 21
- 1
1
vote
0 answers
web component test not running, command line gives error, wct is not a command
I just install web-component-tester by npm and trying to run test by wct command, but getting error.
WCT command is not working cmd is not recognizing this command
Title

Hussain Shahid
- 131
- 2
- 5
1
vote
0 answers
how run web-component-tester to test a vanilla web-component without depending on bower
I found some similar question in GIT but using Polymer and I am not using it at all.
I pasted bellow the error I got and how I am trying so far.
My test file: